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

com.pulumi.aws.codebuild.SourceCredentialArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.72.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.codebuild;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class SourceCredentialArgs extends com.pulumi.resources.ResourceArgs {

    public static final SourceCredentialArgs Empty = new SourceCredentialArgs();

    /**
     * The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.
     * 
     */
    @Import(name="authType", required=true)
    private Output authType;

    /**
     * @return The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.
     * 
     */
    public Output authType() {
        return this.authType;
    }

    /**
     * The source provider used for this project.
     * 
     */
    @Import(name="serverType", required=true)
    private Output serverType;

    /**
     * @return The source provider used for this project.
     * 
     */
    public Output serverType() {
        return this.serverType;
    }

    /**
     * For `GitHub` or `GitHub Enterprise`, this is the personal access token. For `Bitbucket`, this is the app password.
     * 
     */
    @Import(name="token", required=true)
    private Output token;

    /**
     * @return For `GitHub` or `GitHub Enterprise`, this is the personal access token. For `Bitbucket`, this is the app password.
     * 
     */
    public Output token() {
        return this.token;
    }

    /**
     * The Bitbucket username when the authType is `BASIC_AUTH`. This parameter is not valid for other types of source providers or connections.
     * 
     */
    @Import(name="userName")
    private @Nullable Output userName;

    /**
     * @return The Bitbucket username when the authType is `BASIC_AUTH`. This parameter is not valid for other types of source providers or connections.
     * 
     */
    public Optional> userName() {
        return Optional.ofNullable(this.userName);
    }

    private SourceCredentialArgs() {}

    private SourceCredentialArgs(SourceCredentialArgs $) {
        this.authType = $.authType;
        this.serverType = $.serverType;
        this.token = $.token;
        this.userName = $.userName;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(SourceCredentialArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private SourceCredentialArgs $;

        public Builder() {
            $ = new SourceCredentialArgs();
        }

        public Builder(SourceCredentialArgs defaults) {
            $ = new SourceCredentialArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param authType The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.
         * 
         * @return builder
         * 
         */
        public Builder authType(Output authType) {
            $.authType = authType;
            return this;
        }

        /**
         * @param authType The type of authentication used to connect to a GitHub, GitHub Enterprise, or Bitbucket repository. An OAUTH connection is not supported by the API.
         * 
         * @return builder
         * 
         */
        public Builder authType(String authType) {
            return authType(Output.of(authType));
        }

        /**
         * @param serverType The source provider used for this project.
         * 
         * @return builder
         * 
         */
        public Builder serverType(Output serverType) {
            $.serverType = serverType;
            return this;
        }

        /**
         * @param serverType The source provider used for this project.
         * 
         * @return builder
         * 
         */
        public Builder serverType(String serverType) {
            return serverType(Output.of(serverType));
        }

        /**
         * @param token For `GitHub` or `GitHub Enterprise`, this is the personal access token. For `Bitbucket`, this is the app password.
         * 
         * @return builder
         * 
         */
        public Builder token(Output token) {
            $.token = token;
            return this;
        }

        /**
         * @param token For `GitHub` or `GitHub Enterprise`, this is the personal access token. For `Bitbucket`, this is the app password.
         * 
         * @return builder
         * 
         */
        public Builder token(String token) {
            return token(Output.of(token));
        }

        /**
         * @param userName The Bitbucket username when the authType is `BASIC_AUTH`. This parameter is not valid for other types of source providers or connections.
         * 
         * @return builder
         * 
         */
        public Builder userName(@Nullable Output userName) {
            $.userName = userName;
            return this;
        }

        /**
         * @param userName The Bitbucket username when the authType is `BASIC_AUTH`. This parameter is not valid for other types of source providers or connections.
         * 
         * @return builder
         * 
         */
        public Builder userName(String userName) {
            return userName(Output.of(userName));
        }

        public SourceCredentialArgs build() {
            if ($.authType == null) {
                throw new MissingRequiredPropertyException("SourceCredentialArgs", "authType");
            }
            if ($.serverType == null) {
                throw new MissingRequiredPropertyException("SourceCredentialArgs", "serverType");
            }
            if ($.token == null) {
                throw new MissingRequiredPropertyException("SourceCredentialArgs", "token");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy