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

Creates a new case in the AWS Support Center. This operation is modeled on the behavior of the AWS Support Center Create Case page. Its parameters require you to specify the following information:

  1. IssueType. The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."
  2. ServiceCode. The code for an AWS service. You obtain the ServiceCode by calling DescribeServices.
  3. CategoryCode. The category for the service defined for the ServiceCode value. You also obtain the category code for a service by calling DescribeServices. Each AWS service defines its own set of category codes.
  4. SeverityCode. A value that indicates the urgency of the case, which in turn determines the response time according to your service level agreement with AWS Support. You obtain the SeverityCode by calling DescribeSeverityLevels.
  5. Subject. The Subject field on the AWS Support Center Create Case page.
  6. CommunicationBody. The Description field on the AWS Support Center Create Case page.
  7. AttachmentSetId. The ID of a set of attachments that has been created by using AddAttachmentsToSet.
  8. Language. The human language in which AWS Support handles the case. English and Japanese are currently supported.
  9. CcEmailAddresses. The AWS Support Center CC field on the Create Case page. You can list email addresses to be copied on any correspondence about the case. The account that opens the case is already identified by passing the AWS Credentials in the HTTP POST method or in a method or function call from one of the programming languages supported by an AWS SDK .

NOTE: To add additional communication or attachments to an existing case, use AddCommunicationToCase.

A successful CreateCase request returns an AWS Support case number. Case numbers are used by the DescribeCases operation to retrieve existing AWS Support cases.

 
 public class CreateCaseRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The title of the AWS Support case.
 
     private String subject;

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

Constraints:
Pattern: [0-9a-z\-_]+

 
     private String serviceCode;

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

The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.</note>

 
     private String severityCode;

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

    
The communication body text when you create an AWS Support case by calling CreateCase.

Constraints:
Length: 1 - 8000

    private String communicationBody;

    
A list of email addresses that AWS Support copies on case correspondence.

Constraints:
Length: 0 - 10

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 type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."
    private String issueType;

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

    
The title of the AWS Support case.

Returns:
The title of the AWS Support case.
    public String getSubject() {
        return ;
    }
    
    
The title of the AWS Support case.

Parameters:
subject The title of the AWS Support case.
    public void setSubject(String subject) {
        this. = subject;
    }
    
    
The title of the AWS Support case.

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

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

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

Constraints:
Pattern: [0-9a-z\-_]+

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.

Constraints:
Pattern: [0-9a-z\-_]+

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.

Constraints:
Pattern: [0-9a-z\-_]+

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 CreateCaseRequest withServiceCode(String serviceCode) {
        this. = serviceCode;
        return this;
    }

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

The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.</note>

Returns:
The code for the severity level returned by the call to DescribeSeverityLevels. <note>

The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.</note>

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

The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.</note>

Parameters:
severityCode The code for the severity level returned by the call to DescribeSeverityLevels. <note>

The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.</note>

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

The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.</note>

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. <note>

The availability of severity levels depends on each customer's support subscription. In other words, your subscription may not necessarily require the urgent level of response time.</note>

Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateCaseRequest withSeverityCode(String severityCode) {
        this. = severityCode;
        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 CreateCaseRequest withCategoryCode(String categoryCode) {
        this. = categoryCode;
        return this;
    }

    
The communication body text when you create an AWS Support case by calling CreateCase.

Constraints:
Length: 1 - 8000

Returns:
The communication body text when you create an AWS Support case by calling CreateCase.
    public String getCommunicationBody() {
        return ;
    }
    
    
The communication body text when you create an AWS Support case by calling CreateCase.

Constraints:
Length: 1 - 8000

Parameters:
communicationBody The communication body text when you create an AWS Support case by calling CreateCase.
    public void setCommunicationBody(String communicationBody) {
        this. = communicationBody;
    }
    
    
The communication body text when you create an AWS Support case by calling CreateCase.

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

Constraints:
Length: 1 - 8000

Parameters:
communicationBody The communication body text when you create an AWS Support case by calling CreateCase.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateCaseRequest withCommunicationBody(String communicationBody) {
        this. = communicationBody;
        return this;
    }

    
A list of email addresses that AWS Support copies on case correspondence.

Constraints:
Length: 0 - 10

Returns:
A list of email addresses that AWS Support copies on case correspondence.
    public java.util.List<StringgetCcEmailAddresses() {
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of email addresses that AWS Support copies on case correspondence.

Constraints:
Length: 0 - 10

Parameters:
ccEmailAddresses A list of email addresses that AWS Support copies on case correspondence.
    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;
    }
    
    
A list of email addresses that AWS Support copies on case correspondence.

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.

Constraints:
Length: 0 - 10

Parameters:
ccEmailAddresses A list of email addresses that AWS Support copies on case correspondence.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateCaseRequest withCcEmailAddresses(String... ccEmailAddresses) {
        if (getCcEmailAddresses() == nullsetCcEmailAddresses(new java.util.ArrayList<String>(ccEmailAddresses.length));
        for (String value : ccEmailAddresses) {
            getCcEmailAddresses().add(value);
        }
        return this;
    }
    
    
A list of email addresses that AWS Support copies on case correspondence.

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

Constraints:
Length: 0 - 10

Parameters:
ccEmailAddresses A list of email addresses that AWS Support copies on case correspondence.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateCaseRequest 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 CreateCaseRequest withLanguage(String language) {
        this. = language;
        return this;
    }

    
The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."

Returns:
The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."
    public String getIssueType() {
        return ;
    }
    
    
The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."

Parameters:
issueType The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."
    public void setIssueType(String issueType) {
        this. = issueType;
    }
    
    
The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."

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

Parameters:
issueType The type of issue for the case. You can specify either "customer-service" or "technical." If you do not indicate a value, the default is "technical."
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateCaseRequest withIssueType(String issueType) {
        this. = issueType;
        return this;
    }

    
The ID of a set of one or more attachments for the case. Create the set by using AddAttachmentsToSet.

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

Parameters:
attachmentSetId The ID of a set of one or more attachments for the case. Create the set by using AddAttachmentsToSet.
    public void setAttachmentSetId(String attachmentSetId) {
        this. = attachmentSetId;
    }
    
    
The ID of a set of one or more attachments for the case. Create the set by using 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 case. Create the set by using AddAttachmentsToSet.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateCaseRequest 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 (getSubject() != nullsb.append("Subject: " + getSubject() + ",");
        if (getServiceCode() != nullsb.append("ServiceCode: " + getServiceCode() + ",");
        if (getSeverityCode() != nullsb.append("SeverityCode: " + getSeverityCode() + ",");
        if (getCategoryCode() != nullsb.append("CategoryCode: " + getCategoryCode() + ",");
        if (getCommunicationBody() != nullsb.append("CommunicationBody: " + getCommunicationBody() + ",");
        if (getCcEmailAddresses() != nullsb.append("CcEmailAddresses: " + getCcEmailAddresses() + ",");
        if (getLanguage() != nullsb.append("Language: " + getLanguage() + ",");
        if (getIssueType() != nullsb.append("IssueType: " + getIssueType() + ",");
        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 + ((getSubject() == null) ? 0 : getSubject().hashCode()); 
        hashCode = prime * hashCode + ((getServiceCode() == null) ? 0 : getServiceCode().hashCode()); 
        hashCode = prime * hashCode + ((getSeverityCode() == null) ? 0 : getSeverityCode().hashCode()); 
        hashCode = prime * hashCode + ((getCategoryCode() == null) ? 0 : getCategoryCode().hashCode()); 
        hashCode = prime * hashCode + ((getCommunicationBody() == null) ? 0 : getCommunicationBody().hashCode()); 
        hashCode = prime * hashCode + ((getCcEmailAddresses() == null) ? 0 : getCcEmailAddresses().hashCode()); 
        hashCode = prime * hashCode + ((getLanguage() == null) ? 0 : getLanguage().hashCode()); 
        hashCode = prime * hashCode + ((getIssueType() == null) ? 0 : getIssueType().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 CreateCaseRequest == falsereturn false;
        CreateCaseRequest other = (CreateCaseRequest)obj;
        
        if (other.getSubject() == null ^ this.getSubject() == nullreturn false;
        if (other.getSubject() != null && other.getSubject().equals(this.getSubject()) == falsereturn false
        if (other.getServiceCode() == null ^ this.getServiceCode() == nullreturn false;
        if (other.getServiceCode() != null && other.getServiceCode().equals(this.getServiceCode()) == falsereturn false
        if (other.getSeverityCode() == null ^ this.getSeverityCode() == nullreturn false;
        if (other.getSeverityCode() != null && other.getSeverityCode().equals(this.getSeverityCode()) == falsereturn false
        if (other.getCategoryCode() == null ^ this.getCategoryCode() == nullreturn false;
        if (other.getCategoryCode() != null && other.getCategoryCode().equals(this.getCategoryCode()) == 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.getLanguage() == null ^ this.getLanguage() == nullreturn false;
        if (other.getLanguage() != null && other.getLanguage().equals(this.getLanguage()) == falsereturn false
        if (other.getIssueType() == null ^ this.getIssueType() == nullreturn false;
        if (other.getIssueType() != null && other.getIssueType().equals(this.getIssueType()) == falsereturn false
        if (other.getAttachmentSetId() == null ^ this.getAttachmentSetId() == nullreturn false;
        if (other.getAttachmentSetId() != null && other.getAttachmentSetId().equals(this.getAttachmentSetId()) == falsereturn false
        return true;
    }
    
    @Override
    public CreateCaseRequest clone() {
        
            return (CreateCaseRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X