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

com.pulumi.azure.eventhub.SubscriptionRuleArgs Maven / Gradle / Ivy

// *** 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.azure.eventhub;

import com.pulumi.azure.eventhub.inputs.SubscriptionRuleCorrelationFilterArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SubscriptionRuleArgs Empty = new SubscriptionRuleArgs();

    /**
     * Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
     * 
     */
    @Import(name="action")
    private @Nullable Output action;

    /**
     * @return Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
     * 
     */
    public Optional> action() {
        return Optional.ofNullable(this.action);
    }

    /**
     * A `correlation_filter` block as documented below to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `CorrelationFilter`.
     * 
     */
    @Import(name="correlationFilter")
    private @Nullable Output correlationFilter;

    /**
     * @return A `correlation_filter` block as documented below to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `CorrelationFilter`.
     * 
     */
    public Optional> correlationFilter() {
        return Optional.ofNullable(this.correlationFilter);
    }

    /**
     * Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
     * 
     */
    @Import(name="filterType", required=true)
    private Output filterType;

    /**
     * @return Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
     * 
     */
    public Output filterType() {
        return this.filterType;
    }

    /**
     * Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`.
     * 
     */
    @Import(name="sqlFilter")
    private @Nullable Output sqlFilter;

    /**
     * @return Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`.
     * 
     */
    public Optional> sqlFilter() {
        return Optional.ofNullable(this.sqlFilter);
    }

    /**
     * The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="subscriptionId", required=true)
    private Output subscriptionId;

    /**
     * @return The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
     * 
     */
    public Output subscriptionId() {
        return this.subscriptionId;
    }

    private SubscriptionRuleArgs() {}

    private SubscriptionRuleArgs(SubscriptionRuleArgs $) {
        this.action = $.action;
        this.correlationFilter = $.correlationFilter;
        this.filterType = $.filterType;
        this.name = $.name;
        this.sqlFilter = $.sqlFilter;
        this.subscriptionId = $.subscriptionId;
    }

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

    public static final class Builder {
        private SubscriptionRuleArgs $;

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

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

        /**
         * @param action Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
         * 
         * @return builder
         * 
         */
        public Builder action(@Nullable Output action) {
            $.action = action;
            return this;
        }

        /**
         * @param action Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
         * 
         * @return builder
         * 
         */
        public Builder action(String action) {
            return action(Output.of(action));
        }

        /**
         * @param correlationFilter A `correlation_filter` block as documented below to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `CorrelationFilter`.
         * 
         * @return builder
         * 
         */
        public Builder correlationFilter(@Nullable Output correlationFilter) {
            $.correlationFilter = correlationFilter;
            return this;
        }

        /**
         * @param correlationFilter A `correlation_filter` block as documented below to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `CorrelationFilter`.
         * 
         * @return builder
         * 
         */
        public Builder correlationFilter(SubscriptionRuleCorrelationFilterArgs correlationFilter) {
            return correlationFilter(Output.of(correlationFilter));
        }

        /**
         * @param filterType Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
         * 
         * @return builder
         * 
         */
        public Builder filterType(Output filterType) {
            $.filterType = filterType;
            return this;
        }

        /**
         * @param filterType Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
         * 
         * @return builder
         * 
         */
        public Builder filterType(String filterType) {
            return filterType(Output.of(filterType));
        }

        /**
         * @param name Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param sqlFilter Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`.
         * 
         * @return builder
         * 
         */
        public Builder sqlFilter(@Nullable Output sqlFilter) {
            $.sqlFilter = sqlFilter;
            return this;
        }

        /**
         * @param sqlFilter Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filter_type` is set to `SqlFilter`.
         * 
         * @return builder
         * 
         */
        public Builder sqlFilter(String sqlFilter) {
            return sqlFilter(Output.of(sqlFilter));
        }

        /**
         * @param subscriptionId The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionId(Output subscriptionId) {
            $.subscriptionId = subscriptionId;
            return this;
        }

        /**
         * @param subscriptionId The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionId(String subscriptionId) {
            return subscriptionId(Output.of(subscriptionId));
        }

        public SubscriptionRuleArgs build() {
            if ($.filterType == null) {
                throw new MissingRequiredPropertyException("SubscriptionRuleArgs", "filterType");
            }
            if ($.subscriptionId == null) {
                throw new MissingRequiredPropertyException("SubscriptionRuleArgs", "subscriptionId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy