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

com.pulumi.azurenative.insights.inputs.RetentionPolicyArgs 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.insights.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.util.Objects;


/**
 * Specifies the retention policy for the log.
 * 
 */
public final class RetentionPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final RetentionPolicyArgs Empty = new RetentionPolicyArgs();

    /**
     * the number of days for the retention in days. A value of 0 will retain the events indefinitely.
     * 
     */
    @Import(name="days", required=true)
    private Output days;

    /**
     * @return the number of days for the retention in days. A value of 0 will retain the events indefinitely.
     * 
     */
    public Output days() {
        return this.days;
    }

    /**
     * a value indicating whether the retention policy is enabled.
     * 
     */
    @Import(name="enabled", required=true)
    private Output enabled;

    /**
     * @return a value indicating whether the retention policy is enabled.
     * 
     */
    public Output enabled() {
        return this.enabled;
    }

    private RetentionPolicyArgs() {}

    private RetentionPolicyArgs(RetentionPolicyArgs $) {
        this.days = $.days;
        this.enabled = $.enabled;
    }

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

    public static final class Builder {
        private RetentionPolicyArgs $;

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

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

        /**
         * @param days the number of days for the retention in days. A value of 0 will retain the events indefinitely.
         * 
         * @return builder
         * 
         */
        public Builder days(Output days) {
            $.days = days;
            return this;
        }

        /**
         * @param days the number of days for the retention in days. A value of 0 will retain the events indefinitely.
         * 
         * @return builder
         * 
         */
        public Builder days(Integer days) {
            return days(Output.of(days));
        }

        /**
         * @param enabled a value indicating whether the retention policy is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled a value indicating whether the retention policy is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        public RetentionPolicyArgs build() {
            if ($.days == null) {
                throw new MissingRequiredPropertyException("RetentionPolicyArgs", "days");
            }
            if ($.enabled == null) {
                throw new MissingRequiredPropertyException("RetentionPolicyArgs", "enabled");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy