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