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

com.pulumi.azurenative.eventhub.inputs.RetentionDescriptionArgs Maven / Gradle / Ivy

The 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.eventhub.inputs;

import com.pulumi.azurenative.eventhub.enums.CleanupPolicyRetentionDescription;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Properties to configure retention settings for the  eventhub
 * 
 */
public final class RetentionDescriptionArgs extends com.pulumi.resources.ResourceArgs {

    public static final RetentionDescriptionArgs Empty = new RetentionDescriptionArgs();

    /**
     * Enumerates the possible values for cleanup policy
     * 
     */
    @Import(name="cleanupPolicy")
    private @Nullable Output> cleanupPolicy;

    /**
     * @return Enumerates the possible values for cleanup policy
     * 
     */
    public Optional>> cleanupPolicy() {
        return Optional.ofNullable(this.cleanupPolicy);
    }

    /**
     * Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue
     * 
     */
    @Import(name="retentionTimeInHours")
    private @Nullable Output retentionTimeInHours;

    /**
     * @return Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue
     * 
     */
    public Optional> retentionTimeInHours() {
        return Optional.ofNullable(this.retentionTimeInHours);
    }

    /**
     * Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub
     * 
     */
    @Import(name="tombstoneRetentionTimeInHours")
    private @Nullable Output tombstoneRetentionTimeInHours;

    /**
     * @return Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub
     * 
     */
    public Optional> tombstoneRetentionTimeInHours() {
        return Optional.ofNullable(this.tombstoneRetentionTimeInHours);
    }

    private RetentionDescriptionArgs() {}

    private RetentionDescriptionArgs(RetentionDescriptionArgs $) {
        this.cleanupPolicy = $.cleanupPolicy;
        this.retentionTimeInHours = $.retentionTimeInHours;
        this.tombstoneRetentionTimeInHours = $.tombstoneRetentionTimeInHours;
    }

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

    public static final class Builder {
        private RetentionDescriptionArgs $;

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

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

        /**
         * @param cleanupPolicy Enumerates the possible values for cleanup policy
         * 
         * @return builder
         * 
         */
        public Builder cleanupPolicy(@Nullable Output> cleanupPolicy) {
            $.cleanupPolicy = cleanupPolicy;
            return this;
        }

        /**
         * @param cleanupPolicy Enumerates the possible values for cleanup policy
         * 
         * @return builder
         * 
         */
        public Builder cleanupPolicy(Either cleanupPolicy) {
            return cleanupPolicy(Output.of(cleanupPolicy));
        }

        /**
         * @param cleanupPolicy Enumerates the possible values for cleanup policy
         * 
         * @return builder
         * 
         */
        public Builder cleanupPolicy(String cleanupPolicy) {
            return cleanupPolicy(Either.ofLeft(cleanupPolicy));
        }

        /**
         * @param cleanupPolicy Enumerates the possible values for cleanup policy
         * 
         * @return builder
         * 
         */
        public Builder cleanupPolicy(CleanupPolicyRetentionDescription cleanupPolicy) {
            return cleanupPolicy(Either.ofRight(cleanupPolicy));
        }

        /**
         * @param retentionTimeInHours Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue
         * 
         * @return builder
         * 
         */
        public Builder retentionTimeInHours(@Nullable Output retentionTimeInHours) {
            $.retentionTimeInHours = retentionTimeInHours;
            return this;
        }

        /**
         * @param retentionTimeInHours Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue
         * 
         * @return builder
         * 
         */
        public Builder retentionTimeInHours(Double retentionTimeInHours) {
            return retentionTimeInHours(Output.of(retentionTimeInHours));
        }

        /**
         * @param tombstoneRetentionTimeInHours Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub
         * 
         * @return builder
         * 
         */
        public Builder tombstoneRetentionTimeInHours(@Nullable Output tombstoneRetentionTimeInHours) {
            $.tombstoneRetentionTimeInHours = tombstoneRetentionTimeInHours;
            return this;
        }

        /**
         * @param tombstoneRetentionTimeInHours Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub
         * 
         * @return builder
         * 
         */
        public Builder tombstoneRetentionTimeInHours(Integer tombstoneRetentionTimeInHours) {
            return tombstoneRetentionTimeInHours(Output.of(tombstoneRetentionTimeInHours));
        }

        public RetentionDescriptionArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy