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