com.amazonaws.services.devopsguru.model.ProactiveInsightSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-devopsguru 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.devopsguru.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Details about a proactive insight. This object is returned by DescribeInsight.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ProactiveInsightSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of the proactive insight.
*
*/
private String id;
/**
*
* The name of the proactive insight.
*
*/
private String name;
/**
*
* The severity of the insight. For more information, see Understanding insight severities in the Amazon DevOps Guru User Guide.
*
*/
private String severity;
/**
*
* The status of the proactive insight.
*
*/
private String status;
private InsightTimeRange insightTimeRange;
private PredictionTimeRange predictionTimeRange;
private ResourceCollection resourceCollection;
/**
*
* A collection of the names of Amazon Web Services services.
*
*/
private ServiceCollection serviceCollection;
/**
*
* The Amazon Resource Names (ARNs) of the Amazon Web Services resources that generated this insight.
*
*/
private java.util.List associatedResourceArns;
/**
*
* The ID of the proactive insight.
*
*
* @param id
* The ID of the proactive insight.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The ID of the proactive insight.
*
*
* @return The ID of the proactive insight.
*/
public String getId() {
return this.id;
}
/**
*
* The ID of the proactive insight.
*
*
* @param id
* The ID of the proactive insight.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProactiveInsightSummary withId(String id) {
setId(id);
return this;
}
/**
*
* The name of the proactive insight.
*
*
* @param name
* The name of the proactive insight.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the proactive insight.
*
*
* @return The name of the proactive insight.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the proactive insight.
*
*
* @param name
* The name of the proactive insight.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProactiveInsightSummary withName(String name) {
setName(name);
return this;
}
/**
*
* The severity of the insight. For more information, see Understanding insight severities in the Amazon DevOps Guru User Guide.
*
*
* @param severity
* The severity of the insight. For more information, see Understanding insight severities in the Amazon DevOps Guru User Guide.
* @see InsightSeverity
*/
public void setSeverity(String severity) {
this.severity = severity;
}
/**
*
* The severity of the insight. For more information, see Understanding insight severities in the Amazon DevOps Guru User Guide.
*
*
* @return The severity of the insight. For more information, see Understanding insight severities in the Amazon DevOps Guru User Guide.
* @see InsightSeverity
*/
public String getSeverity() {
return this.severity;
}
/**
*
* The severity of the insight. For more information, see Understanding insight severities in the Amazon DevOps Guru User Guide.
*
*
* @param severity
* The severity of the insight. For more information, see Understanding insight severities in the Amazon DevOps Guru User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InsightSeverity
*/
public ProactiveInsightSummary withSeverity(String severity) {
setSeverity(severity);
return this;
}
/**
*
* The severity of the insight. For more information, see Understanding insight severities in the Amazon DevOps Guru User Guide.
*
*
* @param severity
* The severity of the insight. For more information, see Understanding insight severities in the Amazon DevOps Guru User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InsightSeverity
*/
public ProactiveInsightSummary withSeverity(InsightSeverity severity) {
this.severity = severity.toString();
return this;
}
/**
*
* The status of the proactive insight.
*
*
* @param status
* The status of the proactive insight.
* @see InsightStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the proactive insight.
*
*
* @return The status of the proactive insight.
* @see InsightStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the proactive insight.
*
*
* @param status
* The status of the proactive insight.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InsightStatus
*/
public ProactiveInsightSummary withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the proactive insight.
*
*
* @param status
* The status of the proactive insight.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InsightStatus
*/
public ProactiveInsightSummary withStatus(InsightStatus status) {
this.status = status.toString();
return this;
}
/**
* @param insightTimeRange
*/
public void setInsightTimeRange(InsightTimeRange insightTimeRange) {
this.insightTimeRange = insightTimeRange;
}
/**
* @return
*/
public InsightTimeRange getInsightTimeRange() {
return this.insightTimeRange;
}
/**
* @param insightTimeRange
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProactiveInsightSummary withInsightTimeRange(InsightTimeRange insightTimeRange) {
setInsightTimeRange(insightTimeRange);
return this;
}
/**
* @param predictionTimeRange
*/
public void setPredictionTimeRange(PredictionTimeRange predictionTimeRange) {
this.predictionTimeRange = predictionTimeRange;
}
/**
* @return
*/
public PredictionTimeRange getPredictionTimeRange() {
return this.predictionTimeRange;
}
/**
* @param predictionTimeRange
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProactiveInsightSummary withPredictionTimeRange(PredictionTimeRange predictionTimeRange) {
setPredictionTimeRange(predictionTimeRange);
return this;
}
/**
* @param resourceCollection
*/
public void setResourceCollection(ResourceCollection resourceCollection) {
this.resourceCollection = resourceCollection;
}
/**
* @return
*/
public ResourceCollection getResourceCollection() {
return this.resourceCollection;
}
/**
* @param resourceCollection
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProactiveInsightSummary withResourceCollection(ResourceCollection resourceCollection) {
setResourceCollection(resourceCollection);
return this;
}
/**
*
* A collection of the names of Amazon Web Services services.
*
*
* @param serviceCollection
* A collection of the names of Amazon Web Services services.
*/
public void setServiceCollection(ServiceCollection serviceCollection) {
this.serviceCollection = serviceCollection;
}
/**
*
* A collection of the names of Amazon Web Services services.
*
*
* @return A collection of the names of Amazon Web Services services.
*/
public ServiceCollection getServiceCollection() {
return this.serviceCollection;
}
/**
*
* A collection of the names of Amazon Web Services services.
*
*
* @param serviceCollection
* A collection of the names of Amazon Web Services services.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProactiveInsightSummary withServiceCollection(ServiceCollection serviceCollection) {
setServiceCollection(serviceCollection);
return this;
}
/**
*
* The Amazon Resource Names (ARNs) of the Amazon Web Services resources that generated this insight.
*
*
* @return The Amazon Resource Names (ARNs) of the Amazon Web Services resources that generated this insight.
*/
public java.util.List getAssociatedResourceArns() {
return associatedResourceArns;
}
/**
*
* The Amazon Resource Names (ARNs) of the Amazon Web Services resources that generated this insight.
*
*
* @param associatedResourceArns
* The Amazon Resource Names (ARNs) of the Amazon Web Services resources that generated this insight.
*/
public void setAssociatedResourceArns(java.util.Collection associatedResourceArns) {
if (associatedResourceArns == null) {
this.associatedResourceArns = null;
return;
}
this.associatedResourceArns = new java.util.ArrayList(associatedResourceArns);
}
/**
*
* The Amazon Resource Names (ARNs) of the Amazon Web Services resources that generated this insight.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAssociatedResourceArns(java.util.Collection)} or
* {@link #withAssociatedResourceArns(java.util.Collection)} if you want to override the existing values.
*
*
* @param associatedResourceArns
* The Amazon Resource Names (ARNs) of the Amazon Web Services resources that generated this insight.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProactiveInsightSummary withAssociatedResourceArns(String... associatedResourceArns) {
if (this.associatedResourceArns == null) {
setAssociatedResourceArns(new java.util.ArrayList(associatedResourceArns.length));
}
for (String ele : associatedResourceArns) {
this.associatedResourceArns.add(ele);
}
return this;
}
/**
*
* The Amazon Resource Names (ARNs) of the Amazon Web Services resources that generated this insight.
*
*
* @param associatedResourceArns
* The Amazon Resource Names (ARNs) of the Amazon Web Services resources that generated this insight.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProactiveInsightSummary withAssociatedResourceArns(java.util.Collection associatedResourceArns) {
setAssociatedResourceArns(associatedResourceArns);
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getSeverity() != null)
sb.append("Severity: ").append(getSeverity()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getInsightTimeRange() != null)
sb.append("InsightTimeRange: ").append(getInsightTimeRange()).append(",");
if (getPredictionTimeRange() != null)
sb.append("PredictionTimeRange: ").append(getPredictionTimeRange()).append(",");
if (getResourceCollection() != null)
sb.append("ResourceCollection: ").append(getResourceCollection()).append(",");
if (getServiceCollection() != null)
sb.append("ServiceCollection: ").append(getServiceCollection()).append(",");
if (getAssociatedResourceArns() != null)
sb.append("AssociatedResourceArns: ").append(getAssociatedResourceArns());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ProactiveInsightSummary == false)
return false;
ProactiveInsightSummary other = (ProactiveInsightSummary) obj;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == 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.getSeverity() == null ^ this.getSeverity() == null)
return false;
if (other.getSeverity() != null && other.getSeverity().equals(this.getSeverity()) == 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.getInsightTimeRange() == null ^ this.getInsightTimeRange() == null)
return false;
if (other.getInsightTimeRange() != null && other.getInsightTimeRange().equals(this.getInsightTimeRange()) == false)
return false;
if (other.getPredictionTimeRange() == null ^ this.getPredictionTimeRange() == null)
return false;
if (other.getPredictionTimeRange() != null && other.getPredictionTimeRange().equals(this.getPredictionTimeRange()) == false)
return false;
if (other.getResourceCollection() == null ^ this.getResourceCollection() == null)
return false;
if (other.getResourceCollection() != null && other.getResourceCollection().equals(this.getResourceCollection()) == false)
return false;
if (other.getServiceCollection() == null ^ this.getServiceCollection() == null)
return false;
if (other.getServiceCollection() != null && other.getServiceCollection().equals(this.getServiceCollection()) == false)
return false;
if (other.getAssociatedResourceArns() == null ^ this.getAssociatedResourceArns() == null)
return false;
if (other.getAssociatedResourceArns() != null && other.getAssociatedResourceArns().equals(this.getAssociatedResourceArns()) == 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 + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getSeverity() == null) ? 0 : getSeverity().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getInsightTimeRange() == null) ? 0 : getInsightTimeRange().hashCode());
hashCode = prime * hashCode + ((getPredictionTimeRange() == null) ? 0 : getPredictionTimeRange().hashCode());
hashCode = prime * hashCode + ((getResourceCollection() == null) ? 0 : getResourceCollection().hashCode());
hashCode = prime * hashCode + ((getServiceCollection() == null) ? 0 : getServiceCollection().hashCode());
hashCode = prime * hashCode + ((getAssociatedResourceArns() == null) ? 0 : getAssociatedResourceArns().hashCode());
return hashCode;
}
@Override
public ProactiveInsightSummary clone() {
try {
return (ProactiveInsightSummary) 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.devopsguru.model.transform.ProactiveInsightSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}