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

com.amazonaws.services.codebuild.model.SourceCredentialsInfo Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Code Build module holds the client classes that are used for communicating with AWS Code Build.

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

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about the credentials for a GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket * repository. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SourceCredentialsInfo implements Serializable, Cloneable, StructuredPojo { /** *

* The Amazon Resource Name (ARN) of the token. *

*/ private String arn; /** *

* The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or * BITBUCKET. *

*/ private String serverType; /** *

* The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, * or CODECONNECTIONS. *

*/ private String authType; /** *

* The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is CODECONNECTIONS. *

*/ private String resource; /** *

* The Amazon Resource Name (ARN) of the token. *

* * @param arn * The Amazon Resource Name (ARN) of the token. */ public void setArn(String arn) { this.arn = arn; } /** *

* The Amazon Resource Name (ARN) of the token. *

* * @return The Amazon Resource Name (ARN) of the token. */ public String getArn() { return this.arn; } /** *

* The Amazon Resource Name (ARN) of the token. *

* * @param arn * The Amazon Resource Name (ARN) of the token. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceCredentialsInfo withArn(String arn) { setArn(arn); return this; } /** *

* The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or * BITBUCKET. *

* * @param serverType * The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, * or BITBUCKET. * @see ServerType */ public void setServerType(String serverType) { this.serverType = serverType; } /** *

* The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or * BITBUCKET. *

* * @return The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, * GITLAB_SELF_MANAGED, or BITBUCKET. * @see ServerType */ public String getServerType() { return this.serverType; } /** *

* The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or * BITBUCKET. *

* * @param serverType * The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, * or BITBUCKET. * @return Returns a reference to this object so that method calls can be chained together. * @see ServerType */ public SourceCredentialsInfo withServerType(String serverType) { setServerType(serverType); return this; } /** *

* The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, or * BITBUCKET. *

* * @param serverType * The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, GITLAB, GITLAB_SELF_MANAGED, * or BITBUCKET. * @return Returns a reference to this object so that method calls can be chained together. * @see ServerType */ public SourceCredentialsInfo withServerType(ServerType serverType) { this.serverType = serverType.toString(); return this; } /** *

* The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, * or CODECONNECTIONS. *

* * @param authType * The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, * PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS. * @see AuthType */ public void setAuthType(String authType) { this.authType = authType; } /** *

* The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, * or CODECONNECTIONS. *

* * @return The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, * PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS. * @see AuthType */ public String getAuthType() { return this.authType; } /** *

* The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, * or CODECONNECTIONS. *

* * @param authType * The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, * PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS. * @return Returns a reference to this object so that method calls can be chained together. * @see AuthType */ public SourceCredentialsInfo withAuthType(String authType) { setAuthType(authType); return this; } /** *

* The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, PERSONAL_ACCESS_TOKEN, * or CODECONNECTIONS. *

* * @param authType * The type of authentication used by the credentials. Valid options are OAUTH, BASIC_AUTH, * PERSONAL_ACCESS_TOKEN, or CODECONNECTIONS. * @return Returns a reference to this object so that method calls can be chained together. * @see AuthType */ public SourceCredentialsInfo withAuthType(AuthType authType) { this.authType = authType.toString(); return this; } /** *

* The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is CODECONNECTIONS. *

* * @param resource * The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is * CODECONNECTIONS. */ public void setResource(String resource) { this.resource = resource; } /** *

* The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is CODECONNECTIONS. *

* * @return The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is * CODECONNECTIONS. */ public String getResource() { return this.resource; } /** *

* The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is CODECONNECTIONS. *

* * @param resource * The connection ARN if your serverType type is GITLAB or GITLAB_SELF_MANAGED and your authType is * CODECONNECTIONS. * @return Returns a reference to this object so that method calls can be chained together. */ public SourceCredentialsInfo withResource(String resource) { setResource(resource); 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getServerType() != null) sb.append("ServerType: ").append(getServerType()).append(","); if (getAuthType() != null) sb.append("AuthType: ").append(getAuthType()).append(","); if (getResource() != null) sb.append("Resource: ").append(getResource()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SourceCredentialsInfo == false) return false; SourceCredentialsInfo other = (SourceCredentialsInfo) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getServerType() == null ^ this.getServerType() == null) return false; if (other.getServerType() != null && other.getServerType().equals(this.getServerType()) == false) return false; if (other.getAuthType() == null ^ this.getAuthType() == null) return false; if (other.getAuthType() != null && other.getAuthType().equals(this.getAuthType()) == false) return false; if (other.getResource() == null ^ this.getResource() == null) return false; if (other.getResource() != null && other.getResource().equals(this.getResource()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getServerType() == null) ? 0 : getServerType().hashCode()); hashCode = prime * hashCode + ((getAuthType() == null) ? 0 : getAuthType().hashCode()); hashCode = prime * hashCode + ((getResource() == null) ? 0 : getResource().hashCode()); return hashCode; } @Override public SourceCredentialsInfo clone() { try { return (SourceCredentialsInfo) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.codebuild.model.transform.SourceCredentialsInfoMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy