com.amazonaws.services.quicksight.model.Analysis Maven / Gradle / Ivy
Show all versions of aws-java-sdk-quicksight Show documentation
/*
* Copyright 2018-2023 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.quicksight.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Metadata structure for an analysis in Amazon QuickSight
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Analysis implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of the analysis.
*
*/
private String analysisId;
/**
*
* The Amazon Resource Name (ARN) of the analysis.
*
*/
private String arn;
/**
*
* The descriptive name of the analysis.
*
*/
private String name;
/**
*
* Status associated with the analysis.
*
*/
private String status;
/**
*
* Errors associated with the analysis.
*
*/
private java.util.List errors;
/**
*
* The ARNs of the datasets of the analysis.
*
*/
private java.util.List dataSetArns;
/**
*
* The ARN of the theme of the analysis.
*
*/
private String themeArn;
/**
*
* The time that the analysis was created.
*
*/
private java.util.Date createdTime;
/**
*
* The time that the analysis was last updated.
*
*/
private java.util.Date lastUpdatedTime;
/**
*
* A list of the associated sheets with the unique identifier and name of each sheet.
*
*/
private java.util.List sheets;
/**
*
* The ID of the analysis.
*
*
* @param analysisId
* The ID of the analysis.
*/
public void setAnalysisId(String analysisId) {
this.analysisId = analysisId;
}
/**
*
* The ID of the analysis.
*
*
* @return The ID of the analysis.
*/
public String getAnalysisId() {
return this.analysisId;
}
/**
*
* The ID of the analysis.
*
*
* @param analysisId
* The ID of the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withAnalysisId(String analysisId) {
setAnalysisId(analysisId);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the analysis.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the analysis.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The Amazon Resource Name (ARN) of the analysis.
*
*
* @return The Amazon Resource Name (ARN) of the analysis.
*/
public String getArn() {
return this.arn;
}
/**
*
* The Amazon Resource Name (ARN) of the analysis.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The descriptive name of the analysis.
*
*
* @param name
* The descriptive name of the analysis.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The descriptive name of the analysis.
*
*
* @return The descriptive name of the analysis.
*/
public String getName() {
return this.name;
}
/**
*
* The descriptive name of the analysis.
*
*
* @param name
* The descriptive name of the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withName(String name) {
setName(name);
return this;
}
/**
*
* Status associated with the analysis.
*
*
* @param status
* Status associated with the analysis.
* @see ResourceStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* Status associated with the analysis.
*
*
* @return Status associated with the analysis.
* @see ResourceStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* Status associated with the analysis.
*
*
* @param status
* Status associated with the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceStatus
*/
public Analysis withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* Status associated with the analysis.
*
*
* @param status
* Status associated with the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceStatus
*/
public Analysis withStatus(ResourceStatus status) {
this.status = status.toString();
return this;
}
/**
*
* Errors associated with the analysis.
*
*
* @return Errors associated with the analysis.
*/
public java.util.List getErrors() {
return errors;
}
/**
*
* Errors associated with the analysis.
*
*
* @param errors
* Errors associated with the analysis.
*/
public void setErrors(java.util.Collection errors) {
if (errors == null) {
this.errors = null;
return;
}
this.errors = new java.util.ArrayList(errors);
}
/**
*
* Errors associated with the analysis.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setErrors(java.util.Collection)} or {@link #withErrors(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param errors
* Errors associated with the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withErrors(AnalysisError... errors) {
if (this.errors == null) {
setErrors(new java.util.ArrayList(errors.length));
}
for (AnalysisError ele : errors) {
this.errors.add(ele);
}
return this;
}
/**
*
* Errors associated with the analysis.
*
*
* @param errors
* Errors associated with the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withErrors(java.util.Collection errors) {
setErrors(errors);
return this;
}
/**
*
* The ARNs of the datasets of the analysis.
*
*
* @return The ARNs of the datasets of the analysis.
*/
public java.util.List getDataSetArns() {
return dataSetArns;
}
/**
*
* The ARNs of the datasets of the analysis.
*
*
* @param dataSetArns
* The ARNs of the datasets of the analysis.
*/
public void setDataSetArns(java.util.Collection dataSetArns) {
if (dataSetArns == null) {
this.dataSetArns = null;
return;
}
this.dataSetArns = new java.util.ArrayList(dataSetArns);
}
/**
*
* The ARNs of the datasets of the analysis.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDataSetArns(java.util.Collection)} or {@link #withDataSetArns(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param dataSetArns
* The ARNs of the datasets of the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withDataSetArns(String... dataSetArns) {
if (this.dataSetArns == null) {
setDataSetArns(new java.util.ArrayList(dataSetArns.length));
}
for (String ele : dataSetArns) {
this.dataSetArns.add(ele);
}
return this;
}
/**
*
* The ARNs of the datasets of the analysis.
*
*
* @param dataSetArns
* The ARNs of the datasets of the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withDataSetArns(java.util.Collection dataSetArns) {
setDataSetArns(dataSetArns);
return this;
}
/**
*
* The ARN of the theme of the analysis.
*
*
* @param themeArn
* The ARN of the theme of the analysis.
*/
public void setThemeArn(String themeArn) {
this.themeArn = themeArn;
}
/**
*
* The ARN of the theme of the analysis.
*
*
* @return The ARN of the theme of the analysis.
*/
public String getThemeArn() {
return this.themeArn;
}
/**
*
* The ARN of the theme of the analysis.
*
*
* @param themeArn
* The ARN of the theme of the analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withThemeArn(String themeArn) {
setThemeArn(themeArn);
return this;
}
/**
*
* The time that the analysis was created.
*
*
* @param createdTime
* The time that the analysis was created.
*/
public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
}
/**
*
* The time that the analysis was created.
*
*
* @return The time that the analysis was created.
*/
public java.util.Date getCreatedTime() {
return this.createdTime;
}
/**
*
* The time that the analysis was created.
*
*
* @param createdTime
* The time that the analysis was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withCreatedTime(java.util.Date createdTime) {
setCreatedTime(createdTime);
return this;
}
/**
*
* The time that the analysis was last updated.
*
*
* @param lastUpdatedTime
* The time that the analysis was last updated.
*/
public void setLastUpdatedTime(java.util.Date lastUpdatedTime) {
this.lastUpdatedTime = lastUpdatedTime;
}
/**
*
* The time that the analysis was last updated.
*
*
* @return The time that the analysis was last updated.
*/
public java.util.Date getLastUpdatedTime() {
return this.lastUpdatedTime;
}
/**
*
* The time that the analysis was last updated.
*
*
* @param lastUpdatedTime
* The time that the analysis was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withLastUpdatedTime(java.util.Date lastUpdatedTime) {
setLastUpdatedTime(lastUpdatedTime);
return this;
}
/**
*
* A list of the associated sheets with the unique identifier and name of each sheet.
*
*
* @return A list of the associated sheets with the unique identifier and name of each sheet.
*/
public java.util.List getSheets() {
return sheets;
}
/**
*
* A list of the associated sheets with the unique identifier and name of each sheet.
*
*
* @param sheets
* A list of the associated sheets with the unique identifier and name of each sheet.
*/
public void setSheets(java.util.Collection sheets) {
if (sheets == null) {
this.sheets = null;
return;
}
this.sheets = new java.util.ArrayList(sheets);
}
/**
*
* A list of the associated sheets with the unique identifier and name of each sheet.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSheets(java.util.Collection)} or {@link #withSheets(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param sheets
* A list of the associated sheets with the unique identifier and name of each sheet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withSheets(Sheet... sheets) {
if (this.sheets == null) {
setSheets(new java.util.ArrayList(sheets.length));
}
for (Sheet ele : sheets) {
this.sheets.add(ele);
}
return this;
}
/**
*
* A list of the associated sheets with the unique identifier and name of each sheet.
*
*
* @param sheets
* A list of the associated sheets with the unique identifier and name of each sheet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Analysis withSheets(java.util.Collection sheets) {
setSheets(sheets);
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 (getAnalysisId() != null)
sb.append("AnalysisId: ").append(getAnalysisId()).append(",");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getErrors() != null)
sb.append("Errors: ").append(getErrors()).append(",");
if (getDataSetArns() != null)
sb.append("DataSetArns: ").append(getDataSetArns()).append(",");
if (getThemeArn() != null)
sb.append("ThemeArn: ").append(getThemeArn()).append(",");
if (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getLastUpdatedTime() != null)
sb.append("LastUpdatedTime: ").append(getLastUpdatedTime()).append(",");
if (getSheets() != null)
sb.append("Sheets: ").append(getSheets());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Analysis == false)
return false;
Analysis other = (Analysis) obj;
if (other.getAnalysisId() == null ^ this.getAnalysisId() == null)
return false;
if (other.getAnalysisId() != null && other.getAnalysisId().equals(this.getAnalysisId()) == false)
return false;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == 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.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getErrors() == null ^ this.getErrors() == null)
return false;
if (other.getErrors() != null && other.getErrors().equals(this.getErrors()) == false)
return false;
if (other.getDataSetArns() == null ^ this.getDataSetArns() == null)
return false;
if (other.getDataSetArns() != null && other.getDataSetArns().equals(this.getDataSetArns()) == false)
return false;
if (other.getThemeArn() == null ^ this.getThemeArn() == null)
return false;
if (other.getThemeArn() != null && other.getThemeArn().equals(this.getThemeArn()) == false)
return false;
if (other.getCreatedTime() == null ^ this.getCreatedTime() == null)
return false;
if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false)
return false;
if (other.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == null)
return false;
if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == false)
return false;
if (other.getSheets() == null ^ this.getSheets() == null)
return false;
if (other.getSheets() != null && other.getSheets().equals(this.getSheets()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAnalysisId() == null) ? 0 : getAnalysisId().hashCode());
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getErrors() == null) ? 0 : getErrors().hashCode());
hashCode = prime * hashCode + ((getDataSetArns() == null) ? 0 : getDataSetArns().hashCode());
hashCode = prime * hashCode + ((getThemeArn() == null) ? 0 : getThemeArn().hashCode());
hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode());
hashCode = prime * hashCode + ((getSheets() == null) ? 0 : getSheets().hashCode());
return hashCode;
}
@Override
public Analysis clone() {
try {
return (Analysis) 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.quicksight.model.transform.AnalysisMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}