All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.quicksight.model.DataSourceCredentials Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon QuickSight module holds the client classes that are used for communicating with Amazon QuickSight Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.quicksight.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Data source credentials. This is a variant type structure. For this structure to be valid, only one of the attributes * can be non-null. *

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

* Credential pair. For more information, see * CredentialPair * . *

*/ private CredentialPair credentialPair; /** *

* The Amazon Resource Name (ARN) of a data source that has the credential pair that you want to use. When * CopySourceArn is not null, the credential pair from the data source in the ARN is used as the * credentials for the DataSourceCredentials structure. *

*/ private String copySourceArn; /** *

* The Amazon Resource Name (ARN) of the secret associated with the data source in Amazon Secrets Manager. *

*/ private String secretArn; /** *

* Credential pair. For more information, see * CredentialPair * . *

* * @param credentialPair * Credential pair. For more information, see * CredentialPair * . */ public void setCredentialPair(CredentialPair credentialPair) { this.credentialPair = credentialPair; } /** *

* Credential pair. For more information, see * CredentialPair * . *

* * @return Credential pair. For more information, see * CredentialPair * . */ public CredentialPair getCredentialPair() { return this.credentialPair; } /** *

* Credential pair. For more information, see * CredentialPair * . *

* * @param credentialPair * Credential pair. For more information, see * CredentialPair * . * @return Returns a reference to this object so that method calls can be chained together. */ public DataSourceCredentials withCredentialPair(CredentialPair credentialPair) { setCredentialPair(credentialPair); return this; } /** *

* The Amazon Resource Name (ARN) of a data source that has the credential pair that you want to use. When * CopySourceArn is not null, the credential pair from the data source in the ARN is used as the * credentials for the DataSourceCredentials structure. *

* * @param copySourceArn * The Amazon Resource Name (ARN) of a data source that has the credential pair that you want to use. When * CopySourceArn is not null, the credential pair from the data source in the ARN is used as the * credentials for the DataSourceCredentials structure. */ public void setCopySourceArn(String copySourceArn) { this.copySourceArn = copySourceArn; } /** *

* The Amazon Resource Name (ARN) of a data source that has the credential pair that you want to use. When * CopySourceArn is not null, the credential pair from the data source in the ARN is used as the * credentials for the DataSourceCredentials structure. *

* * @return The Amazon Resource Name (ARN) of a data source that has the credential pair that you want to use. When * CopySourceArn is not null, the credential pair from the data source in the ARN is used as * the credentials for the DataSourceCredentials structure. */ public String getCopySourceArn() { return this.copySourceArn; } /** *

* The Amazon Resource Name (ARN) of a data source that has the credential pair that you want to use. When * CopySourceArn is not null, the credential pair from the data source in the ARN is used as the * credentials for the DataSourceCredentials structure. *

* * @param copySourceArn * The Amazon Resource Name (ARN) of a data source that has the credential pair that you want to use. When * CopySourceArn is not null, the credential pair from the data source in the ARN is used as the * credentials for the DataSourceCredentials structure. * @return Returns a reference to this object so that method calls can be chained together. */ public DataSourceCredentials withCopySourceArn(String copySourceArn) { setCopySourceArn(copySourceArn); return this; } /** *

* The Amazon Resource Name (ARN) of the secret associated with the data source in Amazon Secrets Manager. *

* * @param secretArn * The Amazon Resource Name (ARN) of the secret associated with the data source in Amazon Secrets Manager. */ public void setSecretArn(String secretArn) { this.secretArn = secretArn; } /** *

* The Amazon Resource Name (ARN) of the secret associated with the data source in Amazon Secrets Manager. *

* * @return The Amazon Resource Name (ARN) of the secret associated with the data source in Amazon Secrets Manager. */ public String getSecretArn() { return this.secretArn; } /** *

* The Amazon Resource Name (ARN) of the secret associated with the data source in Amazon Secrets Manager. *

* * @param secretArn * The Amazon Resource Name (ARN) of the secret associated with the data source in Amazon Secrets Manager. * @return Returns a reference to this object so that method calls can be chained together. */ public DataSourceCredentials withSecretArn(String secretArn) { setSecretArn(secretArn); 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 (getCredentialPair() != null) sb.append("CredentialPair: ").append(getCredentialPair()).append(","); if (getCopySourceArn() != null) sb.append("CopySourceArn: ").append(getCopySourceArn()).append(","); if (getSecretArn() != null) sb.append("SecretArn: ").append(getSecretArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DataSourceCredentials == false) return false; DataSourceCredentials other = (DataSourceCredentials) obj; if (other.getCredentialPair() == null ^ this.getCredentialPair() == null) return false; if (other.getCredentialPair() != null && other.getCredentialPair().equals(this.getCredentialPair()) == false) return false; if (other.getCopySourceArn() == null ^ this.getCopySourceArn() == null) return false; if (other.getCopySourceArn() != null && other.getCopySourceArn().equals(this.getCopySourceArn()) == false) return false; if (other.getSecretArn() == null ^ this.getSecretArn() == null) return false; if (other.getSecretArn() != null && other.getSecretArn().equals(this.getSecretArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCredentialPair() == null) ? 0 : getCredentialPair().hashCode()); hashCode = prime * hashCode + ((getCopySourceArn() == null) ? 0 : getCopySourceArn().hashCode()); hashCode = prime * hashCode + ((getSecretArn() == null) ? 0 : getSecretArn().hashCode()); return hashCode; } @Override public DataSourceCredentials clone() { try { return (DataSourceCredentials) 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.quicksight.model.transform.DataSourceCredentialsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy