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

com.pulumi.azurenative.iotoperations.inputs.SubscriberQueueLimitArgs 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.azurenative.iotoperations.inputs;

import com.pulumi.azurenative.iotoperations.enums.SubscriberMessageDropStrategy;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.Double;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The settings of Subscriber Queue Limit.
 * 
 */
public final class SubscriberQueueLimitArgs extends com.pulumi.resources.ResourceArgs {

    public static final SubscriberQueueLimitArgs Empty = new SubscriberQueueLimitArgs();

    /**
     * The maximum length of the queue before messages start getting dropped.
     * 
     */
    @Import(name="length")
    private @Nullable Output length;

    /**
     * @return The maximum length of the queue before messages start getting dropped.
     * 
     */
    public Optional> length() {
        return Optional.ofNullable(this.length);
    }

    /**
     * The strategy to use for dropping messages from the queue.
     * 
     */
    @Import(name="strategy")
    private @Nullable Output> strategy;

    /**
     * @return The strategy to use for dropping messages from the queue.
     * 
     */
    public Optional>> strategy() {
        return Optional.ofNullable(this.strategy);
    }

    private SubscriberQueueLimitArgs() {}

    private SubscriberQueueLimitArgs(SubscriberQueueLimitArgs $) {
        this.length = $.length;
        this.strategy = $.strategy;
    }

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

    public static final class Builder {
        private SubscriberQueueLimitArgs $;

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

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

        /**
         * @param length The maximum length of the queue before messages start getting dropped.
         * 
         * @return builder
         * 
         */
        public Builder length(@Nullable Output length) {
            $.length = length;
            return this;
        }

        /**
         * @param length The maximum length of the queue before messages start getting dropped.
         * 
         * @return builder
         * 
         */
        public Builder length(Double length) {
            return length(Output.of(length));
        }

        /**
         * @param strategy The strategy to use for dropping messages from the queue.
         * 
         * @return builder
         * 
         */
        public Builder strategy(@Nullable Output> strategy) {
            $.strategy = strategy;
            return this;
        }

        /**
         * @param strategy The strategy to use for dropping messages from the queue.
         * 
         * @return builder
         * 
         */
        public Builder strategy(Either strategy) {
            return strategy(Output.of(strategy));
        }

        /**
         * @param strategy The strategy to use for dropping messages from the queue.
         * 
         * @return builder
         * 
         */
        public Builder strategy(String strategy) {
            return strategy(Either.ofLeft(strategy));
        }

        /**
         * @param strategy The strategy to use for dropping messages from the queue.
         * 
         * @return builder
         * 
         */
        public Builder strategy(SubscriberMessageDropStrategy strategy) {
            return strategy(Either.ofRight(strategy));
        }

        public SubscriberQueueLimitArgs build() {
            $.strategy = Codegen.stringProp("strategy").left(SubscriberMessageDropStrategy.class).output().arg($.strategy).def("None").getNullable();
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy