com.amazonaws.services.cleanrooms.model.ConfiguredTableAssociation Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cleanrooms Show documentation
/*
* Copyright 2019-2024 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.cleanrooms.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A configured table association links a configured table to a collaboration.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ConfiguredTableAssociation implements Serializable, Cloneable, StructuredPojo {
/**
*
* The unique ARN for the configured table association.
*
*/
private String arn;
/**
*
* The unique ID for the configured table association.
*
*/
private String id;
/**
*
* The unique ID for the configured table that the association refers to.
*
*/
private String configuredTableId;
/**
*
* The unique ARN for the configured table that the association refers to.
*
*/
private String configuredTableArn;
/**
*
* The unique ID for the membership this configured table association belongs to.
*
*/
private String membershipId;
/**
*
* The unique ARN for the membership this configured table association belongs to.
*
*/
private String membershipArn;
/**
*
* The service will assume this role to access catalog metadata and query the table.
*
*/
private String roleArn;
/**
*
* The name of the configured table association, in lowercase. The table is identified by this name when running
* protected queries against the underlying data.
*
*/
private String name;
/**
*
* A description of the configured table association.
*
*/
private String description;
/**
*
* The analysis rule types for the configured table association.
*
*/
private java.util.List analysisRuleTypes;
/**
*
* The time the configured table association was created.
*
*/
private java.util.Date createTime;
/**
*
* The time the configured table association was last updated.
*
*/
private java.util.Date updateTime;
/**
*
* The unique ARN for the configured table association.
*
*
* @param arn
* The unique ARN for the configured table association.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The unique ARN for the configured table association.
*
*
* @return The unique ARN for the configured table association.
*/
public String getArn() {
return this.arn;
}
/**
*
* The unique ARN for the configured table association.
*
*
* @param arn
* The unique ARN for the configured table association.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The unique ID for the configured table association.
*
*
* @param id
* The unique ID for the configured table association.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The unique ID for the configured table association.
*
*
* @return The unique ID for the configured table association.
*/
public String getId() {
return this.id;
}
/**
*
* The unique ID for the configured table association.
*
*
* @param id
* The unique ID for the configured table association.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withId(String id) {
setId(id);
return this;
}
/**
*
* The unique ID for the configured table that the association refers to.
*
*
* @param configuredTableId
* The unique ID for the configured table that the association refers to.
*/
public void setConfiguredTableId(String configuredTableId) {
this.configuredTableId = configuredTableId;
}
/**
*
* The unique ID for the configured table that the association refers to.
*
*
* @return The unique ID for the configured table that the association refers to.
*/
public String getConfiguredTableId() {
return this.configuredTableId;
}
/**
*
* The unique ID for the configured table that the association refers to.
*
*
* @param configuredTableId
* The unique ID for the configured table that the association refers to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withConfiguredTableId(String configuredTableId) {
setConfiguredTableId(configuredTableId);
return this;
}
/**
*
* The unique ARN for the configured table that the association refers to.
*
*
* @param configuredTableArn
* The unique ARN for the configured table that the association refers to.
*/
public void setConfiguredTableArn(String configuredTableArn) {
this.configuredTableArn = configuredTableArn;
}
/**
*
* The unique ARN for the configured table that the association refers to.
*
*
* @return The unique ARN for the configured table that the association refers to.
*/
public String getConfiguredTableArn() {
return this.configuredTableArn;
}
/**
*
* The unique ARN for the configured table that the association refers to.
*
*
* @param configuredTableArn
* The unique ARN for the configured table that the association refers to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withConfiguredTableArn(String configuredTableArn) {
setConfiguredTableArn(configuredTableArn);
return this;
}
/**
*
* The unique ID for the membership this configured table association belongs to.
*
*
* @param membershipId
* The unique ID for the membership this configured table association belongs to.
*/
public void setMembershipId(String membershipId) {
this.membershipId = membershipId;
}
/**
*
* The unique ID for the membership this configured table association belongs to.
*
*
* @return The unique ID for the membership this configured table association belongs to.
*/
public String getMembershipId() {
return this.membershipId;
}
/**
*
* The unique ID for the membership this configured table association belongs to.
*
*
* @param membershipId
* The unique ID for the membership this configured table association belongs to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withMembershipId(String membershipId) {
setMembershipId(membershipId);
return this;
}
/**
*
* The unique ARN for the membership this configured table association belongs to.
*
*
* @param membershipArn
* The unique ARN for the membership this configured table association belongs to.
*/
public void setMembershipArn(String membershipArn) {
this.membershipArn = membershipArn;
}
/**
*
* The unique ARN for the membership this configured table association belongs to.
*
*
* @return The unique ARN for the membership this configured table association belongs to.
*/
public String getMembershipArn() {
return this.membershipArn;
}
/**
*
* The unique ARN for the membership this configured table association belongs to.
*
*
* @param membershipArn
* The unique ARN for the membership this configured table association belongs to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withMembershipArn(String membershipArn) {
setMembershipArn(membershipArn);
return this;
}
/**
*
* The service will assume this role to access catalog metadata and query the table.
*
*
* @param roleArn
* The service will assume this role to access catalog metadata and query the table.
*/
public void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
/**
*
* The service will assume this role to access catalog metadata and query the table.
*
*
* @return The service will assume this role to access catalog metadata and query the table.
*/
public String getRoleArn() {
return this.roleArn;
}
/**
*
* The service will assume this role to access catalog metadata and query the table.
*
*
* @param roleArn
* The service will assume this role to access catalog metadata and query the table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withRoleArn(String roleArn) {
setRoleArn(roleArn);
return this;
}
/**
*
* The name of the configured table association, in lowercase. The table is identified by this name when running
* protected queries against the underlying data.
*
*
* @param name
* The name of the configured table association, in lowercase. The table is identified by this name when
* running protected queries against the underlying data.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the configured table association, in lowercase. The table is identified by this name when running
* protected queries against the underlying data.
*
*
* @return The name of the configured table association, in lowercase. The table is identified by this name when
* running protected queries against the underlying data.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the configured table association, in lowercase. The table is identified by this name when running
* protected queries against the underlying data.
*
*
* @param name
* The name of the configured table association, in lowercase. The table is identified by this name when
* running protected queries against the underlying data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withName(String name) {
setName(name);
return this;
}
/**
*
* A description of the configured table association.
*
*
* @param description
* A description of the configured table association.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the configured table association.
*
*
* @return A description of the configured table association.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the configured table association.
*
*
* @param description
* A description of the configured table association.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The analysis rule types for the configured table association.
*
*
* @return The analysis rule types for the configured table association.
* @see ConfiguredTableAssociationAnalysisRuleType
*/
public java.util.List getAnalysisRuleTypes() {
return analysisRuleTypes;
}
/**
*
* The analysis rule types for the configured table association.
*
*
* @param analysisRuleTypes
* The analysis rule types for the configured table association.
* @see ConfiguredTableAssociationAnalysisRuleType
*/
public void setAnalysisRuleTypes(java.util.Collection analysisRuleTypes) {
if (analysisRuleTypes == null) {
this.analysisRuleTypes = null;
return;
}
this.analysisRuleTypes = new java.util.ArrayList(analysisRuleTypes);
}
/**
*
* The analysis rule types for the configured table association.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAnalysisRuleTypes(java.util.Collection)} or {@link #withAnalysisRuleTypes(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param analysisRuleTypes
* The analysis rule types for the configured table association.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConfiguredTableAssociationAnalysisRuleType
*/
public ConfiguredTableAssociation withAnalysisRuleTypes(String... analysisRuleTypes) {
if (this.analysisRuleTypes == null) {
setAnalysisRuleTypes(new java.util.ArrayList(analysisRuleTypes.length));
}
for (String ele : analysisRuleTypes) {
this.analysisRuleTypes.add(ele);
}
return this;
}
/**
*
* The analysis rule types for the configured table association.
*
*
* @param analysisRuleTypes
* The analysis rule types for the configured table association.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConfiguredTableAssociationAnalysisRuleType
*/
public ConfiguredTableAssociation withAnalysisRuleTypes(java.util.Collection analysisRuleTypes) {
setAnalysisRuleTypes(analysisRuleTypes);
return this;
}
/**
*
* The analysis rule types for the configured table association.
*
*
* @param analysisRuleTypes
* The analysis rule types for the configured table association.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConfiguredTableAssociationAnalysisRuleType
*/
public ConfiguredTableAssociation withAnalysisRuleTypes(ConfiguredTableAssociationAnalysisRuleType... analysisRuleTypes) {
java.util.ArrayList analysisRuleTypesCopy = new java.util.ArrayList(analysisRuleTypes.length);
for (ConfiguredTableAssociationAnalysisRuleType value : analysisRuleTypes) {
analysisRuleTypesCopy.add(value.toString());
}
if (getAnalysisRuleTypes() == null) {
setAnalysisRuleTypes(analysisRuleTypesCopy);
} else {
getAnalysisRuleTypes().addAll(analysisRuleTypesCopy);
}
return this;
}
/**
*
* The time the configured table association was created.
*
*
* @param createTime
* The time the configured table association was created.
*/
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
/**
*
* The time the configured table association was created.
*
*
* @return The time the configured table association was created.
*/
public java.util.Date getCreateTime() {
return this.createTime;
}
/**
*
* The time the configured table association was created.
*
*
* @param createTime
* The time the configured table association was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withCreateTime(java.util.Date createTime) {
setCreateTime(createTime);
return this;
}
/**
*
* The time the configured table association was last updated.
*
*
* @param updateTime
* The time the configured table association was last updated.
*/
public void setUpdateTime(java.util.Date updateTime) {
this.updateTime = updateTime;
}
/**
*
* The time the configured table association was last updated.
*
*
* @return The time the configured table association was last updated.
*/
public java.util.Date getUpdateTime() {
return this.updateTime;
}
/**
*
* The time the configured table association was last updated.
*
*
* @param updateTime
* The time the configured table association was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociation withUpdateTime(java.util.Date updateTime) {
setUpdateTime(updateTime);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getConfiguredTableId() != null)
sb.append("ConfiguredTableId: ").append(getConfiguredTableId()).append(",");
if (getConfiguredTableArn() != null)
sb.append("ConfiguredTableArn: ").append(getConfiguredTableArn()).append(",");
if (getMembershipId() != null)
sb.append("MembershipId: ").append(getMembershipId()).append(",");
if (getMembershipArn() != null)
sb.append("MembershipArn: ").append(getMembershipArn()).append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getAnalysisRuleTypes() != null)
sb.append("AnalysisRuleTypes: ").append(getAnalysisRuleTypes()).append(",");
if (getCreateTime() != null)
sb.append("CreateTime: ").append(getCreateTime()).append(",");
if (getUpdateTime() != null)
sb.append("UpdateTime: ").append(getUpdateTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ConfiguredTableAssociation == false)
return false;
ConfiguredTableAssociation other = (ConfiguredTableAssociation) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getConfiguredTableId() == null ^ this.getConfiguredTableId() == null)
return false;
if (other.getConfiguredTableId() != null && other.getConfiguredTableId().equals(this.getConfiguredTableId()) == false)
return false;
if (other.getConfiguredTableArn() == null ^ this.getConfiguredTableArn() == null)
return false;
if (other.getConfiguredTableArn() != null && other.getConfiguredTableArn().equals(this.getConfiguredTableArn()) == false)
return false;
if (other.getMembershipId() == null ^ this.getMembershipId() == null)
return false;
if (other.getMembershipId() != null && other.getMembershipId().equals(this.getMembershipId()) == false)
return false;
if (other.getMembershipArn() == null ^ this.getMembershipArn() == null)
return false;
if (other.getMembershipArn() != null && other.getMembershipArn().equals(this.getMembershipArn()) == false)
return false;
if (other.getRoleArn() == null ^ this.getRoleArn() == null)
return false;
if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getAnalysisRuleTypes() == null ^ this.getAnalysisRuleTypes() == null)
return false;
if (other.getAnalysisRuleTypes() != null && other.getAnalysisRuleTypes().equals(this.getAnalysisRuleTypes()) == false)
return false;
if (other.getCreateTime() == null ^ this.getCreateTime() == null)
return false;
if (other.getCreateTime() != null && other.getCreateTime().equals(this.getCreateTime()) == false)
return false;
if (other.getUpdateTime() == null ^ this.getUpdateTime() == null)
return false;
if (other.getUpdateTime() != null && other.getUpdateTime().equals(this.getUpdateTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getConfiguredTableId() == null) ? 0 : getConfiguredTableId().hashCode());
hashCode = prime * hashCode + ((getConfiguredTableArn() == null) ? 0 : getConfiguredTableArn().hashCode());
hashCode = prime * hashCode + ((getMembershipId() == null) ? 0 : getMembershipId().hashCode());
hashCode = prime * hashCode + ((getMembershipArn() == null) ? 0 : getMembershipArn().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getAnalysisRuleTypes() == null) ? 0 : getAnalysisRuleTypes().hashCode());
hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
hashCode = prime * hashCode + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return hashCode;
}
@Override
public ConfiguredTableAssociation clone() {
try {
return (ConfiguredTableAssociation) 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.cleanrooms.model.transform.ConfiguredTableAssociationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}