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

com.pulumi.googlenative.pubsub.v1beta1a.SubscriptionArgs 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.googlenative.pubsub.v1beta1a;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.googlenative.pubsub.v1beta1a.inputs.PushConfigArgs;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SubscriptionArgs Empty = new SubscriptionArgs();

    /**
     * For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
     * 
     */
    @Import(name="ackDeadlineSeconds")
    private @Nullable Output ackDeadlineSeconds;

    /**
     * @return For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
     * 
     */
    public Optional> ackDeadlineSeconds() {
        return Optional.ofNullable(this.ackDeadlineSeconds);
    }

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

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

    /**
     * If push delivery is used with this subscription, this field is used to configure it.
     * 
     */
    @Import(name="pushConfig")
    private @Nullable Output pushConfig;

    /**
     * @return If push delivery is used with this subscription, this field is used to configure it.
     * 
     */
    public Optional> pushConfig() {
        return Optional.ofNullable(this.pushConfig);
    }

    /**
     * The name of the topic from which this subscription is receiving messages.
     * 
     */
    @Import(name="topic")
    private @Nullable Output topic;

    /**
     * @return The name of the topic from which this subscription is receiving messages.
     * 
     */
    public Optional> topic() {
        return Optional.ofNullable(this.topic);
    }

    private SubscriptionArgs() {}

    private SubscriptionArgs(SubscriptionArgs $) {
        this.ackDeadlineSeconds = $.ackDeadlineSeconds;
        this.name = $.name;
        this.pushConfig = $.pushConfig;
        this.topic = $.topic;
    }

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

    public static final class Builder {
        private SubscriptionArgs $;

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

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

        /**
         * @param ackDeadlineSeconds For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
         * 
         * @return builder
         * 
         */
        public Builder ackDeadlineSeconds(@Nullable Output ackDeadlineSeconds) {
            $.ackDeadlineSeconds = ackDeadlineSeconds;
            return this;
        }

        /**
         * @param ackDeadlineSeconds For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).
         * 
         * @return builder
         * 
         */
        public Builder ackDeadlineSeconds(Integer ackDeadlineSeconds) {
            return ackDeadlineSeconds(Output.of(ackDeadlineSeconds));
        }

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

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

        /**
         * @param pushConfig If push delivery is used with this subscription, this field is used to configure it.
         * 
         * @return builder
         * 
         */
        public Builder pushConfig(@Nullable Output pushConfig) {
            $.pushConfig = pushConfig;
            return this;
        }

        /**
         * @param pushConfig If push delivery is used with this subscription, this field is used to configure it.
         * 
         * @return builder
         * 
         */
        public Builder pushConfig(PushConfigArgs pushConfig) {
            return pushConfig(Output.of(pushConfig));
        }

        /**
         * @param topic The name of the topic from which this subscription is receiving messages.
         * 
         * @return builder
         * 
         */
        public Builder topic(@Nullable Output topic) {
            $.topic = topic;
            return this;
        }

        /**
         * @param topic The name of the topic from which this subscription is receiving messages.
         * 
         * @return builder
         * 
         */
        public Builder topic(String topic) {
            return topic(Output.of(topic));
        }

        public SubscriptionArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy