public AvailabilityZone unmarshall(JsonUnmarshallerContext context) throws Exception { AvailabilityZone.Builder availabilityZoneBuilder = AvailabilityZone.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 null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Name", targetDepth)) { context.nextToken(); availabilityZoneBuilder.name(context.getUnmarshaller(String.class).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 availabilityZoneBuilder.build(); }
/** * <p> * The Availability Zone of the subnet. * </p> * This is a convenience that creates an instance of the {@link AvailabilityZone.Builder} avoiding the need to * create one manually via {@link AvailabilityZone#builder()}. * * When the {@link Consumer} completes, {@link AvailabilityZone.Builder#build()} is called immediately and its * result is passed to {@link #subnetAvailabilityZone(AvailabilityZone)}. * * @param subnetAvailabilityZone * a consumer that will call methods on {@link AvailabilityZone.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #subnetAvailabilityZone(AvailabilityZone) */ default Builder subnetAvailabilityZone(Consumer<AvailabilityZone.Builder> subnetAvailabilityZone) { return subnetAvailabilityZone(AvailabilityZone.builder().applyMutation(subnetAvailabilityZone).build()); }
/** * <p> * The Availability Zone of the subnet. * </p> * This is a convenience that creates an instance of the {@link AvailabilityZone.Builder} avoiding the need to * create one manually via {@link AvailabilityZone#builder()}. * * When the {@link Consumer} completes, {@link AvailabilityZone.Builder#build()} is called immediately and its * result is passed to {@link #subnetAvailabilityZone(AvailabilityZone)}. * * @param subnetAvailabilityZone * a consumer that will call methods on {@link AvailabilityZone.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #subnetAvailabilityZone(AvailabilityZone) */ default Builder subnetAvailabilityZone(Consumer<AvailabilityZone.Builder> subnetAvailabilityZone) { return subnetAvailabilityZone(AvailabilityZone.builder().applyMutation(subnetAvailabilityZone).build()); }
/** * <p> * The Availability Zone of the subnet. * </p> * This is a convenience that creates an instance of the {@link AvailabilityZone.Builder} avoiding the need to * create one manually via {@link AvailabilityZone#builder()}. * * When the {@link Consumer} completes, {@link AvailabilityZone.Builder#build()} is called immediately and its * result is passed to {@link #subnetAvailabilityZone(AvailabilityZone)}. * * @param subnetAvailabilityZone * a consumer that will call methods on {@link AvailabilityZone.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #subnetAvailabilityZone(AvailabilityZone) */ default Builder subnetAvailabilityZone(Consumer<AvailabilityZone.Builder> subnetAvailabilityZone) { return subnetAvailabilityZone(AvailabilityZone.builder().applyMutation(subnetAvailabilityZone).build()); }