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

com.pulumi.github.inputs.RepositoryCollaboratorsUserArgs 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 java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final RepositoryCollaboratorsUserArgs Empty = new RepositoryCollaboratorsUserArgs();

    /**
     * The permission of the outside collaborators 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{@literal @}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 collaborators 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{@literal @}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);
    }

    /**
     * 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 RepositoryCollaboratorsUserArgs() {}

    private RepositoryCollaboratorsUserArgs(RepositoryCollaboratorsUserArgs $) {
        this.permission = $.permission;
        this.username = $.username;
    }

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

    public static final class Builder {
        private RepositoryCollaboratorsUserArgs $;

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

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

        /**
         * @param permission The permission of the outside collaborators 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{@literal @}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 collaborators 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{@literal @}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 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 RepositoryCollaboratorsUserArgs build() {
            if ($.username == null) {
                throw new MissingRequiredPropertyException("RepositoryCollaboratorsUserArgs", "username");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy