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 JSON-formatted object that contains the metadata for a support case. It is contained the response from a DescribeCases request. CaseDetails contains the following fields:

  1. CaseID. The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case- 12345678910-2013-c4c1d2bf33c5cf47 .
  2. CategoryCode. The category of problem for the AWS Support case. Corresponds to the CategoryCode values returned by a call to DescribeServices.
  3. DisplayId. The identifier for the case on pages in the AWS Support Center.
  4. Language. The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.
  5. RecentCommunications. One or more Communication objects. Fields of these objects are Attachments , Body , CaseId , SubmittedBy , and TimeCreated .
  6. NextToken. A resumption point for pagination.
  7. ServiceCode. The identifier for the AWS service that corresponds to the service code defined in the call to DescribeServices.
  8. SeverityCode. The severity code assigned to the case. Contains one of the values returned by the call to DescribeSeverityLevels.
  9. Status. The status of the case in the AWS Support Center.
  10. Subject. The subject line of the case.
  11. SubmittedBy. The email address of the account that submitted the case.
  12. TimeCreated. The time the case was created, in ISO-8601 format.
 
 public class CaseDetails implements SerializableCloneable {

    
The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47
 
     private String caseId;

    
The ID displayed for the case in the AWS Support Center. This is a numeric string.
 
     private String displayId;

    
The subject line for the case in the AWS Support Center.
 
     private String subject;

    
The status of the case.
 
     private String status;

    
The code for the AWS service returned by the call to DescribeServices.
 
     private String serviceCode;

    
The category of problem for the AWS Support case.
 
     private String categoryCode;

    
The code for the severity level returned by the call to DescribeSeverityLevels.
 
    private String severityCode;

    
The email address of the account that submitted the case.
    private String submittedBy;

    
The time that the case was case created in the AWS Support Center.
    private String timeCreated;

    
The five most recent communications between you and AWS Support Center, including the IDs of any attachments to the communications. Also includes a nextToken that you can use to retrieve earlier communications.
The email addresses that receive copies of communication about the case.
The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.
    private String language;

    
The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47

Returns:
The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47
    public String getCaseId() {
        return ;
    }
    
    
The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47

Parameters:
caseId The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47
    public void setCaseId(String caseId) {
        this. = caseId;
    }
    
    
The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47

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

Parameters:
caseId The AWS Support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-12345678910-2013-c4c1d2bf33c5cf47
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withCaseId(String caseId) {
        this. = caseId;
        return this;
    }

    
The ID displayed for the case in the AWS Support Center. This is a numeric string.

Returns:
The ID displayed for the case in the AWS Support Center. This is a numeric string.
    public String getDisplayId() {
        return ;
    }
    
    
The ID displayed for the case in the AWS Support Center. This is a numeric string.

Parameters:
displayId The ID displayed for the case in the AWS Support Center. This is a numeric string.
    public void setDisplayId(String displayId) {
        this. = displayId;
    }
    
    
The ID displayed for the case in the AWS Support Center. This is a numeric string.

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

Parameters:
displayId The ID displayed for the case in the AWS Support Center. This is a numeric string.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withDisplayId(String displayId) {
        this. = displayId;
        return this;
    }

    
The subject line for the case in the AWS Support Center.

Returns:
The subject line for the case in the AWS Support Center.
    public String getSubject() {
        return ;
    }
    
    
The subject line for the case in the AWS Support Center.

Parameters:
subject The subject line for the case in the AWS Support Center.
    public void setSubject(String subject) {
        this. = subject;
    }
    
    
The subject line for the case in the AWS Support Center.

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

Parameters:
subject The subject line for the case in the AWS Support Center.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withSubject(String subject) {
        this. = subject;
        return this;
    }

    
The status of the case.

Returns:
The status of the case.
    public String getStatus() {
        return ;
    }
    
    
The status of the case.

Parameters:
status The status of the case.
    public void setStatus(String status) {
        this. = status;
    }
    
    
The status of the case.

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

Parameters:
status The status of the case.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withStatus(String status) {
        this. = status;
        return this;
    }

    
The code for the AWS service returned by the call to DescribeServices.

Returns:
The code for the AWS service returned by the call to DescribeServices.
    public String getServiceCode() {
        return ;
    }
    
    
The code for the AWS service returned by the call to DescribeServices.

Parameters:
serviceCode The code for the AWS service returned by the call to DescribeServices.
    public void setServiceCode(String serviceCode) {
        this. = serviceCode;
    }
    
    
The code for the AWS service returned by the call to DescribeServices.

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

Parameters:
serviceCode The code for the AWS service returned by the call to DescribeServices.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withServiceCode(String serviceCode) {
        this. = serviceCode;
        return this;
    }

    
The category of problem for the AWS Support case.

Returns:
The category of problem for the AWS Support case.
    public String getCategoryCode() {
        return ;
    }
    
    
The category of problem for the AWS Support case.

Parameters:
categoryCode The category of problem for the AWS Support case.
    public void setCategoryCode(String categoryCode) {
        this. = categoryCode;
    }
    
    
The category of problem for the AWS Support case.

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

Parameters:
categoryCode The category of problem for the AWS Support case.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withCategoryCode(String categoryCode) {
        this. = categoryCode;
        return this;
    }

    
The code for the severity level returned by the call to DescribeSeverityLevels.

Returns:
The code for the severity level returned by the call to DescribeSeverityLevels.
    public String getSeverityCode() {
        return ;
    }
    
    
The code for the severity level returned by the call to DescribeSeverityLevels.

Parameters:
severityCode The code for the severity level returned by the call to DescribeSeverityLevels.
    public void setSeverityCode(String severityCode) {
        this. = severityCode;
    }
    
    
The code for the severity level returned by the call to DescribeSeverityLevels.

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

Parameters:
severityCode The code for the severity level returned by the call to DescribeSeverityLevels.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withSeverityCode(String severityCode) {
        this. = severityCode;
        return this;
    }

    
The email address of the account that submitted the case.

Returns:
The email address of the account that submitted the case.
    public String getSubmittedBy() {
        return ;
    }
    
    
The email address of the account that submitted the case.

Parameters:
submittedBy The email address of the account that submitted the case.
    public void setSubmittedBy(String submittedBy) {
        this. = submittedBy;
    }
    
    
The email address of the account that submitted the case.

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

Parameters:
submittedBy The email address of the account that submitted the case.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withSubmittedBy(String submittedBy) {
        this. = submittedBy;
        return this;
    }

    
The time that the case was case created in the AWS Support Center.

Returns:
The time that the case was case created in the AWS Support Center.
    public String getTimeCreated() {
        return ;
    }
    
    
The time that the case was case created in the AWS Support Center.

Parameters:
timeCreated The time that the case was case created in the AWS Support Center.
    public void setTimeCreated(String timeCreated) {
        this. = timeCreated;
    }
    
    
The time that the case was case created in the AWS Support Center.

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

Parameters:
timeCreated The time that the case was case created in the AWS Support Center.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withTimeCreated(String timeCreated) {
        this. = timeCreated;
        return this;
    }

    
The five most recent communications between you and AWS Support Center, including the IDs of any attachments to the communications. Also includes a nextToken that you can use to retrieve earlier communications.

Returns:
The five most recent communications between you and AWS Support Center, including the IDs of any attachments to the communications. Also includes a nextToken that you can use to retrieve earlier communications.
        return ;
    }
    
    
The five most recent communications between you and AWS Support Center, including the IDs of any attachments to the communications. Also includes a nextToken that you can use to retrieve earlier communications.

Parameters:
recentCommunications The five most recent communications between you and AWS Support Center, including the IDs of any attachments to the communications. Also includes a nextToken that you can use to retrieve earlier communications.
    public void setRecentCommunications(RecentCaseCommunications recentCommunications) {
        this. = recentCommunications;
    }
    
    
The five most recent communications between you and AWS Support Center, including the IDs of any attachments to the communications. Also includes a nextToken that you can use to retrieve earlier communications.

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

Parameters:
recentCommunications The five most recent communications between you and AWS Support Center, including the IDs of any attachments to the communications. Also includes a nextToken that you can use to retrieve earlier communications.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withRecentCommunications(RecentCaseCommunications recentCommunications) {
        this. = recentCommunications;
        return this;
    }

    
The email addresses that receive copies of communication about the case.

Returns:
The email addresses that receive copies of communication about the case.
    public java.util.List<StringgetCcEmailAddresses() {
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The email addresses that receive copies of communication about the case.

Parameters:
ccEmailAddresses The email addresses that receive copies of communication about the case.
    public void setCcEmailAddresses(java.util.Collection<StringccEmailAddresses) {
        if (ccEmailAddresses == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringccEmailAddressesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(ccEmailAddresses.size());
        ccEmailAddressesCopy.addAll(ccEmailAddresses);
        this. = ccEmailAddressesCopy;
    }
    
    
The email addresses that receive copies of communication about the case.

NOTE: This method appends the values to the existing list (if any). Use setCcEmailAddresses(java.util.Collection) or withCcEmailAddresses(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:
ccEmailAddresses The email addresses that receive copies of communication about the case.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withCcEmailAddresses(String... ccEmailAddresses) {
        if (getCcEmailAddresses() == nullsetCcEmailAddresses(new java.util.ArrayList<String>(ccEmailAddresses.length));
        for (String value : ccEmailAddresses) {
            getCcEmailAddresses().add(value);
        }
        return this;
    }
    
    
The email addresses that receive copies of communication about the case.

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

Parameters:
ccEmailAddresses The email addresses that receive copies of communication about the case.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withCcEmailAddresses(java.util.Collection<StringccEmailAddresses) {
        if (ccEmailAddresses == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringccEmailAddressesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(ccEmailAddresses.size());
            ccEmailAddressesCopy.addAll(ccEmailAddresses);
            this. = ccEmailAddressesCopy;
        }
        return this;
    }

    
The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.

Returns:
The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.
    public String getLanguage() {
        return ;
    }
    
    
The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.

Parameters:
language The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.
    public void setLanguage(String language) {
        this. = language;
    }
    
    
The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.

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

Parameters:
language The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CaseDetails withLanguage(String language) {
        this. = language;
        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 (getCaseId() != nullsb.append("CaseId: " + getCaseId() + ",");
        if (getDisplayId() != nullsb.append("DisplayId: " + getDisplayId() + ",");
        if (getSubject() != nullsb.append("Subject: " + getSubject() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getServiceCode() != nullsb.append("ServiceCode: " + getServiceCode() + ",");
        if (getCategoryCode() != nullsb.append("CategoryCode: " + getCategoryCode() + ",");
        if (getSeverityCode() != nullsb.append("SeverityCode: " + getSeverityCode() + ",");
        if (getSubmittedBy() != nullsb.append("SubmittedBy: " + getSubmittedBy() + ",");
        if (getTimeCreated() != nullsb.append("TimeCreated: " + getTimeCreated() + ",");
        if (getRecentCommunications() != nullsb.append("RecentCommunications: " + getRecentCommunications() + ",");
        if (getCcEmailAddresses() != nullsb.append("CcEmailAddresses: " + getCcEmailAddresses() + ",");
        if (getLanguage() != nullsb.append("Language: " + getLanguage() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCaseId() == null) ? 0 : getCaseId().hashCode()); 
        hashCode = prime * hashCode + ((getDisplayId() == null) ? 0 : getDisplayId().hashCode()); 
        hashCode = prime * hashCode + ((getSubject() == null) ? 0 : getSubject().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getServiceCode() == null) ? 0 : getServiceCode().hashCode()); 
        hashCode = prime * hashCode + ((getCategoryCode() == null) ? 0 : getCategoryCode().hashCode()); 
        hashCode = prime * hashCode + ((getSeverityCode() == null) ? 0 : getSeverityCode().hashCode()); 
        hashCode = prime * hashCode + ((getSubmittedBy() == null) ? 0 : getSubmittedBy().hashCode()); 
        hashCode = prime * hashCode + ((getTimeCreated() == null) ? 0 : getTimeCreated().hashCode()); 
        hashCode = prime * hashCode + ((getRecentCommunications() == null) ? 0 : getRecentCommunications().hashCode()); 
        hashCode = prime * hashCode + ((getCcEmailAddresses() == null) ? 0 : getCcEmailAddresses().hashCode()); 
        hashCode = prime * hashCode + ((getLanguage() == null) ? 0 : getLanguage().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CaseDetails == falsereturn false;
        CaseDetails other = (CaseDetails)obj;
        
        if (other.getCaseId() == null ^ this.getCaseId() == nullreturn false;
        if (other.getCaseId() != null && other.getCaseId().equals(this.getCaseId()) == falsereturn false
        if (other.getDisplayId() == null ^ this.getDisplayId() == nullreturn false;
        if (other.getDisplayId() != null && other.getDisplayId().equals(this.getDisplayId()) == falsereturn false
        if (other.getSubject() == null ^ this.getSubject() == nullreturn false;
        if (other.getSubject() != null && other.getSubject().equals(this.getSubject()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getServiceCode() == null ^ this.getServiceCode() == nullreturn false;
        if (other.getServiceCode() != null && other.getServiceCode().equals(this.getServiceCode()) == falsereturn false
        if (other.getCategoryCode() == null ^ this.getCategoryCode() == nullreturn false;
        if (other.getCategoryCode() != null && other.getCategoryCode().equals(this.getCategoryCode()) == falsereturn false
        if (other.getSeverityCode() == null ^ this.getSeverityCode() == nullreturn false;
        if (other.getSeverityCode() != null && other.getSeverityCode().equals(this.getSeverityCode()) == falsereturn false
        if (other.getSubmittedBy() == null ^ this.getSubmittedBy() == nullreturn false;
        if (other.getSubmittedBy() != null && other.getSubmittedBy().equals(this.getSubmittedBy()) == falsereturn false
        if (other.getTimeCreated() == null ^ this.getTimeCreated() == nullreturn false;
        if (other.getTimeCreated() != null && other.getTimeCreated().equals(this.getTimeCreated()) == falsereturn false
        if (other.getRecentCommunications() == null ^ this.getRecentCommunications() == nullreturn false;
        if (other.getRecentCommunications() != null && other.getRecentCommunications().equals(this.getRecentCommunications()) == falsereturn false
        if (other.getCcEmailAddresses() == null ^ this.getCcEmailAddresses() == nullreturn false;
        if (other.getCcEmailAddresses() != null && other.getCcEmailAddresses().equals(this.getCcEmailAddresses()) == falsereturn false
        if (other.getLanguage() == null ^ this.getLanguage() == nullreturn false;
        if (other.getLanguage() != null && other.getLanguage().equals(this.getLanguage()) == falsereturn false
        return true;
    }
    
    @Override
    public CaseDetails clone() {
        try {
            return (CaseDetailssuper.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