com.amazonaws.services.cleanrooms.model.AnalysisRuleList 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 type of analysis rule that enables row-level analysis.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AnalysisRuleList implements Serializable, Cloneable, StructuredPojo {
/**
*
* Columns that can be used to join a configured table with the table of the member who can query and other members'
* configured tables.
*
*/
private java.util.List joinColumns;
/**
*
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND
.
*
*/
private java.util.List allowedJoinOperators;
/**
*
* Columns that can be listed in the output.
*
*/
private java.util.List listColumns;
/**
*
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the
* direct query.
*
*/
private String additionalAnalyses;
/**
*
* Columns that can be used to join a configured table with the table of the member who can query and other members'
* configured tables.
*
*
* @return Columns that can be used to join a configured table with the table of the member who can query and other
* members' configured tables.
*/
public java.util.List getJoinColumns() {
return joinColumns;
}
/**
*
* Columns that can be used to join a configured table with the table of the member who can query and other members'
* configured tables.
*
*
* @param joinColumns
* Columns that can be used to join a configured table with the table of the member who can query and other
* members' configured tables.
*/
public void setJoinColumns(java.util.Collection joinColumns) {
if (joinColumns == null) {
this.joinColumns = null;
return;
}
this.joinColumns = new java.util.ArrayList(joinColumns);
}
/**
*
* Columns that can be used to join a configured table with the table of the member who can query and other members'
* configured tables.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setJoinColumns(java.util.Collection)} or {@link #withJoinColumns(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param joinColumns
* Columns that can be used to join a configured table with the table of the member who can query and other
* members' configured tables.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisRuleList withJoinColumns(String... joinColumns) {
if (this.joinColumns == null) {
setJoinColumns(new java.util.ArrayList(joinColumns.length));
}
for (String ele : joinColumns) {
this.joinColumns.add(ele);
}
return this;
}
/**
*
* Columns that can be used to join a configured table with the table of the member who can query and other members'
* configured tables.
*
*
* @param joinColumns
* Columns that can be used to join a configured table with the table of the member who can query and other
* members' configured tables.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisRuleList withJoinColumns(java.util.Collection joinColumns) {
setJoinColumns(joinColumns);
return this;
}
/**
*
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND
.
*
*
* @return The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is
* AND
.
* @see JoinOperator
*/
public java.util.List getAllowedJoinOperators() {
return allowedJoinOperators;
}
/**
*
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND
.
*
*
* @param allowedJoinOperators
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is
* AND
.
* @see JoinOperator
*/
public void setAllowedJoinOperators(java.util.Collection allowedJoinOperators) {
if (allowedJoinOperators == null) {
this.allowedJoinOperators = null;
return;
}
this.allowedJoinOperators = new java.util.ArrayList(allowedJoinOperators);
}
/**
*
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND
.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAllowedJoinOperators(java.util.Collection)} or {@link #withAllowedJoinOperators(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param allowedJoinOperators
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is
* AND
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JoinOperator
*/
public AnalysisRuleList withAllowedJoinOperators(String... allowedJoinOperators) {
if (this.allowedJoinOperators == null) {
setAllowedJoinOperators(new java.util.ArrayList(allowedJoinOperators.length));
}
for (String ele : allowedJoinOperators) {
this.allowedJoinOperators.add(ele);
}
return this;
}
/**
*
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND
.
*
*
* @param allowedJoinOperators
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is
* AND
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JoinOperator
*/
public AnalysisRuleList withAllowedJoinOperators(java.util.Collection allowedJoinOperators) {
setAllowedJoinOperators(allowedJoinOperators);
return this;
}
/**
*
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is AND
.
*
*
* @param allowedJoinOperators
* The logical operators (if any) that are to be used in an INNER JOIN match condition. Default is
* AND
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JoinOperator
*/
public AnalysisRuleList withAllowedJoinOperators(JoinOperator... allowedJoinOperators) {
java.util.ArrayList allowedJoinOperatorsCopy = new java.util.ArrayList(allowedJoinOperators.length);
for (JoinOperator value : allowedJoinOperators) {
allowedJoinOperatorsCopy.add(value.toString());
}
if (getAllowedJoinOperators() == null) {
setAllowedJoinOperators(allowedJoinOperatorsCopy);
} else {
getAllowedJoinOperators().addAll(allowedJoinOperatorsCopy);
}
return this;
}
/**
*
* Columns that can be listed in the output.
*
*
* @return Columns that can be listed in the output.
*/
public java.util.List getListColumns() {
return listColumns;
}
/**
*
* Columns that can be listed in the output.
*
*
* @param listColumns
* Columns that can be listed in the output.
*/
public void setListColumns(java.util.Collection listColumns) {
if (listColumns == null) {
this.listColumns = null;
return;
}
this.listColumns = new java.util.ArrayList(listColumns);
}
/**
*
* Columns that can be listed in the output.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setListColumns(java.util.Collection)} or {@link #withListColumns(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param listColumns
* Columns that can be listed in the output.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisRuleList withListColumns(String... listColumns) {
if (this.listColumns == null) {
setListColumns(new java.util.ArrayList(listColumns.length));
}
for (String ele : listColumns) {
this.listColumns.add(ele);
}
return this;
}
/**
*
* Columns that can be listed in the output.
*
*
* @param listColumns
* Columns that can be listed in the output.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisRuleList withListColumns(java.util.Collection listColumns) {
setListColumns(listColumns);
return this;
}
/**
*
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the
* direct query.
*
*
* @param additionalAnalyses
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of
* the direct query.
* @see AdditionalAnalyses
*/
public void setAdditionalAnalyses(String additionalAnalyses) {
this.additionalAnalyses = additionalAnalyses;
}
/**
*
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the
* direct query.
*
*
* @return An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of
* the direct query.
* @see AdditionalAnalyses
*/
public String getAdditionalAnalyses() {
return this.additionalAnalyses;
}
/**
*
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the
* direct query.
*
*
* @param additionalAnalyses
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of
* the direct query.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AdditionalAnalyses
*/
public AnalysisRuleList withAdditionalAnalyses(String additionalAnalyses) {
setAdditionalAnalyses(additionalAnalyses);
return this;
}
/**
*
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of the
* direct query.
*
*
* @param additionalAnalyses
* An indicator as to whether additional analyses (such as Clean Rooms ML) can be applied to the output of
* the direct query.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AdditionalAnalyses
*/
public AnalysisRuleList withAdditionalAnalyses(AdditionalAnalyses additionalAnalyses) {
this.additionalAnalyses = additionalAnalyses.toString();
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 (getJoinColumns() != null)
sb.append("JoinColumns: ").append(getJoinColumns()).append(",");
if (getAllowedJoinOperators() != null)
sb.append("AllowedJoinOperators: ").append(getAllowedJoinOperators()).append(",");
if (getListColumns() != null)
sb.append("ListColumns: ").append(getListColumns()).append(",");
if (getAdditionalAnalyses() != null)
sb.append("AdditionalAnalyses: ").append(getAdditionalAnalyses());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AnalysisRuleList == false)
return false;
AnalysisRuleList other = (AnalysisRuleList) obj;
if (other.getJoinColumns() == null ^ this.getJoinColumns() == null)
return false;
if (other.getJoinColumns() != null && other.getJoinColumns().equals(this.getJoinColumns()) == false)
return false;
if (other.getAllowedJoinOperators() == null ^ this.getAllowedJoinOperators() == null)
return false;
if (other.getAllowedJoinOperators() != null && other.getAllowedJoinOperators().equals(this.getAllowedJoinOperators()) == false)
return false;
if (other.getListColumns() == null ^ this.getListColumns() == null)
return false;
if (other.getListColumns() != null && other.getListColumns().equals(this.getListColumns()) == false)
return false;
if (other.getAdditionalAnalyses() == null ^ this.getAdditionalAnalyses() == null)
return false;
if (other.getAdditionalAnalyses() != null && other.getAdditionalAnalyses().equals(this.getAdditionalAnalyses()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getJoinColumns() == null) ? 0 : getJoinColumns().hashCode());
hashCode = prime * hashCode + ((getAllowedJoinOperators() == null) ? 0 : getAllowedJoinOperators().hashCode());
hashCode = prime * hashCode + ((getListColumns() == null) ? 0 : getListColumns().hashCode());
hashCode = prime * hashCode + ((getAdditionalAnalyses() == null) ? 0 : getAdditionalAnalyses().hashCode());
return hashCode;
}
@Override
public AnalysisRuleList clone() {
try {
return (AnalysisRuleList) 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.AnalysisRuleListMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}