@Override public StringAttributeConstraintsType build() { return new StringAttributeConstraintsType(this); }
public final StringAttributeConstraintsType.Builder getStringAttributeConstraints() { return stringAttributeConstraints != null ? stringAttributeConstraints.toBuilder() : null; }
/** * <p> * Specifies the constraints for an attribute of the string type. * </p> * This is a convenience that creates an instance of the {@link StringAttributeConstraintsType.Builder} avoiding * the need to create one manually via {@link StringAttributeConstraintsType#builder()}. * * When the {@link Consumer} completes, {@link StringAttributeConstraintsType.Builder#build()} is called * immediately and its result is passed to {@link #stringAttributeConstraints(StringAttributeConstraintsType)}. * * @param stringAttributeConstraints * a consumer that will call methods on {@link StringAttributeConstraintsType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #stringAttributeConstraints(StringAttributeConstraintsType) */ default Builder stringAttributeConstraints(Consumer<StringAttributeConstraintsType.Builder> stringAttributeConstraints) { return stringAttributeConstraints(StringAttributeConstraintsType.builder().applyMutation(stringAttributeConstraints) .build()); } }
/** * <p> * Specifies the constraints for an attribute of the string type. * </p> * This is a convenience that creates an instance of the {@link StringAttributeConstraintsType.Builder} avoiding * the need to create one manually via {@link StringAttributeConstraintsType#builder()}. * * When the {@link Consumer} completes, {@link StringAttributeConstraintsType.Builder#build()} is called * immediately and its result is passed to {@link #stringAttributeConstraints(StringAttributeConstraintsType)}. * * @param stringAttributeConstraints * a consumer that will call methods on {@link StringAttributeConstraintsType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #stringAttributeConstraints(StringAttributeConstraintsType) */ default Builder stringAttributeConstraints(Consumer<StringAttributeConstraintsType.Builder> stringAttributeConstraints) { return stringAttributeConstraints(StringAttributeConstraintsType.builder().applyMutation(stringAttributeConstraints) .build()); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof StringAttributeConstraintsType)) { return false; } StringAttributeConstraintsType other = (StringAttributeConstraintsType) obj; return Objects.equals(minLength(), other.minLength()) && Objects.equals(maxLength(), other.maxLength()); }
public StringAttributeConstraintsType unmarshall(JsonUnmarshallerContext context) throws Exception { StringAttributeConstraintsType.Builder stringAttributeConstraintsTypeBuilder = StringAttributeConstraintsType.builder();
@Override public StringAttributeConstraintsType build() { return new StringAttributeConstraintsType(this); } }
public final StringAttributeConstraintsType.Builder getStringAttributeConstraints() { return stringAttributeConstraints != null ? stringAttributeConstraints.toBuilder() : null; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof StringAttributeConstraintsType)) { return false; } StringAttributeConstraintsType other = (StringAttributeConstraintsType) obj; return Objects.equals(minLength(), other.minLength()) && Objects.equals(maxLength(), other.maxLength()); }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("StringAttributeConstraintsType").add("MinLength", minLength()).add("MaxLength", maxLength()) .build(); }
/** * Marshall the given parameter object */ public void marshall(StringAttributeConstraintsType stringAttributeConstraintsType, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(stringAttributeConstraintsType, "stringAttributeConstraintsType"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(stringAttributeConstraintsType.minLength(), MINLENGTH_BINDING); protocolMarshaller.marshall(stringAttributeConstraintsType.maxLength(), MAXLENGTH_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }