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

com.pulumi.azurenative.insights.inputs.MetricSettingsArgs Maven / Gradle / Ivy

There is a newer version: 2.82.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.azurenative.insights.inputs.RetentionPolicyArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric.
 * 
 */
public final class MetricSettingsArgs extends com.pulumi.resources.ResourceArgs {

    public static final MetricSettingsArgs Empty = new MetricSettingsArgs();

    /**
     * Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
     * 
     */
    @Import(name="category")
    private @Nullable Output category;

    /**
     * @return Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
     * 
     */
    public Optional> category() {
        return Optional.ofNullable(this.category);
    }

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

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

    /**
     * the retention policy for this category.
     * 
     */
    @Import(name="retentionPolicy")
    private @Nullable Output retentionPolicy;

    /**
     * @return the retention policy for this category.
     * 
     */
    public Optional> retentionPolicy() {
        return Optional.ofNullable(this.retentionPolicy);
    }

    /**
     * the timegrain of the metric in ISO8601 format.
     * 
     */
    @Import(name="timeGrain")
    private @Nullable Output timeGrain;

    /**
     * @return the timegrain of the metric in ISO8601 format.
     * 
     */
    public Optional> timeGrain() {
        return Optional.ofNullable(this.timeGrain);
    }

    private MetricSettingsArgs() {}

    private MetricSettingsArgs(MetricSettingsArgs $) {
        this.category = $.category;
        this.enabled = $.enabled;
        this.retentionPolicy = $.retentionPolicy;
        this.timeGrain = $.timeGrain;
    }

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

    public static final class Builder {
        private MetricSettingsArgs $;

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

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

        /**
         * @param category Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
         * 
         * @return builder
         * 
         */
        public Builder category(@Nullable Output category) {
            $.category = category;
            return this;
        }

        /**
         * @param category Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
         * 
         * @return builder
         * 
         */
        public Builder category(String category) {
            return category(Output.of(category));
        }

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

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

        /**
         * @param retentionPolicy the retention policy for this category.
         * 
         * @return builder
         * 
         */
        public Builder retentionPolicy(@Nullable Output retentionPolicy) {
            $.retentionPolicy = retentionPolicy;
            return this;
        }

        /**
         * @param retentionPolicy the retention policy for this category.
         * 
         * @return builder
         * 
         */
        public Builder retentionPolicy(RetentionPolicyArgs retentionPolicy) {
            return retentionPolicy(Output.of(retentionPolicy));
        }

        /**
         * @param timeGrain the timegrain of the metric in ISO8601 format.
         * 
         * @return builder
         * 
         */
        public Builder timeGrain(@Nullable Output timeGrain) {
            $.timeGrain = timeGrain;
            return this;
        }

        /**
         * @param timeGrain the timegrain of the metric in ISO8601 format.
         * 
         * @return builder
         * 
         */
        public Builder timeGrain(String timeGrain) {
            return timeGrain(Output.of(timeGrain));
        }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy