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

com.pulumi.kubernetes.autoscaling.v2.inputs.ExternalMetricSourcePatchArgs 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.kubernetes.autoscaling.v2.inputs.MetricIdentifierPatchArgs;
import com.pulumi.kubernetes.autoscaling.v2.inputs.MetricTargetPatchArgs;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
 * 
 */
public final class ExternalMetricSourcePatchArgs extends com.pulumi.resources.ResourceArgs {

    public static final ExternalMetricSourcePatchArgs Empty = new ExternalMetricSourcePatchArgs();

    /**
     * metric identifies the target metric by name and selector
     * 
     */
    @Import(name="metric")
    private @Nullable Output metric;

    /**
     * @return metric identifies the target metric by name and selector
     * 
     */
    public Optional> metric() {
        return Optional.ofNullable(this.metric);
    }

    /**
     * target specifies the target value for the given metric
     * 
     */
    @Import(name="target")
    private @Nullable Output target;

    /**
     * @return target specifies the target value for the given metric
     * 
     */
    public Optional> target() {
        return Optional.ofNullable(this.target);
    }

    private ExternalMetricSourcePatchArgs() {}

    private ExternalMetricSourcePatchArgs(ExternalMetricSourcePatchArgs $) {
        this.metric = $.metric;
        this.target = $.target;
    }

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

    public static final class Builder {
        private ExternalMetricSourcePatchArgs $;

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

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

        /**
         * @param metric metric identifies the target metric by name and selector
         * 
         * @return builder
         * 
         */
        public Builder metric(@Nullable Output metric) {
            $.metric = metric;
            return this;
        }

        /**
         * @param metric metric identifies the target metric by name and selector
         * 
         * @return builder
         * 
         */
        public Builder metric(MetricIdentifierPatchArgs metric) {
            return metric(Output.of(metric));
        }

        /**
         * @param target target specifies the target value for the given metric
         * 
         * @return builder
         * 
         */
        public Builder target(@Nullable Output target) {
            $.target = target;
            return this;
        }

        /**
         * @param target target specifies the target value for the given metric
         * 
         * @return builder
         * 
         */
        public Builder target(MetricTargetPatchArgs target) {
            return target(Output.of(target));
        }

        public ExternalMetricSourcePatchArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy