com.pulumi.kubernetes.autoscaling.v2beta2.outputs.ExternalMetricSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes resources.
// *** 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.v2beta2.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.autoscaling.v2beta2.outputs.MetricIdentifier;
import com.pulumi.kubernetes.autoscaling.v2beta2.outputs.MetricTarget;
import java.util.Objects;
@CustomType
public final class ExternalMetricSource {
/**
* @return metric identifies the target metric by name and selector
*
*/
private MetricIdentifier metric;
/**
* @return target specifies the target value for the given metric
*
*/
private MetricTarget target;
private ExternalMetricSource() {}
/**
* @return metric identifies the target metric by name and selector
*
*/
public MetricIdentifier metric() {
return this.metric;
}
/**
* @return target specifies the target value for the given metric
*
*/
public MetricTarget target() {
return this.target;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ExternalMetricSource defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private MetricIdentifier metric;
private MetricTarget target;
public Builder() {}
public Builder(ExternalMetricSource defaults) {
Objects.requireNonNull(defaults);
this.metric = defaults.metric;
this.target = defaults.target;
}
@CustomType.Setter
public Builder metric(MetricIdentifier metric) {
if (metric == null) {
throw new MissingRequiredPropertyException("ExternalMetricSource", "metric");
}
this.metric = metric;
return this;
}
@CustomType.Setter
public Builder target(MetricTarget target) {
if (target == null) {
throw new MissingRequiredPropertyException("ExternalMetricSource", "target");
}
this.target = target;
return this;
}
public ExternalMetricSource build() {
final var _resultValue = new ExternalMetricSource();
_resultValue.metric = metric;
_resultValue.target = target;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy