@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(minLength()); hashCode = 31 * hashCode + Objects.hashCode(maxLength()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "MinLength": return Optional.ofNullable(clazz.cast(minLength())); case "MaxLength": return Optional.ofNullable(clazz.cast(maxLength())); default: return Optional.empty(); } }
/** * 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(); }
@Override public String toString() { return ToString.builder("StringAttributeConstraintsType").add("MinLength", minLength()).add("MaxLength", maxLength()) .build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(minLength()); hashCode = 31 * hashCode + Objects.hashCode(maxLength()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "MinLength": return Optional.ofNullable(clazz.cast(minLength())); case "MaxLength": return Optional.ofNullable(clazz.cast(maxLength())); default: return Optional.empty(); } }
@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()); }
@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()); }
/** * 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(); } } }