// *** 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.gcp.monitoring.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AlertPolicyConditionConditionMatchedLogArgs Empty = new AlertPolicyConditionConditionMatchedLogArgs();

    /**
     * A logs-based filter.
     * 
     */
    @Import(name="filter", required=true)
    private Output<String> filter;

    /**
     * @return A logs-based filter.
     * 
     */
    public Output<String> filter() {
        return this.filter;
    }

    /**
     * A map from a label key to an extractor expression, which is used to
     * extract the value for this label key. Each entry in this map is
     * a specification for how data should be extracted from log entries that
     * match filter. Each combination of extracted values is treated as
     * a separate rule for the purposes of triggering notifications.
     * Label keys and corresponding values can be used in notifications
     * generated by this condition.
     * 
     */
    @Import(name="labelExtractors")
    private @Nullable Output<Map<String,String>> labelExtractors;

    /**
     * @return A map from a label key to an extractor expression, which is used to
     * extract the value for this label key. Each entry in this map is
     * a specification for how data should be extracted from log entries that
     * match filter. Each combination of extracted values is treated as
     * a separate rule for the purposes of triggering notifications.
     * Label keys and corresponding values can be used in notifications
     * generated by this condition.
     * 
     */
    public Optional<Output<Map<String,String>>> labelExtractors() {
        return Optional.ofNullable(this.labelExtractors);
    }

    private AlertPolicyConditionConditionMatchedLogArgs() {}

    private AlertPolicyConditionConditionMatchedLogArgs(AlertPolicyConditionConditionMatchedLogArgs $) {
        this.filter = $.filter;
        this.labelExtractors = $.labelExtractors;
    }

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

    public static final class Builder {
        private AlertPolicyConditionConditionMatchedLogArgs $;

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

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

        /**
         * @param filter A logs-based filter.
         * 
         * @return builder
         * 
         */
        public Builder filter(Output<String> filter) {
            $.filter = filter;
            return this;
        }

        /**
         * @param filter A logs-based filter.
         * 
         * @return builder
         * 
         */
        public Builder filter(String filter) {
            return filter(Output.of(filter));
        }

        /**
         * @param labelExtractors A map from a label key to an extractor expression, which is used to
         * extract the value for this label key. Each entry in this map is
         * a specification for how data should be extracted from log entries that
         * match filter. Each combination of extracted values is treated as
         * a separate rule for the purposes of triggering notifications.
         * Label keys and corresponding values can be used in notifications
         * generated by this condition.
         * 
         * @return builder
         * 
         */
        public Builder labelExtractors(@Nullable Output<Map<String,String>> labelExtractors) {
            $.labelExtractors = labelExtractors;
            return this;
        }

        /**
         * @param labelExtractors A map from a label key to an extractor expression, which is used to
         * extract the value for this label key. Each entry in this map is
         * a specification for how data should be extracted from log entries that
         * match filter. Each combination of extracted values is treated as
         * a separate rule for the purposes of triggering notifications.
         * Label keys and corresponding values can be used in notifications
         * generated by this condition.
         * 
         * @return builder
         * 
         */
        public Builder labelExtractors(Map<String,String> labelExtractors) {
            return labelExtractors(Output.of(labelExtractors));
        }

        public AlertPolicyConditionConditionMatchedLogArgs build() {
            $.filter = Objects.requireNonNull($.filter, "expected parameter 'filter' to be non-null");
            return $;
        }
    }

}
