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