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

com.pulumi.rabbitmq.inputs.PolicyPolicyArgs 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.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Objects;


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

    public static final PolicyPolicyArgs Empty = new PolicyPolicyArgs();

    /**
     * Can either be "exchanges", "queues", or "all".
     * 
     */
    @Import(name="applyTo", required=true)
    private Output applyTo;

    /**
     * @return Can either be "exchanges", "queues", or "all".
     * 
     */
    public Output applyTo() {
        return this.applyTo;
    }

    /**
     * Key/value pairs of the policy definition. See the
     * RabbitMQ documentation for definition references and examples.
     * 
     */
    @Import(name="definition", required=true)
    private Output> definition;

    /**
     * @return Key/value pairs of the policy definition. See the
     * RabbitMQ documentation for definition references and examples.
     * 
     */
    public Output> definition() {
        return this.definition;
    }

    /**
     * A pattern to match an exchange or queue name.
     * 
     */
    @Import(name="pattern", required=true)
    private Output pattern;

    /**
     * @return A pattern to match an exchange or queue name.
     * 
     */
    public Output pattern() {
        return this.pattern;
    }

    /**
     * The policy with the greater priority is applied first.
     * 
     */
    @Import(name="priority", required=true)
    private Output priority;

    /**
     * @return The policy with the greater priority is applied first.
     * 
     */
    public Output priority() {
        return this.priority;
    }

    private PolicyPolicyArgs() {}

    private PolicyPolicyArgs(PolicyPolicyArgs $) {
        this.applyTo = $.applyTo;
        this.definition = $.definition;
        this.pattern = $.pattern;
        this.priority = $.priority;
    }

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

    public static final class Builder {
        private PolicyPolicyArgs $;

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

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

        /**
         * @param applyTo Can either be "exchanges", "queues", or "all".
         * 
         * @return builder
         * 
         */
        public Builder applyTo(Output applyTo) {
            $.applyTo = applyTo;
            return this;
        }

        /**
         * @param applyTo Can either be "exchanges", "queues", or "all".
         * 
         * @return builder
         * 
         */
        public Builder applyTo(String applyTo) {
            return applyTo(Output.of(applyTo));
        }

        /**
         * @param definition Key/value pairs of the policy definition. See the
         * RabbitMQ documentation for definition references and examples.
         * 
         * @return builder
         * 
         */
        public Builder definition(Output> definition) {
            $.definition = definition;
            return this;
        }

        /**
         * @param definition Key/value pairs of the policy definition. See the
         * RabbitMQ documentation for definition references and examples.
         * 
         * @return builder
         * 
         */
        public Builder definition(Map definition) {
            return definition(Output.of(definition));
        }

        /**
         * @param pattern A pattern to match an exchange or queue name.
         * 
         * @return builder
         * 
         */
        public Builder pattern(Output pattern) {
            $.pattern = pattern;
            return this;
        }

        /**
         * @param pattern A pattern to match an exchange or queue name.
         * 
         * @return builder
         * 
         */
        public Builder pattern(String pattern) {
            return pattern(Output.of(pattern));
        }

        /**
         * @param priority The policy with the greater priority is applied first.
         * 
         * @return builder
         * 
         */
        public Builder priority(Output priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority The policy with the greater priority is applied first.
         * 
         * @return builder
         * 
         */
        public Builder priority(Integer priority) {
            return priority(Output.of(priority));
        }

        public PolicyPolicyArgs build() {
            if ($.applyTo == null) {
                throw new MissingRequiredPropertyException("PolicyPolicyArgs", "applyTo");
            }
            if ($.definition == null) {
                throw new MissingRequiredPropertyException("PolicyPolicyArgs", "definition");
            }
            if ($.pattern == null) {
                throw new MissingRequiredPropertyException("PolicyPolicyArgs", "pattern");
            }
            if ($.priority == null) {
                throw new MissingRequiredPropertyException("PolicyPolicyArgs", "priority");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy