Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2014 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.elasticbeanstalk.model;
 
 
Container for the parameters to the SwapEnvironmentCNAMEs operation.

Swaps the CNAMEs of two environments.

 
 public class SwapEnvironmentCNAMEsRequest extends AmazonWebServiceRequest implements Serializable {

    
The ID of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentId, you must specify the DestinationEnvironmentId.

 
     private String sourceEnvironmentId;

    
The name of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentName, you must specify the DestinationEnvironmentName.

Constraints:
Length: 4 - 23

 
     private String sourceEnvironmentName;

    
The ID of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentId with the DestinationEnvironmentId.

 
     private String destinationEnvironmentId;

    
The name of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentName with the DestinationEnvironmentName.

Constraints:
Length: 4 - 23

 
     private String destinationEnvironmentName;

    
The ID of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentId, you must specify the DestinationEnvironmentId.

Returns:
The ID of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentId, you must specify the DestinationEnvironmentId.

 
     public String getSourceEnvironmentId() {
         return ;
     }
    
    
The ID of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentId, you must specify the DestinationEnvironmentId.

Parameters:
sourceEnvironmentId The ID of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentId, you must specify the DestinationEnvironmentId.

    public void setSourceEnvironmentId(String sourceEnvironmentId) {
        this. = sourceEnvironmentId;
    }
    
    
The ID of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentId, you must specify the DestinationEnvironmentId.

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

Parameters:
sourceEnvironmentId The ID of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentId, you must specify the DestinationEnvironmentId.

Returns:
A reference to this updated object so that method calls can be chained together.
    public SwapEnvironmentCNAMEsRequest withSourceEnvironmentId(String sourceEnvironmentId) {
        this. = sourceEnvironmentId;
        return this;
    }

    
The name of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentName, you must specify the DestinationEnvironmentName.

Constraints:
Length: 4 - 23

Returns:
The name of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentName, you must specify the DestinationEnvironmentName.

    public String getSourceEnvironmentName() {
        return ;
    }
    
    
The name of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentName, you must specify the DestinationEnvironmentName.

Constraints:
Length: 4 - 23

Parameters:
sourceEnvironmentName The name of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentName, you must specify the DestinationEnvironmentName.

    public void setSourceEnvironmentName(String sourceEnvironmentName) {
        this. = sourceEnvironmentName;
    }
    
    
The name of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentName, you must specify the DestinationEnvironmentName.

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

Constraints:
Length: 4 - 23

Parameters:
sourceEnvironmentName The name of the source environment.

Condition: You must specify at least the SourceEnvironmentID or the SourceEnvironmentName. You may also specify both. If you specify the SourceEnvironmentName, you must specify the DestinationEnvironmentName.

Returns:
A reference to this updated object so that method calls can be chained together.
    public SwapEnvironmentCNAMEsRequest withSourceEnvironmentName(String sourceEnvironmentName) {
        this. = sourceEnvironmentName;
        return this;
    }

    
The ID of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentId with the DestinationEnvironmentId.

Returns:
The ID of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentId with the DestinationEnvironmentId.

        return ;
    }
    
    
The ID of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentId with the DestinationEnvironmentId.

Parameters:
destinationEnvironmentId The ID of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentId with the DestinationEnvironmentId.

    public void setDestinationEnvironmentId(String destinationEnvironmentId) {
        this. = destinationEnvironmentId;
    }
    
    
The ID of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentId with the DestinationEnvironmentId.

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

Parameters:
destinationEnvironmentId The ID of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentId with the DestinationEnvironmentId.

Returns:
A reference to this updated object so that method calls can be chained together.
    public SwapEnvironmentCNAMEsRequest withDestinationEnvironmentId(String destinationEnvironmentId) {
        this. = destinationEnvironmentId;
        return this;
    }

    
The name of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentName with the DestinationEnvironmentName.

Constraints:
Length: 4 - 23

Returns:
The name of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentName with the DestinationEnvironmentName.

        return ;
    }
    
    
The name of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentName with the DestinationEnvironmentName.

Constraints:
Length: 4 - 23

Parameters:
destinationEnvironmentName The name of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentName with the DestinationEnvironmentName.

    public void setDestinationEnvironmentName(String destinationEnvironmentName) {
        this. = destinationEnvironmentName;
    }
    
    
The name of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentName with the DestinationEnvironmentName.

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

Constraints:
Length: 4 - 23

Parameters:
destinationEnvironmentName The name of the destination environment.

Condition: You must specify at least the DestinationEnvironmentID or the DestinationEnvironmentName. You may also specify both. You must specify the SourceEnvironmentName with the DestinationEnvironmentName.

Returns:
A reference to this updated object so that method calls can be chained together.
    public SwapEnvironmentCNAMEsRequest withDestinationEnvironmentName(String destinationEnvironmentName) {
        this. = destinationEnvironmentName;
        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 (getSourceEnvironmentId() != nullsb.append("SourceEnvironmentId: " + getSourceEnvironmentId() + ",");
        if (getSourceEnvironmentName() != nullsb.append("SourceEnvironmentName: " + getSourceEnvironmentName() + ",");
        if (getDestinationEnvironmentId() != nullsb.append("DestinationEnvironmentId: " + getDestinationEnvironmentId() + ",");
        if (getDestinationEnvironmentName() != nullsb.append("DestinationEnvironmentName: " + getDestinationEnvironmentName() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSourceEnvironmentId() == null) ? 0 : getSourceEnvironmentId().hashCode()); 
        hashCode = prime * hashCode + ((getSourceEnvironmentName() == null) ? 0 : getSourceEnvironmentName().hashCode()); 
        hashCode = prime * hashCode + ((getDestinationEnvironmentId() == null) ? 0 : getDestinationEnvironmentId().hashCode()); 
        hashCode = prime * hashCode + ((getDestinationEnvironmentName() == null) ? 0 : getDestinationEnvironmentName().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof SwapEnvironmentCNAMEsRequest == falsereturn false;
        
        if (other.getSourceEnvironmentId() == null ^ this.getSourceEnvironmentId() == nullreturn false;
        if (other.getSourceEnvironmentId() != null && other.getSourceEnvironmentId().equals(this.getSourceEnvironmentId()) == falsereturn false
        if (other.getSourceEnvironmentName() == null ^ this.getSourceEnvironmentName() == nullreturn false;
        if (other.getSourceEnvironmentName() != null && other.getSourceEnvironmentName().equals(this.getSourceEnvironmentName()) == falsereturn false
        if (other.getDestinationEnvironmentId() == null ^ this.getDestinationEnvironmentId() == nullreturn false;
        if (other.getDestinationEnvironmentId() != null && other.getDestinationEnvironmentId().equals(this.getDestinationEnvironmentId()) == falsereturn false
        if (other.getDestinationEnvironmentName() == null ^ this.getDestinationEnvironmentName() == nullreturn false;
        if (other.getDestinationEnvironmentName() != null && other.getDestinationEnvironmentName().equals(this.getDestinationEnvironmentName()) == falsereturn false
        return true;
    }
    
}
    
New to GrepCode? Check out our FAQ X