public DescribeUserPoolResponse unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeUserPoolResponse.Builder describeUserPoolResponseBuilder = DescribeUserPoolResponse.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 describeUserPoolResponseBuilder.build(); } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("UserPool", targetDepth)) { context.nextToken(); describeUserPoolResponseBuilder.userPool(UserPoolTypeUnmarshaller.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 describeUserPoolResponseBuilder.build(); }
/** * <p> * The container of metadata returned by the server to describe the pool. * </p> * This is a convenience that creates an instance of the {@link UserPoolType.Builder} avoiding the need to * create one manually via {@link UserPoolType#builder()}. * * When the {@link Consumer} completes, {@link UserPoolType.Builder#build()} is called immediately and its * result is passed to {@link #userPool(UserPoolType)}. * * @param userPool * a consumer that will call methods on {@link UserPoolType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #userPool(UserPoolType) */ default Builder userPool(Consumer<UserPoolType.Builder> userPool) { return userPool(UserPoolType.builder().applyMutation(userPool).build()); } }
/** * <p> * The container of metadata returned by the server to describe the pool. * </p> * This is a convenience that creates an instance of the {@link UserPoolType.Builder} avoiding the need to * create one manually via {@link UserPoolType#builder()}. * * When the {@link Consumer} completes, {@link UserPoolType.Builder#build()} is called immediately and its * result is passed to {@link #userPool(UserPoolType)}. * * @param userPool * a consumer that will call methods on {@link UserPoolType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #userPool(UserPoolType) */ default Builder userPool(Consumer<UserPoolType.Builder> userPool) { return userPool(UserPoolType.builder().applyMutation(userPool).build()); } }