/* * 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.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes a launch template. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class LaunchTemplate implements Serializable, Cloneable { /** ** The ID of the launch template. *
*/ private String launchTemplateId; /** ** The name of the launch template. *
*/ private String launchTemplateName; /** ** The time launch template was created. *
*/ private java.util.Date createTime; /** ** The principal that created the launch template. *
*/ private String createdBy; /** ** The version number of the default version of the launch template. *
*/ private Long defaultVersionNumber; /** ** The version number of the latest version of the launch template. *
*/ private Long latestVersionNumber; /** ** The tags for the launch template. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the launch template. *
* * @param launchTemplateId * The ID of the launch template. */ public void setLaunchTemplateId(String launchTemplateId) { this.launchTemplateId = launchTemplateId; } /** ** The ID of the launch template. *
* * @return The ID of the launch template. */ public String getLaunchTemplateId() { return this.launchTemplateId; } /** ** The ID of the launch template. *
* * @param launchTemplateId * The ID of the launch template. * @return Returns a reference to this object so that method calls can be chained together. */ public LaunchTemplate withLaunchTemplateId(String launchTemplateId) { setLaunchTemplateId(launchTemplateId); return this; } /** ** The name of the launch template. *
* * @param launchTemplateName * The name of the launch template. */ public void setLaunchTemplateName(String launchTemplateName) { this.launchTemplateName = launchTemplateName; } /** ** The name of the launch template. *
* * @return The name of the launch template. */ public String getLaunchTemplateName() { return this.launchTemplateName; } /** ** The name of the launch template. *
* * @param launchTemplateName * The name of the launch template. * @return Returns a reference to this object so that method calls can be chained together. */ public LaunchTemplate withLaunchTemplateName(String launchTemplateName) { setLaunchTemplateName(launchTemplateName); return this; } /** ** The time launch template was created. *
* * @param createTime * The time launch template was created. */ public void setCreateTime(java.util.Date createTime) { this.createTime = createTime; } /** ** The time launch template was created. *
* * @return The time launch template was created. */ public java.util.Date getCreateTime() { return this.createTime; } /** ** The time launch template was created. *
* * @param createTime * The time launch template was created. * @return Returns a reference to this object so that method calls can be chained together. */ public LaunchTemplate withCreateTime(java.util.Date createTime) { setCreateTime(createTime); return this; } /** ** The principal that created the launch template. *
* * @param createdBy * The principal that created the launch template. */ public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } /** ** The principal that created the launch template. *
* * @return The principal that created the launch template. */ public String getCreatedBy() { return this.createdBy; } /** ** The principal that created the launch template. *
* * @param createdBy * The principal that created the launch template. * @return Returns a reference to this object so that method calls can be chained together. */ public LaunchTemplate withCreatedBy(String createdBy) { setCreatedBy(createdBy); return this; } /** ** The version number of the default version of the launch template. *
* * @param defaultVersionNumber * The version number of the default version of the launch template. */ public void setDefaultVersionNumber(Long defaultVersionNumber) { this.defaultVersionNumber = defaultVersionNumber; } /** ** The version number of the default version of the launch template. *
* * @return The version number of the default version of the launch template. */ public Long getDefaultVersionNumber() { return this.defaultVersionNumber; } /** ** The version number of the default version of the launch template. *
* * @param defaultVersionNumber * The version number of the default version of the launch template. * @return Returns a reference to this object so that method calls can be chained together. */ public LaunchTemplate withDefaultVersionNumber(Long defaultVersionNumber) { setDefaultVersionNumber(defaultVersionNumber); return this; } /** ** The version number of the latest version of the launch template. *
* * @param latestVersionNumber * The version number of the latest version of the launch template. */ public void setLatestVersionNumber(Long latestVersionNumber) { this.latestVersionNumber = latestVersionNumber; } /** ** The version number of the latest version of the launch template. *
* * @return The version number of the latest version of the launch template. */ public Long getLatestVersionNumber() { return this.latestVersionNumber; } /** ** The version number of the latest version of the launch template. *
* * @param latestVersionNumber * The version number of the latest version of the launch template. * @return Returns a reference to this object so that method calls can be chained together. */ public LaunchTemplate withLatestVersionNumber(Long latestVersionNumber) { setLatestVersionNumber(latestVersionNumber); return this; } /** ** The tags for the launch template. *
* * @return The tags for the launch template. */ public java.util.List* The tags for the launch template. *
* * @param tags * The tags for the launch template. */ public void setTags(java.util.Collection* The tags for the launch template. *
** 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 * The tags for the launch template. * @return Returns a reference to this object so that method calls can be chained together. */ public LaunchTemplate withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* The tags for the launch template. *
* * @param tags * The tags for the launch template. * @return Returns a reference to this object so that method calls can be chained together. */ public LaunchTemplate withTags(java.util.Collection