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;
 
 
Container for the parameters to the DescribeCases operation.

Returns a list of cases that you specify by passing one or more case IDs. In addition, you can filter the cases by date by setting values for the AfterTime and BeforeTime request parameters. You can set values for the IncludeResolvedCases and IncludeCommunications request parameters to control how much information is returned.

Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request for data might cause an error.

The response returns the following in JSON format:

  1. One or more CaseDetails data types.
  2. One or more NextToken values, which specify where to paginate the returned records represented by the CaseDetails objects.

 
 public class DescribeCasesRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.

Constraints:
Length: 0 - 100

 
The ID displayed for a case in the AWS Support Center user interface.
 
     private String displayId;

    
The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
 
     private String afterTime;

    
The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
 
     private String beforeTime;

    
Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.
 
     private Boolean includeResolvedCases;

    
A resumption point for pagination.
 
     private String nextToken;

    
The maximum number of results to return before paginating.

Constraints:
Range: 10 - 100

 
     private Integer maxResults;

    
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;

    
Specifies whether communications should be included in the DescribeCases results. The default is true.
    private Boolean includeCommunications;

    
A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.

Constraints:
Length: 0 - 100

Returns:
A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.
    public java.util.List<StringgetCaseIdList() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.

Constraints:
Length: 0 - 100

Parameters:
caseIdList A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.
    public void setCaseIdList(java.util.Collection<StringcaseIdList) {
        if (caseIdList == null) {
            this. = null;
            return;
        }
        caseIdListCopy.addAll(caseIdList);
        this. = caseIdListCopy;
    }
    
    
A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.

NOTE: This method appends the values to the existing list (if any). Use setCaseIdList(java.util.Collection) or withCaseIdList(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.

Constraints:
Length: 0 - 100

Parameters:
caseIdList A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeCasesRequest withCaseIdList(String... caseIdList) {
        if (getCaseIdList() == nullsetCaseIdList(new java.util.ArrayList<String>(caseIdList.length));
        for (String value : caseIdList) {
            getCaseIdList().add(value);
        }
        return this;
    }
    
    
A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.

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

Constraints:
Length: 0 - 100

Parameters:
caseIdList A list of ID numbers of the support cases you want returned. The maximum number of cases is 100.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (caseIdList == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringcaseIdListCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(caseIdList.size());
            caseIdListCopy.addAll(caseIdList);
            this. = caseIdListCopy;
        }
        return this;
    }

    
The ID displayed for a case in the AWS Support Center user interface.

Returns:
The ID displayed for a case in the AWS Support Center user interface.
    public String getDisplayId() {
        return ;
    }
    
    
The ID displayed for a case in the AWS Support Center user interface.

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

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

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

    
The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

Returns:
The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
    public String getAfterTime() {
        return ;
    }
    
    
The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

Parameters:
afterTime The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
    public void setAfterTime(String afterTime) {
        this. = afterTime;
    }
    
    
The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

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

Parameters:
afterTime The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeCasesRequest withAfterTime(String afterTime) {
        this. = afterTime;
        return this;
    }

    
The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

Returns:
The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
    public String getBeforeTime() {
        return ;
    }
    
    
The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

Parameters:
beforeTime The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
    public void setBeforeTime(String beforeTime) {
        this. = beforeTime;
    }
    
    
The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.

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

Parameters:
beforeTime The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeCasesRequest withBeforeTime(String beforeTime) {
        this. = beforeTime;
        return this;
    }

    
Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.

Returns:
Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.
    public Boolean isIncludeResolvedCases() {
        return ;
    }
    
    
Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.

Parameters:
includeResolvedCases Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.
    public void setIncludeResolvedCases(Boolean includeResolvedCases) {
        this. = includeResolvedCases;
    }
    
    
Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.

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

Parameters:
includeResolvedCases Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeCasesRequest withIncludeResolvedCases(Boolean includeResolvedCases) {
        this. = includeResolvedCases;
        return this;
    }

    
Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.

Returns:
Specifies whether resolved support cases should be included in the DescribeCases results. The default is false.
    public Boolean getIncludeResolvedCases() {
        return ;
    }

    
A resumption point for pagination.

Returns:
A resumption point for pagination.
    public String getNextToken() {
        return ;
    }
    
    
A resumption point for pagination.

Parameters:
nextToken A resumption point for pagination.
    public void setNextToken(String nextToken) {
        this. = nextToken;
    }
    
    
A resumption point for pagination.

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

Parameters:
nextToken A resumption point for pagination.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeCasesRequest withNextToken(String nextToken) {
        this. = nextToken;
        return this;
    }

    
The maximum number of results to return before paginating.

Constraints:
Range: 10 - 100

Returns:
The maximum number of results to return before paginating.
    public Integer getMaxResults() {
        return ;
    }
    
    
The maximum number of results to return before paginating.

Constraints:
Range: 10 - 100

Parameters:
maxResults The maximum number of results to return before paginating.
    public void setMaxResults(Integer maxResults) {
        this. = maxResults;
    }
    
    
The maximum number of results to return before paginating.

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

Constraints:
Range: 10 - 100

Parameters:
maxResults The maximum number of results to return before paginating.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeCasesRequest withMaxResults(Integer maxResults) {
        this. = maxResults;
        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 DescribeCasesRequest withLanguage(String language) {
        this. = language;
        return this;
    }

    
Specifies whether communications should be included in the DescribeCases results. The default is true.

Returns:
Specifies whether communications should be included in the DescribeCases results. The default is true.
    public Boolean isIncludeCommunications() {
        return ;
    }
    
    
Specifies whether communications should be included in the DescribeCases results. The default is true.

Parameters:
includeCommunications Specifies whether communications should be included in the DescribeCases results. The default is true.
    public void setIncludeCommunications(Boolean includeCommunications) {
        this. = includeCommunications;
    }
    
    
Specifies whether communications should be included in the DescribeCases results. The default is true.

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

Parameters:
includeCommunications Specifies whether communications should be included in the DescribeCases results. The default is true.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeCasesRequest withIncludeCommunications(Boolean includeCommunications) {
        this. = includeCommunications;
        return this;
    }

    
Specifies whether communications should be included in the DescribeCases results. The default is true.

Returns:
Specifies whether communications should be included in the DescribeCases results. The default is true.
    public Boolean getIncludeCommunications() {
        return ;
    }

    
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 (getCaseIdList() != nullsb.append("CaseIdList: " + getCaseIdList() + ",");
        if (getDisplayId() != nullsb.append("DisplayId: " + getDisplayId() + ",");
        if (getAfterTime() != nullsb.append("AfterTime: " + getAfterTime() + ",");
        if (getBeforeTime() != nullsb.append("BeforeTime: " + getBeforeTime() + ",");
        if (isIncludeResolvedCases() != nullsb.append("IncludeResolvedCases: " + isIncludeResolvedCases() + ",");
        if (getNextToken() != nullsb.append("NextToken: " + getNextToken() + ",");
        if (getMaxResults() != nullsb.append("MaxResults: " + getMaxResults() + ",");
        if (getLanguage() != nullsb.append("Language: " + getLanguage() + ",");
        if (isIncludeCommunications() != nullsb.append("IncludeCommunications: " + isIncludeCommunications() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getCaseIdList() == null) ? 0 : getCaseIdList().hashCode()); 
        hashCode = prime * hashCode + ((getDisplayId() == null) ? 0 : getDisplayId().hashCode()); 
        hashCode = prime * hashCode + ((getAfterTime() == null) ? 0 : getAfterTime().hashCode()); 
        hashCode = prime * hashCode + ((getBeforeTime() == null) ? 0 : getBeforeTime().hashCode()); 
        hashCode = prime * hashCode + ((isIncludeResolvedCases() == null) ? 0 : isIncludeResolvedCases().hashCode()); 
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); 
        hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); 
        hashCode = prime * hashCode + ((getLanguage() == null) ? 0 : getLanguage().hashCode()); 
        hashCode = prime * hashCode + ((isIncludeCommunications() == null) ? 0 : isIncludeCommunications().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeCasesRequest == falsereturn false;
        DescribeCasesRequest other = (DescribeCasesRequest)obj;
        
        if (other.getCaseIdList() == null ^ this.getCaseIdList() == nullreturn false;
        if (other.getCaseIdList() != null && other.getCaseIdList().equals(this.getCaseIdList()) == falsereturn false
        if (other.getDisplayId() == null ^ this.getDisplayId() == nullreturn false;
        if (other.getDisplayId() != null && other.getDisplayId().equals(this.getDisplayId()) == falsereturn false
        if (other.getAfterTime() == null ^ this.getAfterTime() == nullreturn false;
        if (other.getAfterTime() != null && other.getAfterTime().equals(this.getAfterTime()) == falsereturn false
        if (other.getBeforeTime() == null ^ this.getBeforeTime() == nullreturn false;
        if (other.getBeforeTime() != null && other.getBeforeTime().equals(this.getBeforeTime()) == falsereturn false
        if (other.isIncludeResolvedCases() == null ^ this.isIncludeResolvedCases() == nullreturn false;
        if (other.isIncludeResolvedCases() != null && other.isIncludeResolvedCases().equals(this.isIncludeResolvedCases()) == falsereturn false
        if (other.getNextToken() == null ^ this.getNextToken() == nullreturn false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == falsereturn false
        if (other.getMaxResults() == null ^ this.getMaxResults() == nullreturn false;
        if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == falsereturn false
        if (other.getLanguage() == null ^ this.getLanguage() == nullreturn false;
        if (other.getLanguage() != null && other.getLanguage().equals(this.getLanguage()) == falsereturn false
        if (other.isIncludeCommunications() == null ^ this.isIncludeCommunications() == nullreturn false;
        if (other.isIncludeCommunications() != null && other.isIncludeCommunications().equals(this.isIncludeCommunications()) == falsereturn false
        return true;
    }
    
    @Override
    public DescribeCasesRequest clone() {
        
            return (DescribeCasesRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X