/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.cognitoidp.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* A container for IdP details. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProviderDescription implements Serializable, Cloneable, StructuredPojo { /** *

* The IdP name. *

*/ private String providerName; /** *

* The IdP type. *

*/ private String providerType; /** *

* The date the provider was last modified. *

*/ private java.util.Date lastModifiedDate; /** *

* The date the provider was added to the user pool. *

*/ private java.util.Date creationDate; /** *

* The IdP name. *

* * @param providerName * The IdP name. */ public void setProviderName(String providerName) { this.providerName = providerName; } /** *

* The IdP name. *

* * @return The IdP name. */ public String getProviderName() { return this.providerName; } /** *

* The IdP name. *

* * @param providerName * The IdP name. * @return Returns a reference to this object so that method calls can be chained together. */ public ProviderDescription withProviderName(String providerName) { setProviderName(providerName); return this; } /** *

* The IdP type. *

* * @param providerType * The IdP type. * @see IdentityProviderTypeType */ public void setProviderType(String providerType) { this.providerType = providerType; } /** *

* The IdP type. *

* * @return The IdP type. * @see IdentityProviderTypeType */ public String getProviderType() { return this.providerType; } /** *

* The IdP type. *

* * @param providerType * The IdP type. * @return Returns a reference to this object so that method calls can be chained together. * @see IdentityProviderTypeType */ public ProviderDescription withProviderType(String providerType) { setProviderType(providerType); return this; } /** *

* The IdP type. *

* * @param providerType * The IdP type. * @see IdentityProviderTypeType */ public void setProviderType(IdentityProviderTypeType providerType) { withProviderType(providerType); } /** *

* The IdP type. *

* * @param providerType * The IdP type. * @return Returns a reference to this object so that method calls can be chained together. * @see IdentityProviderTypeType */ public ProviderDescription withProviderType(IdentityProviderTypeType providerType) { this.providerType = providerType.toString(); return this; } /** *

* The date the provider was last modified. *

* * @param lastModifiedDate * The date the provider was last modified. */ public void setLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** *

* The date the provider was last modified. *

* * @return The date the provider was last modified. */ public java.util.Date getLastModifiedDate() { return this.lastModifiedDate; } /** *

* The date the provider was last modified. *

* * @param lastModifiedDate * The date the provider was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ public ProviderDescription withLastModifiedDate(java.util.Date lastModifiedDate) { setLastModifiedDate(lastModifiedDate); return this; } /** *

* The date the provider was added to the user pool. *

* * @param creationDate * The date the provider was added to the user pool. */ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** *

* The date the provider was added to the user pool. *

* * @return The date the provider was added to the user pool. */ public java.util.Date getCreationDate() { return this.creationDate; } /** *

* The date the provider was added to the user pool. *

* * @param creationDate * The date the provider was added to the user pool. * @return Returns a reference to this object so that method calls can be chained together. */ public ProviderDescription withCreationDate(java.util.Date creationDate) { setCreationDate(creationDate); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getProviderName() != null) sb.append("ProviderName: ").append(getProviderName()).append(","); if (getProviderType() != null) sb.append("ProviderType: ").append(getProviderType()).append(","); if (getLastModifiedDate() != null) sb.append("LastModifiedDate: ").append(getLastModifiedDate()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProviderDescription == false) return false; ProviderDescription other = (ProviderDescription) obj; if (other.getProviderName() == null ^ this.getProviderName() == null) return false; if (other.getProviderName() != null && other.getProviderName().equals(this.getProviderName()) == false) return false; if (other.getProviderType() == null ^ this.getProviderType() == null) return false; if (other.getProviderType() != null && other.getProviderType().equals(this.getProviderType()) == false) return false; if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null) return false; if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false) return false; if (other.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProviderName() == null) ? 0 : getProviderName().hashCode()); hashCode = prime * hashCode + ((getProviderType() == null) ? 0 : getProviderType().hashCode()); hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); return hashCode; } @Override public ProviderDescription clone() { try { return (ProviderDescription) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.cognitoidp.model.transform.ProviderDescriptionMarshaller.getInstance().marshall(this, protocolMarshaller); } }