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