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

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

Go to download

The AWS Java SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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 tags; /** *

* 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 getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* The tags for the launch template. *

* * @param tags * The tags for the launch template. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* 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(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* 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 tags) { setTags(tags); 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 (getLaunchTemplateId() != null) sb.append("LaunchTemplateId: ").append(getLaunchTemplateId()).append(","); if (getLaunchTemplateName() != null) sb.append("LaunchTemplateName: ").append(getLaunchTemplateName()).append(","); if (getCreateTime() != null) sb.append("CreateTime: ").append(getCreateTime()).append(","); if (getCreatedBy() != null) sb.append("CreatedBy: ").append(getCreatedBy()).append(","); if (getDefaultVersionNumber() != null) sb.append("DefaultVersionNumber: ").append(getDefaultVersionNumber()).append(","); if (getLatestVersionNumber() != null) sb.append("LatestVersionNumber: ").append(getLatestVersionNumber()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LaunchTemplate == false) return false; LaunchTemplate other = (LaunchTemplate) obj; 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.getCreateTime() == null ^ this.getCreateTime() == null) return false; if (other.getCreateTime() != null && other.getCreateTime().equals(this.getCreateTime()) == false) return false; if (other.getCreatedBy() == null ^ this.getCreatedBy() == null) return false; if (other.getCreatedBy() != null && other.getCreatedBy().equals(this.getCreatedBy()) == false) return false; if (other.getDefaultVersionNumber() == null ^ this.getDefaultVersionNumber() == null) return false; if (other.getDefaultVersionNumber() != null && other.getDefaultVersionNumber().equals(this.getDefaultVersionNumber()) == false) return false; if (other.getLatestVersionNumber() == null ^ this.getLatestVersionNumber() == null) return false; if (other.getLatestVersionNumber() != null && other.getLatestVersionNumber().equals(this.getLatestVersionNumber()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLaunchTemplateId() == null) ? 0 : getLaunchTemplateId().hashCode()); hashCode = prime * hashCode + ((getLaunchTemplateName() == null) ? 0 : getLaunchTemplateName().hashCode()); hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); hashCode = prime * hashCode + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode()); hashCode = prime * hashCode + ((getDefaultVersionNumber() == null) ? 0 : getDefaultVersionNumber().hashCode()); hashCode = prime * hashCode + ((getLatestVersionNumber() == null) ? 0 : getLatestVersionNumber().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public LaunchTemplate clone() { try { return (LaunchTemplate) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy