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

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

There is a newer version: 6.5.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.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 MembershipState extends com.pulumi.resources.ResourceArgs {

    public static final MembershipState Empty = new MembershipState();

    /**
     * Defaults to `false`. If set to true,
     * when this resource is destroyed, the member will not be removed
     * from the organization. Instead, the member's role will be
     * downgraded to 'member'.
     * 
     */
    @Import(name="downgradeOnDestroy")
    private @Nullable Output downgradeOnDestroy;

    /**
     * @return Defaults to `false`. If set to true,
     * when this resource is destroyed, the member will not be removed
     * from the organization. Instead, the member's role will be
     * downgraded to 'member'.
     * 
     */
    public Optional> downgradeOnDestroy() {
        return Optional.ofNullable(this.downgradeOnDestroy);
    }

    @Import(name="etag")
    private @Nullable Output etag;

    public Optional> etag() {
        return Optional.ofNullable(this.etag);
    }

    /**
     * The role of the user within the organization.
     * Must be one of `member` or `admin`. Defaults to `member`.
     * `admin` role represents the `owner` role available via GitHub UI.
     * 
     */
    @Import(name="role")
    private @Nullable Output role;

    /**
     * @return The role of the user within the organization.
     * Must be one of `member` or `admin`. Defaults to `member`.
     * `admin` role represents the `owner` role available via GitHub UI.
     * 
     */
    public Optional> role() {
        return Optional.ofNullable(this.role);
    }

    /**
     * The user to add to the organization.
     * 
     */
    @Import(name="username")
    private @Nullable Output username;

    /**
     * @return The user to add to the organization.
     * 
     */
    public Optional> username() {
        return Optional.ofNullable(this.username);
    }

    private MembershipState() {}

    private MembershipState(MembershipState $) {
        this.downgradeOnDestroy = $.downgradeOnDestroy;
        this.etag = $.etag;
        this.role = $.role;
        this.username = $.username;
    }

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

    public static final class Builder {
        private MembershipState $;

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

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

        /**
         * @param downgradeOnDestroy Defaults to `false`. If set to true,
         * when this resource is destroyed, the member will not be removed
         * from the organization. Instead, the member's role will be
         * downgraded to 'member'.
         * 
         * @return builder
         * 
         */
        public Builder downgradeOnDestroy(@Nullable Output downgradeOnDestroy) {
            $.downgradeOnDestroy = downgradeOnDestroy;
            return this;
        }

        /**
         * @param downgradeOnDestroy Defaults to `false`. If set to true,
         * when this resource is destroyed, the member will not be removed
         * from the organization. Instead, the member's role will be
         * downgraded to 'member'.
         * 
         * @return builder
         * 
         */
        public Builder downgradeOnDestroy(Boolean downgradeOnDestroy) {
            return downgradeOnDestroy(Output.of(downgradeOnDestroy));
        }

        public Builder etag(@Nullable Output etag) {
            $.etag = etag;
            return this;
        }

        public Builder etag(String etag) {
            return etag(Output.of(etag));
        }

        /**
         * @param role The role of the user within the organization.
         * Must be one of `member` or `admin`. Defaults to `member`.
         * `admin` role represents the `owner` role available via GitHub UI.
         * 
         * @return builder
         * 
         */
        public Builder role(@Nullable Output role) {
            $.role = role;
            return this;
        }

        /**
         * @param role The role of the user within the organization.
         * Must be one of `member` or `admin`. Defaults to `member`.
         * `admin` role represents the `owner` role available via GitHub UI.
         * 
         * @return builder
         * 
         */
        public Builder role(String role) {
            return role(Output.of(role));
        }

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

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

        public MembershipState build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy