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

com.pulumi.azure.webpubsub.HubArgs 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.webpubsub;

import com.pulumi.azure.webpubsub.inputs.HubEventHandlerArgs;
import com.pulumi.azure.webpubsub.inputs.HubEventListenerArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
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 HubArgs extends com.pulumi.resources.ResourceArgs {

    public static final HubArgs Empty = new HubArgs();

    /**
     * Is anonymous connections are allowed for this hub? Defaults to `false`.
     * Possible values are `true`, `false`.
     * 
     */
    @Import(name="anonymousConnectionsEnabled")
    private @Nullable Output anonymousConnectionsEnabled;

    /**
     * @return Is anonymous connections are allowed for this hub? Defaults to `false`.
     * Possible values are `true`, `false`.
     * 
     */
    public Optional> anonymousConnectionsEnabled() {
        return Optional.ofNullable(this.anonymousConnectionsEnabled);
    }

    /**
     * An `event_handler` block as defined below.
     * 
     * > **NOTE:** User can change the order of `event_handler` to change the priority accordingly.
     * 
     */
    @Import(name="eventHandlers")
    private @Nullable Output> eventHandlers;

    /**
     * @return An `event_handler` block as defined below.
     * 
     * > **NOTE:** User can change the order of `event_handler` to change the priority accordingly.
     * 
     */
    public Optional>> eventHandlers() {
        return Optional.ofNullable(this.eventHandlers);
    }

    /**
     * An `event_listener` block as defined below.
     * 
     * > **NOTE:**  The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub.
     * 
     */
    @Import(name="eventListeners")
    private @Nullable Output> eventListeners;

    /**
     * @return An `event_listener` block as defined below.
     * 
     * > **NOTE:**  The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub.
     * 
     */
    public Optional>> eventListeners() {
        return Optional.ofNullable(this.eventListeners);
    }

    /**
     * The name of the Web Pubsub hub service. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the Web Pubsub hub service. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Specifies the id of the Web Pubsub. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="webPubsubId", required=true)
    private Output webPubsubId;

    /**
     * @return Specifies the id of the Web Pubsub. Changing this forces a new resource to be created.
     * 
     */
    public Output webPubsubId() {
        return this.webPubsubId;
    }

    private HubArgs() {}

    private HubArgs(HubArgs $) {
        this.anonymousConnectionsEnabled = $.anonymousConnectionsEnabled;
        this.eventHandlers = $.eventHandlers;
        this.eventListeners = $.eventListeners;
        this.name = $.name;
        this.webPubsubId = $.webPubsubId;
    }

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

    public static final class Builder {
        private HubArgs $;

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

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

        /**
         * @param anonymousConnectionsEnabled Is anonymous connections are allowed for this hub? Defaults to `false`.
         * Possible values are `true`, `false`.
         * 
         * @return builder
         * 
         */
        public Builder anonymousConnectionsEnabled(@Nullable Output anonymousConnectionsEnabled) {
            $.anonymousConnectionsEnabled = anonymousConnectionsEnabled;
            return this;
        }

        /**
         * @param anonymousConnectionsEnabled Is anonymous connections are allowed for this hub? Defaults to `false`.
         * Possible values are `true`, `false`.
         * 
         * @return builder
         * 
         */
        public Builder anonymousConnectionsEnabled(Boolean anonymousConnectionsEnabled) {
            return anonymousConnectionsEnabled(Output.of(anonymousConnectionsEnabled));
        }

        /**
         * @param eventHandlers An `event_handler` block as defined below.
         * 
         * > **NOTE:** User can change the order of `event_handler` to change the priority accordingly.
         * 
         * @return builder
         * 
         */
        public Builder eventHandlers(@Nullable Output> eventHandlers) {
            $.eventHandlers = eventHandlers;
            return this;
        }

        /**
         * @param eventHandlers An `event_handler` block as defined below.
         * 
         * > **NOTE:** User can change the order of `event_handler` to change the priority accordingly.
         * 
         * @return builder
         * 
         */
        public Builder eventHandlers(List eventHandlers) {
            return eventHandlers(Output.of(eventHandlers));
        }

        /**
         * @param eventHandlers An `event_handler` block as defined below.
         * 
         * > **NOTE:** User can change the order of `event_handler` to change the priority accordingly.
         * 
         * @return builder
         * 
         */
        public Builder eventHandlers(HubEventHandlerArgs... eventHandlers) {
            return eventHandlers(List.of(eventHandlers));
        }

        /**
         * @param eventListeners An `event_listener` block as defined below.
         * 
         * > **NOTE:**  The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub.
         * 
         * @return builder
         * 
         */
        public Builder eventListeners(@Nullable Output> eventListeners) {
            $.eventListeners = eventListeners;
            return this;
        }

        /**
         * @param eventListeners An `event_listener` block as defined below.
         * 
         * > **NOTE:**  The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub.
         * 
         * @return builder
         * 
         */
        public Builder eventListeners(List eventListeners) {
            return eventListeners(Output.of(eventListeners));
        }

        /**
         * @param eventListeners An `event_listener` block as defined below.
         * 
         * > **NOTE:**  The managed identity of Web PubSub service must be enabled and the identity must have the "Azure Event Hubs Data sender" role to access the Event Hub.
         * 
         * @return builder
         * 
         */
        public Builder eventListeners(HubEventListenerArgs... eventListeners) {
            return eventListeners(List.of(eventListeners));
        }

        /**
         * @param name The name of the Web Pubsub hub service. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the Web Pubsub hub service. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param webPubsubId Specifies the id of the Web Pubsub. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder webPubsubId(Output webPubsubId) {
            $.webPubsubId = webPubsubId;
            return this;
        }

        /**
         * @param webPubsubId Specifies the id of the Web Pubsub. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder webPubsubId(String webPubsubId) {
            return webPubsubId(Output.of(webPubsubId));
        }

        public HubArgs build() {
            if ($.webPubsubId == null) {
                throw new MissingRequiredPropertyException("HubArgs", "webPubsubId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy