com.amazonaws.services.cleanrooms.model.ConfiguredTableAnalysisRule 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 analysis rule, which limits how data for this table can be used.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ConfiguredTableAnalysisRule implements Serializable, Cloneable, StructuredPojo {
/**
*
* The unique ID for the configured table.
*
*/
private String configuredTableId;
/**
*
* The unique ARN for the configured table.
*
*/
private String configuredTableArn;
/**
*
* The policy that controls SQL query rules.
*
*/
private ConfiguredTableAnalysisRulePolicy policy;
/**
*
* The type of configured table analysis rule.
*
*/
private String type;
/**
*
* The time the configured table analysis rule was created.
*
*/
private java.util.Date createTime;
/**
*
* The time the configured table analysis rule was last updated.
*
*/
private java.util.Date updateTime;
/**
*
* The unique ID for the configured table.
*
*
* @param configuredTableId
* The unique ID for the configured table.
*/
public void setConfiguredTableId(String configuredTableId) {
this.configuredTableId = configuredTableId;
}
/**
*
* The unique ID for the configured table.
*
*
* @return The unique ID for the configured table.
*/
public String getConfiguredTableId() {
return this.configuredTableId;
}
/**
*
* The unique ID for the configured table.
*
*
* @param configuredTableId
* The unique ID for the configured table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAnalysisRule withConfiguredTableId(String configuredTableId) {
setConfiguredTableId(configuredTableId);
return this;
}
/**
*
* The unique ARN for the configured table.
*
*
* @param configuredTableArn
* The unique ARN for the configured table.
*/
public void setConfiguredTableArn(String configuredTableArn) {
this.configuredTableArn = configuredTableArn;
}
/**
*
* The unique ARN for the configured table.
*
*
* @return The unique ARN for the configured table.
*/
public String getConfiguredTableArn() {
return this.configuredTableArn;
}
/**
*
* The unique ARN for the configured table.
*
*
* @param configuredTableArn
* The unique ARN for the configured table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAnalysisRule withConfiguredTableArn(String configuredTableArn) {
setConfiguredTableArn(configuredTableArn);
return this;
}
/**
*
* The policy that controls SQL query rules.
*
*
* @param policy
* The policy that controls SQL query rules.
*/
public void setPolicy(ConfiguredTableAnalysisRulePolicy policy) {
this.policy = policy;
}
/**
*
* The policy that controls SQL query rules.
*
*
* @return The policy that controls SQL query rules.
*/
public ConfiguredTableAnalysisRulePolicy getPolicy() {
return this.policy;
}
/**
*
* The policy that controls SQL query rules.
*
*
* @param policy
* The policy that controls SQL query rules.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAnalysisRule withPolicy(ConfiguredTableAnalysisRulePolicy policy) {
setPolicy(policy);
return this;
}
/**
*
* The type of configured table analysis rule.
*
*
* @param type
* The type of configured table analysis rule.
* @see ConfiguredTableAnalysisRuleType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of configured table analysis rule.
*
*
* @return The type of configured table analysis rule.
* @see ConfiguredTableAnalysisRuleType
*/
public String getType() {
return this.type;
}
/**
*
* The type of configured table analysis rule.
*
*
* @param type
* The type of configured table analysis rule.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConfiguredTableAnalysisRuleType
*/
public ConfiguredTableAnalysisRule withType(String type) {
setType(type);
return this;
}
/**
*
* The type of configured table analysis rule.
*
*
* @param type
* The type of configured table analysis rule.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ConfiguredTableAnalysisRuleType
*/
public ConfiguredTableAnalysisRule withType(ConfiguredTableAnalysisRuleType type) {
this.type = type.toString();
return this;
}
/**
*
* The time the configured table analysis rule was created.
*
*
* @param createTime
* The time the configured table analysis rule was created.
*/
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
/**
*
* The time the configured table analysis rule was created.
*
*
* @return The time the configured table analysis rule was created.
*/
public java.util.Date getCreateTime() {
return this.createTime;
}
/**
*
* The time the configured table analysis rule was created.
*
*
* @param createTime
* The time the configured table analysis rule was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAnalysisRule withCreateTime(java.util.Date createTime) {
setCreateTime(createTime);
return this;
}
/**
*
* The time the configured table analysis rule was last updated.
*
*
* @param updateTime
* The time the configured table analysis rule was last updated.
*/
public void setUpdateTime(java.util.Date updateTime) {
this.updateTime = updateTime;
}
/**
*
* The time the configured table analysis rule was last updated.
*
*
* @return The time the configured table analysis rule was last updated.
*/
public java.util.Date getUpdateTime() {
return this.updateTime;
}
/**
*
* The time the configured table analysis rule was last updated.
*
*
* @param updateTime
* The time the configured table analysis rule was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfiguredTableAnalysisRule 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 (getConfiguredTableId() != null)
sb.append("ConfiguredTableId: ").append(getConfiguredTableId()).append(",");
if (getConfiguredTableArn() != null)
sb.append("ConfiguredTableArn: ").append(getConfiguredTableArn()).append(",");
if (getPolicy() != null)
sb.append("Policy: ").append(getPolicy()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).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 ConfiguredTableAnalysisRule == false)
return false;
ConfiguredTableAnalysisRule other = (ConfiguredTableAnalysisRule) obj;
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.getPolicy() == null ^ this.getPolicy() == null)
return false;
if (other.getPolicy() != null && other.getPolicy().equals(this.getPolicy()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == 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 + ((getConfiguredTableId() == null) ? 0 : getConfiguredTableId().hashCode());
hashCode = prime * hashCode + ((getConfiguredTableArn() == null) ? 0 : getConfiguredTableArn().hashCode());
hashCode = prime * hashCode + ((getPolicy() == null) ? 0 : getPolicy().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
hashCode = prime * hashCode + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return hashCode;
}
@Override
public ConfiguredTableAnalysisRule clone() {
try {
return (ConfiguredTableAnalysisRule) 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.ConfiguredTableAnalysisRuleMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}