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

Adds additional customer communication to an AWS Support case. You use the CaseId value to identify the case to add communication to. You can list a set of email addresses to copy on the communication using the CcEmailAddresses value. The CommunicationBody value contains the text of the communication.

The response indicates the success or failure of the request.

This operation implements a subset of the features of the AWS Support Center.

 
 public class AddCommunicationToCaseRequest 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 body of an email communication to add to the support case.

Constraints:
Length: 1 - 8000

 
     private String communicationBody;

    
The email addresses in the CC line of an email to be added to the support case.

Constraints:
Length: 0 - 10

 
The ID of a set of one or more attachments for the communication to add to the case. Create the set by calling AddAttachmentsToSet
 
     private String attachmentSetId;

    
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 body of an email communication to add to the support case.

Constraints:
Length: 1 - 8000

Returns:
The body of an email communication to add to the support case.
    public String getCommunicationBody() {
        return ;
    }
    
    
The body of an email communication to add to the support case.

Constraints:
Length: 1 - 8000

Parameters:
communicationBody The body of an email communication to add to the support case.
    public void setCommunicationBody(String communicationBody) {
        this. = communicationBody;
    }
    
    
The body of an email communication to add to the support case.

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

Constraints:
Length: 1 - 8000

Parameters:
communicationBody The body of an email communication to add to the support case.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AddCommunicationToCaseRequest withCommunicationBody(String communicationBody) {
        this. = communicationBody;
        return this;
    }

    
The email addresses in the CC line of an email to be added to the support case.

Constraints:
Length: 0 - 10

Returns:
The email addresses in the CC line of an email to be added to the support case.
    public java.util.List<StringgetCcEmailAddresses() {
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The email addresses in the CC line of an email to be added to the support case.

Constraints:
Length: 0 - 10

Parameters:
ccEmailAddresses The email addresses in the CC line of an email to be added to the support 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 in the CC line of an email to be added to the support case.

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

Constraints:
Length: 0 - 10

Parameters:
ccEmailAddresses The email addresses in the CC line of an email to be added to the support case.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AddCommunicationToCaseRequest 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 in the CC line of an email to be added to the support case.

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

Constraints:
Length: 0 - 10

Parameters:
ccEmailAddresses The email addresses in the CC line of an email to be added to the support case.
Returns:
A reference to this updated object so that method calls can be chained together.
        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 ID of a set of one or more attachments for the communication to add to the case. Create the set by calling AddAttachmentsToSet

Returns:
The ID of a set of one or more attachments for the communication to add to the case. Create the set by calling AddAttachmentsToSet
    public String getAttachmentSetId() {
        return ;
    }
    
    
The ID of a set of one or more attachments for the communication to add to the case. Create the set by calling AddAttachmentsToSet

Parameters:
attachmentSetId The ID of a set of one or more attachments for the communication to add to the case. Create the set by calling AddAttachmentsToSet
    public void setAttachmentSetId(String attachmentSetId) {
        this. = attachmentSetId;
    }
    
    
The ID of a set of one or more attachments for the communication to add to the case. Create the set by calling AddAttachmentsToSet

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

Parameters:
attachmentSetId The ID of a set of one or more attachments for the communication to add to the case. Create the set by calling AddAttachmentsToSet
Returns:
A reference to this updated object so that method calls can be chained together.
    public AddCommunicationToCaseRequest withAttachmentSetId(String attachmentSetId) {
        this. = attachmentSetId;
        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 (getCommunicationBody() != nullsb.append("CommunicationBody: " + getCommunicationBody() + ",");
        if (getCcEmailAddresses() != nullsb.append("CcEmailAddresses: " + getCcEmailAddresses() + ",");
        if (getAttachmentSetId() != nullsb.append("AttachmentSetId: " + getAttachmentSetId() );
        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 + ((getCommunicationBody() == null) ? 0 : getCommunicationBody().hashCode()); 
        hashCode = prime * hashCode + ((getCcEmailAddresses() == null) ? 0 : getCcEmailAddresses().hashCode()); 
        hashCode = prime * hashCode + ((getAttachmentSetId() == null) ? 0 : getAttachmentSetId().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof AddCommunicationToCaseRequest == falsereturn false;
        
        if (other.getCaseId() == null ^ this.getCaseId() == nullreturn false;
        if (other.getCaseId() != null && other.getCaseId().equals(this.getCaseId()) == falsereturn false
        if (other.getCommunicationBody() == null ^ this.getCommunicationBody() == nullreturn false;
        if (other.getCommunicationBody() != null && other.getCommunicationBody().equals(this.getCommunicationBody()) == falsereturn false
        if (other.getCcEmailAddresses() == null ^ this.getCcEmailAddresses() == nullreturn false;
        if (other.getCcEmailAddresses() != null && other.getCcEmailAddresses().equals(this.getCcEmailAddresses()) == falsereturn false
        if (other.getAttachmentSetId() == null ^ this.getAttachmentSetId() == nullreturn false;
        if (other.getAttachmentSetId() != null && other.getAttachmentSetId().equals(this.getAttachmentSetId()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (AddCommunicationToCaseRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X