com.amazonaws.services.cleanrooms.model.ConfiguredTableAssociationAnalysisRuleCustom 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;
/**
*
* The configured table association analysis rule applied to a configured table with the custom analysis rule.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ConfiguredTableAssociationAnalysisRuleCustom implements Serializable, Cloneable, StructuredPojo {
/**
*
* The list of collaboration members who are allowed to receive results of queries run with this configured table.
*
*/
private java.util.List allowedResultReceivers;
/**
*
* The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
*
*/
private java.util.List allowedAdditionalAnalyses;
/**
*
* The list of collaboration members who are allowed to receive results of queries run with this configured table.
*
*
* @return The list of collaboration members who are allowed to receive results of queries run with this configured
* table.
*/
public java.util.List getAllowedResultReceivers() {
return allowedResultReceivers;
}
/**
*
* The list of collaboration members who are allowed to receive results of queries run with this configured table.
*
*
* @param allowedResultReceivers
* The list of collaboration members who are allowed to receive results of queries run with this configured
* table.
*/
public void setAllowedResultReceivers(java.util.Collection allowedResultReceivers) {
if (allowedResultReceivers == null) {
this.allowedResultReceivers = null;
return;
}
this.allowedResultReceivers = new java.util.ArrayList(allowedResultReceivers);
}
/**
*
* The list of collaboration members who are allowed to receive results of queries run with this configured table.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAllowedResultReceivers(java.util.Collection)} or
* {@link #withAllowedResultReceivers(java.util.Collection)} if you want to override the existing values.
*
*
* @param allowedResultReceivers
* The list of collaboration members who are allowed to receive results of queries run with this configured
* table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociationAnalysisRuleCustom withAllowedResultReceivers(String... allowedResultReceivers) {
if (this.allowedResultReceivers == null) {
setAllowedResultReceivers(new java.util.ArrayList(allowedResultReceivers.length));
}
for (String ele : allowedResultReceivers) {
this.allowedResultReceivers.add(ele);
}
return this;
}
/**
*
* The list of collaboration members who are allowed to receive results of queries run with this configured table.
*
*
* @param allowedResultReceivers
* The list of collaboration members who are allowed to receive results of queries run with this configured
* table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociationAnalysisRuleCustom withAllowedResultReceivers(java.util.Collection allowedResultReceivers) {
setAllowedResultReceivers(allowedResultReceivers);
return this;
}
/**
*
* The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
*
*
* @return The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query
* output.
*/
public java.util.List getAllowedAdditionalAnalyses() {
return allowedAdditionalAnalyses;
}
/**
*
* The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
*
*
* @param allowedAdditionalAnalyses
* The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
*/
public void setAllowedAdditionalAnalyses(java.util.Collection allowedAdditionalAnalyses) {
if (allowedAdditionalAnalyses == null) {
this.allowedAdditionalAnalyses = null;
return;
}
this.allowedAdditionalAnalyses = new java.util.ArrayList(allowedAdditionalAnalyses);
}
/**
*
* The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAllowedAdditionalAnalyses(java.util.Collection)} or
* {@link #withAllowedAdditionalAnalyses(java.util.Collection)} if you want to override the existing values.
*
*
* @param allowedAdditionalAnalyses
* The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociationAnalysisRuleCustom withAllowedAdditionalAnalyses(String... allowedAdditionalAnalyses) {
if (this.allowedAdditionalAnalyses == null) {
setAllowedAdditionalAnalyses(new java.util.ArrayList(allowedAdditionalAnalyses.length));
}
for (String ele : allowedAdditionalAnalyses) {
this.allowedAdditionalAnalyses.add(ele);
}
return this;
}
/**
*
* The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
*
*
* @param allowedAdditionalAnalyses
* The list of resources or wildcards (ARNs) that are allowed to perform additional analysis on query output.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAssociationAnalysisRuleCustom withAllowedAdditionalAnalyses(java.util.Collection allowedAdditionalAnalyses) {
setAllowedAdditionalAnalyses(allowedAdditionalAnalyses);
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 (getAllowedResultReceivers() != null)
sb.append("AllowedResultReceivers: ").append(getAllowedResultReceivers()).append(",");
if (getAllowedAdditionalAnalyses() != null)
sb.append("AllowedAdditionalAnalyses: ").append(getAllowedAdditionalAnalyses());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ConfiguredTableAssociationAnalysisRuleCustom == false)
return false;
ConfiguredTableAssociationAnalysisRuleCustom other = (ConfiguredTableAssociationAnalysisRuleCustom) obj;
if (other.getAllowedResultReceivers() == null ^ this.getAllowedResultReceivers() == null)
return false;
if (other.getAllowedResultReceivers() != null && other.getAllowedResultReceivers().equals(this.getAllowedResultReceivers()) == false)
return false;
if (other.getAllowedAdditionalAnalyses() == null ^ this.getAllowedAdditionalAnalyses() == null)
return false;
if (other.getAllowedAdditionalAnalyses() != null && other.getAllowedAdditionalAnalyses().equals(this.getAllowedAdditionalAnalyses()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAllowedResultReceivers() == null) ? 0 : getAllowedResultReceivers().hashCode());
hashCode = prime * hashCode + ((getAllowedAdditionalAnalyses() == null) ? 0 : getAllowedAdditionalAnalyses().hashCode());
return hashCode;
}
@Override
public ConfiguredTableAssociationAnalysisRuleCustom clone() {
try {
return (ConfiguredTableAssociationAnalysisRuleCustom) 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.ConfiguredTableAssociationAnalysisRuleCustomMarshaller.getInstance().marshall(this,
protocolMarshaller);
}
}