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

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

// *** 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.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final RepositoryFileState Empty = new RepositoryFileState();

    /**
     * Git branch (defaults to the repository's default branch).
     * The branch must already exist, it will not be created if it does not already exist.
     * 
     */
    @Import(name="branch")
    private @Nullable Output branch;

    /**
     * @return Git branch (defaults to the repository's default branch).
     * The branch must already exist, it will not be created if it does not already exist.
     * 
     */
    public Optional> branch() {
        return Optional.ofNullable(this.branch);
    }

    /**
     * Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
     * 
     */
    @Import(name="commitAuthor")
    private @Nullable Output commitAuthor;

    /**
     * @return Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
     * 
     */
    public Optional> commitAuthor() {
        return Optional.ofNullable(this.commitAuthor);
    }

    /**
     * Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
     * 
     */
    @Import(name="commitEmail")
    private @Nullable Output commitEmail;

    /**
     * @return Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
     * 
     */
    public Optional> commitEmail() {
        return Optional.ofNullable(this.commitEmail);
    }

    /**
     * The commit message when creating, updating or deleting the managed file.
     * 
     */
    @Import(name="commitMessage")
    private @Nullable Output commitMessage;

    /**
     * @return The commit message when creating, updating or deleting the managed file.
     * 
     */
    public Optional> commitMessage() {
        return Optional.ofNullable(this.commitMessage);
    }

    /**
     * The SHA of the commit that modified the file.
     * 
     */
    @Import(name="commitSha")
    private @Nullable Output commitSha;

    /**
     * @return The SHA of the commit that modified the file.
     * 
     */
    public Optional> commitSha() {
        return Optional.ofNullable(this.commitSha);
    }

    /**
     * The file content.
     * 
     */
    @Import(name="content")
    private @Nullable Output content;

    /**
     * @return The file content.
     * 
     */
    public Optional> content() {
        return Optional.ofNullable(this.content);
    }

    /**
     * The path of the file to manage.
     * 
     */
    @Import(name="file")
    private @Nullable Output file;

    /**
     * @return The path of the file to manage.
     * 
     */
    public Optional> file() {
        return Optional.ofNullable(this.file);
    }

    /**
     * Enable overwriting existing files. If set to `true` it will overwrite an existing file with the same name. If set to `false` it will fail if there is an existing file with the same name.
     * 
     */
    @Import(name="overwriteOnCreate")
    private @Nullable Output overwriteOnCreate;

    /**
     * @return Enable overwriting existing files. If set to `true` it will overwrite an existing file with the same name. If set to `false` it will fail if there is an existing file with the same name.
     * 
     */
    public Optional> overwriteOnCreate() {
        return Optional.ofNullable(this.overwriteOnCreate);
    }

    /**
     * The name of the commit/branch/tag.
     * 
     */
    @Import(name="ref")
    private @Nullable Output ref;

    /**
     * @return The name of the commit/branch/tag.
     * 
     */
    public Optional> ref() {
        return Optional.ofNullable(this.ref);
    }

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

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

    /**
     * The SHA blob of the file.
     * 
     */
    @Import(name="sha")
    private @Nullable Output sha;

    /**
     * @return The SHA blob of the file.
     * 
     */
    public Optional> sha() {
        return Optional.ofNullable(this.sha);
    }

    private RepositoryFileState() {}

    private RepositoryFileState(RepositoryFileState $) {
        this.branch = $.branch;
        this.commitAuthor = $.commitAuthor;
        this.commitEmail = $.commitEmail;
        this.commitMessage = $.commitMessage;
        this.commitSha = $.commitSha;
        this.content = $.content;
        this.file = $.file;
        this.overwriteOnCreate = $.overwriteOnCreate;
        this.ref = $.ref;
        this.repository = $.repository;
        this.sha = $.sha;
    }

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

    public static final class Builder {
        private RepositoryFileState $;

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

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

        /**
         * @param branch Git branch (defaults to the repository's default branch).
         * The branch must already exist, it will not be created if it does not already exist.
         * 
         * @return builder
         * 
         */
        public Builder branch(@Nullable Output branch) {
            $.branch = branch;
            return this;
        }

        /**
         * @param branch Git branch (defaults to the repository's default branch).
         * The branch must already exist, it will not be created if it does not already exist.
         * 
         * @return builder
         * 
         */
        public Builder branch(String branch) {
            return branch(Output.of(branch));
        }

        /**
         * @param commitAuthor Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
         * 
         * @return builder
         * 
         */
        public Builder commitAuthor(@Nullable Output commitAuthor) {
            $.commitAuthor = commitAuthor;
            return this;
        }

        /**
         * @param commitAuthor Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
         * 
         * @return builder
         * 
         */
        public Builder commitAuthor(String commitAuthor) {
            return commitAuthor(Output.of(commitAuthor));
        }

        /**
         * @param commitEmail Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
         * 
         * @return builder
         * 
         */
        public Builder commitEmail(@Nullable Output commitEmail) {
            $.commitEmail = commitEmail;
            return this;
        }

        /**
         * @param commitEmail Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
         * 
         * @return builder
         * 
         */
        public Builder commitEmail(String commitEmail) {
            return commitEmail(Output.of(commitEmail));
        }

        /**
         * @param commitMessage The commit message when creating, updating or deleting the managed file.
         * 
         * @return builder
         * 
         */
        public Builder commitMessage(@Nullable Output commitMessage) {
            $.commitMessage = commitMessage;
            return this;
        }

        /**
         * @param commitMessage The commit message when creating, updating or deleting the managed file.
         * 
         * @return builder
         * 
         */
        public Builder commitMessage(String commitMessage) {
            return commitMessage(Output.of(commitMessage));
        }

        /**
         * @param commitSha The SHA of the commit that modified the file.
         * 
         * @return builder
         * 
         */
        public Builder commitSha(@Nullable Output commitSha) {
            $.commitSha = commitSha;
            return this;
        }

        /**
         * @param commitSha The SHA of the commit that modified the file.
         * 
         * @return builder
         * 
         */
        public Builder commitSha(String commitSha) {
            return commitSha(Output.of(commitSha));
        }

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

        /**
         * @param content The file content.
         * 
         * @return builder
         * 
         */
        public Builder content(String content) {
            return content(Output.of(content));
        }

        /**
         * @param file The path of the file to manage.
         * 
         * @return builder
         * 
         */
        public Builder file(@Nullable Output file) {
            $.file = file;
            return this;
        }

        /**
         * @param file The path of the file to manage.
         * 
         * @return builder
         * 
         */
        public Builder file(String file) {
            return file(Output.of(file));
        }

        /**
         * @param overwriteOnCreate Enable overwriting existing files. If set to `true` it will overwrite an existing file with the same name. If set to `false` it will fail if there is an existing file with the same name.
         * 
         * @return builder
         * 
         */
        public Builder overwriteOnCreate(@Nullable Output overwriteOnCreate) {
            $.overwriteOnCreate = overwriteOnCreate;
            return this;
        }

        /**
         * @param overwriteOnCreate Enable overwriting existing files. If set to `true` it will overwrite an existing file with the same name. If set to `false` it will fail if there is an existing file with the same name.
         * 
         * @return builder
         * 
         */
        public Builder overwriteOnCreate(Boolean overwriteOnCreate) {
            return overwriteOnCreate(Output.of(overwriteOnCreate));
        }

        /**
         * @param ref The name of the commit/branch/tag.
         * 
         * @return builder
         * 
         */
        public Builder ref(@Nullable Output ref) {
            $.ref = ref;
            return this;
        }

        /**
         * @param ref The name of the commit/branch/tag.
         * 
         * @return builder
         * 
         */
        public Builder ref(String ref) {
            return ref(Output.of(ref));
        }

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

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

        /**
         * @param sha The SHA blob of the file.
         * 
         * @return builder
         * 
         */
        public Builder sha(@Nullable Output sha) {
            $.sha = sha;
            return this;
        }

        /**
         * @param sha The SHA blob of the file.
         * 
         * @return builder
         * 
         */
        public Builder sha(String sha) {
            return sha(Output.of(sha));
        }

        public RepositoryFileState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy