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

com.pulumi.github.RepositoryCollaboratorArgs 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;

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 RepositoryCollaboratorArgs extends com.pulumi.resources.ResourceArgs {

    public static final RepositoryCollaboratorArgs Empty = new RepositoryCollaboratorArgs();

    /**
     * The permission of the outside collaborator for the repository.
     * Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories.
     * Must be `push` for personal repositories. Defaults to `push`.
     * 
     */
    @Import(name="permission")
    private @Nullable Output permission;

    /**
     * @return The permission of the outside collaborator for the repository.
     * Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories.
     * Must be `push` for personal repositories. Defaults to `push`.
     * 
     */
    public Optional> permission() {
        return Optional.ofNullable(this.permission);
    }

    /**
     * Suppress plan diffs for `triage` and `maintain`.  Defaults to `false`.
     * 
     */
    @Import(name="permissionDiffSuppression")
    private @Nullable Output permissionDiffSuppression;

    /**
     * @return Suppress plan diffs for `triage` and `maintain`.  Defaults to `false`.
     * 
     */
    public Optional> permissionDiffSuppression() {
        return Optional.ofNullable(this.permissionDiffSuppression);
    }

    /**
     * The GitHub repository
     * 
     */
    @Import(name="repository", required=true)
    private Output repository;

    /**
     * @return The GitHub repository
     * 
     */
    public Output repository() {
        return this.repository;
    }

    /**
     * The user to add to the repository as a collaborator.
     * 
     */
    @Import(name="username", required=true)
    private Output username;

    /**
     * @return The user to add to the repository as a collaborator.
     * 
     */
    public Output username() {
        return this.username;
    }

    private RepositoryCollaboratorArgs() {}

    private RepositoryCollaboratorArgs(RepositoryCollaboratorArgs $) {
        this.permission = $.permission;
        this.permissionDiffSuppression = $.permissionDiffSuppression;
        this.repository = $.repository;
        this.username = $.username;
    }

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

    public static final class Builder {
        private RepositoryCollaboratorArgs $;

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

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

        /**
         * @param permission The permission of the outside collaborator for the repository.
         * Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories.
         * Must be `push` for personal repositories. Defaults to `push`.
         * 
         * @return builder
         * 
         */
        public Builder permission(@Nullable Output permission) {
            $.permission = permission;
            return this;
        }

        /**
         * @param permission The permission of the outside collaborator for the repository.
         * Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories.
         * Must be `push` for personal repositories. Defaults to `push`.
         * 
         * @return builder
         * 
         */
        public Builder permission(String permission) {
            return permission(Output.of(permission));
        }

        /**
         * @param permissionDiffSuppression Suppress plan diffs for `triage` and `maintain`.  Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder permissionDiffSuppression(@Nullable Output permissionDiffSuppression) {
            $.permissionDiffSuppression = permissionDiffSuppression;
            return this;
        }

        /**
         * @param permissionDiffSuppression Suppress plan diffs for `triage` and `maintain`.  Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder permissionDiffSuppression(Boolean permissionDiffSuppression) {
            return permissionDiffSuppression(Output.of(permissionDiffSuppression));
        }

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

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

        /**
         * @param username The user to add to the repository as a collaborator.
         * 
         * @return builder
         * 
         */
        public Builder username(Output username) {
            $.username = username;
            return this;
        }

        /**
         * @param username The user to add to the repository as a collaborator.
         * 
         * @return builder
         * 
         */
        public Builder username(String username) {
            return username(Output.of(username));
        }

        public RepositoryCollaboratorArgs build() {
            $.repository = Objects.requireNonNull($.repository, "expected parameter 'repository' to be non-null");
            $.username = Objects.requireNonNull($.username, "expected parameter 'username' to be non-null");
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy