All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.model.CreateLaunchTemplateVersionRequest Maven / Gradle / Ivy

/*
 * 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.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateLaunchTemplateVersionRequestMarshaller;

/**
 * 
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateLaunchTemplateVersionRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
        DryRunSupportedRequest {

    /**
     * 

* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see * Ensuring * idempotency. *

*

* Constraint: Maximum 128 ASCII characters. *

*/ private String clientToken; /** *

* The ID of the launch template. *

*

* You must specify either the launch template ID or the launch template name, but not both. *

*/ private String launchTemplateId; /** *

* The name of the launch template. *

*

* You must specify either the launch template ID or the launch template name, but not both. *

*/ private String launchTemplateName; /** *

* The version of the launch template on which to base the new version. Snapshots applied to the block device * mapping are ignored when creating a new version unless they are explicitly included. *

*

* If you specify this parameter, the new version inherits the launch parameters from the source version. If you * specify additional launch parameters for the new version, they overwrite any corresponding launch parameters * inherited from the source version. *

*

* If you omit this parameter, the new version contains only the launch parameters that you specify for the new * version. *

*/ private String sourceVersion; /** *

* A description for the version of the launch template. *

*/ private String versionDescription; /** *

* The information for the launch template. *

*/ private RequestLaunchTemplateData launchTemplateData; /** *

* If true, and if a Systems Manager parameter is specified for ImageId, the AMI ID is * displayed in the response for imageID. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide. *

*

* Default: false *

*/ private Boolean resolveAlias; /** *

* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see * Ensuring * idempotency. *

*

* Constraint: Maximum 128 ASCII characters. *

* * @param clientToken * Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more * information, see Ensuring * idempotency.

*

* Constraint: Maximum 128 ASCII characters. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see * Ensuring * idempotency. *

*

* Constraint: Maximum 128 ASCII characters. *

* * @return Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more * information, see Ensuring * idempotency.

*

* Constraint: Maximum 128 ASCII characters. */ public String getClientToken() { return this.clientToken; } /** *

* Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see * Ensuring * idempotency. *

*

* Constraint: Maximum 128 ASCII characters. *

* * @param clientToken * Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more * information, see Ensuring * idempotency.

*

* Constraint: Maximum 128 ASCII characters. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLaunchTemplateVersionRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* The ID of the launch template. *

*

* You must specify either the launch template ID or the launch template name, but not both. *

* * @param launchTemplateId * The ID of the launch template.

*

* You must specify either the launch template ID or the launch template name, but not both. */ public void setLaunchTemplateId(String launchTemplateId) { this.launchTemplateId = launchTemplateId; } /** *

* The ID of the launch template. *

*

* You must specify either the launch template ID or the launch template name, but not both. *

* * @return The ID of the launch template.

*

* You must specify either the launch template ID or the launch template name, but not both. */ public String getLaunchTemplateId() { return this.launchTemplateId; } /** *

* The ID of the launch template. *

*

* You must specify either the launch template ID or the launch template name, but not both. *

* * @param launchTemplateId * The ID of the launch template.

*

* You must specify either the launch template ID or the launch template name, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLaunchTemplateVersionRequest withLaunchTemplateId(String launchTemplateId) { setLaunchTemplateId(launchTemplateId); return this; } /** *

* The name of the launch template. *

*

* You must specify either the launch template ID or the launch template name, but not both. *

* * @param launchTemplateName * The name of the launch template.

*

* You must specify either the launch template ID or the launch template name, but not both. */ public void setLaunchTemplateName(String launchTemplateName) { this.launchTemplateName = launchTemplateName; } /** *

* The name of the launch template. *

*

* You must specify either the launch template ID or the launch template name, but not both. *

* * @return The name of the launch template.

*

* You must specify either the launch template ID or the launch template name, but not both. */ public String getLaunchTemplateName() { return this.launchTemplateName; } /** *

* The name of the launch template. *

*

* You must specify either the launch template ID or the launch template name, but not both. *

* * @param launchTemplateName * The name of the launch template.

*

* You must specify either the launch template ID or the launch template name, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLaunchTemplateVersionRequest withLaunchTemplateName(String launchTemplateName) { setLaunchTemplateName(launchTemplateName); return this; } /** *

* The version of the launch template on which to base the new version. Snapshots applied to the block device * mapping are ignored when creating a new version unless they are explicitly included. *

*

* If you specify this parameter, the new version inherits the launch parameters from the source version. If you * specify additional launch parameters for the new version, they overwrite any corresponding launch parameters * inherited from the source version. *

*

* If you omit this parameter, the new version contains only the launch parameters that you specify for the new * version. *

* * @param sourceVersion * The version of the launch template on which to base the new version. Snapshots applied to the block device * mapping are ignored when creating a new version unless they are explicitly included.

*

* If you specify this parameter, the new version inherits the launch parameters from the source version. If * you specify additional launch parameters for the new version, they overwrite any corresponding launch * parameters inherited from the source version. *

*

* If you omit this parameter, the new version contains only the launch parameters that you specify for the * new version. */ public void setSourceVersion(String sourceVersion) { this.sourceVersion = sourceVersion; } /** *

* The version of the launch template on which to base the new version. Snapshots applied to the block device * mapping are ignored when creating a new version unless they are explicitly included. *

*

* If you specify this parameter, the new version inherits the launch parameters from the source version. If you * specify additional launch parameters for the new version, they overwrite any corresponding launch parameters * inherited from the source version. *

*

* If you omit this parameter, the new version contains only the launch parameters that you specify for the new * version. *

* * @return The version of the launch template on which to base the new version. Snapshots applied to the block * device mapping are ignored when creating a new version unless they are explicitly included.

*

* If you specify this parameter, the new version inherits the launch parameters from the source version. If * you specify additional launch parameters for the new version, they overwrite any corresponding launch * parameters inherited from the source version. *

*

* If you omit this parameter, the new version contains only the launch parameters that you specify for the * new version. */ public String getSourceVersion() { return this.sourceVersion; } /** *

* The version of the launch template on which to base the new version. Snapshots applied to the block device * mapping are ignored when creating a new version unless they are explicitly included. *

*

* If you specify this parameter, the new version inherits the launch parameters from the source version. If you * specify additional launch parameters for the new version, they overwrite any corresponding launch parameters * inherited from the source version. *

*

* If you omit this parameter, the new version contains only the launch parameters that you specify for the new * version. *

* * @param sourceVersion * The version of the launch template on which to base the new version. Snapshots applied to the block device * mapping are ignored when creating a new version unless they are explicitly included.

*

* If you specify this parameter, the new version inherits the launch parameters from the source version. If * you specify additional launch parameters for the new version, they overwrite any corresponding launch * parameters inherited from the source version. *

*

* If you omit this parameter, the new version contains only the launch parameters that you specify for the * new version. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLaunchTemplateVersionRequest withSourceVersion(String sourceVersion) { setSourceVersion(sourceVersion); return this; } /** *

* A description for the version of the launch template. *

* * @param versionDescription * A description for the version of the launch template. */ public void setVersionDescription(String versionDescription) { this.versionDescription = versionDescription; } /** *

* A description for the version of the launch template. *

* * @return A description for the version of the launch template. */ public String getVersionDescription() { return this.versionDescription; } /** *

* A description for the version of the launch template. *

* * @param versionDescription * A description for the version of the launch template. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLaunchTemplateVersionRequest withVersionDescription(String versionDescription) { setVersionDescription(versionDescription); return this; } /** *

* The information for the launch template. *

* * @param launchTemplateData * The information for the launch template. */ public void setLaunchTemplateData(RequestLaunchTemplateData launchTemplateData) { this.launchTemplateData = launchTemplateData; } /** *

* The information for the launch template. *

* * @return The information for the launch template. */ public RequestLaunchTemplateData getLaunchTemplateData() { return this.launchTemplateData; } /** *

* The information for the launch template. *

* * @param launchTemplateData * The information for the launch template. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLaunchTemplateVersionRequest withLaunchTemplateData(RequestLaunchTemplateData launchTemplateData) { setLaunchTemplateData(launchTemplateData); return this; } /** *

* If true, and if a Systems Manager parameter is specified for ImageId, the AMI ID is * displayed in the response for imageID. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide. *

*

* Default: false *

* * @param resolveAlias * If true, and if a Systems Manager parameter is specified for ImageId, the AMI ID * is displayed in the response for imageID. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.

*

* Default: false */ public void setResolveAlias(Boolean resolveAlias) { this.resolveAlias = resolveAlias; } /** *

* If true, and if a Systems Manager parameter is specified for ImageId, the AMI ID is * displayed in the response for imageID. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide. *

*

* Default: false *

* * @return If true, and if a Systems Manager parameter is specified for ImageId, the AMI * ID is displayed in the response for imageID. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.

*

* Default: false */ public Boolean getResolveAlias() { return this.resolveAlias; } /** *

* If true, and if a Systems Manager parameter is specified for ImageId, the AMI ID is * displayed in the response for imageID. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide. *

*

* Default: false *

* * @param resolveAlias * If true, and if a Systems Manager parameter is specified for ImageId, the AMI ID * is displayed in the response for imageID. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.

*

* Default: false * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLaunchTemplateVersionRequest withResolveAlias(Boolean resolveAlias) { setResolveAlias(resolveAlias); return this; } /** *

* If true, and if a Systems Manager parameter is specified for ImageId, the AMI ID is * displayed in the response for imageID. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide. *

*

* Default: false *

* * @return If true, and if a Systems Manager parameter is specified for ImageId, the AMI * ID is displayed in the response for imageID. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.

*

* Default: false */ public Boolean isResolveAlias() { return this.resolveAlias; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request getDryRunRequest() { Request request = new CreateLaunchTemplateVersionRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * 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 (getLaunchTemplateId() != null) sb.append("LaunchTemplateId: ").append(getLaunchTemplateId()).append(","); if (getLaunchTemplateName() != null) sb.append("LaunchTemplateName: ").append(getLaunchTemplateName()).append(","); if (getSourceVersion() != null) sb.append("SourceVersion: ").append(getSourceVersion()).append(","); if (getVersionDescription() != null) sb.append("VersionDescription: ").append(getVersionDescription()).append(","); if (getLaunchTemplateData() != null) sb.append("LaunchTemplateData: ").append(getLaunchTemplateData()).append(","); if (getResolveAlias() != null) sb.append("ResolveAlias: ").append(getResolveAlias()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateLaunchTemplateVersionRequest == false) return false; CreateLaunchTemplateVersionRequest other = (CreateLaunchTemplateVersionRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getLaunchTemplateId() == null ^ this.getLaunchTemplateId() == null) return false; if (other.getLaunchTemplateId() != null && other.getLaunchTemplateId().equals(this.getLaunchTemplateId()) == false) return false; if (other.getLaunchTemplateName() == null ^ this.getLaunchTemplateName() == null) return false; if (other.getLaunchTemplateName() != null && other.getLaunchTemplateName().equals(this.getLaunchTemplateName()) == false) return false; if (other.getSourceVersion() == null ^ this.getSourceVersion() == null) return false; if (other.getSourceVersion() != null && other.getSourceVersion().equals(this.getSourceVersion()) == false) return false; if (other.getVersionDescription() == null ^ this.getVersionDescription() == null) return false; if (other.getVersionDescription() != null && other.getVersionDescription().equals(this.getVersionDescription()) == false) return false; if (other.getLaunchTemplateData() == null ^ this.getLaunchTemplateData() == null) return false; if (other.getLaunchTemplateData() != null && other.getLaunchTemplateData().equals(this.getLaunchTemplateData()) == false) return false; if (other.getResolveAlias() == null ^ this.getResolveAlias() == null) return false; if (other.getResolveAlias() != null && other.getResolveAlias().equals(this.getResolveAlias()) == 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 + ((getLaunchTemplateId() == null) ? 0 : getLaunchTemplateId().hashCode()); hashCode = prime * hashCode + ((getLaunchTemplateName() == null) ? 0 : getLaunchTemplateName().hashCode()); hashCode = prime * hashCode + ((getSourceVersion() == null) ? 0 : getSourceVersion().hashCode()); hashCode = prime * hashCode + ((getVersionDescription() == null) ? 0 : getVersionDescription().hashCode()); hashCode = prime * hashCode + ((getLaunchTemplateData() == null) ? 0 : getLaunchTemplateData().hashCode()); hashCode = prime * hashCode + ((getResolveAlias() == null) ? 0 : getResolveAlias().hashCode()); return hashCode; } @Override public CreateLaunchTemplateVersionRequest clone() { return (CreateLaunchTemplateVersionRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy