
com.amazonaws.services.elasticbeanstalk.model.ComposeEnvironmentsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticbeanstalk Show documentation
/*
* Copyright 2010-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;
/**
*
* Request to create or update a group of environments.
*
*/
public class ComposeEnvironmentsRequest extends AmazonWebServiceRequest
implements Serializable, Cloneable {
/**
*
* The name of the application to which the specified source bundles belong.
*
*/
private String applicationName;
/**
*
* The name of the group to which the target environments belong. Specify a
* group name only if the environment name defined in each target
* environment's manifest ends with a + (plus) character. See Environment Manifest (env.yaml) for details.
*
*/
private String groupName;
/**
*
* A list of version labels, specifying one or more application source
* bundles that belong to the target application. Each source bundle must
* include an environment manifest that specifies the name of the
* environment and the name of the solution stack to use, and optionally can
* specify environment links to create.
*
*/
private com.amazonaws.internal.SdkInternalList versionLabels;
/**
*
* The name of the application to which the specified source bundles belong.
*
*
* @param applicationName
* The name of the application to which the specified source bundles
* belong.
*/
public void setApplicationName(String applicationName) {
this.applicationName = applicationName;
}
/**
*
* The name of the application to which the specified source bundles belong.
*
*
* @return The name of the application to which the specified source bundles
* belong.
*/
public String getApplicationName() {
return this.applicationName;
}
/**
*
* The name of the application to which the specified source bundles belong.
*
*
* @param applicationName
* The name of the application to which the specified source bundles
* belong.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ComposeEnvironmentsRequest withApplicationName(String applicationName) {
setApplicationName(applicationName);
return this;
}
/**
*
* The name of the group to which the target environments belong. Specify a
* group name only if the environment name defined in each target
* environment's manifest ends with a + (plus) character. See Environment Manifest (env.yaml) for details.
*
*
* @param groupName
* The name of the group to which the target environments belong.
* Specify a group name only if the environment name defined in each
* target environment's manifest ends with a + (plus) character. See
* Environment Manifest (env.yaml) for details.
*/
public void setGroupName(String groupName) {
this.groupName = groupName;
}
/**
*
* The name of the group to which the target environments belong. Specify a
* group name only if the environment name defined in each target
* environment's manifest ends with a + (plus) character. See Environment Manifest (env.yaml) for details.
*
*
* @return The name of the group to which the target environments belong.
* Specify a group name only if the environment name defined in each
* target environment's manifest ends with a + (plus) character. See
* Environment Manifest (env.yaml) for details.
*/
public String getGroupName() {
return this.groupName;
}
/**
*
* The name of the group to which the target environments belong. Specify a
* group name only if the environment name defined in each target
* environment's manifest ends with a + (plus) character. See Environment Manifest (env.yaml) for details.
*
*
* @param groupName
* The name of the group to which the target environments belong.
* Specify a group name only if the environment name defined in each
* target environment's manifest ends with a + (plus) character. See
* Environment Manifest (env.yaml) for details.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ComposeEnvironmentsRequest withGroupName(String groupName) {
setGroupName(groupName);
return this;
}
/**
*
* A list of version labels, specifying one or more application source
* bundles that belong to the target application. Each source bundle must
* include an environment manifest that specifies the name of the
* environment and the name of the solution stack to use, and optionally can
* specify environment links to create.
*
*
* @return A list of version labels, specifying one or more application
* source bundles that belong to the target application. Each source
* bundle must include an environment manifest that specifies the
* name of the environment and the name of the solution stack to
* use, and optionally can specify environment links to create.
*/
public java.util.List getVersionLabels() {
if (versionLabels == null) {
versionLabels = new com.amazonaws.internal.SdkInternalList();
}
return versionLabels;
}
/**
*
* A list of version labels, specifying one or more application source
* bundles that belong to the target application. Each source bundle must
* include an environment manifest that specifies the name of the
* environment and the name of the solution stack to use, and optionally can
* specify environment links to create.
*
*
* @param versionLabels
* A list of version labels, specifying one or more application
* source bundles that belong to the target application. Each source
* bundle must include an environment manifest that specifies the
* name of the environment and the name of the solution stack to use,
* and optionally can specify environment links to create.
*/
public void setVersionLabels(java.util.Collection versionLabels) {
if (versionLabels == null) {
this.versionLabels = null;
return;
}
this.versionLabels = new com.amazonaws.internal.SdkInternalList(
versionLabels);
}
/**
*
* A list of version labels, specifying one or more application source
* bundles that belong to the target application. Each source bundle must
* include an environment manifest that specifies the name of the
* environment and the name of the solution stack to use, and optionally can
* specify environment links to create.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setVersionLabels(java.util.Collection)} or
* {@link #withVersionLabels(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param versionLabels
* A list of version labels, specifying one or more application
* source bundles that belong to the target application. Each source
* bundle must include an environment manifest that specifies the
* name of the environment and the name of the solution stack to use,
* and optionally can specify environment links to create.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ComposeEnvironmentsRequest withVersionLabels(String... versionLabels) {
if (this.versionLabels == null) {
setVersionLabels(new com.amazonaws.internal.SdkInternalList(
versionLabels.length));
}
for (String ele : versionLabels) {
this.versionLabels.add(ele);
}
return this;
}
/**
*
* A list of version labels, specifying one or more application source
* bundles that belong to the target application. Each source bundle must
* include an environment manifest that specifies the name of the
* environment and the name of the solution stack to use, and optionally can
* specify environment links to create.
*
*
* @param versionLabels
* A list of version labels, specifying one or more application
* source bundles that belong to the target application. Each source
* bundle must include an environment manifest that specifies the
* name of the environment and the name of the solution stack to use,
* and optionally can specify environment links to create.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ComposeEnvironmentsRequest withVersionLabels(
java.util.Collection versionLabels) {
setVersionLabels(versionLabels);
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 (getApplicationName() != null)
sb.append("ApplicationName: " + getApplicationName() + ",");
if (getGroupName() != null)
sb.append("GroupName: " + getGroupName() + ",");
if (getVersionLabels() != null)
sb.append("VersionLabels: " + getVersionLabels());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ComposeEnvironmentsRequest == false)
return false;
ComposeEnvironmentsRequest other = (ComposeEnvironmentsRequest) obj;
if (other.getApplicationName() == null
^ this.getApplicationName() == null)
return false;
if (other.getApplicationName() != null
&& other.getApplicationName().equals(this.getApplicationName()) == false)
return false;
if (other.getGroupName() == null ^ this.getGroupName() == null)
return false;
if (other.getGroupName() != null
&& other.getGroupName().equals(this.getGroupName()) == false)
return false;
if (other.getVersionLabels() == null ^ this.getVersionLabels() == null)
return false;
if (other.getVersionLabels() != null
&& other.getVersionLabels().equals(this.getVersionLabels()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime
* hashCode
+ ((getApplicationName() == null) ? 0 : getApplicationName()
.hashCode());
hashCode = prime * hashCode
+ ((getGroupName() == null) ? 0 : getGroupName().hashCode());
hashCode = prime
* hashCode
+ ((getVersionLabels() == null) ? 0 : getVersionLabels()
.hashCode());
return hashCode;
}
@Override
public ComposeEnvironmentsRequest clone() {
return (ComposeEnvironmentsRequest) super.clone();
}
}