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