
com.amazonaws.services.proton.model.CreateServiceTemplateRequest 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.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 CreateServiceTemplateRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A description of the service template.
*
*/
private String description;
/**
*
* The name of the service template as displayed in the developer interface.
*
*/
private String displayName;
/**
*
* A customer provided encryption key that's used to encrypt data.
*
*/
private String encryptionKey;
/**
*
* The name of the service template.
*
*/
private String name;
/**
*
* By default, Proton provides a service pipeline for your service. When this parameter is included, it indicates
* that an Proton service pipeline isn't provided for your service. After it's included, it can't be
* changed. For more information, see Template bundles in the Proton User Guide.
*
*/
private String pipelineProvisioning;
/**
*
* An optional list of metadata items that you can associate with the Proton service template. A tag is a key-value
* pair.
*
*
* For more information, see Proton
* resources and tagging in the Proton User Guide.
*
*/
private java.util.List tags;
/**
*
* A description of the service template.
*
*
* @param description
* A description of the service template.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the service template.
*
*
* @return A description of the service template.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the service template.
*
*
* @param description
* A description of the service template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateServiceTemplateRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The name of the service template as displayed in the developer interface.
*
*
* @param displayName
* The name of the service template as displayed in the developer interface.
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
*
* The name of the service template as displayed in the developer interface.
*
*
* @return The name of the service template as displayed in the developer interface.
*/
public String getDisplayName() {
return this.displayName;
}
/**
*
* The name of the service template as displayed in the developer interface.
*
*
* @param displayName
* The name of the service template as displayed in the developer interface.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateServiceTemplateRequest withDisplayName(String displayName) {
setDisplayName(displayName);
return this;
}
/**
*
* A customer provided encryption key that's used to encrypt data.
*
*
* @param encryptionKey
* A customer provided encryption key that's used to encrypt data.
*/
public void setEncryptionKey(String encryptionKey) {
this.encryptionKey = encryptionKey;
}
/**
*
* A customer provided encryption key that's used to encrypt data.
*
*
* @return A customer provided encryption key that's used to encrypt data.
*/
public String getEncryptionKey() {
return this.encryptionKey;
}
/**
*
* A customer provided encryption key that's used to encrypt data.
*
*
* @param encryptionKey
* A customer provided encryption key that's used to encrypt data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateServiceTemplateRequest withEncryptionKey(String encryptionKey) {
setEncryptionKey(encryptionKey);
return this;
}
/**
*
* The name of the service template.
*
*
* @param name
* The name of the service template.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the service template.
*
*
* @return The name of the service template.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the service template.
*
*
* @param name
* The name of the service template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateServiceTemplateRequest withName(String name) {
setName(name);
return this;
}
/**
*
* By default, Proton provides a service pipeline for your service. When this parameter is included, it indicates
* that an Proton service pipeline isn't provided for your service. After it's included, it can't be
* changed. For more information, see Template bundles in the Proton User Guide.
*
*
* @param pipelineProvisioning
* By default, Proton provides a service pipeline for your service. When this parameter is included, it
* indicates that an Proton service pipeline isn't provided for your service. After it's included, it
* can't be changed. For more information, see Template bundles in the Proton User Guide.
* @see Provisioning
*/
public void setPipelineProvisioning(String pipelineProvisioning) {
this.pipelineProvisioning = pipelineProvisioning;
}
/**
*
* By default, Proton provides a service pipeline for your service. When this parameter is included, it indicates
* that an Proton service pipeline isn't provided for your service. After it's included, it can't be
* changed. For more information, see Template bundles in the Proton User Guide.
*
*
* @return By default, Proton provides a service pipeline for your service. When this parameter is included, it
* indicates that an Proton service pipeline isn't provided for your service. After it's included, it
* can't be changed. For more information, see Template bundles in the Proton User Guide.
* @see Provisioning
*/
public String getPipelineProvisioning() {
return this.pipelineProvisioning;
}
/**
*
* By default, Proton provides a service pipeline for your service. When this parameter is included, it indicates
* that an Proton service pipeline isn't provided for your service. After it's included, it can't be
* changed. For more information, see Template bundles in the Proton User Guide.
*
*
* @param pipelineProvisioning
* By default, Proton provides a service pipeline for your service. When this parameter is included, it
* indicates that an Proton service pipeline isn't provided for your service. After it's included, it
* can't be changed. For more information, see Template bundles in the Proton User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Provisioning
*/
public CreateServiceTemplateRequest withPipelineProvisioning(String pipelineProvisioning) {
setPipelineProvisioning(pipelineProvisioning);
return this;
}
/**
*
* By default, Proton provides a service pipeline for your service. When this parameter is included, it indicates
* that an Proton service pipeline isn't provided for your service. After it's included, it can't be
* changed. For more information, see Template bundles in the Proton User Guide.
*
*
* @param pipelineProvisioning
* By default, Proton provides a service pipeline for your service. When this parameter is included, it
* indicates that an Proton service pipeline isn't provided for your service. After it's included, it
* can't be changed. For more information, see Template bundles in the Proton User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Provisioning
*/
public CreateServiceTemplateRequest withPipelineProvisioning(Provisioning pipelineProvisioning) {
this.pipelineProvisioning = pipelineProvisioning.toString();
return this;
}
/**
*
* An optional list of metadata items that you can associate with the Proton service template. A tag is a key-value
* pair.
*
*
* For more information, see Proton
* resources and tagging in the Proton User Guide.
*
*
* @return An optional list of metadata items that you can associate with the Proton service template. A tag is a
* key-value pair.
*
* For more information, see Proton resources and
* tagging in the Proton User Guide.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* An optional list of metadata items that you can associate with the Proton service template. A tag is a key-value
* pair.
*
*
* For more information, see Proton
* resources and tagging in the Proton User Guide.
*
*
* @param tags
* An optional list of metadata items that you can associate with the Proton service template. A tag is a
* key-value pair.
*
* For more information, see Proton resources and tagging
* in the Proton User Guide.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* An optional list of metadata items that you can associate with the Proton service template. 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.
*
*
* @param tags
* An optional list of metadata items that you can associate with the Proton service template. A tag is a
* key-value pair.
*
* 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 CreateServiceTemplateRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* An optional list of metadata items that you can associate with the Proton service template. A tag is a key-value
* pair.
*
*
* For more information, see Proton
* resources and tagging in the Proton User Guide.
*
*
* @param tags
* An optional list of metadata items that you can associate with the Proton service template. A tag is a
* key-value pair.
*
* 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 CreateServiceTemplateRequest 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 (getDescription() != null)
sb.append("Description: ").append("***Sensitive Data Redacted***").append(",");
if (getDisplayName() != null)
sb.append("DisplayName: ").append("***Sensitive Data Redacted***").append(",");
if (getEncryptionKey() != null)
sb.append("EncryptionKey: ").append(getEncryptionKey()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getPipelineProvisioning() != null)
sb.append("PipelineProvisioning: ").append(getPipelineProvisioning()).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 CreateServiceTemplateRequest == false)
return false;
CreateServiceTemplateRequest other = (CreateServiceTemplateRequest) obj;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getDisplayName() == null ^ this.getDisplayName() == null)
return false;
if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false)
return false;
if (other.getEncryptionKey() == null ^ this.getEncryptionKey() == null)
return false;
if (other.getEncryptionKey() != null && other.getEncryptionKey().equals(this.getEncryptionKey()) == 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.getPipelineProvisioning() == null ^ this.getPipelineProvisioning() == null)
return false;
if (other.getPipelineProvisioning() != null && other.getPipelineProvisioning().equals(this.getPipelineProvisioning()) == 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 + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
hashCode = prime * hashCode + ((getEncryptionKey() == null) ? 0 : getEncryptionKey().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getPipelineProvisioning() == null) ? 0 : getPipelineProvisioning().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateServiceTemplateRequest clone() {
return (CreateServiceTemplateRequest) super.clone();
}
}