com.amazonaws.services.elasticbeanstalk.model.SwapEnvironmentCNAMEsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk Show documentation
/*
* 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;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
* Container for the parameters to the {@link com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalk#swapEnvironmentCNAMEs(SwapEnvironmentCNAMEsRequest) SwapEnvironmentCNAMEs operation}.
*
* Swaps the CNAMEs of two environments.
*
*
* @see com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalk#swapEnvironmentCNAMEs(SwapEnvironmentCNAMEsRequest)
*/
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
.
*
* @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 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
.
*/
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
.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @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 A reference to this updated object so that method calls can be chained
* together.
*/
public SwapEnvironmentCNAMEsRequest withSourceEnvironmentId(String sourceEnvironmentId) {
this.sourceEnvironmentId = 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
*
* @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 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
.
*
* Constraints:
* Length: 4 - 23
*
* @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
.
*
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Length: 4 - 23
*
* @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 A reference to this updated object so that method calls can be chained
* together.
*/
public SwapEnvironmentCNAMEsRequest withSourceEnvironmentName(String sourceEnvironmentName) {
this.sourceEnvironmentName = 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
.
*
* @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 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
.
*/
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
.
*
* Returns a reference to this object so that method calls can be chained together.
*
* @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 A reference to this updated object so that method calls can be chained
* together.
*/
public SwapEnvironmentCNAMEsRequest withDestinationEnvironmentId(String destinationEnvironmentId) {
this.destinationEnvironmentId = 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
*
* @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 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
.
*
* Constraints:
* Length: 4 - 23
*
* @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
.
*
* Returns a reference to this object so that method calls can be chained together.
*
* Constraints:
* Length: 4 - 23
*
* @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 A reference to this updated object so that method calls can be chained
* together.
*/
public SwapEnvironmentCNAMEsRequest withDestinationEnvironmentName(String destinationEnvironmentName) {
this.destinationEnvironmentName = 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 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 == 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;
}
}