com.amazonaws.services.proton.model.UpdateEnvironmentRequest 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 UpdateEnvironmentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* There are four modes for updating an environment as described in the following. The deploymentType
* field defines the mode.
*
*
*
* -
*
* NONE
*
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
*
*
*
* -
*
* CURRENT_VERSION
*
*
* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested
* parameters are updated. Don’t include minor or major version parameters when you use this
* deployment-type.
*
*
*
* -
*
* MINOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of
* the current major version in use, by default. You can also specify a different minor version of the current major
* version in use.
*
*
*
* -
*
* MAJOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor
* version of the current template, by default. You can also specify a different major version that is higher than
* the major version in use and a minor version (optional).
*
*
*
*/
private String deploymentType;
/**
*
* A description of the environment update.
*
*/
private String description;
/**
*
* The ID of the environment account connection.
*
*
* You can only update to a new environment account connection if it was created in the same environment account
* that the current environment account connection was created in and associated with the current environment.
*
*/
private String environmentAccountConnectionId;
/**
*
* The name of the environment to update.
*
*/
private String name;
/**
*
* The ARN of the AWS Proton service role that allows AWS Proton to make API calls to other services your behalf.
*
*/
private String protonServiceRoleArn;
/**
*
* The formatted specification that defines the update.
*
*/
private String spec;
/**
*
* The ID of the major version of the environment to update.
*
*/
private String templateMajorVersion;
/**
*
* The ID of the minor version of the environment to update.
*
*/
private String templateMinorVersion;
/**
*
* There are four modes for updating an environment as described in the following. The deploymentType
* field defines the mode.
*
*
*
* -
*
* NONE
*
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
*
*
*
* -
*
* CURRENT_VERSION
*
*
* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested
* parameters are updated. Don’t include minor or major version parameters when you use this
* deployment-type.
*
*
*
* -
*
* MINOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of
* the current major version in use, by default. You can also specify a different minor version of the current major
* version in use.
*
*
*
* -
*
* MAJOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor
* version of the current template, by default. You can also specify a different major version that is higher than
* the major version in use and a minor version (optional).
*
*
*
*
* @param deploymentType
* There are four modes for updating an environment as described in the following. The
* deploymentType field defines the mode.
*
*
* -
*
* NONE
*
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
*
*
*
* -
*
* CURRENT_VERSION
*
*
* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested
* parameters are updated. Don’t include minor or major version parameters when you use this
* deployment-type.
*
*
*
* -
*
* MINOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) minor
* version of the current major version in use, by default. You can also specify a different minor version of
* the current major version in use.
*
*
*
* -
*
* MAJOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) major and
* minor version of the current template, by default. You can also specify a different major version that is
* higher than the major version in use and a minor version (optional).
*
*
* @see DeploymentUpdateType
*/
public void setDeploymentType(String deploymentType) {
this.deploymentType = deploymentType;
}
/**
*
* There are four modes for updating an environment as described in the following. The deploymentType
* field defines the mode.
*
*
*
* -
*
* NONE
*
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
*
*
*
* -
*
* CURRENT_VERSION
*
*
* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested
* parameters are updated. Don’t include minor or major version parameters when you use this
* deployment-type.
*
*
*
* -
*
* MINOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of
* the current major version in use, by default. You can also specify a different minor version of the current major
* version in use.
*
*
*
* -
*
* MAJOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor
* version of the current template, by default. You can also specify a different major version that is higher than
* the major version in use and a minor version (optional).
*
*
*
*
* @return There are four modes for updating an environment as described in the following. The
* deploymentType field defines the mode.
*
*
* -
*
* NONE
*
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
*
*
*
* -
*
* CURRENT_VERSION
*
*
* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested
* parameters are updated. Don’t include minor or major version parameters when you use this
* deployment-type.
*
*
*
* -
*
* MINOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) minor
* version of the current major version in use, by default. You can also specify a different minor version
* of the current major version in use.
*
*
*
* -
*
* MAJOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) major and
* minor version of the current template, by default. You can also specify a different major version that is
* higher than the major version in use and a minor version (optional).
*
*
* @see DeploymentUpdateType
*/
public String getDeploymentType() {
return this.deploymentType;
}
/**
*
* There are four modes for updating an environment as described in the following. The deploymentType
* field defines the mode.
*
*
*
* -
*
* NONE
*
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
*
*
*
* -
*
* CURRENT_VERSION
*
*
* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested
* parameters are updated. Don’t include minor or major version parameters when you use this
* deployment-type.
*
*
*
* -
*
* MINOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of
* the current major version in use, by default. You can also specify a different minor version of the current major
* version in use.
*
*
*
* -
*
* MAJOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor
* version of the current template, by default. You can also specify a different major version that is higher than
* the major version in use and a minor version (optional).
*
*
*
*
* @param deploymentType
* There are four modes for updating an environment as described in the following. The
* deploymentType field defines the mode.
*
*
* -
*
* NONE
*
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
*
*
*
* -
*
* CURRENT_VERSION
*
*
* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested
* parameters are updated. Don’t include minor or major version parameters when you use this
* deployment-type.
*
*
*
* -
*
* MINOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) minor
* version of the current major version in use, by default. You can also specify a different minor version of
* the current major version in use.
*
*
*
* -
*
* MAJOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) major and
* minor version of the current template, by default. You can also specify a different major version that is
* higher than the major version in use and a minor version (optional).
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeploymentUpdateType
*/
public UpdateEnvironmentRequest withDeploymentType(String deploymentType) {
setDeploymentType(deploymentType);
return this;
}
/**
*
* There are four modes for updating an environment as described in the following. The deploymentType
* field defines the mode.
*
*
*
* -
*
* NONE
*
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
*
*
*
* -
*
* CURRENT_VERSION
*
*
* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested
* parameters are updated. Don’t include minor or major version parameters when you use this
* deployment-type.
*
*
*
* -
*
* MINOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) minor version of
* the current major version in use, by default. You can also specify a different minor version of the current major
* version in use.
*
*
*
* -
*
* MAJOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) major and minor
* version of the current template, by default. You can also specify a different major version that is higher than
* the major version in use and a minor version (optional).
*
*
*
*
* @param deploymentType
* There are four modes for updating an environment as described in the following. The
* deploymentType field defines the mode.
*
*
* -
*
* NONE
*
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated.
*
*
*
* -
*
* CURRENT_VERSION
*
*
* In this mode, the environment is deployed and updated with the new spec that you provide. Only requested
* parameters are updated. Don’t include minor or major version parameters when you use this
* deployment-type.
*
*
*
* -
*
* MINOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) minor
* version of the current major version in use, by default. You can also specify a different minor version of
* the current major version in use.
*
*
*
* -
*
* MAJOR_VERSION
*
*
* In this mode, the environment is deployed and updated with the published, recommended (latest) major and
* minor version of the current template, by default. You can also specify a different major version that is
* higher than the major version in use and a minor version (optional).
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DeploymentUpdateType
*/
public UpdateEnvironmentRequest withDeploymentType(DeploymentUpdateType deploymentType) {
this.deploymentType = deploymentType.toString();
return this;
}
/**
*
* A description of the environment update.
*
*
* @param description
* A description of the environment update.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the environment update.
*
*
* @return A description of the environment update.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the environment update.
*
*
* @param description
* A description of the environment update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The ID of the environment account connection.
*
*
* You can only update to a new environment account connection if it was created in the same environment account
* that the current environment account connection was created in and associated with the current environment.
*
*
* @param environmentAccountConnectionId
* The ID of the environment account connection.
*
* You can only update to a new environment account connection if it was created in the same environment
* account that the current environment account connection was created in and associated with the current
* environment.
*/
public void setEnvironmentAccountConnectionId(String environmentAccountConnectionId) {
this.environmentAccountConnectionId = environmentAccountConnectionId;
}
/**
*
* The ID of the environment account connection.
*
*
* You can only update to a new environment account connection if it was created in the same environment account
* that the current environment account connection was created in and associated with the current environment.
*
*
* @return The ID of the environment account connection.
*
* You can only update to a new environment account connection if it was created in the same environment
* account that the current environment account connection was created in and associated with the current
* environment.
*/
public String getEnvironmentAccountConnectionId() {
return this.environmentAccountConnectionId;
}
/**
*
* The ID of the environment account connection.
*
*
* You can only update to a new environment account connection if it was created in the same environment account
* that the current environment account connection was created in and associated with the current environment.
*
*
* @param environmentAccountConnectionId
* The ID of the environment account connection.
*
* You can only update to a new environment account connection if it was created in the same environment
* account that the current environment account connection was created in and associated with the current
* environment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withEnvironmentAccountConnectionId(String environmentAccountConnectionId) {
setEnvironmentAccountConnectionId(environmentAccountConnectionId);
return this;
}
/**
*
* The name of the environment to update.
*
*
* @param name
* The name of the environment to update.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the environment to update.
*
*
* @return The name of the environment to update.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the environment to update.
*
*
* @param name
* The name of the environment to update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withName(String name) {
setName(name);
return this;
}
/**
*
* The ARN of the AWS Proton service role that allows AWS Proton to make API calls to other services your behalf.
*
*
* @param protonServiceRoleArn
* The ARN of the AWS Proton service role that allows AWS Proton to make API calls to other services your
* behalf.
*/
public void setProtonServiceRoleArn(String protonServiceRoleArn) {
this.protonServiceRoleArn = protonServiceRoleArn;
}
/**
*
* The ARN of the AWS Proton service role that allows AWS Proton to make API calls to other services your behalf.
*
*
* @return The ARN of the AWS Proton service role that allows AWS Proton to make API calls to other services your
* behalf.
*/
public String getProtonServiceRoleArn() {
return this.protonServiceRoleArn;
}
/**
*
* The ARN of the AWS Proton service role that allows AWS Proton to make API calls to other services your behalf.
*
*
* @param protonServiceRoleArn
* The ARN of the AWS Proton service role that allows AWS Proton to make API calls to other services your
* behalf.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withProtonServiceRoleArn(String protonServiceRoleArn) {
setProtonServiceRoleArn(protonServiceRoleArn);
return this;
}
/**
*
* The formatted specification that defines the update.
*
*
* @param spec
* The formatted specification that defines the update.
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
*
* The formatted specification that defines the update.
*
*
* @return The formatted specification that defines the update.
*/
public String getSpec() {
return this.spec;
}
/**
*
* The formatted specification that defines the update.
*
*
* @param spec
* The formatted specification that defines the update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withSpec(String spec) {
setSpec(spec);
return this;
}
/**
*
* The ID of the major version of the environment to update.
*
*
* @param templateMajorVersion
* The ID of the major version of the environment to update.
*/
public void setTemplateMajorVersion(String templateMajorVersion) {
this.templateMajorVersion = templateMajorVersion;
}
/**
*
* The ID of the major version of the environment to update.
*
*
* @return The ID of the major version of the environment to update.
*/
public String getTemplateMajorVersion() {
return this.templateMajorVersion;
}
/**
*
* The ID of the major version of the environment to update.
*
*
* @param templateMajorVersion
* The ID of the major version of the environment to update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withTemplateMajorVersion(String templateMajorVersion) {
setTemplateMajorVersion(templateMajorVersion);
return this;
}
/**
*
* The ID of the minor version of the environment to update.
*
*
* @param templateMinorVersion
* The ID of the minor version of the environment to update.
*/
public void setTemplateMinorVersion(String templateMinorVersion) {
this.templateMinorVersion = templateMinorVersion;
}
/**
*
* The ID of the minor version of the environment to update.
*
*
* @return The ID of the minor version of the environment to update.
*/
public String getTemplateMinorVersion() {
return this.templateMinorVersion;
}
/**
*
* The ID of the minor version of the environment to update.
*
*
* @param templateMinorVersion
* The ID of the minor version of the environment to update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateEnvironmentRequest withTemplateMinorVersion(String templateMinorVersion) {
setTemplateMinorVersion(templateMinorVersion);
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 (getDeploymentType() != null)
sb.append("DeploymentType: ").append(getDeploymentType()).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 (getTemplateMajorVersion() != null)
sb.append("TemplateMajorVersion: ").append(getTemplateMajorVersion()).append(",");
if (getTemplateMinorVersion() != null)
sb.append("TemplateMinorVersion: ").append(getTemplateMinorVersion());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateEnvironmentRequest == false)
return false;
UpdateEnvironmentRequest other = (UpdateEnvironmentRequest) obj;
if (other.getDeploymentType() == null ^ this.getDeploymentType() == null)
return false;
if (other.getDeploymentType() != null && other.getDeploymentType().equals(this.getDeploymentType()) == false)
return false;
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.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;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDeploymentType() == null) ? 0 : getDeploymentType().hashCode());
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 + ((getTemplateMajorVersion() == null) ? 0 : getTemplateMajorVersion().hashCode());
hashCode = prime * hashCode + ((getTemplateMinorVersion() == null) ? 0 : getTemplateMinorVersion().hashCode());
return hashCode;
}
@Override
public UpdateEnvironmentRequest clone() {
return (UpdateEnvironmentRequest) super.clone();
}
}