com.amazonaws.services.proton.model.CreateEnvironmentRequest Maven / Gradle / Ivy
/*
* Copyright 2016-2021 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.proton.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateEnvironmentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A description of the environment that's being created and deployed.
*
*/
private String description;
/**
*
* The ID of the environment account connection that you provide if you're provisioning your environment
* infrastructure resources to an environment account. You must include either the
* environmentAccountConnectionId or protonServiceRoleArn parameter and value. For more
* information, see Environment account
* connections in the AWS Proton Administration guide.
*
*/
private String environmentAccountConnectionId;
/**
*
* The name of the environment.
*
*/
private String name;
/**
*
* The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to other
* services on your behalf. You must include either the environmentAccountConnectionId or
* protonServiceRoleArn parameter and value.
*
*/
private String protonServiceRoleArn;
/**
*
* A link to a YAML formatted spec file that provides inputs as defined in the environment template bundle schema
* file. For more information, see Environments in the
* AWS Proton Administration Guide.
*
*/
private String spec;
/**
*
* Create tags for your environment. For more information, see AWS Proton resources and tagging in the AWS Proton Administration Guide or
* AWS Proton User Guide.
*
*/
private java.util.List tags;
/**
*
* The ID of the major version of the environment template.
*
*/
private String templateMajorVersion;
/**
*
* The ID of the minor version of the environment template.
*
*/
private String templateMinorVersion;
/**
*
* The name of the environment template. For more information, see Environment Templates in
* the AWS Proton Administration Guide.
*
*/
private String templateName;
/**
*
* A description of the environment that's being created and deployed.
*
*
* @param description
* A description of the environment that's being created and deployed.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the environment that's being created and deployed.
*
*
* @return A description of the environment that's being created and deployed.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the environment that's being created and deployed.
*
*
* @param description
* A description of the environment that's being created and deployed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The ID of the environment account connection that you provide if you're provisioning your environment
* infrastructure resources to an environment account. You must include either the
* environmentAccountConnectionId or protonServiceRoleArn parameter and value. For more
* information, see Environment account
* connections in the AWS Proton Administration guide.
*
*
* @param environmentAccountConnectionId
* The ID of the environment account connection that you provide if you're provisioning your environment
* infrastructure resources to an environment account. You must include either the
* environmentAccountConnectionId or protonServiceRoleArn parameter and value. For
* more information, see Environment
* account connections in the AWS Proton Administration guide.
*/
public void setEnvironmentAccountConnectionId(String environmentAccountConnectionId) {
this.environmentAccountConnectionId = environmentAccountConnectionId;
}
/**
*
* The ID of the environment account connection that you provide if you're provisioning your environment
* infrastructure resources to an environment account. You must include either the
* environmentAccountConnectionId or protonServiceRoleArn parameter and value. For more
* information, see Environment account
* connections in the AWS Proton Administration guide.
*
*
* @return The ID of the environment account connection that you provide if you're provisioning your environment
* infrastructure resources to an environment account. You must include either the
* environmentAccountConnectionId or protonServiceRoleArn parameter and value. For
* more information, see Environment
* account connections in the AWS Proton Administration guide.
*/
public String getEnvironmentAccountConnectionId() {
return this.environmentAccountConnectionId;
}
/**
*
* The ID of the environment account connection that you provide if you're provisioning your environment
* infrastructure resources to an environment account. You must include either the
* environmentAccountConnectionId or protonServiceRoleArn parameter and value. For more
* information, see Environment account
* connections in the AWS Proton Administration guide.
*
*
* @param environmentAccountConnectionId
* The ID of the environment account connection that you provide if you're provisioning your environment
* infrastructure resources to an environment account. You must include either the
* environmentAccountConnectionId or protonServiceRoleArn parameter and value. For
* more information, see Environment
* account connections in the AWS Proton Administration guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withEnvironmentAccountConnectionId(String environmentAccountConnectionId) {
setEnvironmentAccountConnectionId(environmentAccountConnectionId);
return this;
}
/**
*
* The name of the environment.
*
*
* @param name
* The name of the environment.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the environment.
*
*
* @return The name of the environment.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the environment.
*
*
* @param name
* The name of the environment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withName(String name) {
setName(name);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to other
* services on your behalf. You must include either the environmentAccountConnectionId or
* protonServiceRoleArn parameter and value.
*
*
* @param protonServiceRoleArn
* The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to
* other services on your behalf. You must include either the environmentAccountConnectionId or
* protonServiceRoleArn parameter and value.
*/
public void setProtonServiceRoleArn(String protonServiceRoleArn) {
this.protonServiceRoleArn = protonServiceRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to other
* services on your behalf. You must include either the environmentAccountConnectionId or
* protonServiceRoleArn parameter and value.
*
*
* @return The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to
* other services on your behalf. You must include either the environmentAccountConnectionId or
* protonServiceRoleArn parameter and value.
*/
public String getProtonServiceRoleArn() {
return this.protonServiceRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to other
* services on your behalf. You must include either the environmentAccountConnectionId or
* protonServiceRoleArn parameter and value.
*
*
* @param protonServiceRoleArn
* The Amazon Resource Name (ARN) of the AWS Proton service role that allows AWS Proton to make calls to
* other services on your behalf. You must include either the environmentAccountConnectionId or
* protonServiceRoleArn parameter and value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withProtonServiceRoleArn(String protonServiceRoleArn) {
setProtonServiceRoleArn(protonServiceRoleArn);
return this;
}
/**
*
* A link to a YAML formatted spec file that provides inputs as defined in the environment template bundle schema
* file. For more information, see Environments in the
* AWS Proton Administration Guide.
*
*
* @param spec
* A link to a YAML formatted spec file that provides inputs as defined in the environment template bundle
* schema file. For more information, see Environments
* in the AWS Proton Administration Guide.
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
*
* A link to a YAML formatted spec file that provides inputs as defined in the environment template bundle schema
* file. For more information, see Environments in the
* AWS Proton Administration Guide.
*
*
* @return A link to a YAML formatted spec file that provides inputs as defined in the environment template bundle
* schema file. For more information, see Environments in the AWS Proton Administration Guide.
*/
public String getSpec() {
return this.spec;
}
/**
*
* A link to a YAML formatted spec file that provides inputs as defined in the environment template bundle schema
* file. For more information, see Environments in the
* AWS Proton Administration Guide.
*
*
* @param spec
* A link to a YAML formatted spec file that provides inputs as defined in the environment template bundle
* schema file. For more information, see Environments
* in the AWS Proton Administration Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withSpec(String spec) {
setSpec(spec);
return this;
}
/**
*
* Create tags for your environment. For more information, see AWS Proton resources and tagging in the AWS Proton Administration Guide or
* AWS Proton User Guide.
*
*
* @return Create tags for your environment. For more information, see AWS Proton resources and tagging in
* the AWS Proton
* Administration Guide or AWS Proton User Guide.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* Create tags for your environment. For more information, see AWS Proton resources and tagging in the AWS Proton Administration Guide or
* AWS Proton User Guide.
*
*
* @param tags
* Create tags for your environment. For more information, see AWS Proton resources and tagging in the
* AWS Proton Administration
* Guide or AWS Proton User
* Guide.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* Create tags for your environment. For more information, see AWS Proton resources and tagging in the AWS Proton Administration Guide or
* AWS Proton User Guide.
*
*
* 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
* Create tags for your environment. For more information, see AWS Proton resources and tagging in the
* AWS Proton Administration
* Guide or AWS Proton User
* Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* Create tags for your environment. For more information, see AWS Proton resources and tagging in the AWS Proton Administration Guide or
* AWS Proton User Guide.
*
*
* @param tags
* Create tags for your environment. For more information, see AWS Proton resources and tagging in the
* AWS Proton Administration
* Guide or AWS Proton User
* Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* The ID of the major version of the environment template.
*
*
* @param templateMajorVersion
* The ID of the major version of the environment template.
*/
public void setTemplateMajorVersion(String templateMajorVersion) {
this.templateMajorVersion = templateMajorVersion;
}
/**
*
* The ID of the major version of the environment template.
*
*
* @return The ID of the major version of the environment template.
*/
public String getTemplateMajorVersion() {
return this.templateMajorVersion;
}
/**
*
* The ID of the major version of the environment template.
*
*
* @param templateMajorVersion
* The ID of the major version of the environment template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withTemplateMajorVersion(String templateMajorVersion) {
setTemplateMajorVersion(templateMajorVersion);
return this;
}
/**
*
* The ID of the minor version of the environment template.
*
*
* @param templateMinorVersion
* The ID of the minor version of the environment template.
*/
public void setTemplateMinorVersion(String templateMinorVersion) {
this.templateMinorVersion = templateMinorVersion;
}
/**
*
* The ID of the minor version of the environment template.
*
*
* @return The ID of the minor version of the environment template.
*/
public String getTemplateMinorVersion() {
return this.templateMinorVersion;
}
/**
*
* The ID of the minor version of the environment template.
*
*
* @param templateMinorVersion
* The ID of the minor version of the environment template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withTemplateMinorVersion(String templateMinorVersion) {
setTemplateMinorVersion(templateMinorVersion);
return this;
}
/**
*
* The name of the environment template. For more information, see Environment Templates in
* the AWS Proton Administration Guide.
*
*
* @param templateName
* The name of the environment template. For more information, see Environment
* Templates in the AWS Proton Administration Guide.
*/
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
/**
*
* The name of the environment template. For more information, see Environment Templates in
* the AWS Proton Administration Guide.
*
*
* @return The name of the environment template. For more information, see Environment
* Templates in the AWS Proton Administration Guide.
*/
public String getTemplateName() {
return this.templateName;
}
/**
*
* The name of the environment template. For more information, see Environment Templates in
* the AWS Proton Administration Guide.
*
*
* @param templateName
* The name of the environment template. For more information, see Environment
* Templates in the AWS Proton Administration Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateEnvironmentRequest withTemplateName(String templateName) {
setTemplateName(templateName);
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 (getDescription() != null)
sb.append("Description: ").append("***Sensitive Data Redacted***").append(",");
if (getEnvironmentAccountConnectionId() != null)
sb.append("EnvironmentAccountConnectionId: ").append(getEnvironmentAccountConnectionId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getProtonServiceRoleArn() != null)
sb.append("ProtonServiceRoleArn: ").append(getProtonServiceRoleArn()).append(",");
if (getSpec() != null)
sb.append("Spec: ").append("***Sensitive Data Redacted***").append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getTemplateMajorVersion() != null)
sb.append("TemplateMajorVersion: ").append(getTemplateMajorVersion()).append(",");
if (getTemplateMinorVersion() != null)
sb.append("TemplateMinorVersion: ").append(getTemplateMinorVersion()).append(",");
if (getTemplateName() != null)
sb.append("TemplateName: ").append(getTemplateName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateEnvironmentRequest == false)
return false;
CreateEnvironmentRequest other = (CreateEnvironmentRequest) obj;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getEnvironmentAccountConnectionId() == null ^ this.getEnvironmentAccountConnectionId() == null)
return false;
if (other.getEnvironmentAccountConnectionId() != null
&& other.getEnvironmentAccountConnectionId().equals(this.getEnvironmentAccountConnectionId()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getProtonServiceRoleArn() == null ^ this.getProtonServiceRoleArn() == null)
return false;
if (other.getProtonServiceRoleArn() != null && other.getProtonServiceRoleArn().equals(this.getProtonServiceRoleArn()) == false)
return false;
if (other.getSpec() == null ^ this.getSpec() == null)
return false;
if (other.getSpec() != null && other.getSpec().equals(this.getSpec()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getTemplateMajorVersion() == null ^ this.getTemplateMajorVersion() == null)
return false;
if (other.getTemplateMajorVersion() != null && other.getTemplateMajorVersion().equals(this.getTemplateMajorVersion()) == false)
return false;
if (other.getTemplateMinorVersion() == null ^ this.getTemplateMinorVersion() == null)
return false;
if (other.getTemplateMinorVersion() != null && other.getTemplateMinorVersion().equals(this.getTemplateMinorVersion()) == false)
return false;
if (other.getTemplateName() == null ^ this.getTemplateName() == null)
return false;
if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getEnvironmentAccountConnectionId() == null) ? 0 : getEnvironmentAccountConnectionId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getProtonServiceRoleArn() == null) ? 0 : getProtonServiceRoleArn().hashCode());
hashCode = prime * hashCode + ((getSpec() == null) ? 0 : getSpec().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getTemplateMajorVersion() == null) ? 0 : getTemplateMajorVersion().hashCode());
hashCode = prime * hashCode + ((getTemplateMinorVersion() == null) ? 0 : getTemplateMinorVersion().hashCode());
hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode());
return hashCode;
}
@Override
public CreateEnvironmentRequest clone() {
return (CreateEnvironmentRequest) super.clone();
}
}