/* * 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 CreateServiceTemplateVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* When included, if two identical requests are made with the same client token, Proton returns the service template * version that the first request created. *
*/ private String clientToken; /** ** An array of environment template objects that are compatible with the new service template version. A service * instance based on this service template version can run in environments based on compatible templates. *
*/ private java.util.List* A description of the new version of a service template. *
*/ private String description; /** *
* To create a new minor version of the service template, include a major Version
.
*
* To create a new major and minor version of the service template, exclude major Version
.
*
* An object that includes the template bundle S3 bucket path and name for the new version of a service template. *
*/ private TemplateVersionSourceInput source; /** ** An array of supported component sources. Components with supported sources can be attached to service instances * based on this service template version. *
** For more information about components, see Proton components in the * Proton User Guide. *
*/ private java.util.List* An optional list of metadata items that you can associate with the Proton service template version. A tag is a * key-value pair. *
** For more information, see Proton * resources and tagging in the Proton User Guide. *
*/ private java.util.List* The name of the service template. *
*/ private String templateName; /** ** When included, if two identical requests are made with the same client token, Proton returns the service template * version that the first request created. *
* * @param clientToken * When included, if two identical requests are made with the same client token, Proton returns the service * template version that the first request created. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** When included, if two identical requests are made with the same client token, Proton returns the service template * version that the first request created. *
* * @return When included, if two identical requests are made with the same client token, Proton returns the service * template version that the first request created. */ public String getClientToken() { return this.clientToken; } /** ** When included, if two identical requests are made with the same client token, Proton returns the service template * version that the first request created. *
* * @param clientToken * When included, if two identical requests are made with the same client token, Proton returns the service * template version that the first request created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateServiceTemplateVersionRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** An array of environment template objects that are compatible with the new service template version. A service * instance based on this service template version can run in environments based on compatible templates. *
* * @return An array of environment template objects that are compatible with the new service template version. A * service instance based on this service template version can run in environments based on compatible * templates. */ public java.util.List* An array of environment template objects that are compatible with the new service template version. A service * instance based on this service template version can run in environments based on compatible templates. *
* * @param compatibleEnvironmentTemplates * An array of environment template objects that are compatible with the new service template version. A * service instance based on this service template version can run in environments based on compatible * templates. */ public void setCompatibleEnvironmentTemplates(java.util.Collection* An array of environment template objects that are compatible with the new service template version. A service * instance based on this service template version can run in environments based on compatible templates. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCompatibleEnvironmentTemplates(java.util.Collection)} or * {@link #withCompatibleEnvironmentTemplates(java.util.Collection)} if you want to override the existing values. *
* * @param compatibleEnvironmentTemplates * An array of environment template objects that are compatible with the new service template version. A * service instance based on this service template version can run in environments based on compatible * templates. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateServiceTemplateVersionRequest withCompatibleEnvironmentTemplates(CompatibleEnvironmentTemplateInput... compatibleEnvironmentTemplates) { if (this.compatibleEnvironmentTemplates == null) { setCompatibleEnvironmentTemplates(new java.util.ArrayList* An array of environment template objects that are compatible with the new service template version. A service * instance based on this service template version can run in environments based on compatible templates. *
* * @param compatibleEnvironmentTemplates * An array of environment template objects that are compatible with the new service template version. A * service instance based on this service template version can run in environments based on compatible * templates. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateServiceTemplateVersionRequest withCompatibleEnvironmentTemplates( java.util.Collection* A description of the new version of a service template. *
* * @param description * A description of the new version of a service template. */ public void setDescription(String description) { this.description = description; } /** ** A description of the new version of a service template. *
* * @return A description of the new version of a service template. */ public String getDescription() { return this.description; } /** ** A description of the new version of a service template. *
* * @param description * A description of the new version of a service template. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateServiceTemplateVersionRequest withDescription(String description) { setDescription(description); return this; } /** *
* To create a new minor version of the service template, include a major Version
.
*
* To create a new major and minor version of the service template, exclude major Version
.
*
major Version
.
*
* To create a new major and minor version of the service template, exclude major Version
.
*/
public void setMajorVersion(String majorVersion) {
this.majorVersion = majorVersion;
}
/**
*
* To create a new minor version of the service template, include a major Version
.
*
* To create a new major and minor version of the service template, exclude major Version
.
*
major Version
.
*
* To create a new major and minor version of the service template, exclude
* major Version
.
*/
public String getMajorVersion() {
return this.majorVersion;
}
/**
*
* To create a new minor version of the service template, include a major Version
.
*
* To create a new major and minor version of the service template, exclude major Version
.
*
major Version
.
*
* To create a new major and minor version of the service template, exclude major Version
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateServiceTemplateVersionRequest withMajorVersion(String majorVersion) {
setMajorVersion(majorVersion);
return this;
}
/**
*
* An object that includes the template bundle S3 bucket path and name for the new version of a service template. *
* * @param source * An object that includes the template bundle S3 bucket path and name for the new version of a service * template. */ public void setSource(TemplateVersionSourceInput source) { this.source = source; } /** ** An object that includes the template bundle S3 bucket path and name for the new version of a service template. *
* * @return An object that includes the template bundle S3 bucket path and name for the new version of a service * template. */ public TemplateVersionSourceInput getSource() { return this.source; } /** ** An object that includes the template bundle S3 bucket path and name for the new version of a service template. *
* * @param source * An object that includes the template bundle S3 bucket path and name for the new version of a service * template. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateServiceTemplateVersionRequest withSource(TemplateVersionSourceInput source) { setSource(source); return this; } /** ** An array of supported component sources. Components with supported sources can be attached to service instances * based on this service template version. *
** For more information about components, see Proton components in the * Proton User Guide. *
* * @return An array of supported component sources. Components with supported sources can be attached to service * instances based on this service template version. *
* For more information about components, see Proton components in
* the Proton User Guide.
* @see ServiceTemplateSupportedComponentSourceType
*/
public java.util.List
* An array of supported component sources. Components with supported sources can be attached to service instances
* based on this service template version.
*
* For more information about components, see Proton components in the
* Proton User Guide.
*
* For more information about components, see Proton components in the
* Proton User Guide.
* @see ServiceTemplateSupportedComponentSourceType
*/
public void setSupportedComponentSources(java.util.Collection
* An array of supported component sources. Components with supported sources can be attached to service instances
* based on this service template version.
*
* For more information about components, see Proton components in the
* Proton User Guide.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSupportedComponentSources(java.util.Collection)} or
* {@link #withSupportedComponentSources(java.util.Collection)} if you want to override the existing values.
*
* For more information about components, see Proton components in the
* Proton User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ServiceTemplateSupportedComponentSourceType
*/
public CreateServiceTemplateVersionRequest withSupportedComponentSources(String... supportedComponentSources) {
if (this.supportedComponentSources == null) {
setSupportedComponentSources(new java.util.ArrayList
* An array of supported component sources. Components with supported sources can be attached to service instances
* based on this service template version.
*
* For more information about components, see Proton components in the
* Proton User Guide.
*
* For more information about components, see Proton components in the
* Proton User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ServiceTemplateSupportedComponentSourceType
*/
public CreateServiceTemplateVersionRequest withSupportedComponentSources(java.util.Collection
* An array of supported component sources. Components with supported sources can be attached to service instances
* based on this service template version.
*
* For more information about components, see Proton components in the
* Proton User Guide.
*
* For more information about components, see Proton components in the
* Proton User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ServiceTemplateSupportedComponentSourceType
*/
public CreateServiceTemplateVersionRequest withSupportedComponentSources(ServiceTemplateSupportedComponentSourceType... supportedComponentSources) {
java.util.ArrayList
* An optional list of metadata items that you can associate with the Proton service template version. A tag is a
* key-value pair.
*
* For more information, see Proton
* resources and tagging in the Proton User Guide.
*
* For more information, see Proton resources and
* tagging in the Proton User Guide.
*/
public java.util.List
* An optional list of metadata items that you can associate with the Proton service template version. A tag is a
* key-value pair.
*
* For more information, see Proton
* resources and tagging in the Proton User Guide.
*
* For more information, see Proton resources and tagging
* in the Proton User Guide.
*/
public void setTags(java.util.Collection
* An optional list of metadata items that you can associate with the Proton service template version. A tag is a
* key-value pair.
*
* For more information, see Proton
* resources and tagging in the Proton User Guide.
*
* 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.
*
* For more information, see Proton resources and tagging
* in the Proton User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateServiceTemplateVersionRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList
* An optional list of metadata items that you can associate with the Proton service template version. A tag is a
* key-value pair.
*
* For more information, see Proton
* resources and tagging in the Proton User Guide.
*
* For more information, see Proton resources and tagging
* in the Proton User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateServiceTemplateVersionRequest withTags(java.util.Collection
* The name of the service template.
*
* The name of the service template.
*
* The name of the service template.
*