com.amazonaws.services.redshift.model.AssociateDataShareConsumerRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-redshift Show documentation
/*
* Copyright 2017-2022 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.redshift.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AssociateDataShareConsumerRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.
*
*/
private String dataShareArn;
/**
*
* A value that specifies whether the datashare is associated with the entire account.
*
*/
private Boolean associateEntireAccount;
/**
*
* The Amazon Resource Name (ARN) of the consumer that is associated with the datashare.
*
*/
private String consumerArn;
/**
*
* The Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.
*
*
* @param dataShareArn
* The Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the
* namespace.
*/
public void setDataShareArn(String dataShareArn) {
this.dataShareArn = dataShareArn;
}
/**
*
* The Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.
*
*
* @return The Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the
* namespace.
*/
public String getDataShareArn() {
return this.dataShareArn;
}
/**
*
* The Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.
*
*
* @param dataShareArn
* The Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the
* namespace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AssociateDataShareConsumerRequest withDataShareArn(String dataShareArn) {
setDataShareArn(dataShareArn);
return this;
}
/**
*
* A value that specifies whether the datashare is associated with the entire account.
*
*
* @param associateEntireAccount
* A value that specifies whether the datashare is associated with the entire account.
*/
public void setAssociateEntireAccount(Boolean associateEntireAccount) {
this.associateEntireAccount = associateEntireAccount;
}
/**
*
* A value that specifies whether the datashare is associated with the entire account.
*
*
* @return A value that specifies whether the datashare is associated with the entire account.
*/
public Boolean getAssociateEntireAccount() {
return this.associateEntireAccount;
}
/**
*
* A value that specifies whether the datashare is associated with the entire account.
*
*
* @param associateEntireAccount
* A value that specifies whether the datashare is associated with the entire account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AssociateDataShareConsumerRequest withAssociateEntireAccount(Boolean associateEntireAccount) {
setAssociateEntireAccount(associateEntireAccount);
return this;
}
/**
*
* A value that specifies whether the datashare is associated with the entire account.
*
*
* @return A value that specifies whether the datashare is associated with the entire account.
*/
public Boolean isAssociateEntireAccount() {
return this.associateEntireAccount;
}
/**
*
* The Amazon Resource Name (ARN) of the consumer that is associated with the datashare.
*
*
* @param consumerArn
* The Amazon Resource Name (ARN) of the consumer that is associated with the datashare.
*/
public void setConsumerArn(String consumerArn) {
this.consumerArn = consumerArn;
}
/**
*
* The Amazon Resource Name (ARN) of the consumer that is associated with the datashare.
*
*
* @return The Amazon Resource Name (ARN) of the consumer that is associated with the datashare.
*/
public String getConsumerArn() {
return this.consumerArn;
}
/**
*
* The Amazon Resource Name (ARN) of the consumer that is associated with the datashare.
*
*
* @param consumerArn
* The Amazon Resource Name (ARN) of the consumer that is associated with the datashare.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AssociateDataShareConsumerRequest withConsumerArn(String consumerArn) {
setConsumerArn(consumerArn);
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 (getDataShareArn() != null)
sb.append("DataShareArn: ").append(getDataShareArn()).append(",");
if (getAssociateEntireAccount() != null)
sb.append("AssociateEntireAccount: ").append(getAssociateEntireAccount()).append(",");
if (getConsumerArn() != null)
sb.append("ConsumerArn: ").append(getConsumerArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AssociateDataShareConsumerRequest == false)
return false;
AssociateDataShareConsumerRequest other = (AssociateDataShareConsumerRequest) obj;
if (other.getDataShareArn() == null ^ this.getDataShareArn() == null)
return false;
if (other.getDataShareArn() != null && other.getDataShareArn().equals(this.getDataShareArn()) == false)
return false;
if (other.getAssociateEntireAccount() == null ^ this.getAssociateEntireAccount() == null)
return false;
if (other.getAssociateEntireAccount() != null && other.getAssociateEntireAccount().equals(this.getAssociateEntireAccount()) == false)
return false;
if (other.getConsumerArn() == null ^ this.getConsumerArn() == null)
return false;
if (other.getConsumerArn() != null && other.getConsumerArn().equals(this.getConsumerArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDataShareArn() == null) ? 0 : getDataShareArn().hashCode());
hashCode = prime * hashCode + ((getAssociateEntireAccount() == null) ? 0 : getAssociateEntireAccount().hashCode());
hashCode = prime * hashCode + ((getConsumerArn() == null) ? 0 : getConsumerArn().hashCode());
return hashCode;
}
@Override
public AssociateDataShareConsumerRequest clone() {
return (AssociateDataShareConsumerRequest) super.clone();
}
}