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

com.pulumi.azurenative.insights.outputs.ManagementEventRuleConditionResponse Maven / Gradle / Ivy

There is a newer version: 2.72.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.outputs;

import com.pulumi.azurenative.insights.outputs.ManagementEventAggregationConditionResponse;
import com.pulumi.azurenative.insights.outputs.RuleManagementEventDataSourceResponse;
import com.pulumi.azurenative.insights.outputs.RuleMetricDataSourceResponse;
import com.pulumi.core.Either;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ManagementEventRuleConditionResponse {
    /**
     * @return How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
     * 
     */
    private @Nullable ManagementEventAggregationConditionResponse aggregation;
    /**
     * @return the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
     * 
     */
    private @Nullable Either dataSource;
    /**
     * @return specifies the type of condition. This can be one of three types: ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition (based on the number of failures of a web test), and ThresholdRuleCondition (based on the threshold of a metric).
     * Expected value is 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition'.
     * 
     */
    private String odataType;

    private ManagementEventRuleConditionResponse() {}
    /**
     * @return How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate.
     * 
     */
    public Optional aggregation() {
        return Optional.ofNullable(this.aggregation);
    }
    /**
     * @return the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
     * 
     */
    public Optional> dataSource() {
        return Optional.ofNullable(this.dataSource);
    }
    /**
     * @return specifies the type of condition. This can be one of three types: ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition (based on the number of failures of a web test), and ThresholdRuleCondition (based on the threshold of a metric).
     * Expected value is 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition'.
     * 
     */
    public String odataType() {
        return this.odataType;
    }

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

    public static Builder builder(ManagementEventRuleConditionResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable ManagementEventAggregationConditionResponse aggregation;
        private @Nullable Either dataSource;
        private String odataType;
        public Builder() {}
        public Builder(ManagementEventRuleConditionResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.aggregation = defaults.aggregation;
    	      this.dataSource = defaults.dataSource;
    	      this.odataType = defaults.odataType;
        }

        @CustomType.Setter
        public Builder aggregation(@Nullable ManagementEventAggregationConditionResponse aggregation) {

            this.aggregation = aggregation;
            return this;
        }
        @CustomType.Setter
        public Builder dataSource(@Nullable Either dataSource) {

            this.dataSource = dataSource;
            return this;
        }
        @CustomType.Setter
        public Builder odataType(String odataType) {
            if (odataType == null) {
              throw new MissingRequiredPropertyException("ManagementEventRuleConditionResponse", "odataType");
            }
            this.odataType = odataType;
            return this;
        }
        public ManagementEventRuleConditionResponse build() {
            final var _resultValue = new ManagementEventRuleConditionResponse();
            _resultValue.aggregation = aggregation;
            _resultValue.dataSource = dataSource;
            _resultValue.odataType = odataType;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy