/* * 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.nimblestudio.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 UpdateStudioComponentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify * a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to * ensure idempotency. *
*/ private String clientToken; /** ** The configuration of the studio component, based on component type. *
*/ private StudioComponentConfiguration configuration; /** ** The description. *
*/ private String description; /** ** The EC2 security groups that control access to the studio component. *
*/ private java.util.List* Initialization scripts for studio components. *
*/ private java.util.List* The name for the studio component. *
*/ private String name; /** ** An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services * resources at anytime while the instance is running. *
*/ private String runtimeRoleArn; /** ** Parameters for the studio component scripts. *
*/ private java.util.List* An IAM role attached to Studio Component when the system initialization script runs which give the studio * component access to Amazon Web Services resources when the system initialization script runs. *
*/ private String secureInitializationRoleArn; /** ** The studio component ID. *
*/ private String studioComponentId; /** ** The studio ID. *
*/ private String studioId; /** ** The specific subtype of a studio component. *
*/ private String subtype; /** ** The type of the studio component. *
*/ private String type; /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify * a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to * ensure idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t * specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for * the request to ensure idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify * a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to * ensure idempotency. *
* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t * specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it * for the request to ensure idempotency. */ public String getClientToken() { return this.clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t specify * a client token, the Amazon Web Services SDK automatically generates a client token and uses it for the request to * ensure idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don’t * specify a client token, the Amazon Web Services SDK automatically generates a client token and uses it for * the request to ensure idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** The configuration of the studio component, based on component type. *
* * @param configuration * The configuration of the studio component, based on component type. */ public void setConfiguration(StudioComponentConfiguration configuration) { this.configuration = configuration; } /** ** The configuration of the studio component, based on component type. *
* * @return The configuration of the studio component, based on component type. */ public StudioComponentConfiguration getConfiguration() { return this.configuration; } /** ** The configuration of the studio component, based on component type. *
* * @param configuration * The configuration of the studio component, based on component type. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withConfiguration(StudioComponentConfiguration configuration) { setConfiguration(configuration); return this; } /** ** The description. *
* * @param description * The description. */ public void setDescription(String description) { this.description = description; } /** ** The description. *
* * @return The description. */ public String getDescription() { return this.description; } /** ** The description. *
* * @param description * The description. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withDescription(String description) { setDescription(description); return this; } /** ** The EC2 security groups that control access to the studio component. *
* * @return The EC2 security groups that control access to the studio component. */ public java.util.List* The EC2 security groups that control access to the studio component. *
* * @param ec2SecurityGroupIds * The EC2 security groups that control access to the studio component. */ public void setEc2SecurityGroupIds(java.util.Collection* The EC2 security groups that control access to the studio component. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEc2SecurityGroupIds(java.util.Collection)} or {@link #withEc2SecurityGroupIds(java.util.Collection)} * if you want to override the existing values. *
* * @param ec2SecurityGroupIds * The EC2 security groups that control access to the studio component. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withEc2SecurityGroupIds(String... ec2SecurityGroupIds) { if (this.ec2SecurityGroupIds == null) { setEc2SecurityGroupIds(new java.util.ArrayList* The EC2 security groups that control access to the studio component. *
* * @param ec2SecurityGroupIds * The EC2 security groups that control access to the studio component. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withEc2SecurityGroupIds(java.util.Collection* Initialization scripts for studio components. *
* * @return Initialization scripts for studio components. */ public java.util.List* Initialization scripts for studio components. *
* * @param initializationScripts * Initialization scripts for studio components. */ public void setInitializationScripts(java.util.Collection* Initialization scripts for studio components. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setInitializationScripts(java.util.Collection)} or * {@link #withInitializationScripts(java.util.Collection)} if you want to override the existing values. *
* * @param initializationScripts * Initialization scripts for studio components. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withInitializationScripts(StudioComponentInitializationScript... initializationScripts) { if (this.initializationScripts == null) { setInitializationScripts(new java.util.ArrayList* Initialization scripts for studio components. *
* * @param initializationScripts * Initialization scripts for studio components. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withInitializationScripts(java.util.Collection* The name for the studio component. *
* * @param name * The name for the studio component. */ public void setName(String name) { this.name = name; } /** ** The name for the studio component. *
* * @return The name for the studio component. */ public String getName() { return this.name; } /** ** The name for the studio component. *
* * @param name * The name for the studio component. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withName(String name) { setName(name); return this; } /** ** An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services * resources at anytime while the instance is running. *
* * @param runtimeRoleArn * An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services * resources at anytime while the instance is running. */ public void setRuntimeRoleArn(String runtimeRoleArn) { this.runtimeRoleArn = runtimeRoleArn; } /** ** An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services * resources at anytime while the instance is running. *
* * @return An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services * resources at anytime while the instance is running. */ public String getRuntimeRoleArn() { return this.runtimeRoleArn; } /** ** An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services * resources at anytime while the instance is running. *
* * @param runtimeRoleArn * An IAM role attached to a Studio Component that gives the studio component access to Amazon Web Services * resources at anytime while the instance is running. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withRuntimeRoleArn(String runtimeRoleArn) { setRuntimeRoleArn(runtimeRoleArn); return this; } /** ** Parameters for the studio component scripts. *
* * @return Parameters for the studio component scripts. */ public java.util.List* Parameters for the studio component scripts. *
* * @param scriptParameters * Parameters for the studio component scripts. */ public void setScriptParameters(java.util.Collection* Parameters for the studio component scripts. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setScriptParameters(java.util.Collection)} or {@link #withScriptParameters(java.util.Collection)} if you * want to override the existing values. *
* * @param scriptParameters * Parameters for the studio component scripts. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withScriptParameters(ScriptParameterKeyValue... scriptParameters) { if (this.scriptParameters == null) { setScriptParameters(new java.util.ArrayList* Parameters for the studio component scripts. *
* * @param scriptParameters * Parameters for the studio component scripts. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withScriptParameters(java.util.Collection* An IAM role attached to Studio Component when the system initialization script runs which give the studio * component access to Amazon Web Services resources when the system initialization script runs. *
* * @param secureInitializationRoleArn * An IAM role attached to Studio Component when the system initialization script runs which give the studio * component access to Amazon Web Services resources when the system initialization script runs. */ public void setSecureInitializationRoleArn(String secureInitializationRoleArn) { this.secureInitializationRoleArn = secureInitializationRoleArn; } /** ** An IAM role attached to Studio Component when the system initialization script runs which give the studio * component access to Amazon Web Services resources when the system initialization script runs. *
* * @return An IAM role attached to Studio Component when the system initialization script runs which give the studio * component access to Amazon Web Services resources when the system initialization script runs. */ public String getSecureInitializationRoleArn() { return this.secureInitializationRoleArn; } /** ** An IAM role attached to Studio Component when the system initialization script runs which give the studio * component access to Amazon Web Services resources when the system initialization script runs. *
* * @param secureInitializationRoleArn * An IAM role attached to Studio Component when the system initialization script runs which give the studio * component access to Amazon Web Services resources when the system initialization script runs. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withSecureInitializationRoleArn(String secureInitializationRoleArn) { setSecureInitializationRoleArn(secureInitializationRoleArn); return this; } /** ** The studio component ID. *
* * @param studioComponentId * The studio component ID. */ public void setStudioComponentId(String studioComponentId) { this.studioComponentId = studioComponentId; } /** ** The studio component ID. *
* * @return The studio component ID. */ public String getStudioComponentId() { return this.studioComponentId; } /** ** The studio component ID. *
* * @param studioComponentId * The studio component ID. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withStudioComponentId(String studioComponentId) { setStudioComponentId(studioComponentId); return this; } /** ** The studio ID. *
* * @param studioId * The studio ID. */ public void setStudioId(String studioId) { this.studioId = studioId; } /** ** The studio ID. *
* * @return The studio ID. */ public String getStudioId() { return this.studioId; } /** ** The studio ID. *
* * @param studioId * The studio ID. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStudioComponentRequest withStudioId(String studioId) { setStudioId(studioId); return this; } /** ** The specific subtype of a studio component. *
* * @param subtype * The specific subtype of a studio component. * @see StudioComponentSubtype */ public void setSubtype(String subtype) { this.subtype = subtype; } /** ** The specific subtype of a studio component. *
* * @return The specific subtype of a studio component. * @see StudioComponentSubtype */ public String getSubtype() { return this.subtype; } /** ** The specific subtype of a studio component. *
* * @param subtype * The specific subtype of a studio component. * @return Returns a reference to this object so that method calls can be chained together. * @see StudioComponentSubtype */ public UpdateStudioComponentRequest withSubtype(String subtype) { setSubtype(subtype); return this; } /** ** The specific subtype of a studio component. *
* * @param subtype * The specific subtype of a studio component. * @return Returns a reference to this object so that method calls can be chained together. * @see StudioComponentSubtype */ public UpdateStudioComponentRequest withSubtype(StudioComponentSubtype subtype) { this.subtype = subtype.toString(); return this; } /** ** The type of the studio component. *
* * @param type * The type of the studio component. * @see StudioComponentType */ public void setType(String type) { this.type = type; } /** ** The type of the studio component. *
* * @return The type of the studio component. * @see StudioComponentType */ public String getType() { return this.type; } /** ** The type of the studio component. *
* * @param type * The type of the studio component. * @return Returns a reference to this object so that method calls can be chained together. * @see StudioComponentType */ public UpdateStudioComponentRequest withType(String type) { setType(type); return this; } /** ** The type of the studio component. *
* * @param type * The type of the studio component. * @return Returns a reference to this object so that method calls can be chained together. * @see StudioComponentType */ public UpdateStudioComponentRequest withType(StudioComponentType type) { this.type = type.toString(); 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 (getConfiguration() != null) sb.append("Configuration: ").append(getConfiguration()).append(","); if (getDescription() != null) sb.append("Description: ").append("***Sensitive Data Redacted***").append(","); if (getEc2SecurityGroupIds() != null) sb.append("Ec2SecurityGroupIds: ").append(getEc2SecurityGroupIds()).append(","); if (getInitializationScripts() != null) sb.append("InitializationScripts: ").append(getInitializationScripts()).append(","); if (getName() != null) sb.append("Name: ").append("***Sensitive Data Redacted***").append(","); if (getRuntimeRoleArn() != null) sb.append("RuntimeRoleArn: ").append(getRuntimeRoleArn()).append(","); if (getScriptParameters() != null) sb.append("ScriptParameters: ").append("***Sensitive Data Redacted***").append(","); if (getSecureInitializationRoleArn() != null) sb.append("SecureInitializationRoleArn: ").append(getSecureInitializationRoleArn()).append(","); if (getStudioComponentId() != null) sb.append("StudioComponentId: ").append(getStudioComponentId()).append(","); if (getStudioId() != null) sb.append("StudioId: ").append(getStudioId()).append(","); if (getSubtype() != null) sb.append("Subtype: ").append(getSubtype()).append(","); if (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateStudioComponentRequest == false) return false; UpdateStudioComponentRequest other = (UpdateStudioComponentRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getConfiguration() == null ^ this.getConfiguration() == null) return false; if (other.getConfiguration() != null && other.getConfiguration().equals(this.getConfiguration()) == 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.getEc2SecurityGroupIds() == null ^ this.getEc2SecurityGroupIds() == null) return false; if (other.getEc2SecurityGroupIds() != null && other.getEc2SecurityGroupIds().equals(this.getEc2SecurityGroupIds()) == false) return false; if (other.getInitializationScripts() == null ^ this.getInitializationScripts() == null) return false; if (other.getInitializationScripts() != null && other.getInitializationScripts().equals(this.getInitializationScripts()) == 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.getRuntimeRoleArn() == null ^ this.getRuntimeRoleArn() == null) return false; if (other.getRuntimeRoleArn() != null && other.getRuntimeRoleArn().equals(this.getRuntimeRoleArn()) == false) return false; if (other.getScriptParameters() == null ^ this.getScriptParameters() == null) return false; if (other.getScriptParameters() != null && other.getScriptParameters().equals(this.getScriptParameters()) == false) return false; if (other.getSecureInitializationRoleArn() == null ^ this.getSecureInitializationRoleArn() == null) return false; if (other.getSecureInitializationRoleArn() != null && other.getSecureInitializationRoleArn().equals(this.getSecureInitializationRoleArn()) == false) return false; if (other.getStudioComponentId() == null ^ this.getStudioComponentId() == null) return false; if (other.getStudioComponentId() != null && other.getStudioComponentId().equals(this.getStudioComponentId()) == false) return false; if (other.getStudioId() == null ^ this.getStudioId() == null) return false; if (other.getStudioId() != null && other.getStudioId().equals(this.getStudioId()) == false) return false; if (other.getSubtype() == null ^ this.getSubtype() == null) return false; if (other.getSubtype() != null && other.getSubtype().equals(this.getSubtype()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == 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 + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getEc2SecurityGroupIds() == null) ? 0 : getEc2SecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getInitializationScripts() == null) ? 0 : getInitializationScripts().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRuntimeRoleArn() == null) ? 0 : getRuntimeRoleArn().hashCode()); hashCode = prime * hashCode + ((getScriptParameters() == null) ? 0 : getScriptParameters().hashCode()); hashCode = prime * hashCode + ((getSecureInitializationRoleArn() == null) ? 0 : getSecureInitializationRoleArn().hashCode()); hashCode = prime * hashCode + ((getStudioComponentId() == null) ? 0 : getStudioComponentId().hashCode()); hashCode = prime * hashCode + ((getStudioId() == null) ? 0 : getStudioId().hashCode()); hashCode = prime * hashCode + ((getSubtype() == null) ? 0 : getSubtype().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public UpdateStudioComponentRequest clone() { return (UpdateStudioComponentRequest) super.clone(); } }