public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "SourceArn": return Optional.ofNullable(clazz.cast(sourceArn())); case "ReplyToEmailAddress": return Optional.ofNullable(clazz.cast(replyToEmailAddress())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "SourceArn": return Optional.ofNullable(clazz.cast(sourceArn())); case "ReplyToEmailAddress": return Optional.ofNullable(clazz.cast(replyToEmailAddress())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(sourceArn()); hashCode = 31 * hashCode + Objects.hashCode(replyToEmailAddress()); return hashCode; }
/** * 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("EmailConfigurationType").add("SourceArn", sourceArn()) .add("ReplyToEmailAddress", replyToEmailAddress()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(sourceArn()); hashCode = 31 * hashCode + Objects.hashCode(replyToEmailAddress()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof EmailConfigurationType)) { return false; } EmailConfigurationType other = (EmailConfigurationType) obj; return Objects.equals(sourceArn(), other.sourceArn()) && Objects.equals(replyToEmailAddress(), other.replyToEmailAddress()); }
@Override public String toString() { return ToString.builder("EmailConfigurationType").add("SourceArn", sourceArn()) .add("ReplyToEmailAddress", replyToEmailAddress()).build(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof EmailConfigurationType)) { return false; } EmailConfigurationType other = (EmailConfigurationType) obj; return Objects.equals(sourceArn(), other.sourceArn()) && Objects.equals(replyToEmailAddress(), other.replyToEmailAddress()); }
/** * Marshall the given parameter object */ public void marshall(EmailConfigurationType emailConfigurationType, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(emailConfigurationType, "emailConfigurationType"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(emailConfigurationType.sourceArn(), SOURCEARN_BINDING); protocolMarshaller.marshall(emailConfigurationType.replyToEmailAddress(), REPLYTOEMAILADDRESS_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }