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 description and metadata for a Trusted Advisor check.

 
 public class TrustedAdvisorCheckDescription implements SerializableCloneable {

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

    
The display name for the Trusted Advisor check.
 
     private String name;

    
The description of the Trusted Advisor check, which includes the alert criteria and recommended actions (contains HTML markup).
 
     private String description;

    
The category of the Trusted Advisor check.
 
     private String category;

    
The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the Metadata element of the TrustedAdvisorResourceDetail for the check. Metadata contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.
 
The unique identifier for the Trusted Advisor check.

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

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

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

Parameters:
id The unique identifier for the Trusted Advisor check.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         this. = id;
         return this;
     }

    
The display name for the Trusted Advisor check.

Returns:
The display name for the Trusted Advisor check.
 
     public String getName() {
         return ;
     }
    
    
The display name for the Trusted Advisor check.

Parameters:
name The display name for the Trusted Advisor check.
    public void setName(String name) {
        this. = name;
    }
    
    
The display name for the Trusted Advisor check.

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

Parameters:
name The display name for the Trusted Advisor check.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = name;
        return this;
    }

    
The description of the Trusted Advisor check, which includes the alert criteria and recommended actions (contains HTML markup).

Returns:
The description of the Trusted Advisor check, which includes the alert criteria and recommended actions (contains HTML markup).
    public String getDescription() {
        return ;
    }
    
    
The description of the Trusted Advisor check, which includes the alert criteria and recommended actions (contains HTML markup).

Parameters:
description The description of the Trusted Advisor check, which includes the alert criteria and recommended actions (contains HTML markup).
    public void setDescription(String description) {
        this. = description;
    }
    
    
The description of the Trusted Advisor check, which includes the alert criteria and recommended actions (contains HTML markup).

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

Parameters:
description The description of the Trusted Advisor check, which includes the alert criteria and recommended actions (contains HTML markup).
Returns:
A reference to this updated object so that method calls can be chained together.
    public TrustedAdvisorCheckDescription withDescription(String description) {
        this. = description;
        return this;
    }

    
The category of the Trusted Advisor check.

Returns:
The category of the Trusted Advisor check.
    public String getCategory() {
        return ;
    }
    
    
The category of the Trusted Advisor check.

Parameters:
category The category of the Trusted Advisor check.
    public void setCategory(String category) {
        this. = category;
    }
    
    
The category of the Trusted Advisor check.

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

Parameters:
category The category of the Trusted Advisor check.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = category;
        return this;
    }

    
The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the Metadata element of the TrustedAdvisorResourceDetail for the check. Metadata contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.

Returns:
The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the Metadata element of the TrustedAdvisorResourceDetail for the check. Metadata contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.
    public java.util.List<StringgetMetadata() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the Metadata element of the TrustedAdvisorResourceDetail for the check. Metadata contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.

Parameters:
metadata The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the Metadata element of the TrustedAdvisorResourceDetail for the check. Metadata contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.
    public void setMetadata(java.util.Collection<Stringmetadata) {
        if (metadata == null) {
            this. = null;
            return;
        }
        metadataCopy.addAll(metadata);
        this. = metadataCopy;
    }
    
    
The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the Metadata element of the TrustedAdvisorResourceDetail for the check. Metadata contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.

NOTE: This method appends the values to the existing list (if any). Use setMetadata(java.util.Collection) or withMetadata(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:
metadata The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the Metadata element of the TrustedAdvisorResourceDetail for the check. Metadata contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.
Returns:
A reference to this updated object so that method calls can be chained together.
    public TrustedAdvisorCheckDescription withMetadata(String... metadata) {
        if (getMetadata() == nullsetMetadata(new java.util.ArrayList<String>(metadata.length));
        for (String value : metadata) {
            getMetadata().add(value);
        }
        return this;
    }
    
    
The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the Metadata element of the TrustedAdvisorResourceDetail for the check. Metadata contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.

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

Parameters:
metadata The column headings for the data returned by the Trusted Advisor check. The order of the headings corresponds to the order of the data in the Metadata element of the TrustedAdvisorResourceDetail for the check. Metadata contains all the data that is shown in the Excel download, even in those cases where the UI shows just summary data.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (metadata == null) {
            this. = null;
        } else {
            metadataCopy.addAll(metadata);
            this. = metadataCopy;
        }
        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 (getId() != nullsb.append("Id: " + getId() + ",");
        if (getName() != nullsb.append("Name: " + getName() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getCategory() != nullsb.append("Category: " + getCategory() + ",");
        if (getMetadata() != nullsb.append("Metadata: " + getMetadata() );
        sb.append("}");
        return sb.toString();
    }
    
    @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 + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getCategory() == null) ? 0 : getCategory().hashCode()); 
        hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof TrustedAdvisorCheckDescription == falsereturn false;
        
        if (other.getId() == null ^ this.getId() == nullreturn false;
        if (other.getId() != null && other.getId().equals(this.getId()) == falsereturn false
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getCategory() == null ^ this.getCategory() == nullreturn false;
        if (other.getCategory() != null && other.getCategory().equals(this.getCategory()) == falsereturn false
        if (other.getMetadata() == null ^ this.getMetadata() == nullreturn false;
        if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == falsereturn false
        return true;
    }
    
    @Override
        try {
            return (TrustedAdvisorCheckDescriptionsuper.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