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

com.pulumi.kubernetes.autoscaling.v2.inputs.MetricIdentifierArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
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.kubernetes.autoscaling.v2.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.meta.v1.inputs.LabelSelectorArgs;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * MetricIdentifier defines the name and optionally selector for a metric
 * 
 */
public final class MetricIdentifierArgs extends com.pulumi.resources.ResourceArgs {

    public static final MetricIdentifierArgs Empty = new MetricIdentifierArgs();

    /**
     * name is the name of the given metric
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return name is the name of the given metric
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
     * 
     */
    @Import(name="selector")
    private @Nullable Output selector;

    /**
     * @return selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
     * 
     */
    public Optional> selector() {
        return Optional.ofNullable(this.selector);
    }

    private MetricIdentifierArgs() {}

    private MetricIdentifierArgs(MetricIdentifierArgs $) {
        this.name = $.name;
        this.selector = $.selector;
    }

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

    public static final class Builder {
        private MetricIdentifierArgs $;

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

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

        /**
         * @param name name is the name of the given metric
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name name is the name of the given metric
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param selector selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
         * 
         * @return builder
         * 
         */
        public Builder selector(@Nullable Output selector) {
            $.selector = selector;
            return this;
        }

        /**
         * @param selector selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
         * 
         * @return builder
         * 
         */
        public Builder selector(LabelSelectorArgs selector) {
            return selector(Output.of(selector));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy