
com.amazonaws.services.elasticbeanstalk.model.SwapEnvironmentCNAMEsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-osgi Show documentation
/*
* Copyright 2011-2016 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;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Swaps the CNAMEs of two environments.
*
*/
public class SwapEnvironmentCNAMEsRequest extends AmazonWebServiceRequest
implements Serializable, Cloneable {
/**
*
* 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
.
*
*/
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
.
*
*/
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
.
*
*
* @param 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 = 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
.
*
*
* @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
.
*/
public String getSourceEnvironmentId() {
return 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
.
*
*
* @param 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
.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public SwapEnvironmentCNAMEsRequest withSourceEnvironmentId(
String sourceEnvironmentId) {
setSourceEnvironmentId(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
.
*
*
* @param 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 = 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
.
*
*
* @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
.
*/
public String getSourceEnvironmentName() {
return 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
.
*
*
* @param 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
.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public SwapEnvironmentCNAMEsRequest withSourceEnvironmentName(
String sourceEnvironmentName) {
setSourceEnvironmentName(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
.
*
*
* @param 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 = 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
.
*
*
* @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
.
*/
public String getDestinationEnvironmentId() {
return 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
.
*
*
* @param 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
.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public SwapEnvironmentCNAMEsRequest withDestinationEnvironmentId(
String destinationEnvironmentId) {
setDestinationEnvironmentId(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
.
*
*
* @param 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 = 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
.
*
*
* @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
.
*/
public String getDestinationEnvironmentName() {
return 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
.
*
*
* @param 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
.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public SwapEnvironmentCNAMEsRequest withDestinationEnvironmentName(
String destinationEnvironmentName) {
setDestinationEnvironmentName(destinationEnvironmentName);
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getSourceEnvironmentId() != null)
sb.append("SourceEnvironmentId: " + getSourceEnvironmentId() + ",");
if (getSourceEnvironmentName() != null)
sb.append("SourceEnvironmentName: " + getSourceEnvironmentName()
+ ",");
if (getDestinationEnvironmentId() != null)
sb.append("DestinationEnvironmentId: "
+ getDestinationEnvironmentId() + ",");
if (getDestinationEnvironmentName() != null)
sb.append("DestinationEnvironmentName: "
+ getDestinationEnvironmentName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SwapEnvironmentCNAMEsRequest == false)
return false;
SwapEnvironmentCNAMEsRequest other = (SwapEnvironmentCNAMEsRequest) obj;
if (other.getSourceEnvironmentId() == null
^ this.getSourceEnvironmentId() == null)
return false;
if (other.getSourceEnvironmentId() != null
&& other.getSourceEnvironmentId().equals(
this.getSourceEnvironmentId()) == false)
return false;
if (other.getSourceEnvironmentName() == null
^ this.getSourceEnvironmentName() == null)
return false;
if (other.getSourceEnvironmentName() != null
&& other.getSourceEnvironmentName().equals(
this.getSourceEnvironmentName()) == false)
return false;
if (other.getDestinationEnvironmentId() == null
^ this.getDestinationEnvironmentId() == null)
return false;
if (other.getDestinationEnvironmentId() != null
&& other.getDestinationEnvironmentId().equals(
this.getDestinationEnvironmentId()) == false)
return false;
if (other.getDestinationEnvironmentName() == null
^ this.getDestinationEnvironmentName() == null)
return false;
if (other.getDestinationEnvironmentName() != null
&& other.getDestinationEnvironmentName().equals(
this.getDestinationEnvironmentName()) == false)
return false;
return true;
}
@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 SwapEnvironmentCNAMEsRequest clone() {
return (SwapEnvironmentCNAMEsRequest) super.clone();
}
}