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

com.amazonaws.services.codestar.model.CreateProjectRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2016-2021 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.codestar.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 display name for the project to be created in AWS CodeStar. *

*/ private String name; /** *

* The ID of the project to be created in AWS CodeStar. *

*/ private String id; /** *

* The description of the project, if any. *

*/ private String description; /** *

* A user- or system-generated token that identifies the entity that requested project creation. This token can be * used to repeat the request. *

*/ private String clientRequestToken; /** *

* A list of the Code objects submitted with the project request. If this parameter is specified, the request must * also include the toolchain parameter. *

*/ private java.util.List sourceCode; /** *

* The name of the toolchain template file submitted with the project request. If this parameter is specified, the * request must also include the sourceCode parameter. *

*/ private Toolchain toolchain; /** *

* The tags created for the project. *

*/ private java.util.Map tags; /** *

* The display name for the project to be created in AWS CodeStar. *

* * @param name * The display name for the project to be created in AWS CodeStar. */ public void setName(String name) { this.name = name; } /** *

* The display name for the project to be created in AWS CodeStar. *

* * @return The display name for the project to be created in AWS CodeStar. */ public String getName() { return this.name; } /** *

* The display name for the project to be created in AWS CodeStar. *

* * @param name * The display name for the project to be created in AWS CodeStar. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withName(String name) { setName(name); return this; } /** *

* The ID of the project to be created in AWS CodeStar. *

* * @param id * The ID of the project to be created in AWS CodeStar. */ public void setId(String id) { this.id = id; } /** *

* The ID of the project to be created in AWS CodeStar. *

* * @return The ID of the project to be created in AWS CodeStar. */ public String getId() { return this.id; } /** *

* The ID of the project to be created in AWS CodeStar. *

* * @param id * The ID of the project to be created in AWS CodeStar. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withId(String id) { setId(id); return this; } /** *

* The description of the project, if any. *

* * @param description * The description of the project, if any. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the project, if any. *

* * @return The description of the project, if any. */ public String getDescription() { return this.description; } /** *

* The description of the project, if any. *

* * @param description * The description of the project, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withDescription(String description) { setDescription(description); return this; } /** *

* A user- or system-generated token that identifies the entity that requested project creation. This token can be * used to repeat the request. *

* * @param clientRequestToken * A user- or system-generated token that identifies the entity that requested project creation. This token * can be used to repeat the request. */ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** *

* A user- or system-generated token that identifies the entity that requested project creation. This token can be * used to repeat the request. *

* * @return A user- or system-generated token that identifies the entity that requested project creation. This token * can be used to repeat the request. */ public String getClientRequestToken() { return this.clientRequestToken; } /** *

* A user- or system-generated token that identifies the entity that requested project creation. This token can be * used to repeat the request. *

* * @param clientRequestToken * A user- or system-generated token that identifies the entity that requested project creation. This token * can be used to repeat the request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** *

* A list of the Code objects submitted with the project request. If this parameter is specified, the request must * also include the toolchain parameter. *

* * @return A list of the Code objects submitted with the project request. If this parameter is specified, the * request must also include the toolchain parameter. */ public java.util.List getSourceCode() { return sourceCode; } /** *

* A list of the Code objects submitted with the project request. If this parameter is specified, the request must * also include the toolchain parameter. *

* * @param sourceCode * A list of the Code objects submitted with the project request. If this parameter is specified, the request * must also include the toolchain parameter. */ public void setSourceCode(java.util.Collection sourceCode) { if (sourceCode == null) { this.sourceCode = null; return; } this.sourceCode = new java.util.ArrayList(sourceCode); } /** *

* A list of the Code objects submitted with the project request. If this parameter is specified, the request must * also include the toolchain parameter. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSourceCode(java.util.Collection)} or {@link #withSourceCode(java.util.Collection)} if you want to * override the existing values. *

* * @param sourceCode * A list of the Code objects submitted with the project request. If this parameter is specified, the request * must also include the toolchain parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withSourceCode(Code... sourceCode) { if (this.sourceCode == null) { setSourceCode(new java.util.ArrayList(sourceCode.length)); } for (Code ele : sourceCode) { this.sourceCode.add(ele); } return this; } /** *

* A list of the Code objects submitted with the project request. If this parameter is specified, the request must * also include the toolchain parameter. *

* * @param sourceCode * A list of the Code objects submitted with the project request. If this parameter is specified, the request * must also include the toolchain parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withSourceCode(java.util.Collection sourceCode) { setSourceCode(sourceCode); return this; } /** *

* The name of the toolchain template file submitted with the project request. If this parameter is specified, the * request must also include the sourceCode parameter. *

* * @param toolchain * The name of the toolchain template file submitted with the project request. If this parameter is * specified, the request must also include the sourceCode parameter. */ public void setToolchain(Toolchain toolchain) { this.toolchain = toolchain; } /** *

* The name of the toolchain template file submitted with the project request. If this parameter is specified, the * request must also include the sourceCode parameter. *

* * @return The name of the toolchain template file submitted with the project request. If this parameter is * specified, the request must also include the sourceCode parameter. */ public Toolchain getToolchain() { return this.toolchain; } /** *

* The name of the toolchain template file submitted with the project request. If this parameter is specified, the * request must also include the sourceCode parameter. *

* * @param toolchain * The name of the toolchain template file submitted with the project request. If this parameter is * specified, the request must also include the sourceCode parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withToolchain(Toolchain toolchain) { setToolchain(toolchain); return this; } /** *

* The tags created for the project. *

* * @return The tags created for the project. */ public java.util.Map getTags() { return tags; } /** *

* The tags created for the project. *

* * @param tags * The tags created for the project. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The tags created for the project. *

* * @param tags * The tags created for the project. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateProjectRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateProjectRequest clearTagsEntries() { this.tags = null; 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 (getName() != null) sb.append("Name: ").append("***Sensitive Data Redacted***").append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getDescription() != null) sb.append("Description: ").append("***Sensitive Data Redacted***").append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getSourceCode() != null) sb.append("SourceCode: ").append(getSourceCode()).append(","); if (getToolchain() != null) sb.append("Toolchain: ").append(getToolchain()).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.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getSourceCode() == null ^ this.getSourceCode() == null) return false; if (other.getSourceCode() != null && other.getSourceCode().equals(this.getSourceCode()) == false) return false; if (other.getToolchain() == null ^ this.getToolchain() == null) return false; if (other.getToolchain() != null && other.getToolchain().equals(this.getToolchain()) == 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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getSourceCode() == null) ? 0 : getSourceCode().hashCode()); hashCode = prime * hashCode + ((getToolchain() == null) ? 0 : getToolchain().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateProjectRequest clone() { return (CreateProjectRequest) super.clone(); } }