/** * 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("CreateIdentityProviderRequest").add("UserPoolId", userPoolId()) .add("ProviderName", providerName()).add("ProviderType", providerTypeAsString()) .add("ProviderDetails", providerDetails()).add("AttributeMapping", attributeMapping()) .add("IdpIdentifiers", idpIdentifiers()).build(); }
@Override public String toString() { return ToString.builder("CreateIdentityProviderRequest").add("UserPoolId", userPoolId()) .add("ProviderName", providerName()).add("ProviderType", providerTypeAsString()) .add("ProviderDetails", providerDetails()).add("AttributeMapping", attributeMapping()) .add("IdpIdentifiers", idpIdentifiers()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(providerName()); hashCode = 31 * hashCode + Objects.hashCode(providerTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(providerDetails()); hashCode = 31 * hashCode + Objects.hashCode(attributeMapping()); hashCode = 31 * hashCode + Objects.hashCode(idpIdentifiers()); return hashCode; }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "UserPoolId": return Optional.ofNullable(clazz.cast(userPoolId())); case "ProviderName": return Optional.ofNullable(clazz.cast(providerName())); case "ProviderType": return Optional.ofNullable(clazz.cast(providerTypeAsString())); case "ProviderDetails": return Optional.ofNullable(clazz.cast(providerDetails())); case "AttributeMapping": return Optional.ofNullable(clazz.cast(attributeMapping())); case "IdpIdentifiers": return Optional.ofNullable(clazz.cast(idpIdentifiers())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "UserPoolId": return Optional.ofNullable(clazz.cast(userPoolId())); case "ProviderName": return Optional.ofNullable(clazz.cast(providerName())); case "ProviderType": return Optional.ofNullable(clazz.cast(providerTypeAsString())); case "ProviderDetails": return Optional.ofNullable(clazz.cast(providerDetails())); case "AttributeMapping": return Optional.ofNullable(clazz.cast(attributeMapping())); case "IdpIdentifiers": return Optional.ofNullable(clazz.cast(idpIdentifiers())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(userPoolId()); hashCode = 31 * hashCode + Objects.hashCode(providerName()); hashCode = 31 * hashCode + Objects.hashCode(providerTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(providerDetails()); hashCode = 31 * hashCode + Objects.hashCode(attributeMapping()); hashCode = 31 * hashCode + Objects.hashCode(idpIdentifiers()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateIdentityProviderRequest)) { return false; } CreateIdentityProviderRequest other = (CreateIdentityProviderRequest) obj; return Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(providerName(), other.providerName()) && Objects.equals(providerTypeAsString(), other.providerTypeAsString()) && Objects.equals(providerDetails(), other.providerDetails()) && Objects.equals(attributeMapping(), other.attributeMapping()) && Objects.equals(idpIdentifiers(), other.idpIdentifiers()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateIdentityProviderRequest)) { return false; } CreateIdentityProviderRequest other = (CreateIdentityProviderRequest) obj; return Objects.equals(userPoolId(), other.userPoolId()) && Objects.equals(providerName(), other.providerName()) && Objects.equals(providerTypeAsString(), other.providerTypeAsString()) && Objects.equals(providerDetails(), other.providerDetails()) && Objects.equals(attributeMapping(), other.attributeMapping()) && Objects.equals(idpIdentifiers(), other.idpIdentifiers()); }
/** * Marshall the given parameter object */ public void marshall(CreateIdentityProviderRequest createIdentityProviderRequest, ProtocolMarshaller protocolMarshaller) { Validate.paramNotNull(createIdentityProviderRequest, "createIdentityProviderRequest"); Validate.paramNotNull(protocolMarshaller, "protocolMarshaller"); try { protocolMarshaller.marshall(createIdentityProviderRequest.userPoolId(), USERPOOLID_BINDING); protocolMarshaller.marshall(createIdentityProviderRequest.providerName(), PROVIDERNAME_BINDING); protocolMarshaller.marshall(createIdentityProviderRequest.providerTypeAsString(), PROVIDERTYPE_BINDING); protocolMarshaller.marshall(createIdentityProviderRequest.providerDetails(), PROVIDERDETAILS_BINDING); protocolMarshaller.marshall(createIdentityProviderRequest.attributeMapping(), ATTRIBUTEMAPPING_BINDING); protocolMarshaller.marshall(createIdentityProviderRequest.idpIdentifiers(), IDPIDENTIFIERS_BINDING); } catch (Exception e) { throw SdkClientException.builder().message("Unable to marshall request to JSON: " + e.getMessage()).cause(e).build(); } } }