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

com.pulumi.azurenative.devtestlab.PolicyArgs Maven / Gradle / Ivy

There is a newer version: 2.82.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.devtestlab;

import com.pulumi.azurenative.devtestlab.enums.PolicyEvaluatorType;
import com.pulumi.azurenative.devtestlab.enums.PolicyFactName;
import com.pulumi.azurenative.devtestlab.enums.PolicyStatus;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PolicyArgs Empty = new PolicyArgs();

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

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

    /**
     * The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).
     * 
     */
    @Import(name="evaluatorType")
    private @Nullable Output> evaluatorType;

    /**
     * @return The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).
     * 
     */
    public Optional>> evaluatorType() {
        return Optional.ofNullable(this.evaluatorType);
    }

    /**
     * The fact data of the policy.
     * 
     */
    @Import(name="factData")
    private @Nullable Output factData;

    /**
     * @return The fact data of the policy.
     * 
     */
    public Optional> factData() {
        return Optional.ofNullable(this.factData);
    }

    /**
     * The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.
     * 
     */
    @Import(name="factName")
    private @Nullable Output> factName;

    /**
     * @return The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.
     * 
     */
    public Optional>> factName() {
        return Optional.ofNullable(this.factName);
    }

    /**
     * The name of the lab.
     * 
     */
    @Import(name="labName", required=true)
    private Output labName;

    /**
     * @return The name of the lab.
     * 
     */
    public Output labName() {
        return this.labName;
    }

    /**
     * The location of the resource.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The location of the resource.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

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

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

    /**
     * The name of the policy set.
     * 
     */
    @Import(name="policySetName", required=true)
    private Output policySetName;

    /**
     * @return The name of the policy set.
     * 
     */
    public Output policySetName() {
        return this.policySetName;
    }

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

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The status of the policy.
     * 
     */
    @Import(name="status")
    private @Nullable Output> status;

    /**
     * @return The status of the policy.
     * 
     */
    public Optional>> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * The tags of the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return The tags of the resource.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
     * 
     */
    @Import(name="threshold")
    private @Nullable Output threshold;

    /**
     * @return The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
     * 
     */
    public Optional> threshold() {
        return Optional.ofNullable(this.threshold);
    }

    private PolicyArgs() {}

    private PolicyArgs(PolicyArgs $) {
        this.description = $.description;
        this.evaluatorType = $.evaluatorType;
        this.factData = $.factData;
        this.factName = $.factName;
        this.labName = $.labName;
        this.location = $.location;
        this.name = $.name;
        this.policySetName = $.policySetName;
        this.resourceGroupName = $.resourceGroupName;
        this.status = $.status;
        this.tags = $.tags;
        this.threshold = $.threshold;
    }

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

    public static final class Builder {
        private PolicyArgs $;

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

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

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

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

        /**
         * @param evaluatorType The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).
         * 
         * @return builder
         * 
         */
        public Builder evaluatorType(@Nullable Output> evaluatorType) {
            $.evaluatorType = evaluatorType;
            return this;
        }

        /**
         * @param evaluatorType The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).
         * 
         * @return builder
         * 
         */
        public Builder evaluatorType(Either evaluatorType) {
            return evaluatorType(Output.of(evaluatorType));
        }

        /**
         * @param evaluatorType The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).
         * 
         * @return builder
         * 
         */
        public Builder evaluatorType(String evaluatorType) {
            return evaluatorType(Either.ofLeft(evaluatorType));
        }

        /**
         * @param evaluatorType The evaluator type of the policy (i.e. AllowedValuesPolicy, MaxValuePolicy).
         * 
         * @return builder
         * 
         */
        public Builder evaluatorType(PolicyEvaluatorType evaluatorType) {
            return evaluatorType(Either.ofRight(evaluatorType));
        }

        /**
         * @param factData The fact data of the policy.
         * 
         * @return builder
         * 
         */
        public Builder factData(@Nullable Output factData) {
            $.factData = factData;
            return this;
        }

        /**
         * @param factData The fact data of the policy.
         * 
         * @return builder
         * 
         */
        public Builder factData(String factData) {
            return factData(Output.of(factData));
        }

        /**
         * @param factName The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.
         * 
         * @return builder
         * 
         */
        public Builder factName(@Nullable Output> factName) {
            $.factName = factName;
            return this;
        }

        /**
         * @param factName The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.
         * 
         * @return builder
         * 
         */
        public Builder factName(Either factName) {
            return factName(Output.of(factName));
        }

        /**
         * @param factName The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.
         * 
         * @return builder
         * 
         */
        public Builder factName(String factName) {
            return factName(Either.ofLeft(factName));
        }

        /**
         * @param factName The fact name of the policy (e.g. LabVmCount, LabVmSize, MaxVmsAllowedPerLab, etc.
         * 
         * @return builder
         * 
         */
        public Builder factName(PolicyFactName factName) {
            return factName(Either.ofRight(factName));
        }

        /**
         * @param labName The name of the lab.
         * 
         * @return builder
         * 
         */
        public Builder labName(Output labName) {
            $.labName = labName;
            return this;
        }

        /**
         * @param labName The name of the lab.
         * 
         * @return builder
         * 
         */
        public Builder labName(String labName) {
            return labName(Output.of(labName));
        }

        /**
         * @param location The location of the resource.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

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

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

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

        /**
         * @param policySetName The name of the policy set.
         * 
         * @return builder
         * 
         */
        public Builder policySetName(Output policySetName) {
            $.policySetName = policySetName;
            return this;
        }

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

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param status The status of the policy.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output> status) {
            $.status = status;
            return this;
        }

        /**
         * @param status The status of the policy.
         * 
         * @return builder
         * 
         */
        public Builder status(Either status) {
            return status(Output.of(status));
        }

        /**
         * @param status The status of the policy.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Either.ofLeft(status));
        }

        /**
         * @param status The status of the policy.
         * 
         * @return builder
         * 
         */
        public Builder status(PolicyStatus status) {
            return status(Either.ofRight(status));
        }

        /**
         * @param tags The tags of the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags The tags of the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param threshold The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
         * 
         * @return builder
         * 
         */
        public Builder threshold(@Nullable Output threshold) {
            $.threshold = threshold;
            return this;
        }

        /**
         * @param threshold The threshold of the policy (i.e. a number for MaxValuePolicy, and a JSON array of values for AllowedValuesPolicy).
         * 
         * @return builder
         * 
         */
        public Builder threshold(String threshold) {
            return threshold(Output.of(threshold));
        }

        public PolicyArgs build() {
            if ($.labName == null) {
                throw new MissingRequiredPropertyException("PolicyArgs", "labName");
            }
            if ($.policySetName == null) {
                throw new MissingRequiredPropertyException("PolicyArgs", "policySetName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("PolicyArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy