public UpdateGroupResponse unmarshall(JsonUnmarshallerContext context) throws Exception { UpdateGroupResponse.Builder updateGroupResponseBuilder = UpdateGroupResponse.builder(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return updateGroupResponseBuilder.build(); } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Group", targetDepth)) { context.nextToken(); updateGroupResponseBuilder.group(GroupTypeUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return updateGroupResponseBuilder.build(); }
/** * <p> * The group object for the group. * </p> * This is a convenience that creates an instance of the {@link GroupType.Builder} avoiding the need to create * one manually via {@link GroupType#builder()}. * * When the {@link Consumer} completes, {@link GroupType.Builder#build()} is called immediately and its result * is passed to {@link #group(GroupType)}. * * @param group * a consumer that will call methods on {@link GroupType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #group(GroupType) */ default Builder group(Consumer<GroupType.Builder> group) { return group(GroupType.builder().applyMutation(group).build()); } }
/** * <p> * The group object for the group. * </p> * This is a convenience that creates an instance of the {@link GroupType.Builder} avoiding the need to create * one manually via {@link GroupType#builder()}. * * When the {@link Consumer} completes, {@link GroupType.Builder#build()} is called immediately and its result * is passed to {@link #group(GroupType)}. * * @param group * a consumer that will call methods on {@link GroupType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #group(GroupType) */ default Builder group(Consumer<GroupType.Builder> group) { return group(GroupType.builder().applyMutation(group).build()); } }