/* * Copyright 2018-2023 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 UpdateComponentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The client token for the updated component. *
*/ private String clientToken; /** ** The deployment type. It defines the mode for updating a component, as follows: *
*
* NONE
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You can only
* specify description
in this mode.
*
* CURRENT_VERSION
*
* In this mode, the component is deployed and updated with the new serviceSpec
,
* templateSource
, and/or type
that you provide. Only requested parameters are updated.
*
* An optional customer-provided description of the component. *
*/ private String description; /** ** The name of the component to update. *
*/ private String name; /** *
* The name of the service instance that you want to attach this component to. Don't specify to keep the component's
* current service instance attachment. Specify an empty string to detach the component from the service instance
* it's attached to. Specify non-empty values for both serviceInstanceName
and serviceName
* or for neither of them.
*
* The name of the service that serviceInstanceName
is associated with. Don't specify to keep the
* component's current service instance attachment. Specify an empty string to detach the component from the service
* instance it's attached to. Specify non-empty values for both serviceInstanceName
and
* serviceName
or for neither of them.
*
* The service spec that you want the component to use to access service inputs. Set this only when the component is * attached to a service instance. *
*/ private String serviceSpec; /** ** A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions. *
** Components support a single IaC file, even if you use Terraform as your template language. *
** The client token for the updated component. *
* * @param clientToken * The client token for the updated component. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** The client token for the updated component. *
* * @return The client token for the updated component. */ public String getClientToken() { return this.clientToken; } /** ** The client token for the updated component. *
* * @param clientToken * The client token for the updated component. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateComponentRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** The deployment type. It defines the mode for updating a component, as follows: *
*
* NONE
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You can only
* specify description
in this mode.
*
* CURRENT_VERSION
*
* In this mode, the component is deployed and updated with the new serviceSpec
,
* templateSource
, and/or type
that you provide. Only requested parameters are updated.
*
* NONE
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You
* can only specify description
in this mode.
*
* CURRENT_VERSION
*
* In this mode, the component is deployed and updated with the new serviceSpec
,
* templateSource
, and/or type
that you provide. Only requested parameters are
* updated.
*
* The deployment type. It defines the mode for updating a component, as follows: *
*
* NONE
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You can only
* specify description
in this mode.
*
* CURRENT_VERSION
*
* In this mode, the component is deployed and updated with the new serviceSpec
,
* templateSource
, and/or type
that you provide. Only requested parameters are updated.
*
* NONE
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You
* can only specify description
in this mode.
*
* CURRENT_VERSION
*
* In this mode, the component is deployed and updated with the new serviceSpec
,
* templateSource
, and/or type
that you provide. Only requested parameters are
* updated.
*
* The deployment type. It defines the mode for updating a component, as follows: *
*
* NONE
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You can only
* specify description
in this mode.
*
* CURRENT_VERSION
*
* In this mode, the component is deployed and updated with the new serviceSpec
,
* templateSource
, and/or type
that you provide. Only requested parameters are updated.
*
* NONE
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You
* can only specify description
in this mode.
*
* CURRENT_VERSION
*
* In this mode, the component is deployed and updated with the new serviceSpec
,
* templateSource
, and/or type
that you provide. Only requested parameters are
* updated.
*
* The deployment type. It defines the mode for updating a component, as follows: *
*
* NONE
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You can only
* specify description
in this mode.
*
* CURRENT_VERSION
*
* In this mode, the component is deployed and updated with the new serviceSpec
,
* templateSource
, and/or type
that you provide. Only requested parameters are updated.
*
* NONE
*
* In this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You
* can only specify description
in this mode.
*
* CURRENT_VERSION
*
* In this mode, the component is deployed and updated with the new serviceSpec
,
* templateSource
, and/or type
that you provide. Only requested parameters are
* updated.
*
* An optional customer-provided description of the component. *
* * @param description * An optional customer-provided description of the component. */ public void setDescription(String description) { this.description = description; } /** ** An optional customer-provided description of the component. *
* * @return An optional customer-provided description of the component. */ public String getDescription() { return this.description; } /** ** An optional customer-provided description of the component. *
* * @param description * An optional customer-provided description of the component. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateComponentRequest withDescription(String description) { setDescription(description); return this; } /** ** The name of the component to update. *
* * @param name * The name of the component to update. */ public void setName(String name) { this.name = name; } /** ** The name of the component to update. *
* * @return The name of the component to update. */ public String getName() { return this.name; } /** ** The name of the component to update. *
* * @param name * The name of the component to update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateComponentRequest withName(String name) { setName(name); return this; } /** *
* The name of the service instance that you want to attach this component to. Don't specify to keep the component's
* current service instance attachment. Specify an empty string to detach the component from the service instance
* it's attached to. Specify non-empty values for both serviceInstanceName
and serviceName
* or for neither of them.
*
serviceInstanceName
and
* serviceName
or for neither of them.
*/
public void setServiceInstanceName(String serviceInstanceName) {
this.serviceInstanceName = serviceInstanceName;
}
/**
*
* The name of the service instance that you want to attach this component to. Don't specify to keep the component's
* current service instance attachment. Specify an empty string to detach the component from the service instance
* it's attached to. Specify non-empty values for both serviceInstanceName
and serviceName
* or for neither of them.
*
serviceInstanceName
and
* serviceName
or for neither of them.
*/
public String getServiceInstanceName() {
return this.serviceInstanceName;
}
/**
*
* The name of the service instance that you want to attach this component to. Don't specify to keep the component's
* current service instance attachment. Specify an empty string to detach the component from the service instance
* it's attached to. Specify non-empty values for both serviceInstanceName
and serviceName
* or for neither of them.
*
serviceInstanceName
and
* serviceName
or for neither of them.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateComponentRequest withServiceInstanceName(String serviceInstanceName) {
setServiceInstanceName(serviceInstanceName);
return this;
}
/**
*
* The name of the service that serviceInstanceName
is associated with. Don't specify to keep the
* component's current service instance attachment. Specify an empty string to detach the component from the service
* instance it's attached to. Specify non-empty values for both serviceInstanceName
and
* serviceName
or for neither of them.
*
serviceInstanceName
is associated with. Don't specify to keep
* the component's current service instance attachment. Specify an empty string to detach the component from
* the service instance it's attached to. Specify non-empty values for both serviceInstanceName
* and serviceName
or for neither of them.
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/**
*
* The name of the service that serviceInstanceName
is associated with. Don't specify to keep the
* component's current service instance attachment. Specify an empty string to detach the component from the service
* instance it's attached to. Specify non-empty values for both serviceInstanceName
and
* serviceName
or for neither of them.
*
serviceInstanceName
is associated with. Don't specify to keep
* the component's current service instance attachment. Specify an empty string to detach the component from
* the service instance it's attached to. Specify non-empty values for both serviceInstanceName
* and serviceName
or for neither of them.
*/
public String getServiceName() {
return this.serviceName;
}
/**
*
* The name of the service that serviceInstanceName
is associated with. Don't specify to keep the
* component's current service instance attachment. Specify an empty string to detach the component from the service
* instance it's attached to. Specify non-empty values for both serviceInstanceName
and
* serviceName
or for neither of them.
*
serviceInstanceName
is associated with. Don't specify to keep
* the component's current service instance attachment. Specify an empty string to detach the component from
* the service instance it's attached to. Specify non-empty values for both serviceInstanceName
* and serviceName
or for neither of them.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateComponentRequest withServiceName(String serviceName) {
setServiceName(serviceName);
return this;
}
/**
* * The service spec that you want the component to use to access service inputs. Set this only when the component is * attached to a service instance. *
* * @param serviceSpec * The service spec that you want the component to use to access service inputs. Set this only when the * component is attached to a service instance. */ public void setServiceSpec(String serviceSpec) { this.serviceSpec = serviceSpec; } /** ** The service spec that you want the component to use to access service inputs. Set this only when the component is * attached to a service instance. *
* * @return The service spec that you want the component to use to access service inputs. Set this only when the * component is attached to a service instance. */ public String getServiceSpec() { return this.serviceSpec; } /** ** The service spec that you want the component to use to access service inputs. Set this only when the component is * attached to a service instance. *
* * @param serviceSpec * The service spec that you want the component to use to access service inputs. Set this only when the * component is attached to a service instance. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateComponentRequest withServiceSpec(String serviceSpec) { setServiceSpec(serviceSpec); return this; } /** ** A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions. *
** Components support a single IaC file, even if you use Terraform as your template language. *
** Components support a single IaC file, even if you use Terraform as your template language. *
*/ public void setTemplateFile(String templateFile) { this.templateFile = templateFile; } /** ** A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions. *
** Components support a single IaC file, even if you use Terraform as your template language. *
** Components support a single IaC file, even if you use Terraform as your template language. *
*/ public String getTemplateFile() { return this.templateFile; } /** ** A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions. *
** Components support a single IaC file, even if you use Terraform as your template language. *
** Components support a single IaC file, even if you use Terraform as your template language. *
* @return Returns a reference to this object so that method calls can be chained together. */ public UpdateComponentRequest withTemplateFile(String templateFile) { setTemplateFile(templateFile); 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 (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getDeploymentType() != null) sb.append("DeploymentType: ").append(getDeploymentType()).append(","); if (getDescription() != null) sb.append("Description: ").append("***Sensitive Data Redacted***").append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getServiceInstanceName() != null) sb.append("ServiceInstanceName: ").append(getServiceInstanceName()).append(","); if (getServiceName() != null) sb.append("ServiceName: ").append(getServiceName()).append(","); if (getServiceSpec() != null) sb.append("ServiceSpec: ").append("***Sensitive Data Redacted***").append(","); if (getTemplateFile() != null) sb.append("TemplateFile: ").append("***Sensitive Data Redacted***"); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateComponentRequest == false) return false; UpdateComponentRequest other = (UpdateComponentRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; 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.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getServiceInstanceName() == null ^ this.getServiceInstanceName() == null) return false; if (other.getServiceInstanceName() != null && other.getServiceInstanceName().equals(this.getServiceInstanceName()) == false) return false; if (other.getServiceName() == null ^ this.getServiceName() == null) return false; if (other.getServiceName() != null && other.getServiceName().equals(this.getServiceName()) == false) return false; if (other.getServiceSpec() == null ^ this.getServiceSpec() == null) return false; if (other.getServiceSpec() != null && other.getServiceSpec().equals(this.getServiceSpec()) == false) return false; if (other.getTemplateFile() == null ^ this.getTemplateFile() == null) return false; if (other.getTemplateFile() != null && other.getTemplateFile().equals(this.getTemplateFile()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getDeploymentType() == null) ? 0 : getDeploymentType().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getServiceInstanceName() == null) ? 0 : getServiceInstanceName().hashCode()); hashCode = prime * hashCode + ((getServiceName() == null) ? 0 : getServiceName().hashCode()); hashCode = prime * hashCode + ((getServiceSpec() == null) ? 0 : getServiceSpec().hashCode()); hashCode = prime * hashCode + ((getTemplateFile() == null) ? 0 : getTemplateFile().hashCode()); return hashCode; } @Override public UpdateComponentRequest clone() { return (UpdateComponentRequest) super.clone(); } }