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

com.pulumi.azurenative.authorization.PolicyDefinitionAtManagementGroupArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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.azurenative.authorization;

import com.pulumi.azurenative.authorization.enums.PolicyType;
import com.pulumi.azurenative.authorization.inputs.ParameterDefinitionsValueArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PolicyDefinitionAtManagementGroupArgs Empty = new PolicyDefinitionAtManagementGroupArgs();

    /**
     * The policy definition description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return The policy definition description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The display name of the policy definition.
     * 
     */
    @Import(name="displayName")
    private @Nullable Output displayName;

    /**
     * @return The display name of the policy definition.
     * 
     */
    public Optional> displayName() {
        return Optional.ofNullable(this.displayName);
    }

    /**
     * The ID of the management group.
     * 
     */
    @Import(name="managementGroupId", required=true)
    private Output managementGroupId;

    /**
     * @return The ID of the management group.
     * 
     */
    public Output managementGroupId() {
        return this.managementGroupId;
    }

    /**
     * The policy definition metadata.  Metadata is an open ended object and is typically a collection of key value pairs.
     * 
     */
    @Import(name="metadata")
    private @Nullable Output metadata;

    /**
     * @return The policy definition metadata.  Metadata is an open ended object and is typically a collection of key value pairs.
     * 
     */
    public Optional> metadata() {
        return Optional.ofNullable(this.metadata);
    }

    /**
     * The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
     * 
     */
    @Import(name="mode")
    private @Nullable Output mode;

    /**
     * @return The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
     * 
     */
    public Optional> mode() {
        return Optional.ofNullable(this.mode);
    }

    /**
     * The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
     * 
     */
    @Import(name="parameters")
    private @Nullable Output> parameters;

    /**
     * @return The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
     * 
     */
    public Optional>> parameters() {
        return Optional.ofNullable(this.parameters);
    }

    /**
     * The name of the policy definition to create.
     * 
     */
    @Import(name="policyDefinitionName")
    private @Nullable Output policyDefinitionName;

    /**
     * @return The name of the policy definition to create.
     * 
     */
    public Optional> policyDefinitionName() {
        return Optional.ofNullable(this.policyDefinitionName);
    }

    /**
     * The policy rule.
     * 
     */
    @Import(name="policyRule")
    private @Nullable Output policyRule;

    /**
     * @return The policy rule.
     * 
     */
    public Optional> policyRule() {
        return Optional.ofNullable(this.policyRule);
    }

    /**
     * The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
     * 
     */
    @Import(name="policyType")
    private @Nullable Output> policyType;

    /**
     * @return The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
     * 
     */
    public Optional>> policyType() {
        return Optional.ofNullable(this.policyType);
    }

    private PolicyDefinitionAtManagementGroupArgs() {}

    private PolicyDefinitionAtManagementGroupArgs(PolicyDefinitionAtManagementGroupArgs $) {
        this.description = $.description;
        this.displayName = $.displayName;
        this.managementGroupId = $.managementGroupId;
        this.metadata = $.metadata;
        this.mode = $.mode;
        this.parameters = $.parameters;
        this.policyDefinitionName = $.policyDefinitionName;
        this.policyRule = $.policyRule;
        this.policyType = $.policyType;
    }

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

    public static final class Builder {
        private PolicyDefinitionAtManagementGroupArgs $;

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

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

        /**
         * @param description The policy definition description.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description The policy definition description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param displayName The display name of the policy definition.
         * 
         * @return builder
         * 
         */
        public Builder displayName(@Nullable Output displayName) {
            $.displayName = displayName;
            return this;
        }

        /**
         * @param displayName The display name of the policy definition.
         * 
         * @return builder
         * 
         */
        public Builder displayName(String displayName) {
            return displayName(Output.of(displayName));
        }

        /**
         * @param managementGroupId The ID of the management group.
         * 
         * @return builder
         * 
         */
        public Builder managementGroupId(Output managementGroupId) {
            $.managementGroupId = managementGroupId;
            return this;
        }

        /**
         * @param managementGroupId The ID of the management group.
         * 
         * @return builder
         * 
         */
        public Builder managementGroupId(String managementGroupId) {
            return managementGroupId(Output.of(managementGroupId));
        }

        /**
         * @param metadata The policy definition metadata.  Metadata is an open ended object and is typically a collection of key value pairs.
         * 
         * @return builder
         * 
         */
        public Builder metadata(@Nullable Output metadata) {
            $.metadata = metadata;
            return this;
        }

        /**
         * @param metadata The policy definition metadata.  Metadata is an open ended object and is typically a collection of key value pairs.
         * 
         * @return builder
         * 
         */
        public Builder metadata(Object metadata) {
            return metadata(Output.of(metadata));
        }

        /**
         * @param mode The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
         * 
         * @return builder
         * 
         */
        public Builder mode(@Nullable Output mode) {
            $.mode = mode;
            return this;
        }

        /**
         * @param mode The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
         * 
         * @return builder
         * 
         */
        public Builder mode(String mode) {
            return mode(Output.of(mode));
        }

        /**
         * @param parameters The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
         * 
         * @return builder
         * 
         */
        public Builder parameters(@Nullable Output> parameters) {
            $.parameters = parameters;
            return this;
        }

        /**
         * @param parameters The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
         * 
         * @return builder
         * 
         */
        public Builder parameters(Map parameters) {
            return parameters(Output.of(parameters));
        }

        /**
         * @param policyDefinitionName The name of the policy definition to create.
         * 
         * @return builder
         * 
         */
        public Builder policyDefinitionName(@Nullable Output policyDefinitionName) {
            $.policyDefinitionName = policyDefinitionName;
            return this;
        }

        /**
         * @param policyDefinitionName The name of the policy definition to create.
         * 
         * @return builder
         * 
         */
        public Builder policyDefinitionName(String policyDefinitionName) {
            return policyDefinitionName(Output.of(policyDefinitionName));
        }

        /**
         * @param policyRule The policy rule.
         * 
         * @return builder
         * 
         */
        public Builder policyRule(@Nullable Output policyRule) {
            $.policyRule = policyRule;
            return this;
        }

        /**
         * @param policyRule The policy rule.
         * 
         * @return builder
         * 
         */
        public Builder policyRule(Object policyRule) {
            return policyRule(Output.of(policyRule));
        }

        /**
         * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
         * 
         * @return builder
         * 
         */
        public Builder policyType(@Nullable Output> policyType) {
            $.policyType = policyType;
            return this;
        }

        /**
         * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
         * 
         * @return builder
         * 
         */
        public Builder policyType(Either policyType) {
            return policyType(Output.of(policyType));
        }

        /**
         * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
         * 
         * @return builder
         * 
         */
        public Builder policyType(String policyType) {
            return policyType(Either.ofLeft(policyType));
        }

        /**
         * @param policyType The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
         * 
         * @return builder
         * 
         */
        public Builder policyType(PolicyType policyType) {
            return policyType(Either.ofRight(policyType));
        }

        public PolicyDefinitionAtManagementGroupArgs build() {
            if ($.managementGroupId == null) {
                throw new MissingRequiredPropertyException("PolicyDefinitionAtManagementGroupArgs", "managementGroupId");
            }
            $.mode = Codegen.stringProp("mode").output().arg($.mode).def("Indexed").getNullable();
            return $;
        }
    }

}