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 DescribeCommunications operation.

Returns communications (and attachments) for one or more support cases. You can use the AfterTime and BeforeTime parameters to filter by date. You can use the CaseId parameter to restrict the results to a particular case.

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.

You can use the MaxResults and NextToken parameters to control the pagination of the result set. Set MaxResults to the number of cases you want displayed on each page, and use NextToken to specify the resumption of pagination.

 
 public class DescribeCommunicationsRequest extends AmazonWebServiceRequest 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 end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.
 
     private String beforeTime;

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

    
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 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.
        this. = caseId;
        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 DescribeCommunicationsRequest withBeforeTime(String beforeTime) {
        this. = beforeTime;
        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 DescribeCommunicationsRequest withAfterTime(String afterTime) {
        this. = afterTime;
        return this;
    }

    
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 DescribeCommunicationsRequest 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.
        this. = maxResults;
        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 (getBeforeTime() != nullsb.append("BeforeTime: " + getBeforeTime() + ",");
        if (getAfterTime() != nullsb.append("AfterTime: " + getAfterTime() + ",");
        if (getNextToken() != nullsb.append("NextToken: " + getNextToken() + ",");
        if (getMaxResults() != nullsb.append("MaxResults: " + getMaxResults() );
        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 + ((getBeforeTime() == null) ? 0 : getBeforeTime().hashCode()); 
        hashCode = prime * hashCode + ((getAfterTime() == null) ? 0 : getAfterTime().hashCode()); 
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); 
        hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeCommunicationsRequest == falsereturn false;
        
        if (other.getCaseId() == null ^ this.getCaseId() == nullreturn false;
        if (other.getCaseId() != null && other.getCaseId().equals(this.getCaseId()) == falsereturn false
        if (other.getBeforeTime() == null ^ this.getBeforeTime() == nullreturn false;
        if (other.getBeforeTime() != null && other.getBeforeTime().equals(this.getBeforeTime()) == falsereturn false
        if (other.getAfterTime() == null ^ this.getAfterTime() == nullreturn false;
        if (other.getAfterTime() != null && other.getAfterTime().equals(this.getAfterTime()) == 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
        return true;
    }
    
    @Override
        
            return (DescribeCommunicationsRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X