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

com.pulumi.github.inputs.OrganizationRulesetConditionsArgs 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 com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.github.inputs.OrganizationRulesetConditionsRefNameArgs;
import com.pulumi.github.inputs.OrganizationRulesetConditionsRepositoryNameArgs;
import java.lang.Integer;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final OrganizationRulesetConditionsArgs Empty = new OrganizationRulesetConditionsArgs();

    /**
     * (Block List, Min: 1, Max: 1) (see below for nested schema)
     * 
     */
    @Import(name="refName", required=true)
    private Output refName;

    /**
     * @return (Block List, Min: 1, Max: 1) (see below for nested schema)
     * 
     */
    public Output refName() {
        return this.refName;
    }

    /**
     * The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`.
     * 
     */
    @Import(name="repositoryIds")
    private @Nullable Output> repositoryIds;

    /**
     * @return The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`.
     * 
     */
    public Optional>> repositoryIds() {
        return Optional.ofNullable(this.repositoryIds);
    }

    /**
     * Conflicts with `repository_id`. (see below for nested schema)
     * 
     * One of `repository_id` and `repository_name` must be set for the rule to target any repositories.
     * 
     */
    @Import(name="repositoryName")
    private @Nullable Output repositoryName;

    /**
     * @return Conflicts with `repository_id`. (see below for nested schema)
     * 
     * One of `repository_id` and `repository_name` must be set for the rule to target any repositories.
     * 
     */
    public Optional> repositoryName() {
        return Optional.ofNullable(this.repositoryName);
    }

    private OrganizationRulesetConditionsArgs() {}

    private OrganizationRulesetConditionsArgs(OrganizationRulesetConditionsArgs $) {
        this.refName = $.refName;
        this.repositoryIds = $.repositoryIds;
        this.repositoryName = $.repositoryName;
    }

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

    public static final class Builder {
        private OrganizationRulesetConditionsArgs $;

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

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

        /**
         * @param refName (Block List, Min: 1, Max: 1) (see below for nested schema)
         * 
         * @return builder
         * 
         */
        public Builder refName(Output refName) {
            $.refName = refName;
            return this;
        }

        /**
         * @param refName (Block List, Min: 1, Max: 1) (see below for nested schema)
         * 
         * @return builder
         * 
         */
        public Builder refName(OrganizationRulesetConditionsRefNameArgs refName) {
            return refName(Output.of(refName));
        }

        /**
         * @param repositoryIds The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`.
         * 
         * @return builder
         * 
         */
        public Builder repositoryIds(@Nullable Output> repositoryIds) {
            $.repositoryIds = repositoryIds;
            return this;
        }

        /**
         * @param repositoryIds The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`.
         * 
         * @return builder
         * 
         */
        public Builder repositoryIds(List repositoryIds) {
            return repositoryIds(Output.of(repositoryIds));
        }

        /**
         * @param repositoryIds The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`.
         * 
         * @return builder
         * 
         */
        public Builder repositoryIds(Integer... repositoryIds) {
            return repositoryIds(List.of(repositoryIds));
        }

        /**
         * @param repositoryName Conflicts with `repository_id`. (see below for nested schema)
         * 
         * One of `repository_id` and `repository_name` must be set for the rule to target any repositories.
         * 
         * @return builder
         * 
         */
        public Builder repositoryName(@Nullable Output repositoryName) {
            $.repositoryName = repositoryName;
            return this;
        }

        /**
         * @param repositoryName Conflicts with `repository_id`. (see below for nested schema)
         * 
         * One of `repository_id` and `repository_name` must be set for the rule to target any repositories.
         * 
         * @return builder
         * 
         */
        public Builder repositoryName(OrganizationRulesetConditionsRepositoryNameArgs repositoryName) {
            return repositoryName(Output.of(repositoryName));
        }

        public OrganizationRulesetConditionsArgs build() {
            if ($.refName == null) {
                throw new MissingRequiredPropertyException("OrganizationRulesetConditionsArgs", "refName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy