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;
 

The results of a Trusted Advisor check returned by DescribeTrustedAdvisorCheckResult.

 
 public class TrustedAdvisorCheckResult 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;

    
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 details about each resource listed in the check result.
 
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 TrustedAdvisorCheckResult 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 TrustedAdvisorCheckResult 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 TrustedAdvisorCheckResult withStatus(String status) {
        this. = status;
        return this;
    }

    
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;
    }

    
The details about each resource listed in the check result.

Returns:
The details about each resource listed in the check result.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The details about each resource listed in the check result.

Parameters:
flaggedResources The details about each resource listed in the check result.
    public void setFlaggedResources(java.util.Collection<TrustedAdvisorResourceDetailflaggedResources) {
        if (flaggedResources == null) {
            this. = null;
            return;
        }
        flaggedResourcesCopy.addAll(flaggedResources);
        this. = flaggedResourcesCopy;
    }
    
    
The details about each resource listed in the check result.

NOTE: This method appends the values to the existing list (if any). Use setFlaggedResources(java.util.Collection) or withFlaggedResources(java.util.Collection) if you want to override the existing values.

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

Parameters:
flaggedResources The details about each resource listed in the check result.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (getFlaggedResources() == nullsetFlaggedResources(new java.util.ArrayList<TrustedAdvisorResourceDetail>(flaggedResources.length));
        for (TrustedAdvisorResourceDetail value : flaggedResources) {
            getFlaggedResources().add(value);
        }
        return this;
    }
    
    
The details about each resource listed in the check result.

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

Parameters:
flaggedResources The details about each resource listed in the check result.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (flaggedResources == null) {
            this. = null;
        } else {
            flaggedResourcesCopy.addAll(flaggedResources);
            this. = flaggedResourcesCopy;
        }
        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 (getResourcesSummary() != nullsb.append("ResourcesSummary: " + getResourcesSummary() + ",");
        if (getCategorySpecificSummary() != nullsb.append("CategorySpecificSummary: " + getCategorySpecificSummary() + ",");
        if (getFlaggedResources() != nullsb.append("FlaggedResources: " + getFlaggedResources() );
        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 + ((getResourcesSummary() == null) ? 0 : getResourcesSummary().hashCode()); 
        hashCode = prime * hashCode + ((getCategorySpecificSummary() == null) ? 0 : getCategorySpecificSummary().hashCode()); 
        hashCode = prime * hashCode + ((getFlaggedResources() == null) ? 0 : getFlaggedResources().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof TrustedAdvisorCheckResult == 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.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
        if (other.getFlaggedResources() == null ^ this.getFlaggedResources() == nullreturn false;
        if (other.getFlaggedResources() != null && other.getFlaggedResources().equals(this.getFlaggedResources()) == falsereturn false
        return true;
    }
    
    @Override
    public TrustedAdvisorCheckResult clone() {
        try {
            return (TrustedAdvisorCheckResultsuper.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