
com.amazonaws.services.eks.model.InsightSummary Maven / Gradle / Ivy
/*
* 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.eks.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The summarized description of the insight.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class InsightSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of the insight.
*
*/
private String id;
/**
*
* The name of the insight.
*
*/
private String name;
/**
*
* The category of the insight.
*
*/
private String category;
/**
*
* The Kubernetes minor version associated with an insight if applicable.
*
*/
private String kubernetesVersion;
/**
*
* The time Amazon EKS last successfully completed a refresh of this insight check on the cluster.
*
*/
private java.util.Date lastRefreshTime;
/**
*
* The time the status of the insight last changed.
*
*/
private java.util.Date lastTransitionTime;
/**
*
* The description of the insight which includes alert criteria, remediation recommendation, and additional
* resources (contains Markdown).
*
*/
private String description;
/**
*
* An object containing more detail on the status of the insight.
*
*/
private InsightStatus insightStatus;
/**
*
* The ID of the insight.
*
*
* @param id
* The ID of the insight.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The ID of the insight.
*
*
* @return The ID of the insight.
*/
public String getId() {
return this.id;
}
/**
*
* The ID of the insight.
*
*
* @param id
* The ID of the insight.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightSummary withId(String id) {
setId(id);
return this;
}
/**
*
* The name of the insight.
*
*
* @param name
* The name of the insight.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the insight.
*
*
* @return The name of the insight.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the insight.
*
*
* @param name
* The name of the insight.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightSummary withName(String name) {
setName(name);
return this;
}
/**
*
* The category of the insight.
*
*
* @param category
* The category of the insight.
* @see Category
*/
public void setCategory(String category) {
this.category = category;
}
/**
*
* The category of the insight.
*
*
* @return The category of the insight.
* @see Category
*/
public String getCategory() {
return this.category;
}
/**
*
* The category of the insight.
*
*
* @param category
* The category of the insight.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Category
*/
public InsightSummary withCategory(String category) {
setCategory(category);
return this;
}
/**
*
* The category of the insight.
*
*
* @param category
* The category of the insight.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Category
*/
public InsightSummary withCategory(Category category) {
this.category = category.toString();
return this;
}
/**
*
* The Kubernetes minor version associated with an insight if applicable.
*
*
* @param kubernetesVersion
* The Kubernetes minor version associated with an insight if applicable.
*/
public void setKubernetesVersion(String kubernetesVersion) {
this.kubernetesVersion = kubernetesVersion;
}
/**
*
* The Kubernetes minor version associated with an insight if applicable.
*
*
* @return The Kubernetes minor version associated with an insight if applicable.
*/
public String getKubernetesVersion() {
return this.kubernetesVersion;
}
/**
*
* The Kubernetes minor version associated with an insight if applicable.
*
*
* @param kubernetesVersion
* The Kubernetes minor version associated with an insight if applicable.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightSummary withKubernetesVersion(String kubernetesVersion) {
setKubernetesVersion(kubernetesVersion);
return this;
}
/**
*
* The time Amazon EKS last successfully completed a refresh of this insight check on the cluster.
*
*
* @param lastRefreshTime
* The time Amazon EKS last successfully completed a refresh of this insight check on the cluster.
*/
public void setLastRefreshTime(java.util.Date lastRefreshTime) {
this.lastRefreshTime = lastRefreshTime;
}
/**
*
* The time Amazon EKS last successfully completed a refresh of this insight check on the cluster.
*
*
* @return The time Amazon EKS last successfully completed a refresh of this insight check on the cluster.
*/
public java.util.Date getLastRefreshTime() {
return this.lastRefreshTime;
}
/**
*
* The time Amazon EKS last successfully completed a refresh of this insight check on the cluster.
*
*
* @param lastRefreshTime
* The time Amazon EKS last successfully completed a refresh of this insight check on the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightSummary withLastRefreshTime(java.util.Date lastRefreshTime) {
setLastRefreshTime(lastRefreshTime);
return this;
}
/**
*
* The time the status of the insight last changed.
*
*
* @param lastTransitionTime
* The time the status of the insight last changed.
*/
public void setLastTransitionTime(java.util.Date lastTransitionTime) {
this.lastTransitionTime = lastTransitionTime;
}
/**
*
* The time the status of the insight last changed.
*
*
* @return The time the status of the insight last changed.
*/
public java.util.Date getLastTransitionTime() {
return this.lastTransitionTime;
}
/**
*
* The time the status of the insight last changed.
*
*
* @param lastTransitionTime
* The time the status of the insight last changed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightSummary withLastTransitionTime(java.util.Date lastTransitionTime) {
setLastTransitionTime(lastTransitionTime);
return this;
}
/**
*
* The description of the insight which includes alert criteria, remediation recommendation, and additional
* resources (contains Markdown).
*
*
* @param description
* The description of the insight which includes alert criteria, remediation recommendation, and additional
* resources (contains Markdown).
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the insight which includes alert criteria, remediation recommendation, and additional
* resources (contains Markdown).
*
*
* @return The description of the insight which includes alert criteria, remediation recommendation, and additional
* resources (contains Markdown).
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the insight which includes alert criteria, remediation recommendation, and additional
* resources (contains Markdown).
*
*
* @param description
* The description of the insight which includes alert criteria, remediation recommendation, and additional
* resources (contains Markdown).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightSummary withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* An object containing more detail on the status of the insight.
*
*
* @param insightStatus
* An object containing more detail on the status of the insight.
*/
public void setInsightStatus(InsightStatus insightStatus) {
this.insightStatus = insightStatus;
}
/**
*
* An object containing more detail on the status of the insight.
*
*
* @return An object containing more detail on the status of the insight.
*/
public InsightStatus getInsightStatus() {
return this.insightStatus;
}
/**
*
* An object containing more detail on the status of the insight.
*
*
* @param insightStatus
* An object containing more detail on the status of the insight.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InsightSummary withInsightStatus(InsightStatus insightStatus) {
setInsightStatus(insightStatus);
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 (getCategory() != null)
sb.append("Category: ").append(getCategory()).append(",");
if (getKubernetesVersion() != null)
sb.append("KubernetesVersion: ").append(getKubernetesVersion()).append(",");
if (getLastRefreshTime() != null)
sb.append("LastRefreshTime: ").append(getLastRefreshTime()).append(",");
if (getLastTransitionTime() != null)
sb.append("LastTransitionTime: ").append(getLastTransitionTime()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getInsightStatus() != null)
sb.append("InsightStatus: ").append(getInsightStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof InsightSummary == false)
return false;
InsightSummary other = (InsightSummary) 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.getCategory() == null ^ this.getCategory() == null)
return false;
if (other.getCategory() != null && other.getCategory().equals(this.getCategory()) == false)
return false;
if (other.getKubernetesVersion() == null ^ this.getKubernetesVersion() == null)
return false;
if (other.getKubernetesVersion() != null && other.getKubernetesVersion().equals(this.getKubernetesVersion()) == false)
return false;
if (other.getLastRefreshTime() == null ^ this.getLastRefreshTime() == null)
return false;
if (other.getLastRefreshTime() != null && other.getLastRefreshTime().equals(this.getLastRefreshTime()) == false)
return false;
if (other.getLastTransitionTime() == null ^ this.getLastTransitionTime() == null)
return false;
if (other.getLastTransitionTime() != null && other.getLastTransitionTime().equals(this.getLastTransitionTime()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getInsightStatus() == null ^ this.getInsightStatus() == null)
return false;
if (other.getInsightStatus() != null && other.getInsightStatus().equals(this.getInsightStatus()) == 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 + ((getCategory() == null) ? 0 : getCategory().hashCode());
hashCode = prime * hashCode + ((getKubernetesVersion() == null) ? 0 : getKubernetesVersion().hashCode());
hashCode = prime * hashCode + ((getLastRefreshTime() == null) ? 0 : getLastRefreshTime().hashCode());
hashCode = prime * hashCode + ((getLastTransitionTime() == null) ? 0 : getLastTransitionTime().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getInsightStatus() == null) ? 0 : getInsightStatus().hashCode());
return hashCode;
}
@Override
public InsightSummary clone() {
try {
return (InsightSummary) 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.eks.model.transform.InsightSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}