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

com.pulumi.github.outputs.BranchProtectionV3RequiredStatusChecks Maven / Gradle / Ivy

There is a newer version: 6.3.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.github.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class BranchProtectionV3RequiredStatusChecks {
    /**
     * @return The list of status checks to require in order to merge into this branch. No status checks are required by default. Checks should be strings containing the context and app_id like so "context:app_id".
     * 
     */
    private @Nullable List checks;
    /**
     * @return [**DEPRECATED**] (Optional) The list of status checks to require in order to merge into this branch. No status checks are required by default.
     * 
     * > Note: This attribute can contain multiple string patterns.
     * If specified, usual value is the [job name](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname). Otherwise, the [job id](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname) is defaulted to.
     * For workflows that use matrixes, append the matrix name to the value using the following pattern `(<matrix_value>[, <matrix_value>])`. Matrixes should be specified based on the order of matrix properties in the workflow file. See GitHub Documentation for more information.
     * For workflows that use reusable workflows, the pattern is `<initial_workflow.jobs.job.[name/id]> / <reused-workflow.jobs.job.[name/id]>`. This can extend multiple levels.
     * 
     * @deprecated
     * GitHub is deprecating the use of `contexts`. Use a `checks` array instead.
     * 
     */
    @Deprecated /* GitHub is deprecating the use of `contexts`. Use a `checks` array instead. */
    private @Nullable List contexts;
    /**
     * @deprecated
     * Use enforce_admins instead
     * 
     */
    @Deprecated /* Use enforce_admins instead */
    private @Nullable Boolean includeAdmins;
    /**
     * @return Require branches to be up to date before merging. Defaults to `false`.
     * 
     */
    private @Nullable Boolean strict;

    private BranchProtectionV3RequiredStatusChecks() {}
    /**
     * @return The list of status checks to require in order to merge into this branch. No status checks are required by default. Checks should be strings containing the context and app_id like so "context:app_id".
     * 
     */
    public List checks() {
        return this.checks == null ? List.of() : this.checks;
    }
    /**
     * @return [**DEPRECATED**] (Optional) The list of status checks to require in order to merge into this branch. No status checks are required by default.
     * 
     * > Note: This attribute can contain multiple string patterns.
     * If specified, usual value is the [job name](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname). Otherwise, the [job id](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname) is defaulted to.
     * For workflows that use matrixes, append the matrix name to the value using the following pattern `(<matrix_value>[, <matrix_value>])`. Matrixes should be specified based on the order of matrix properties in the workflow file. See GitHub Documentation for more information.
     * For workflows that use reusable workflows, the pattern is `<initial_workflow.jobs.job.[name/id]> / <reused-workflow.jobs.job.[name/id]>`. This can extend multiple levels.
     * 
     * @deprecated
     * GitHub is deprecating the use of `contexts`. Use a `checks` array instead.
     * 
     */
    @Deprecated /* GitHub is deprecating the use of `contexts`. Use a `checks` array instead. */
    public List contexts() {
        return this.contexts == null ? List.of() : this.contexts;
    }
    /**
     * @deprecated
     * Use enforce_admins instead
     * 
     */
    @Deprecated /* Use enforce_admins instead */
    public Optional includeAdmins() {
        return Optional.ofNullable(this.includeAdmins);
    }
    /**
     * @return Require branches to be up to date before merging. Defaults to `false`.
     * 
     */
    public Optional strict() {
        return Optional.ofNullable(this.strict);
    }

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

    public static Builder builder(BranchProtectionV3RequiredStatusChecks defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List checks;
        private @Nullable List contexts;
        private @Nullable Boolean includeAdmins;
        private @Nullable Boolean strict;
        public Builder() {}
        public Builder(BranchProtectionV3RequiredStatusChecks defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.checks = defaults.checks;
    	      this.contexts = defaults.contexts;
    	      this.includeAdmins = defaults.includeAdmins;
    	      this.strict = defaults.strict;
        }

        @CustomType.Setter
        public Builder checks(@Nullable List checks) {

            this.checks = checks;
            return this;
        }
        public Builder checks(String... checks) {
            return checks(List.of(checks));
        }
        @CustomType.Setter
        public Builder contexts(@Nullable List contexts) {

            this.contexts = contexts;
            return this;
        }
        public Builder contexts(String... contexts) {
            return contexts(List.of(contexts));
        }
        @CustomType.Setter
        public Builder includeAdmins(@Nullable Boolean includeAdmins) {

            this.includeAdmins = includeAdmins;
            return this;
        }
        @CustomType.Setter
        public Builder strict(@Nullable Boolean strict) {

            this.strict = strict;
            return this;
        }
        public BranchProtectionV3RequiredStatusChecks build() {
            final var _resultValue = new BranchProtectionV3RequiredStatusChecks();
            _resultValue.checks = checks;
            _resultValue.contexts = contexts;
            _resultValue.includeAdmins = includeAdmins;
            _resultValue.strict = strict;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy