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

com.pulumi.azurenative.eventgrid.TopicArgs Maven / Gradle / Ivy

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

import com.pulumi.azurenative.eventgrid.enums.DataResidencyBoundary;
import com.pulumi.azurenative.eventgrid.enums.InputSchema;
import com.pulumi.azurenative.eventgrid.enums.PublicNetworkAccess;
import com.pulumi.azurenative.eventgrid.inputs.IdentityInfoArgs;
import com.pulumi.azurenative.eventgrid.inputs.InboundIpRuleArgs;
import com.pulumi.azurenative.eventgrid.inputs.JsonInputSchemaMappingArgs;
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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final TopicArgs Empty = new TopicArgs();

    /**
     * Data Residency Boundary of the resource.
     * 
     */
    @Import(name="dataResidencyBoundary")
    private @Nullable Output> dataResidencyBoundary;

    /**
     * @return Data Residency Boundary of the resource.
     * 
     */
    public Optional>> dataResidencyBoundary() {
        return Optional.ofNullable(this.dataResidencyBoundary);
    }

    /**
     * This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic.
     * 
     */
    @Import(name="disableLocalAuth")
    private @Nullable Output disableLocalAuth;

    /**
     * @return This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic.
     * 
     */
    public Optional> disableLocalAuth() {
        return Optional.ofNullable(this.disableLocalAuth);
    }

    /**
     * Identity information for the resource.
     * 
     */
    @Import(name="identity")
    private @Nullable Output identity;

    /**
     * @return Identity information for the resource.
     * 
     */
    public Optional> identity() {
        return Optional.ofNullable(this.identity);
    }

    /**
     * This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
     * 
     */
    @Import(name="inboundIpRules")
    private @Nullable Output> inboundIpRules;

    /**
     * @return This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
     * 
     */
    public Optional>> inboundIpRules() {
        return Optional.ofNullable(this.inboundIpRules);
    }

    /**
     * This determines the format that Event Grid should expect for incoming events published to the topic.
     * 
     */
    @Import(name="inputSchema")
    private @Nullable Output> inputSchema;

    /**
     * @return This determines the format that Event Grid should expect for incoming events published to the topic.
     * 
     */
    public Optional>> inputSchema() {
        return Optional.ofNullable(this.inputSchema);
    }

    /**
     * This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema.
     * 
     */
    @Import(name="inputSchemaMapping")
    private @Nullable Output inputSchemaMapping;

    /**
     * @return This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema.
     * 
     */
    public Optional> inputSchemaMapping() {
        return Optional.ofNullable(this.inputSchemaMapping);
    }

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

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

    /**
     * This determines if traffic is allowed over public network. By default it is enabled.
     * You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicProperties.InboundIpRules" />
     * 
     */
    @Import(name="publicNetworkAccess")
    private @Nullable Output> publicNetworkAccess;

    /**
     * @return This determines if traffic is allowed over public network. By default it is enabled.
     * You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicProperties.InboundIpRules" />
     * 
     */
    public Optional>> publicNetworkAccess() {
        return Optional.ofNullable(this.publicNetworkAccess);
    }

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

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

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

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

    /**
     * Name of the topic.
     * 
     */
    @Import(name="topicName")
    private @Nullable Output topicName;

    /**
     * @return Name of the topic.
     * 
     */
    public Optional> topicName() {
        return Optional.ofNullable(this.topicName);
    }

    private TopicArgs() {}

    private TopicArgs(TopicArgs $) {
        this.dataResidencyBoundary = $.dataResidencyBoundary;
        this.disableLocalAuth = $.disableLocalAuth;
        this.identity = $.identity;
        this.inboundIpRules = $.inboundIpRules;
        this.inputSchema = $.inputSchema;
        this.inputSchemaMapping = $.inputSchemaMapping;
        this.location = $.location;
        this.publicNetworkAccess = $.publicNetworkAccess;
        this.resourceGroupName = $.resourceGroupName;
        this.tags = $.tags;
        this.topicName = $.topicName;
    }

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

    public static final class Builder {
        private TopicArgs $;

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

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

        /**
         * @param dataResidencyBoundary Data Residency Boundary of the resource.
         * 
         * @return builder
         * 
         */
        public Builder dataResidencyBoundary(@Nullable Output> dataResidencyBoundary) {
            $.dataResidencyBoundary = dataResidencyBoundary;
            return this;
        }

        /**
         * @param dataResidencyBoundary Data Residency Boundary of the resource.
         * 
         * @return builder
         * 
         */
        public Builder dataResidencyBoundary(Either dataResidencyBoundary) {
            return dataResidencyBoundary(Output.of(dataResidencyBoundary));
        }

        /**
         * @param dataResidencyBoundary Data Residency Boundary of the resource.
         * 
         * @return builder
         * 
         */
        public Builder dataResidencyBoundary(String dataResidencyBoundary) {
            return dataResidencyBoundary(Either.ofLeft(dataResidencyBoundary));
        }

        /**
         * @param dataResidencyBoundary Data Residency Boundary of the resource.
         * 
         * @return builder
         * 
         */
        public Builder dataResidencyBoundary(DataResidencyBoundary dataResidencyBoundary) {
            return dataResidencyBoundary(Either.ofRight(dataResidencyBoundary));
        }

        /**
         * @param disableLocalAuth This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic.
         * 
         * @return builder
         * 
         */
        public Builder disableLocalAuth(@Nullable Output disableLocalAuth) {
            $.disableLocalAuth = disableLocalAuth;
            return this;
        }

        /**
         * @param disableLocalAuth This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic.
         * 
         * @return builder
         * 
         */
        public Builder disableLocalAuth(Boolean disableLocalAuth) {
            return disableLocalAuth(Output.of(disableLocalAuth));
        }

        /**
         * @param identity Identity information for the resource.
         * 
         * @return builder
         * 
         */
        public Builder identity(@Nullable Output identity) {
            $.identity = identity;
            return this;
        }

        /**
         * @param identity Identity information for the resource.
         * 
         * @return builder
         * 
         */
        public Builder identity(IdentityInfoArgs identity) {
            return identity(Output.of(identity));
        }

        /**
         * @param inboundIpRules This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
         * 
         * @return builder
         * 
         */
        public Builder inboundIpRules(@Nullable Output> inboundIpRules) {
            $.inboundIpRules = inboundIpRules;
            return this;
        }

        /**
         * @param inboundIpRules This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
         * 
         * @return builder
         * 
         */
        public Builder inboundIpRules(List inboundIpRules) {
            return inboundIpRules(Output.of(inboundIpRules));
        }

        /**
         * @param inboundIpRules This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
         * 
         * @return builder
         * 
         */
        public Builder inboundIpRules(InboundIpRuleArgs... inboundIpRules) {
            return inboundIpRules(List.of(inboundIpRules));
        }

        /**
         * @param inputSchema This determines the format that Event Grid should expect for incoming events published to the topic.
         * 
         * @return builder
         * 
         */
        public Builder inputSchema(@Nullable Output> inputSchema) {
            $.inputSchema = inputSchema;
            return this;
        }

        /**
         * @param inputSchema This determines the format that Event Grid should expect for incoming events published to the topic.
         * 
         * @return builder
         * 
         */
        public Builder inputSchema(Either inputSchema) {
            return inputSchema(Output.of(inputSchema));
        }

        /**
         * @param inputSchema This determines the format that Event Grid should expect for incoming events published to the topic.
         * 
         * @return builder
         * 
         */
        public Builder inputSchema(String inputSchema) {
            return inputSchema(Either.ofLeft(inputSchema));
        }

        /**
         * @param inputSchema This determines the format that Event Grid should expect for incoming events published to the topic.
         * 
         * @return builder
         * 
         */
        public Builder inputSchema(InputSchema inputSchema) {
            return inputSchema(Either.ofRight(inputSchema));
        }

        /**
         * @param inputSchemaMapping This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema.
         * 
         * @return builder
         * 
         */
        public Builder inputSchemaMapping(@Nullable Output inputSchemaMapping) {
            $.inputSchemaMapping = inputSchemaMapping;
            return this;
        }

        /**
         * @param inputSchemaMapping This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema.
         * 
         * @return builder
         * 
         */
        public Builder inputSchemaMapping(JsonInputSchemaMappingArgs inputSchemaMapping) {
            return inputSchemaMapping(Output.of(inputSchemaMapping));
        }

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

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

        /**
         * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled.
         * You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicProperties.InboundIpRules" />
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(@Nullable Output> publicNetworkAccess) {
            $.publicNetworkAccess = publicNetworkAccess;
            return this;
        }

        /**
         * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled.
         * You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicProperties.InboundIpRules" />
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(Either publicNetworkAccess) {
            return publicNetworkAccess(Output.of(publicNetworkAccess));
        }

        /**
         * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled.
         * You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicProperties.InboundIpRules" />
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(String publicNetworkAccess) {
            return publicNetworkAccess(Either.ofLeft(publicNetworkAccess));
        }

        /**
         * @param publicNetworkAccess This determines if traffic is allowed over public network. By default it is enabled.
         * You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicProperties.InboundIpRules" />
         * 
         * @return builder
         * 
         */
        public Builder publicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
            return publicNetworkAccess(Either.ofRight(publicNetworkAccess));
        }

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

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

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

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

        /**
         * @param topicName Name of the topic.
         * 
         * @return builder
         * 
         */
        public Builder topicName(@Nullable Output topicName) {
            $.topicName = topicName;
            return this;
        }

        /**
         * @param topicName Name of the topic.
         * 
         * @return builder
         * 
         */
        public Builder topicName(String topicName) {
            return topicName(Output.of(topicName));
        }

        public TopicArgs build() {
            $.disableLocalAuth = Codegen.booleanProp("disableLocalAuth").output().arg($.disableLocalAuth).def(false).getNullable();
            $.inputSchema = Codegen.stringProp("inputSchema").left(InputSchema.class).output().arg($.inputSchema).def("EventGridSchema").getNullable();
            $.publicNetworkAccess = Codegen.stringProp("publicNetworkAccess").left(PublicNetworkAccess.class).output().arg($.publicNetworkAccess).def("Enabled").getNullable();
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("TopicArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy