/** * 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("GetApiKeysRequest").add("Position", position()).add("Limit", limit()) .add("NameQuery", nameQuery()).add("CustomerId", customerId()).add("IncludeValues", includeValues()).build(); }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "position": return Optional.ofNullable(clazz.cast(position())); case "limit": return Optional.ofNullable(clazz.cast(limit())); case "nameQuery": return Optional.ofNullable(clazz.cast(nameQuery())); case "customerId": return Optional.ofNullable(clazz.cast(customerId())); case "includeValues": return Optional.ofNullable(clazz.cast(includeValues())); 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("GetApiKeysRequest").add("Position", position()).add("Limit", limit()) .add("NameQuery", nameQuery()).add("CustomerId", customerId()).add("IncludeValues", includeValues()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(position()); hashCode = 31 * hashCode + Objects.hashCode(limit()); hashCode = 31 * hashCode + Objects.hashCode(nameQuery()); hashCode = 31 * hashCode + Objects.hashCode(customerId()); hashCode = 31 * hashCode + Objects.hashCode(includeValues()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "position": return Optional.ofNullable(clazz.cast(position())); case "limit": return Optional.ofNullable(clazz.cast(limit())); case "nameQuery": return Optional.ofNullable(clazz.cast(nameQuery())); case "customerId": return Optional.ofNullable(clazz.cast(customerId())); case "includeValues": return Optional.ofNullable(clazz.cast(includeValues())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(position()); hashCode = 31 * hashCode + Objects.hashCode(limit()); hashCode = 31 * hashCode + Objects.hashCode(nameQuery()); hashCode = 31 * hashCode + Objects.hashCode(customerId()); hashCode = 31 * hashCode + Objects.hashCode(includeValues()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetApiKeysRequest)) { return false; } GetApiKeysRequest other = (GetApiKeysRequest) obj; return Objects.equals(position(), other.position()) && Objects.equals(limit(), other.limit()) && Objects.equals(nameQuery(), other.nameQuery()) && Objects.equals(customerId(), other.customerId()) && Objects.equals(includeValues(), other.includeValues()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GetApiKeysRequest)) { return false; } GetApiKeysRequest other = (GetApiKeysRequest) obj; return Objects.equals(position(), other.position()) && Objects.equals(limit(), other.limit()) && Objects.equals(nameQuery(), other.nameQuery()) && Objects.equals(customerId(), other.customerId()) && Objects.equals(includeValues(), other.includeValues()); }
/** * Marshall the given parameter object */ public void marshall(GetApiKeysRequest getApiKeysRequest, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(getApiKeysRequest, "getApiKeysRequest"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(getApiKeysRequest.position(), POSITION_BINDING); protocolMarshaller.marshall(getApiKeysRequest.limit(), LIMIT_BINDING); protocolMarshaller.marshall(getApiKeysRequest.nameQuery(), NAMEQUERY_BINDING); protocolMarshaller.marshall(getApiKeysRequest.customerId(), CUSTOMERID_BINDING); protocolMarshaller.marshall(getApiKeysRequest.includeValues(), INCLUDEVALUES_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }