com.amazonaws.services.cleanrooms.model.ProtectedQuery 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 parameters for an Clean Rooms protected query.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ProtectedQuery implements Serializable, Cloneable, StructuredPojo {
/**
*
* The identifier for a protected query instance.
*
*/
private String id;
/**
*
* The identifier for the membership.
*
*/
private String membershipId;
/**
*
* The ARN of the membership.
*
*/
private String membershipArn;
/**
*
* The time at which the protected query was created.
*
*/
private java.util.Date createTime;
/**
*
* The protected query SQL parameters.
*
*/
private ProtectedQuerySQLParameters sqlParameters;
/**
*
* The status of the query.
*
*/
private String status;
/**
*
* Contains any details needed to write the query results.
*
*/
private ProtectedQueryResultConfiguration resultConfiguration;
/**
*
* Statistics about protected query execution.
*
*/
private ProtectedQueryStatistics statistics;
/**
*
* The result of the protected query.
*
*/
private ProtectedQueryResult result;
/**
*
* An error thrown by the protected query.
*
*/
private ProtectedQueryError error;
/**
*
* The sensitivity parameters of the differential privacy results of the protected query.
*
*/
private DifferentialPrivacyParameters differentialPrivacy;
/**
*
* The identifier for a protected query instance.
*
*
* @param id
* The identifier for a protected query instance.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The identifier for a protected query instance.
*
*
* @return The identifier for a protected query instance.
*/
public String getId() {
return this.id;
}
/**
*
* The identifier for a protected query instance.
*
*
* @param id
* The identifier for a protected query instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withId(String id) {
setId(id);
return this;
}
/**
*
* The identifier for the membership.
*
*
* @param membershipId
* The identifier for the membership.
*/
public void setMembershipId(String membershipId) {
this.membershipId = membershipId;
}
/**
*
* The identifier for the membership.
*
*
* @return The identifier for the membership.
*/
public String getMembershipId() {
return this.membershipId;
}
/**
*
* The identifier for the membership.
*
*
* @param membershipId
* The identifier for the membership.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withMembershipId(String membershipId) {
setMembershipId(membershipId);
return this;
}
/**
*
* The ARN of the membership.
*
*
* @param membershipArn
* The ARN of the membership.
*/
public void setMembershipArn(String membershipArn) {
this.membershipArn = membershipArn;
}
/**
*
* The ARN of the membership.
*
*
* @return The ARN of the membership.
*/
public String getMembershipArn() {
return this.membershipArn;
}
/**
*
* The ARN of the membership.
*
*
* @param membershipArn
* The ARN of the membership.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withMembershipArn(String membershipArn) {
setMembershipArn(membershipArn);
return this;
}
/**
*
* The time at which the protected query was created.
*
*
* @param createTime
* The time at which the protected query was created.
*/
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
/**
*
* The time at which the protected query was created.
*
*
* @return The time at which the protected query was created.
*/
public java.util.Date getCreateTime() {
return this.createTime;
}
/**
*
* The time at which the protected query was created.
*
*
* @param createTime
* The time at which the protected query was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withCreateTime(java.util.Date createTime) {
setCreateTime(createTime);
return this;
}
/**
*
* The protected query SQL parameters.
*
*
* @param sqlParameters
* The protected query SQL parameters.
*/
public void setSqlParameters(ProtectedQuerySQLParameters sqlParameters) {
this.sqlParameters = sqlParameters;
}
/**
*
* The protected query SQL parameters.
*
*
* @return The protected query SQL parameters.
*/
public ProtectedQuerySQLParameters getSqlParameters() {
return this.sqlParameters;
}
/**
*
* The protected query SQL parameters.
*
*
* @param sqlParameters
* The protected query SQL parameters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withSqlParameters(ProtectedQuerySQLParameters sqlParameters) {
setSqlParameters(sqlParameters);
return this;
}
/**
*
* The status of the query.
*
*
* @param status
* The status of the query.
* @see ProtectedQueryStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the query.
*
*
* @return The status of the query.
* @see ProtectedQueryStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the query.
*
*
* @param status
* The status of the query.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ProtectedQueryStatus
*/
public ProtectedQuery withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the query.
*
*
* @param status
* The status of the query.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ProtectedQueryStatus
*/
public ProtectedQuery withStatus(ProtectedQueryStatus status) {
this.status = status.toString();
return this;
}
/**
*
* Contains any details needed to write the query results.
*
*
* @param resultConfiguration
* Contains any details needed to write the query results.
*/
public void setResultConfiguration(ProtectedQueryResultConfiguration resultConfiguration) {
this.resultConfiguration = resultConfiguration;
}
/**
*
* Contains any details needed to write the query results.
*
*
* @return Contains any details needed to write the query results.
*/
public ProtectedQueryResultConfiguration getResultConfiguration() {
return this.resultConfiguration;
}
/**
*
* Contains any details needed to write the query results.
*
*
* @param resultConfiguration
* Contains any details needed to write the query results.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withResultConfiguration(ProtectedQueryResultConfiguration resultConfiguration) {
setResultConfiguration(resultConfiguration);
return this;
}
/**
*
* Statistics about protected query execution.
*
*
* @param statistics
* Statistics about protected query execution.
*/
public void setStatistics(ProtectedQueryStatistics statistics) {
this.statistics = statistics;
}
/**
*
* Statistics about protected query execution.
*
*
* @return Statistics about protected query execution.
*/
public ProtectedQueryStatistics getStatistics() {
return this.statistics;
}
/**
*
* Statistics about protected query execution.
*
*
* @param statistics
* Statistics about protected query execution.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withStatistics(ProtectedQueryStatistics statistics) {
setStatistics(statistics);
return this;
}
/**
*
* The result of the protected query.
*
*
* @param result
* The result of the protected query.
*/
public void setResult(ProtectedQueryResult result) {
this.result = result;
}
/**
*
* The result of the protected query.
*
*
* @return The result of the protected query.
*/
public ProtectedQueryResult getResult() {
return this.result;
}
/**
*
* The result of the protected query.
*
*
* @param result
* The result of the protected query.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withResult(ProtectedQueryResult result) {
setResult(result);
return this;
}
/**
*
* An error thrown by the protected query.
*
*
* @param error
* An error thrown by the protected query.
*/
public void setError(ProtectedQueryError error) {
this.error = error;
}
/**
*
* An error thrown by the protected query.
*
*
* @return An error thrown by the protected query.
*/
public ProtectedQueryError getError() {
return this.error;
}
/**
*
* An error thrown by the protected query.
*
*
* @param error
* An error thrown by the protected query.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withError(ProtectedQueryError error) {
setError(error);
return this;
}
/**
*
* The sensitivity parameters of the differential privacy results of the protected query.
*
*
* @param differentialPrivacy
* The sensitivity parameters of the differential privacy results of the protected query.
*/
public void setDifferentialPrivacy(DifferentialPrivacyParameters differentialPrivacy) {
this.differentialPrivacy = differentialPrivacy;
}
/**
*
* The sensitivity parameters of the differential privacy results of the protected query.
*
*
* @return The sensitivity parameters of the differential privacy results of the protected query.
*/
public DifferentialPrivacyParameters getDifferentialPrivacy() {
return this.differentialPrivacy;
}
/**
*
* The sensitivity parameters of the differential privacy results of the protected query.
*
*
* @param differentialPrivacy
* The sensitivity parameters of the differential privacy results of the protected query.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProtectedQuery withDifferentialPrivacy(DifferentialPrivacyParameters differentialPrivacy) {
setDifferentialPrivacy(differentialPrivacy);
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 (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getMembershipId() != null)
sb.append("MembershipId: ").append(getMembershipId()).append(",");
if (getMembershipArn() != null)
sb.append("MembershipArn: ").append(getMembershipArn()).append(",");
if (getCreateTime() != null)
sb.append("CreateTime: ").append(getCreateTime()).append(",");
if (getSqlParameters() != null)
sb.append("SqlParameters: ").append("***Sensitive Data Redacted***").append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getResultConfiguration() != null)
sb.append("ResultConfiguration: ").append(getResultConfiguration()).append(",");
if (getStatistics() != null)
sb.append("Statistics: ").append(getStatistics()).append(",");
if (getResult() != null)
sb.append("Result: ").append(getResult()).append(",");
if (getError() != null)
sb.append("Error: ").append(getError()).append(",");
if (getDifferentialPrivacy() != null)
sb.append("DifferentialPrivacy: ").append(getDifferentialPrivacy());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ProtectedQuery == false)
return false;
ProtectedQuery other = (ProtectedQuery) obj;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == 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.getCreateTime() == null ^ this.getCreateTime() == null)
return false;
if (other.getCreateTime() != null && other.getCreateTime().equals(this.getCreateTime()) == false)
return false;
if (other.getSqlParameters() == null ^ this.getSqlParameters() == null)
return false;
if (other.getSqlParameters() != null && other.getSqlParameters().equals(this.getSqlParameters()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getResultConfiguration() == null ^ this.getResultConfiguration() == null)
return false;
if (other.getResultConfiguration() != null && other.getResultConfiguration().equals(this.getResultConfiguration()) == false)
return false;
if (other.getStatistics() == null ^ this.getStatistics() == null)
return false;
if (other.getStatistics() != null && other.getStatistics().equals(this.getStatistics()) == false)
return false;
if (other.getResult() == null ^ this.getResult() == null)
return false;
if (other.getResult() != null && other.getResult().equals(this.getResult()) == false)
return false;
if (other.getError() == null ^ this.getError() == null)
return false;
if (other.getError() != null && other.getError().equals(this.getError()) == false)
return false;
if (other.getDifferentialPrivacy() == null ^ this.getDifferentialPrivacy() == null)
return false;
if (other.getDifferentialPrivacy() != null && other.getDifferentialPrivacy().equals(this.getDifferentialPrivacy()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getMembershipId() == null) ? 0 : getMembershipId().hashCode());
hashCode = prime * hashCode + ((getMembershipArn() == null) ? 0 : getMembershipArn().hashCode());
hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
hashCode = prime * hashCode + ((getSqlParameters() == null) ? 0 : getSqlParameters().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getResultConfiguration() == null) ? 0 : getResultConfiguration().hashCode());
hashCode = prime * hashCode + ((getStatistics() == null) ? 0 : getStatistics().hashCode());
hashCode = prime * hashCode + ((getResult() == null) ? 0 : getResult().hashCode());
hashCode = prime * hashCode + ((getError() == null) ? 0 : getError().hashCode());
hashCode = prime * hashCode + ((getDifferentialPrivacy() == null) ? 0 : getDifferentialPrivacy().hashCode());
return hashCode;
}
@Override
public ProtectedQuery clone() {
try {
return (ProtectedQuery) 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.ProtectedQueryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}