com.amazonaws.services.pi.model.AnalysisReport Maven / Gradle / Ivy
Show all versions of aws-java-sdk-pi 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.pi.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Retrieves the summary of the performance analysis report created for a time period.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AnalysisReport implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the analysis report.
*
*/
private String analysisReportId;
/**
*
* The unique identifier of the analysis report.
*
*/
private String identifier;
/**
*
* List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid values
* are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*/
private String serviceType;
/**
*
* The time you created the analysis report.
*
*/
private java.util.Date createTime;
/**
*
* The analysis start time in the report.
*
*/
private java.util.Date startTime;
/**
*
* The analysis end time in the report.
*
*/
private java.util.Date endTime;
/**
*
* The status of the created analysis report.
*
*/
private String status;
/**
*
* The list of identified insights in the analysis report.
*
*/
private java.util.List insights;
/**
*
* The name of the analysis report.
*
*
* @param analysisReportId
* The name of the analysis report.
*/
public void setAnalysisReportId(String analysisReportId) {
this.analysisReportId = analysisReportId;
}
/**
*
* The name of the analysis report.
*
*
* @return The name of the analysis report.
*/
public String getAnalysisReportId() {
return this.analysisReportId;
}
/**
*
* The name of the analysis report.
*
*
* @param analysisReportId
* The name of the analysis report.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisReport withAnalysisReportId(String analysisReportId) {
setAnalysisReportId(analysisReportId);
return this;
}
/**
*
* The unique identifier of the analysis report.
*
*
* @param identifier
* The unique identifier of the analysis report.
*/
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
/**
*
* The unique identifier of the analysis report.
*
*
* @return The unique identifier of the analysis report.
*/
public String getIdentifier() {
return this.identifier;
}
/**
*
* The unique identifier of the analysis report.
*
*
* @param identifier
* The unique identifier of the analysis report.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisReport withIdentifier(String identifier) {
setIdentifier(identifier);
return this;
}
/**
*
* List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid values
* are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*
* @param serviceType
* List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid
* values are as follows:
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
* @see ServiceType
*/
public void setServiceType(String serviceType) {
this.serviceType = serviceType;
}
/**
*
* List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid values
* are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*
* @return List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid
* values are as follows:
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
* @see ServiceType
*/
public String getServiceType() {
return this.serviceType;
}
/**
*
* List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid values
* are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*
* @param serviceType
* List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid
* values are as follows:
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ServiceType
*/
public AnalysisReport withServiceType(String serviceType) {
setServiceType(serviceType);
return this;
}
/**
*
* List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid values
* are as follows:
*
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
*
*
* @param serviceType
* List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid
* values are as follows:
*
* -
*
* RDS
*
*
* -
*
* DOCDB
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ServiceType
*/
public AnalysisReport withServiceType(ServiceType serviceType) {
this.serviceType = serviceType.toString();
return this;
}
/**
*
* The time you created the analysis report.
*
*
* @param createTime
* The time you created the analysis report.
*/
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
/**
*
* The time you created the analysis report.
*
*
* @return The time you created the analysis report.
*/
public java.util.Date getCreateTime() {
return this.createTime;
}
/**
*
* The time you created the analysis report.
*
*
* @param createTime
* The time you created the analysis report.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisReport withCreateTime(java.util.Date createTime) {
setCreateTime(createTime);
return this;
}
/**
*
* The analysis start time in the report.
*
*
* @param startTime
* The analysis start time in the report.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* The analysis start time in the report.
*
*
* @return The analysis start time in the report.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* The analysis start time in the report.
*
*
* @param startTime
* The analysis start time in the report.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisReport withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* The analysis end time in the report.
*
*
* @param endTime
* The analysis end time in the report.
*/
public void setEndTime(java.util.Date endTime) {
this.endTime = endTime;
}
/**
*
* The analysis end time in the report.
*
*
* @return The analysis end time in the report.
*/
public java.util.Date getEndTime() {
return this.endTime;
}
/**
*
* The analysis end time in the report.
*
*
* @param endTime
* The analysis end time in the report.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisReport withEndTime(java.util.Date endTime) {
setEndTime(endTime);
return this;
}
/**
*
* The status of the created analysis report.
*
*
* @param status
* The status of the created analysis report.
* @see AnalysisStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the created analysis report.
*
*
* @return The status of the created analysis report.
* @see AnalysisStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the created analysis report.
*
*
* @param status
* The status of the created analysis report.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AnalysisStatus
*/
public AnalysisReport withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the created analysis report.
*
*
* @param status
* The status of the created analysis report.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AnalysisStatus
*/
public AnalysisReport withStatus(AnalysisStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The list of identified insights in the analysis report.
*
*
* @return The list of identified insights in the analysis report.
*/
public java.util.List getInsights() {
return insights;
}
/**
*
* The list of identified insights in the analysis report.
*
*
* @param insights
* The list of identified insights in the analysis report.
*/
public void setInsights(java.util.Collection insights) {
if (insights == null) {
this.insights = null;
return;
}
this.insights = new java.util.ArrayList(insights);
}
/**
*
* The list of identified insights in the analysis report.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInsights(java.util.Collection)} or {@link #withInsights(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param insights
* The list of identified insights in the analysis report.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisReport withInsights(Insight... insights) {
if (this.insights == null) {
setInsights(new java.util.ArrayList(insights.length));
}
for (Insight ele : insights) {
this.insights.add(ele);
}
return this;
}
/**
*
* The list of identified insights in the analysis report.
*
*
* @param insights
* The list of identified insights in the analysis report.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalysisReport withInsights(java.util.Collection insights) {
setInsights(insights);
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 (getAnalysisReportId() != null)
sb.append("AnalysisReportId: ").append(getAnalysisReportId()).append(",");
if (getIdentifier() != null)
sb.append("Identifier: ").append(getIdentifier()).append(",");
if (getServiceType() != null)
sb.append("ServiceType: ").append(getServiceType()).append(",");
if (getCreateTime() != null)
sb.append("CreateTime: ").append(getCreateTime()).append(",");
if (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getEndTime() != null)
sb.append("EndTime: ").append(getEndTime()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getInsights() != null)
sb.append("Insights: ").append(getInsights());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AnalysisReport == false)
return false;
AnalysisReport other = (AnalysisReport) obj;
if (other.getAnalysisReportId() == null ^ this.getAnalysisReportId() == null)
return false;
if (other.getAnalysisReportId() != null && other.getAnalysisReportId().equals(this.getAnalysisReportId()) == false)
return false;
if (other.getIdentifier() == null ^ this.getIdentifier() == null)
return false;
if (other.getIdentifier() != null && other.getIdentifier().equals(this.getIdentifier()) == false)
return false;
if (other.getServiceType() == null ^ this.getServiceType() == null)
return false;
if (other.getServiceType() != null && other.getServiceType().equals(this.getServiceType()) == 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.getStartTime() == null ^ this.getStartTime() == null)
return false;
if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false)
return false;
if (other.getEndTime() == null ^ this.getEndTime() == null)
return false;
if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == 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.getInsights() == null ^ this.getInsights() == null)
return false;
if (other.getInsights() != null && other.getInsights().equals(this.getInsights()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAnalysisReportId() == null) ? 0 : getAnalysisReportId().hashCode());
hashCode = prime * hashCode + ((getIdentifier() == null) ? 0 : getIdentifier().hashCode());
hashCode = prime * hashCode + ((getServiceType() == null) ? 0 : getServiceType().hashCode());
hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getInsights() == null) ? 0 : getInsights().hashCode());
return hashCode;
}
@Override
public AnalysisReport clone() {
try {
return (AnalysisReport) 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.pi.model.transform.AnalysisReportMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}