Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.support.model;
 

A summary of a Trusted Advisor check result, including the alert status, last refresh, and number of resources examined.

 
 public class TrustedAdvisorCheckSummary implements SerializableCloneable {

    
The unique identifier for the Trusted Advisor check.
 
     private String checkId;

    
The time of the last refresh of the check.
 
     private String timestamp;

    
The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".
 
     private String status;

    
Specifies whether the Trusted Advisor check has flagged resources.
 
     private Boolean hasFlaggedResources;

    
Details about AWS resources that were analyzed in a call to Trusted Advisor DescribeTrustedAdvisorCheckSummaries.
 
Summary information that relates to the category of the check. Cost Optimizing is the only category that is currently supported.
 
The unique identifier for the Trusted Advisor check.

Returns:
The unique identifier for the Trusted Advisor check.
 
     public String getCheckId() {
         return ;
     }
    
    
The unique identifier for the Trusted Advisor check.

Parameters:
checkId The unique identifier for the Trusted Advisor check.
 
     public void setCheckId(String checkId) {
         this. = checkId;
     }
    
    
The unique identifier for the Trusted Advisor check.

Returns a reference to this object so that method calls can be chained together.

Parameters:
checkId The unique identifier for the Trusted Advisor check.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public TrustedAdvisorCheckSummary withCheckId(String checkId) {
         this. = checkId;
         return this;
     }

    
The time of the last refresh of the check.

Returns:
The time of the last refresh of the check.
 
     public String getTimestamp() {
         return ;
    }
    
    
The time of the last refresh of the check.

Parameters:
timestamp The time of the last refresh of the check.
    public void setTimestamp(String timestamp) {
        this. = timestamp;
    }
    
    
The time of the last refresh of the check.

Returns a reference to this object so that method calls can be chained together.

Parameters:
timestamp The time of the last refresh of the check.
Returns:
A reference to this updated object so that method calls can be chained together.
    public TrustedAdvisorCheckSummary withTimestamp(String timestamp) {
        this. = timestamp;
        return this;
    }

    
The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".

Returns:
The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".
    public String getStatus() {
        return ;
    }
    
    
The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".

Parameters:
status The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".
    public void setStatus(String status) {
        this. = status;
    }
    
    
The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".

Returns a reference to this object so that method calls can be chained together.

Parameters:
status The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".
Returns:
A reference to this updated object so that method calls can be chained together.
    public TrustedAdvisorCheckSummary withStatus(String status) {
        this. = status;
        return this;
    }

    
Specifies whether the Trusted Advisor check has flagged resources.

Returns:
Specifies whether the Trusted Advisor check has flagged resources.
    public Boolean isHasFlaggedResources() {
        return ;
    }
    
    
Specifies whether the Trusted Advisor check has flagged resources.

Parameters:
hasFlaggedResources Specifies whether the Trusted Advisor check has flagged resources.
    public void setHasFlaggedResources(Boolean hasFlaggedResources) {
        this. = hasFlaggedResources;
    }
    
    
Specifies whether the Trusted Advisor check has flagged resources.

Returns a reference to this object so that method calls can be chained together.

Parameters:
hasFlaggedResources Specifies whether the Trusted Advisor check has flagged resources.
Returns:
A reference to this updated object so that method calls can be chained together.
    public TrustedAdvisorCheckSummary withHasFlaggedResources(Boolean hasFlaggedResources) {
        this. = hasFlaggedResources;
        return this;
    }

    
Specifies whether the Trusted Advisor check has flagged resources.

Returns:
Specifies whether the Trusted Advisor check has flagged resources.
    public Boolean getHasFlaggedResources() {
        return ;
    }

    
Details about AWS resources that were analyzed in a call to Trusted Advisor DescribeTrustedAdvisorCheckSummaries.

Returns:
Details about AWS resources that were analyzed in a call to Trusted Advisor DescribeTrustedAdvisorCheckSummaries.
        return ;
    }
    
    
Details about AWS resources that were analyzed in a call to Trusted Advisor DescribeTrustedAdvisorCheckSummaries.

Parameters:
resourcesSummary Details about AWS resources that were analyzed in a call to Trusted Advisor DescribeTrustedAdvisorCheckSummaries.
    public void setResourcesSummary(TrustedAdvisorResourcesSummary resourcesSummary) {
        this. = resourcesSummary;
    }
    
    
Details about AWS resources that were analyzed in a call to Trusted Advisor DescribeTrustedAdvisorCheckSummaries.

Returns a reference to this object so that method calls can be chained together.

Parameters:
resourcesSummary Details about AWS resources that were analyzed in a call to Trusted Advisor DescribeTrustedAdvisorCheckSummaries.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = resourcesSummary;
        return this;
    }

    
Summary information that relates to the category of the check. Cost Optimizing is the only category that is currently supported.

Returns:
Summary information that relates to the category of the check. Cost Optimizing is the only category that is currently supported.
        return ;
    }
    
    
Summary information that relates to the category of the check. Cost Optimizing is the only category that is currently supported.

Parameters:
categorySpecificSummary Summary information that relates to the category of the check. Cost Optimizing is the only category that is currently supported.
    public void setCategorySpecificSummary(TrustedAdvisorCategorySpecificSummary categorySpecificSummary) {
        this. = categorySpecificSummary;
    }
    
    
Summary information that relates to the category of the check. Cost Optimizing is the only category that is currently supported.

Returns a reference to this object so that method calls can be chained together.

Parameters:
categorySpecificSummary Summary information that relates to the category of the check. Cost Optimizing is the only category that is currently supported.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = categorySpecificSummary;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getCheckId() != nullsb.append("CheckId: " + getCheckId() + ",");
        if (getTimestamp() != nullsb.append("Timestamp: " + getTimestamp() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (isHasFlaggedResources() != nullsb.append("HasFlaggedResources: " + isHasFlaggedResources() + ",");
        if (getResourcesSummary() != nullsb.append("ResourcesSummary: " + getResourcesSummary() + ",");
        if (getCategorySpecificSummary() != nullsb.append("CategorySpecificSummary: " + getCategorySpecificSummary() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCheckId() == null) ? 0 : getCheckId().hashCode()); 
        hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((isHasFlaggedResources() == null) ? 0 : isHasFlaggedResources().hashCode()); 
        hashCode = prime * hashCode + ((getResourcesSummary() == null) ? 0 : getResourcesSummary().hashCode()); 
        hashCode = prime * hashCode + ((getCategorySpecificSummary() == null) ? 0 : getCategorySpecificSummary().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof TrustedAdvisorCheckSummary == falsereturn false;
        
        if (other.getCheckId() == null ^ this.getCheckId() == nullreturn false;
        if (other.getCheckId() != null && other.getCheckId().equals(this.getCheckId()) == falsereturn false
        if (other.getTimestamp() == null ^ this.getTimestamp() == nullreturn false;
        if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.isHasFlaggedResources() == null ^ this.isHasFlaggedResources() == nullreturn false;
        if (other.isHasFlaggedResources() != null && other.isHasFlaggedResources().equals(this.isHasFlaggedResources()) == falsereturn false
        if (other.getResourcesSummary() == null ^ this.getResourcesSummary() == nullreturn false;
        if (other.getResourcesSummary() != null && other.getResourcesSummary().equals(this.getResourcesSummary()) == falsereturn false
        if (other.getCategorySpecificSummary() == null ^ this.getCategorySpecificSummary() == nullreturn false;
        if (other.getCategorySpecificSummary() != null && other.getCategorySpecificSummary().equals(this.getCategorySpecificSummary()) == falsereturn false
        return true;
    }
    
    @Override
    public TrustedAdvisorCheckSummary clone() {
        try {
            return (TrustedAdvisorCheckSummarysuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X