
com.amazonaws.services.sagemaker.model.CreateProjectRequest Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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.sagemaker.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 CreateProjectRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the project.
*
*/
private String projectName;
/**
*
* A description for the project.
*
*/
private String projectDescription;
/**
*
* The product ID and provisioning artifact ID to provision a service catalog. For information, see What is AWS Service
* Catalog.
*
*/
private ServiceCatalogProvisioningDetails serviceCatalogProvisioningDetails;
/**
*
* An array of key-value pairs that you want to use to organize and track your AWS resource costs. For more
* information, see Tagging AWS
* resources in the AWS General Reference Guide.
*
*/
private java.util.List tags;
/**
*
* The name of the project.
*
*
* @param projectName
* The name of the project.
*/
public void setProjectName(String projectName) {
this.projectName = projectName;
}
/**
*
* The name of the project.
*
*
* @return The name of the project.
*/
public String getProjectName() {
return this.projectName;
}
/**
*
* The name of the project.
*
*
* @param projectName
* The name of the project.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateProjectRequest withProjectName(String projectName) {
setProjectName(projectName);
return this;
}
/**
*
* A description for the project.
*
*
* @param projectDescription
* A description for the project.
*/
public void setProjectDescription(String projectDescription) {
this.projectDescription = projectDescription;
}
/**
*
* A description for the project.
*
*
* @return A description for the project.
*/
public String getProjectDescription() {
return this.projectDescription;
}
/**
*
* A description for the project.
*
*
* @param projectDescription
* A description for the project.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateProjectRequest withProjectDescription(String projectDescription) {
setProjectDescription(projectDescription);
return this;
}
/**
*
* The product ID and provisioning artifact ID to provision a service catalog. For information, see What is AWS Service
* Catalog.
*
*
* @param serviceCatalogProvisioningDetails
* The product ID and provisioning artifact ID to provision a service catalog. For information, see What is AWS Service
* Catalog.
*/
public void setServiceCatalogProvisioningDetails(ServiceCatalogProvisioningDetails serviceCatalogProvisioningDetails) {
this.serviceCatalogProvisioningDetails = serviceCatalogProvisioningDetails;
}
/**
*
* The product ID and provisioning artifact ID to provision a service catalog. For information, see What is AWS Service
* Catalog.
*
*
* @return The product ID and provisioning artifact ID to provision a service catalog. For information, see What is AWS Service
* Catalog.
*/
public ServiceCatalogProvisioningDetails getServiceCatalogProvisioningDetails() {
return this.serviceCatalogProvisioningDetails;
}
/**
*
* The product ID and provisioning artifact ID to provision a service catalog. For information, see What is AWS Service
* Catalog.
*
*
* @param serviceCatalogProvisioningDetails
* The product ID and provisioning artifact ID to provision a service catalog. For information, see What is AWS Service
* Catalog.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateProjectRequest withServiceCatalogProvisioningDetails(ServiceCatalogProvisioningDetails serviceCatalogProvisioningDetails) {
setServiceCatalogProvisioningDetails(serviceCatalogProvisioningDetails);
return this;
}
/**
*
* An array of key-value pairs that you want to use to organize and track your AWS resource costs. For more
* information, see Tagging AWS
* resources in the AWS General Reference Guide.
*
*
* @return An array of key-value pairs that you want to use to organize and track your AWS resource costs. For more
* information, see Tagging AWS
* resources in the AWS General Reference Guide.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* An array of key-value pairs that you want to use to organize and track your AWS resource costs. For more
* information, see Tagging AWS
* resources in the AWS General Reference Guide.
*
*
* @param tags
* An array of key-value pairs that you want to use to organize and track your AWS resource costs. For more
* information, see Tagging AWS
* resources in the AWS General Reference Guide.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* An array of key-value pairs that you want to use to organize and track your AWS resource costs. For more
* information, see Tagging AWS
* resources in the AWS General Reference 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 array of key-value pairs that you want to use to organize and track your AWS resource costs. For more
* information, see Tagging AWS
* resources in the AWS General Reference Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateProjectRequest 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 array of key-value pairs that you want to use to organize and track your AWS resource costs. For more
* information, see Tagging AWS
* resources in the AWS General Reference Guide.
*
*
* @param tags
* An array of key-value pairs that you want to use to organize and track your AWS resource costs. For more
* information, see Tagging AWS
* resources in the AWS General Reference Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateProjectRequest 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 (getProjectName() != null)
sb.append("ProjectName: ").append(getProjectName()).append(",");
if (getProjectDescription() != null)
sb.append("ProjectDescription: ").append(getProjectDescription()).append(",");
if (getServiceCatalogProvisioningDetails() != null)
sb.append("ServiceCatalogProvisioningDetails: ").append(getServiceCatalogProvisioningDetails()).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 CreateProjectRequest == false)
return false;
CreateProjectRequest other = (CreateProjectRequest) obj;
if (other.getProjectName() == null ^ this.getProjectName() == null)
return false;
if (other.getProjectName() != null && other.getProjectName().equals(this.getProjectName()) == false)
return false;
if (other.getProjectDescription() == null ^ this.getProjectDescription() == null)
return false;
if (other.getProjectDescription() != null && other.getProjectDescription().equals(this.getProjectDescription()) == false)
return false;
if (other.getServiceCatalogProvisioningDetails() == null ^ this.getServiceCatalogProvisioningDetails() == null)
return false;
if (other.getServiceCatalogProvisioningDetails() != null
&& other.getServiceCatalogProvisioningDetails().equals(this.getServiceCatalogProvisioningDetails()) == 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 + ((getProjectName() == null) ? 0 : getProjectName().hashCode());
hashCode = prime * hashCode + ((getProjectDescription() == null) ? 0 : getProjectDescription().hashCode());
hashCode = prime * hashCode + ((getServiceCatalogProvisioningDetails() == null) ? 0 : getServiceCatalogProvisioningDetails().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateProjectRequest clone() {
return (CreateProjectRequest) super.clone();
}
}