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

com.pulumi.postgresql.inputs.DefaultPrivilegesState Maven / Gradle / Ivy

There is a newer version: 3.14.0-alpha.1731737772
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.postgresql.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DefaultPrivilegesState Empty = new DefaultPrivilegesState();

    /**
     * The database to grant default privileges for this role.
     * 
     */
    @Import(name="database")
    private @Nullable Output database;

    /**
     * @return The database to grant default privileges for this role.
     * 
     */
    public Optional> database() {
        return Optional.ofNullable(this.database);
    }

    /**
     * The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type, schema).
     * 
     */
    @Import(name="objectType")
    private @Nullable Output objectType;

    /**
     * @return The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type, schema).
     * 
     */
    public Optional> objectType() {
        return Optional.ofNullable(this.objectType);
    }

    /**
     * Role for which apply default privileges (You can change default privileges only for objects that will be created by yourself or by roles that you are a member of).
     * 
     */
    @Import(name="owner")
    private @Nullable Output owner;

    /**
     * @return Role for which apply default privileges (You can change default privileges only for objects that will be created by yourself or by roles that you are a member of).
     * 
     */
    public Optional> owner() {
        return Optional.ofNullable(this.owner);
    }

    /**
     * The list of privileges to apply as default privileges. An empty list could be provided to revoke all default privileges for this role.
     * 
     */
    @Import(name="privileges")
    private @Nullable Output> privileges;

    /**
     * @return The list of privileges to apply as default privileges. An empty list could be provided to revoke all default privileges for this role.
     * 
     */
    public Optional>> privileges() {
        return Optional.ofNullable(this.privileges);
    }

    /**
     * The name of the role to which grant default privileges on.
     * 
     */
    @Import(name="role")
    private @Nullable Output role;

    /**
     * @return The name of the role to which grant default privileges on.
     * 
     */
    public Optional> role() {
        return Optional.ofNullable(this.role);
    }

    /**
     * The database schema to set default privileges for this role.
     * 
     */
    @Import(name="schema")
    private @Nullable Output schema;

    /**
     * @return The database schema to set default privileges for this role.
     * 
     */
    public Optional> schema() {
        return Optional.ofNullable(this.schema);
    }

    /**
     * Permit the grant recipient to grant it to others
     * 
     */
    @Import(name="withGrantOption")
    private @Nullable Output withGrantOption;

    /**
     * @return Permit the grant recipient to grant it to others
     * 
     */
    public Optional> withGrantOption() {
        return Optional.ofNullable(this.withGrantOption);
    }

    private DefaultPrivilegesState() {}

    private DefaultPrivilegesState(DefaultPrivilegesState $) {
        this.database = $.database;
        this.objectType = $.objectType;
        this.owner = $.owner;
        this.privileges = $.privileges;
        this.role = $.role;
        this.schema = $.schema;
        this.withGrantOption = $.withGrantOption;
    }

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

    public static final class Builder {
        private DefaultPrivilegesState $;

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

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

        /**
         * @param database The database to grant default privileges for this role.
         * 
         * @return builder
         * 
         */
        public Builder database(@Nullable Output database) {
            $.database = database;
            return this;
        }

        /**
         * @param database The database to grant default privileges for this role.
         * 
         * @return builder
         * 
         */
        public Builder database(String database) {
            return database(Output.of(database));
        }

        /**
         * @param objectType The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type, schema).
         * 
         * @return builder
         * 
         */
        public Builder objectType(@Nullable Output objectType) {
            $.objectType = objectType;
            return this;
        }

        /**
         * @param objectType The PostgreSQL object type to set the default privileges on (one of: table, sequence, function, type, schema).
         * 
         * @return builder
         * 
         */
        public Builder objectType(String objectType) {
            return objectType(Output.of(objectType));
        }

        /**
         * @param owner Role for which apply default privileges (You can change default privileges only for objects that will be created by yourself or by roles that you are a member of).
         * 
         * @return builder
         * 
         */
        public Builder owner(@Nullable Output owner) {
            $.owner = owner;
            return this;
        }

        /**
         * @param owner Role for which apply default privileges (You can change default privileges only for objects that will be created by yourself or by roles that you are a member of).
         * 
         * @return builder
         * 
         */
        public Builder owner(String owner) {
            return owner(Output.of(owner));
        }

        /**
         * @param privileges The list of privileges to apply as default privileges. An empty list could be provided to revoke all default privileges for this role.
         * 
         * @return builder
         * 
         */
        public Builder privileges(@Nullable Output> privileges) {
            $.privileges = privileges;
            return this;
        }

        /**
         * @param privileges The list of privileges to apply as default privileges. An empty list could be provided to revoke all default privileges for this role.
         * 
         * @return builder
         * 
         */
        public Builder privileges(List privileges) {
            return privileges(Output.of(privileges));
        }

        /**
         * @param privileges The list of privileges to apply as default privileges. An empty list could be provided to revoke all default privileges for this role.
         * 
         * @return builder
         * 
         */
        public Builder privileges(String... privileges) {
            return privileges(List.of(privileges));
        }

        /**
         * @param role The name of the role to which grant default privileges on.
         * 
         * @return builder
         * 
         */
        public Builder role(@Nullable Output role) {
            $.role = role;
            return this;
        }

        /**
         * @param role The name of the role to which grant default privileges on.
         * 
         * @return builder
         * 
         */
        public Builder role(String role) {
            return role(Output.of(role));
        }

        /**
         * @param schema The database schema to set default privileges for this role.
         * 
         * @return builder
         * 
         */
        public Builder schema(@Nullable Output schema) {
            $.schema = schema;
            return this;
        }

        /**
         * @param schema The database schema to set default privileges for this role.
         * 
         * @return builder
         * 
         */
        public Builder schema(String schema) {
            return schema(Output.of(schema));
        }

        /**
         * @param withGrantOption Permit the grant recipient to grant it to others
         * 
         * @return builder
         * 
         */
        public Builder withGrantOption(@Nullable Output withGrantOption) {
            $.withGrantOption = withGrantOption;
            return this;
        }

        /**
         * @param withGrantOption Permit the grant recipient to grant it to others
         * 
         * @return builder
         * 
         */
        public Builder withGrantOption(Boolean withGrantOption) {
            return withGrantOption(Output.of(withGrantOption));
        }

        public DefaultPrivilegesState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy