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

com.pulumi.azurenative.iotoperationsmq.inputs.ResourceInfoDefinitionArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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.iotoperationsmq.inputs;

import com.pulumi.azurenative.iotoperationsmq.enums.ResourceInfoDefinitionMethods;
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.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * ResourceInfoDefinition properties of Basic Rule. This defines the objects that represent the actions or topics, such as - method.Connect, method.Publish, etc.
 * 
 */
public final class ResourceInfoDefinitionArgs extends com.pulumi.resources.ResourceArgs {

    public static final ResourceInfoDefinitionArgs Empty = new ResourceInfoDefinitionArgs();

    /**
     * The type of action that the clients can perform on the broker: Connect, Publish or Subscribe.
     * 
     */
    @Import(name="method", required=true)
    private Output> method;

    /**
     * @return The type of action that the clients can perform on the broker: Connect, Publish or Subscribe.
     * 
     */
    public Output> method() {
        return this.method;
    }

    /**
     * A list of topics or topic patterns that match the topics that the clients can publish or subscribe to. This subfield is required if the method is Publish or Subscribe.
     * 
     */
    @Import(name="topics")
    private @Nullable Output> topics;

    /**
     * @return A list of topics or topic patterns that match the topics that the clients can publish or subscribe to. This subfield is required if the method is Publish or Subscribe.
     * 
     */
    public Optional>> topics() {
        return Optional.ofNullable(this.topics);
    }

    private ResourceInfoDefinitionArgs() {}

    private ResourceInfoDefinitionArgs(ResourceInfoDefinitionArgs $) {
        this.method = $.method;
        this.topics = $.topics;
    }

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

    public static final class Builder {
        private ResourceInfoDefinitionArgs $;

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

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

        /**
         * @param method The type of action that the clients can perform on the broker: Connect, Publish or Subscribe.
         * 
         * @return builder
         * 
         */
        public Builder method(Output> method) {
            $.method = method;
            return this;
        }

        /**
         * @param method The type of action that the clients can perform on the broker: Connect, Publish or Subscribe.
         * 
         * @return builder
         * 
         */
        public Builder method(Either method) {
            return method(Output.of(method));
        }

        /**
         * @param method The type of action that the clients can perform on the broker: Connect, Publish or Subscribe.
         * 
         * @return builder
         * 
         */
        public Builder method(String method) {
            return method(Either.ofLeft(method));
        }

        /**
         * @param method The type of action that the clients can perform on the broker: Connect, Publish or Subscribe.
         * 
         * @return builder
         * 
         */
        public Builder method(ResourceInfoDefinitionMethods method) {
            return method(Either.ofRight(method));
        }

        /**
         * @param topics A list of topics or topic patterns that match the topics that the clients can publish or subscribe to. This subfield is required if the method is Publish or Subscribe.
         * 
         * @return builder
         * 
         */
        public Builder topics(@Nullable Output> topics) {
            $.topics = topics;
            return this;
        }

        /**
         * @param topics A list of topics or topic patterns that match the topics that the clients can publish or subscribe to. This subfield is required if the method is Publish or Subscribe.
         * 
         * @return builder
         * 
         */
        public Builder topics(List topics) {
            return topics(Output.of(topics));
        }

        /**
         * @param topics A list of topics or topic patterns that match the topics that the clients can publish or subscribe to. This subfield is required if the method is Publish or Subscribe.
         * 
         * @return builder
         * 
         */
        public Builder topics(String... topics) {
            return topics(List.of(topics));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy