/** * 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("ConfirmDeviceRequest") .add("AccessToken", accessToken() == null ? null : "*** Sensitive Data Redacted ***") .add("DeviceKey", deviceKey()).add("DeviceSecretVerifierConfig", deviceSecretVerifierConfig()) .add("DeviceName", deviceName()).build(); }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "AccessToken": return Optional.ofNullable(clazz.cast(accessToken())); case "DeviceKey": return Optional.ofNullable(clazz.cast(deviceKey())); case "DeviceSecretVerifierConfig": return Optional.ofNullable(clazz.cast(deviceSecretVerifierConfig())); case "DeviceName": return Optional.ofNullable(clazz.cast(deviceName())); default: return Optional.empty(); } }
@Override public String toString() { return ToString.builder("ConfirmDeviceRequest").add("AccessToken", accessToken()).add("DeviceKey", deviceKey()) .add("DeviceSecretVerifierConfig", deviceSecretVerifierConfig()).add("DeviceName", deviceName()).build(); }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "AccessToken": return Optional.ofNullable(clazz.cast(accessToken())); case "DeviceKey": return Optional.ofNullable(clazz.cast(deviceKey())); case "DeviceSecretVerifierConfig": return Optional.ofNullable(clazz.cast(deviceSecretVerifierConfig())); case "DeviceName": return Optional.ofNullable(clazz.cast(deviceName())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(accessToken()); hashCode = 31 * hashCode + Objects.hashCode(deviceKey()); hashCode = 31 * hashCode + Objects.hashCode(deviceSecretVerifierConfig()); hashCode = 31 * hashCode + Objects.hashCode(deviceName()); return hashCode; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(accessToken()); hashCode = 31 * hashCode + Objects.hashCode(deviceKey()); hashCode = 31 * hashCode + Objects.hashCode(deviceSecretVerifierConfig()); hashCode = 31 * hashCode + Objects.hashCode(deviceName()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ConfirmDeviceRequest)) { return false; } ConfirmDeviceRequest other = (ConfirmDeviceRequest) obj; return Objects.equals(accessToken(), other.accessToken()) && Objects.equals(deviceKey(), other.deviceKey()) && Objects.equals(deviceSecretVerifierConfig(), other.deviceSecretVerifierConfig()) && Objects.equals(deviceName(), other.deviceName()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ConfirmDeviceRequest)) { return false; } ConfirmDeviceRequest other = (ConfirmDeviceRequest) obj; return Objects.equals(accessToken(), other.accessToken()) && Objects.equals(deviceKey(), other.deviceKey()) && Objects.equals(deviceSecretVerifierConfig(), other.deviceSecretVerifierConfig()) && Objects.equals(deviceName(), other.deviceName()); }
/** * Marshall the given parameter object */ public void marshall(ConfirmDeviceRequest confirmDeviceRequest, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(confirmDeviceRequest, "confirmDeviceRequest"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(confirmDeviceRequest.accessToken(), ACCESSTOKEN_BINDING); protocolMarshaller.marshall(confirmDeviceRequest.deviceKey(), DEVICEKEY_BINDING); protocolMarshaller.marshall(confirmDeviceRequest.deviceSecretVerifierConfig(), DEVICESECRETVERIFIERCONFIG_BINDING); protocolMarshaller.marshall(confirmDeviceRequest.deviceName(), DEVICENAME_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }