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

com.pulumi.rabbitmq.TopicPermissionsArgs Maven / Gradle / Ivy

There is a newer version: 3.4.0-alpha.1731737837
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.rabbitmq;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.rabbitmq.inputs.TopicPermissionsPermissionArgs;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final TopicPermissionsArgs Empty = new TopicPermissionsArgs();

    /**
     * The settings of the permissions. The structure is
     * described below.
     * 
     */
    @Import(name="permissions", required=true)
    private Output> permissions;

    /**
     * @return The settings of the permissions. The structure is
     * described below.
     * 
     */
    public Output> permissions() {
        return this.permissions;
    }

    /**
     * The user to apply the permissions to.
     * 
     */
    @Import(name="user", required=true)
    private Output user;

    /**
     * @return The user to apply the permissions to.
     * 
     */
    public Output user() {
        return this.user;
    }

    /**
     * The vhost to create the resource in.
     * 
     */
    @Import(name="vhost")
    private @Nullable Output vhost;

    /**
     * @return The vhost to create the resource in.
     * 
     */
    public Optional> vhost() {
        return Optional.ofNullable(this.vhost);
    }

    private TopicPermissionsArgs() {}

    private TopicPermissionsArgs(TopicPermissionsArgs $) {
        this.permissions = $.permissions;
        this.user = $.user;
        this.vhost = $.vhost;
    }

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

    public static final class Builder {
        private TopicPermissionsArgs $;

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

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

        /**
         * @param permissions The settings of the permissions. The structure is
         * described below.
         * 
         * @return builder
         * 
         */
        public Builder permissions(Output> permissions) {
            $.permissions = permissions;
            return this;
        }

        /**
         * @param permissions The settings of the permissions. The structure is
         * described below.
         * 
         * @return builder
         * 
         */
        public Builder permissions(List permissions) {
            return permissions(Output.of(permissions));
        }

        /**
         * @param permissions The settings of the permissions. The structure is
         * described below.
         * 
         * @return builder
         * 
         */
        public Builder permissions(TopicPermissionsPermissionArgs... permissions) {
            return permissions(List.of(permissions));
        }

        /**
         * @param user The user to apply the permissions to.
         * 
         * @return builder
         * 
         */
        public Builder user(Output user) {
            $.user = user;
            return this;
        }

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

        /**
         * @param vhost The vhost to create the resource in.
         * 
         * @return builder
         * 
         */
        public Builder vhost(@Nullable Output vhost) {
            $.vhost = vhost;
            return this;
        }

        /**
         * @param vhost The vhost to create the resource in.
         * 
         * @return builder
         * 
         */
        public Builder vhost(String vhost) {
            return vhost(Output.of(vhost));
        }

        public TopicPermissionsArgs build() {
            if ($.permissions == null) {
                throw new MissingRequiredPropertyException("TopicPermissionsArgs", "permissions");
            }
            if ($.user == null) {
                throw new MissingRequiredPropertyException("TopicPermissionsArgs", "user");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy