com.amazonaws.services.elasticbeanstalk.model.CreatePlatformVersionRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticbeanstalk Show documentation
/*
* Copyright 2019-2024 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 javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Request to create a new platform version.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreatePlatformVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of your custom platform.
*
*/
private String platformName;
/**
*
* The number, such as 1.0.2, for the new platform version.
*
*/
private String platformVersion;
/**
*
* The location of the platform definition archive in Amazon S3.
*
*/
private S3Location platformDefinitionBundle;
/**
*
* The name of the builder environment.
*
*/
private String environmentName;
/**
*
* The configuration option settings to apply to the builder environment.
*
*/
private com.amazonaws.internal.SdkInternalList optionSettings;
/**
*
* Specifies the tags applied to the new platform version.
*
*
* Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the
* platform version don't inherit the tags.
*
*/
private com.amazonaws.internal.SdkInternalList tags;
/**
*
* The name of your custom platform.
*
*
* @param platformName
* The name of your custom platform.
*/
public void setPlatformName(String platformName) {
this.platformName = platformName;
}
/**
*
* The name of your custom platform.
*
*
* @return The name of your custom platform.
*/
public String getPlatformName() {
return this.platformName;
}
/**
*
* The name of your custom platform.
*
*
* @param platformName
* The name of your custom platform.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePlatformVersionRequest withPlatformName(String platformName) {
setPlatformName(platformName);
return this;
}
/**
*
* The number, such as 1.0.2, for the new platform version.
*
*
* @param platformVersion
* The number, such as 1.0.2, for the new platform version.
*/
public void setPlatformVersion(String platformVersion) {
this.platformVersion = platformVersion;
}
/**
*
* The number, such as 1.0.2, for the new platform version.
*
*
* @return The number, such as 1.0.2, for the new platform version.
*/
public String getPlatformVersion() {
return this.platformVersion;
}
/**
*
* The number, such as 1.0.2, for the new platform version.
*
*
* @param platformVersion
* The number, such as 1.0.2, for the new platform version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePlatformVersionRequest withPlatformVersion(String platformVersion) {
setPlatformVersion(platformVersion);
return this;
}
/**
*
* The location of the platform definition archive in Amazon S3.
*
*
* @param platformDefinitionBundle
* The location of the platform definition archive in Amazon S3.
*/
public void setPlatformDefinitionBundle(S3Location platformDefinitionBundle) {
this.platformDefinitionBundle = platformDefinitionBundle;
}
/**
*
* The location of the platform definition archive in Amazon S3.
*
*
* @return The location of the platform definition archive in Amazon S3.
*/
public S3Location getPlatformDefinitionBundle() {
return this.platformDefinitionBundle;
}
/**
*
* The location of the platform definition archive in Amazon S3.
*
*
* @param platformDefinitionBundle
* The location of the platform definition archive in Amazon S3.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePlatformVersionRequest withPlatformDefinitionBundle(S3Location platformDefinitionBundle) {
setPlatformDefinitionBundle(platformDefinitionBundle);
return this;
}
/**
*
* The name of the builder environment.
*
*
* @param environmentName
* The name of the builder environment.
*/
public void setEnvironmentName(String environmentName) {
this.environmentName = environmentName;
}
/**
*
* The name of the builder environment.
*
*
* @return The name of the builder environment.
*/
public String getEnvironmentName() {
return this.environmentName;
}
/**
*
* The name of the builder environment.
*
*
* @param environmentName
* The name of the builder environment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePlatformVersionRequest withEnvironmentName(String environmentName) {
setEnvironmentName(environmentName);
return this;
}
/**
*
* The configuration option settings to apply to the builder environment.
*
*
* @return The configuration option settings to apply to the builder environment.
*/
public java.util.List getOptionSettings() {
if (optionSettings == null) {
optionSettings = new com.amazonaws.internal.SdkInternalList();
}
return optionSettings;
}
/**
*
* The configuration option settings to apply to the builder environment.
*
*
* @param optionSettings
* The configuration option settings to apply to the builder environment.
*/
public void setOptionSettings(java.util.Collection optionSettings) {
if (optionSettings == null) {
this.optionSettings = null;
return;
}
this.optionSettings = new com.amazonaws.internal.SdkInternalList(optionSettings);
}
/**
*
* The configuration option settings to apply to the builder environment.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOptionSettings(java.util.Collection)} or {@link #withOptionSettings(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param optionSettings
* The configuration option settings to apply to the builder environment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePlatformVersionRequest withOptionSettings(ConfigurationOptionSetting... optionSettings) {
if (this.optionSettings == null) {
setOptionSettings(new com.amazonaws.internal.SdkInternalList(optionSettings.length));
}
for (ConfigurationOptionSetting ele : optionSettings) {
this.optionSettings.add(ele);
}
return this;
}
/**
*
* The configuration option settings to apply to the builder environment.
*
*
* @param optionSettings
* The configuration option settings to apply to the builder environment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePlatformVersionRequest withOptionSettings(java.util.Collection optionSettings) {
setOptionSettings(optionSettings);
return this;
}
/**
*
* Specifies the tags applied to the new platform version.
*
*
* Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the
* platform version don't inherit the tags.
*
*
* @return Specifies the tags applied to the new platform version.
*
* Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the
* platform version don't inherit the tags.
*/
public java.util.List getTags() {
if (tags == null) {
tags = new com.amazonaws.internal.SdkInternalList();
}
return tags;
}
/**
*
* Specifies the tags applied to the new platform version.
*
*
* Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the
* platform version don't inherit the tags.
*
*
* @param tags
* Specifies the tags applied to the new platform version.
*
* Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the
* platform version don't inherit the tags.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new com.amazonaws.internal.SdkInternalList(tags);
}
/**
*
* Specifies the tags applied to the new platform version.
*
*
* Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the
* platform version don't inherit the tags.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* Specifies the tags applied to the new platform version.
*
* Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the
* platform version don't inherit the tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePlatformVersionRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* Specifies the tags applied to the new platform version.
*
*
* Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the
* platform version don't inherit the tags.
*
*
* @param tags
* Specifies the tags applied to the new platform version.
*
* Elastic Beanstalk applies these tags only to the platform version. Environments that you create using the
* platform version don't inherit the tags.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreatePlatformVersionRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getPlatformName() != null)
sb.append("PlatformName: ").append(getPlatformName()).append(",");
if (getPlatformVersion() != null)
sb.append("PlatformVersion: ").append(getPlatformVersion()).append(",");
if (getPlatformDefinitionBundle() != null)
sb.append("PlatformDefinitionBundle: ").append(getPlatformDefinitionBundle()).append(",");
if (getEnvironmentName() != null)
sb.append("EnvironmentName: ").append(getEnvironmentName()).append(",");
if (getOptionSettings() != null)
sb.append("OptionSettings: ").append(getOptionSettings()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreatePlatformVersionRequest == false)
return false;
CreatePlatformVersionRequest other = (CreatePlatformVersionRequest) obj;
if (other.getPlatformName() == null ^ this.getPlatformName() == null)
return false;
if (other.getPlatformName() != null && other.getPlatformName().equals(this.getPlatformName()) == false)
return false;
if (other.getPlatformVersion() == null ^ this.getPlatformVersion() == null)
return false;
if (other.getPlatformVersion() != null && other.getPlatformVersion().equals(this.getPlatformVersion()) == false)
return false;
if (other.getPlatformDefinitionBundle() == null ^ this.getPlatformDefinitionBundle() == null)
return false;
if (other.getPlatformDefinitionBundle() != null && other.getPlatformDefinitionBundle().equals(this.getPlatformDefinitionBundle()) == false)
return false;
if (other.getEnvironmentName() == null ^ this.getEnvironmentName() == null)
return false;
if (other.getEnvironmentName() != null && other.getEnvironmentName().equals(this.getEnvironmentName()) == false)
return false;
if (other.getOptionSettings() == null ^ this.getOptionSettings() == null)
return false;
if (other.getOptionSettings() != null && other.getOptionSettings().equals(this.getOptionSettings()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getPlatformName() == null) ? 0 : getPlatformName().hashCode());
hashCode = prime * hashCode + ((getPlatformVersion() == null) ? 0 : getPlatformVersion().hashCode());
hashCode = prime * hashCode + ((getPlatformDefinitionBundle() == null) ? 0 : getPlatformDefinitionBundle().hashCode());
hashCode = prime * hashCode + ((getEnvironmentName() == null) ? 0 : getEnvironmentName().hashCode());
hashCode = prime * hashCode + ((getOptionSettings() == null) ? 0 : getOptionSettings().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreatePlatformVersionRequest clone() {
return (CreatePlatformVersionRequest) super.clone();
}
}