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

This operation generates a pre-paid UPS shipping label that you will use to ship your device to AWS for processing.

 
 public class GetShippingLabelRequest extends AmazonWebServiceRequest implements SerializableCloneable {
 
 
     private String name;
 
     private String company;
 
     private String phoneNumber;
 
     private String country;
 
     private String stateOrProvince;
 
     private String city;
 
     private String postalCode;
 
     private String street1;
 
     private String street2;
 
     private String street3;
 
     private String aPIVersion;

    
Returns the value of the JobIds property for this object.

Returns:
The value of the JobIds property for this object.
 
     public java.util.List<StringgetJobIds() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
Sets the value of the JobIds property for this object.

Parameters:
jobIds The new value for the JobIds property for this object.
 
     public void setJobIds(java.util.Collection<StringjobIds) {
         if (jobIds == null) {
             this. = null;
             return;
         }
         jobIdsCopy.addAll(jobIds);
         this. = jobIdsCopy;
     }
    
    
Sets the value of the JobIds property for this object.

NOTE: This method appends the values to the existing list (if any). Use setJobIds(java.util.Collection) or withJobIds(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:
jobIds The new value for the JobIds property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public GetShippingLabelRequest withJobIds(String... jobIds) {
        if (getJobIds() == nullsetJobIds(new java.util.ArrayList<String>(jobIds.length));
        for (String value : jobIds) {
            getJobIds().add(value);
        }
        return this;
    }
    
    
Sets the value of the JobIds property for this object.

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

Parameters:
jobIds The new value for the JobIds property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (jobIds == null) {
            this. = null;
        } else {
            jobIdsCopy.addAll(jobIds);
            this. = jobIdsCopy;
        }
        return this;
    }

    
Returns the value of the Name property for this object.

Returns:
The value of the Name property for this object.
    public String getName() {
        return ;
    }
    
    
Sets the value of the Name property for this object.

Parameters:
name The new value for the Name property for this object.
    public void setName(String name) {
        this. = name;
    }
    
    
Sets the value of the Name property for this object.

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

Parameters:
name The new value for the Name property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withName(String name) {
        this. = name;
        return this;
    }

    
Returns the value of the Company property for this object.

Returns:
The value of the Company property for this object.
    public String getCompany() {
        return ;
    }
    
    
Sets the value of the Company property for this object.

Parameters:
company The new value for the Company property for this object.
    public void setCompany(String company) {
        this. = company;
    }
    
    
Sets the value of the Company property for this object.

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

Parameters:
company The new value for the Company property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withCompany(String company) {
        this. = company;
        return this;
    }

    
Returns the value of the PhoneNumber property for this object.

Returns:
The value of the PhoneNumber property for this object.
    public String getPhoneNumber() {
        return ;
    }
    
    
Sets the value of the PhoneNumber property for this object.

Parameters:
phoneNumber The new value for the PhoneNumber property for this object.
    public void setPhoneNumber(String phoneNumber) {
        this. = phoneNumber;
    }
    
    
Sets the value of the PhoneNumber property for this object.

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

Parameters:
phoneNumber The new value for the PhoneNumber property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withPhoneNumber(String phoneNumber) {
        this. = phoneNumber;
        return this;
    }

    
Returns the value of the Country property for this object.

Returns:
The value of the Country property for this object.
    public String getCountry() {
        return ;
    }
    
    
Sets the value of the Country property for this object.

Parameters:
country The new value for the Country property for this object.
    public void setCountry(String country) {
        this. = country;
    }
    
    
Sets the value of the Country property for this object.

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

Parameters:
country The new value for the Country property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withCountry(String country) {
        this. = country;
        return this;
    }

    
Returns the value of the StateOrProvince property for this object.

Returns:
The value of the StateOrProvince property for this object.
    public String getStateOrProvince() {
        return ;
    }
    
    
Sets the value of the StateOrProvince property for this object.

Parameters:
stateOrProvince The new value for the StateOrProvince property for this object.
    public void setStateOrProvince(String stateOrProvince) {
        this. = stateOrProvince;
    }
    
    
Sets the value of the StateOrProvince property for this object.

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

Parameters:
stateOrProvince The new value for the StateOrProvince property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withStateOrProvince(String stateOrProvince) {
        this. = stateOrProvince;
        return this;
    }

    
Returns the value of the City property for this object.

Returns:
The value of the City property for this object.
    public String getCity() {
        return ;
    }
    
    
Sets the value of the City property for this object.

Parameters:
city The new value for the City property for this object.
    public void setCity(String city) {
        this. = city;
    }
    
    
Sets the value of the City property for this object.

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

Parameters:
city The new value for the City property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withCity(String city) {
        this. = city;
        return this;
    }

    
Returns the value of the PostalCode property for this object.

Returns:
The value of the PostalCode property for this object.
    public String getPostalCode() {
        return ;
    }
    
    
Sets the value of the PostalCode property for this object.

Parameters:
postalCode The new value for the PostalCode property for this object.
    public void setPostalCode(String postalCode) {
        this. = postalCode;
    }
    
    
Sets the value of the PostalCode property for this object.

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

Parameters:
postalCode The new value for the PostalCode property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withPostalCode(String postalCode) {
        this. = postalCode;
        return this;
    }

    
Returns the value of the Street1 property for this object.

Returns:
The value of the Street1 property for this object.
    public String getStreet1() {
        return ;
    }
    
    
Sets the value of the Street1 property for this object.

Parameters:
street1 The new value for the Street1 property for this object.
    public void setStreet1(String street1) {
        this. = street1;
    }
    
    
Sets the value of the Street1 property for this object.

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

Parameters:
street1 The new value for the Street1 property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withStreet1(String street1) {
        this. = street1;
        return this;
    }

    
Returns the value of the Street2 property for this object.

Returns:
The value of the Street2 property for this object.
    public String getStreet2() {
        return ;
    }
    
    
Sets the value of the Street2 property for this object.

Parameters:
street2 The new value for the Street2 property for this object.
    public void setStreet2(String street2) {
        this. = street2;
    }
    
    
Sets the value of the Street2 property for this object.

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

Parameters:
street2 The new value for the Street2 property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withStreet2(String street2) {
        this. = street2;
        return this;
    }

    
Returns the value of the Street3 property for this object.

Returns:
The value of the Street3 property for this object.
    public String getStreet3() {
        return ;
    }
    
    
Sets the value of the Street3 property for this object.

Parameters:
street3 The new value for the Street3 property for this object.
    public void setStreet3(String street3) {
        this. = street3;
    }
    
    
Sets the value of the Street3 property for this object.

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

Parameters:
street3 The new value for the Street3 property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withStreet3(String street3) {
        this. = street3;
        return this;
    }

    
Returns the value of the APIVersion property for this object.

Returns:
The value of the APIVersion property for this object.
    public String getAPIVersion() {
        return ;
    }
    
    
Sets the value of the APIVersion property for this object.

Parameters:
aPIVersion The new value for the APIVersion property for this object.
    public void setAPIVersion(String aPIVersion) {
        this. = aPIVersion;
    }
    
    
Sets the value of the APIVersion property for this object.

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

Parameters:
aPIVersion The new value for the APIVersion property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetShippingLabelRequest withAPIVersion(String aPIVersion) {
        this. = aPIVersion;
        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 (getJobIds() != nullsb.append("JobIds: " + getJobIds() + ",");
        if (getName() != nullsb.append("Name: " + getName() + ",");
        if (getCompany() != nullsb.append("Company: " + getCompany() + ",");
        if (getPhoneNumber() != nullsb.append("PhoneNumber: " + getPhoneNumber() + ",");
        if (getCountry() != nullsb.append("Country: " + getCountry() + ",");
        if (getStateOrProvince() != nullsb.append("StateOrProvince: " + getStateOrProvince() + ",");
        if (getCity() != nullsb.append("City: " + getCity() + ",");
        if (getPostalCode() != nullsb.append("PostalCode: " + getPostalCode() + ",");
        if (getStreet1() != nullsb.append("Street1: " + getStreet1() + ",");
        if (getStreet2() != nullsb.append("Street2: " + getStreet2() + ",");
        if (getStreet3() != nullsb.append("Street3: " + getStreet3() + ",");
        if (getAPIVersion() != nullsb.append("APIVersion: " + getAPIVersion() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getJobIds() == null) ? 0 : getJobIds().hashCode()); 
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getCompany() == null) ? 0 : getCompany().hashCode()); 
        hashCode = prime * hashCode + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode()); 
        hashCode = prime * hashCode + ((getCountry() == null) ? 0 : getCountry().hashCode()); 
        hashCode = prime * hashCode + ((getStateOrProvince() == null) ? 0 : getStateOrProvince().hashCode()); 
        hashCode = prime * hashCode + ((getCity() == null) ? 0 : getCity().hashCode()); 
        hashCode = prime * hashCode + ((getPostalCode() == null) ? 0 : getPostalCode().hashCode()); 
        hashCode = prime * hashCode + ((getStreet1() == null) ? 0 : getStreet1().hashCode()); 
        hashCode = prime * hashCode + ((getStreet2() == null) ? 0 : getStreet2().hashCode()); 
        hashCode = prime * hashCode + ((getStreet3() == null) ? 0 : getStreet3().hashCode()); 
        hashCode = prime * hashCode + ((getAPIVersion() == null) ? 0 : getAPIVersion().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof GetShippingLabelRequest == falsereturn false;
        GetShippingLabelRequest other = (GetShippingLabelRequest)obj;
        
        if (other.getJobIds() == null ^ this.getJobIds() == nullreturn false;
        if (other.getJobIds() != null && other.getJobIds().equals(this.getJobIds()) == falsereturn false
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getCompany() == null ^ this.getCompany() == nullreturn false;
        if (other.getCompany() != null && other.getCompany().equals(this.getCompany()) == falsereturn false
        if (other.getPhoneNumber() == null ^ this.getPhoneNumber() == nullreturn false;
        if (other.getPhoneNumber() != null && other.getPhoneNumber().equals(this.getPhoneNumber()) == falsereturn false
        if (other.getCountry() == null ^ this.getCountry() == nullreturn false;
        if (other.getCountry() != null && other.getCountry().equals(this.getCountry()) == falsereturn false
        if (other.getStateOrProvince() == null ^ this.getStateOrProvince() == nullreturn false;
        if (other.getStateOrProvince() != null && other.getStateOrProvince().equals(this.getStateOrProvince()) == falsereturn false
        if (other.getCity() == null ^ this.getCity() == nullreturn false;
        if (other.getCity() != null && other.getCity().equals(this.getCity()) == falsereturn false
        if (other.getPostalCode() == null ^ this.getPostalCode() == nullreturn false;
        if (other.getPostalCode() != null && other.getPostalCode().equals(this.getPostalCode()) == falsereturn false
        if (other.getStreet1() == null ^ this.getStreet1() == nullreturn false;
        if (other.getStreet1() != null && other.getStreet1().equals(this.getStreet1()) == falsereturn false
        if (other.getStreet2() == null ^ this.getStreet2() == nullreturn false;
        if (other.getStreet2() != null && other.getStreet2().equals(this.getStreet2()) == falsereturn false
        if (other.getStreet3() == null ^ this.getStreet3() == nullreturn false;
        if (other.getStreet3() != null && other.getStreet3().equals(this.getStreet3()) == falsereturn false
        if (other.getAPIVersion() == null ^ this.getAPIVersion() == nullreturn false;
        if (other.getAPIVersion() != null && other.getAPIVersion().equals(this.getAPIVersion()) == falsereturn false
        return true;
    }
    
    @Override
    public GetShippingLabelRequest clone() {
        
            return (GetShippingLabelRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X