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

com.pulumi.github.inputs.BranchState Maven / Gradle / Ivy

There is a newer version: 6.4.0-alpha.1731735876
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.github.inputs;

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


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

    public static final BranchState Empty = new BranchState();

    /**
     * The repository branch to create.
     * 
     */
    @Import(name="branch")
    private @Nullable Output branch;

    /**
     * @return The repository branch to create.
     * 
     */
    public Optional> branch() {
        return Optional.ofNullable(this.branch);
    }

    /**
     * An etag representing the Branch object.
     * 
     */
    @Import(name="etag")
    private @Nullable Output etag;

    /**
     * @return An etag representing the Branch object.
     * 
     */
    public Optional> etag() {
        return Optional.ofNullable(this.etag);
    }

    /**
     * A string representing a branch reference, in the form of `refs/heads/<branch>`.
     * 
     */
    @Import(name="ref")
    private @Nullable Output ref;

    /**
     * @return A string representing a branch reference, in the form of `refs/heads/<branch>`.
     * 
     */
    public Optional> ref() {
        return Optional.ofNullable(this.ref);
    }

    /**
     * The GitHub repository name.
     * 
     */
    @Import(name="repository")
    private @Nullable Output repository;

    /**
     * @return The GitHub repository name.
     * 
     */
    public Optional> repository() {
        return Optional.ofNullable(this.repository);
    }

    /**
     * A string storing the reference's `HEAD` commit's SHA1.
     * 
     */
    @Import(name="sha")
    private @Nullable Output sha;

    /**
     * @return A string storing the reference's `HEAD` commit's SHA1.
     * 
     */
    public Optional> sha() {
        return Optional.ofNullable(this.sha);
    }

    /**
     * The branch name to start from. Defaults to `main`.
     * 
     */
    @Import(name="sourceBranch")
    private @Nullable Output sourceBranch;

    /**
     * @return The branch name to start from. Defaults to `main`.
     * 
     */
    public Optional> sourceBranch() {
        return Optional.ofNullable(this.sourceBranch);
    }

    /**
     * The commit hash to start from. Defaults to the tip of `source_branch`. If provided, `source_branch` is ignored.
     * 
     */
    @Import(name="sourceSha")
    private @Nullable Output sourceSha;

    /**
     * @return The commit hash to start from. Defaults to the tip of `source_branch`. If provided, `source_branch` is ignored.
     * 
     */
    public Optional> sourceSha() {
        return Optional.ofNullable(this.sourceSha);
    }

    private BranchState() {}

    private BranchState(BranchState $) {
        this.branch = $.branch;
        this.etag = $.etag;
        this.ref = $.ref;
        this.repository = $.repository;
        this.sha = $.sha;
        this.sourceBranch = $.sourceBranch;
        this.sourceSha = $.sourceSha;
    }

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

    public static final class Builder {
        private BranchState $;

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

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

        /**
         * @param branch The repository branch to create.
         * 
         * @return builder
         * 
         */
        public Builder branch(@Nullable Output branch) {
            $.branch = branch;
            return this;
        }

        /**
         * @param branch The repository branch to create.
         * 
         * @return builder
         * 
         */
        public Builder branch(String branch) {
            return branch(Output.of(branch));
        }

        /**
         * @param etag An etag representing the Branch object.
         * 
         * @return builder
         * 
         */
        public Builder etag(@Nullable Output etag) {
            $.etag = etag;
            return this;
        }

        /**
         * @param etag An etag representing the Branch object.
         * 
         * @return builder
         * 
         */
        public Builder etag(String etag) {
            return etag(Output.of(etag));
        }

        /**
         * @param ref A string representing a branch reference, in the form of `refs/heads/<branch>`.
         * 
         * @return builder
         * 
         */
        public Builder ref(@Nullable Output ref) {
            $.ref = ref;
            return this;
        }

        /**
         * @param ref A string representing a branch reference, in the form of `refs/heads/<branch>`.
         * 
         * @return builder
         * 
         */
        public Builder ref(String ref) {
            return ref(Output.of(ref));
        }

        /**
         * @param repository The GitHub repository name.
         * 
         * @return builder
         * 
         */
        public Builder repository(@Nullable Output repository) {
            $.repository = repository;
            return this;
        }

        /**
         * @param repository The GitHub repository name.
         * 
         * @return builder
         * 
         */
        public Builder repository(String repository) {
            return repository(Output.of(repository));
        }

        /**
         * @param sha A string storing the reference's `HEAD` commit's SHA1.
         * 
         * @return builder
         * 
         */
        public Builder sha(@Nullable Output sha) {
            $.sha = sha;
            return this;
        }

        /**
         * @param sha A string storing the reference's `HEAD` commit's SHA1.
         * 
         * @return builder
         * 
         */
        public Builder sha(String sha) {
            return sha(Output.of(sha));
        }

        /**
         * @param sourceBranch The branch name to start from. Defaults to `main`.
         * 
         * @return builder
         * 
         */
        public Builder sourceBranch(@Nullable Output sourceBranch) {
            $.sourceBranch = sourceBranch;
            return this;
        }

        /**
         * @param sourceBranch The branch name to start from. Defaults to `main`.
         * 
         * @return builder
         * 
         */
        public Builder sourceBranch(String sourceBranch) {
            return sourceBranch(Output.of(sourceBranch));
        }

        /**
         * @param sourceSha The commit hash to start from. Defaults to the tip of `source_branch`. If provided, `source_branch` is ignored.
         * 
         * @return builder
         * 
         */
        public Builder sourceSha(@Nullable Output sourceSha) {
            $.sourceSha = sourceSha;
            return this;
        }

        /**
         * @param sourceSha The commit hash to start from. Defaults to the tip of `source_branch`. If provided, `source_branch` is ignored.
         * 
         * @return builder
         * 
         */
        public Builder sourceSha(String sourceSha) {
            return sourceSha(Output.of(sourceSha));
        }

        public BranchState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy