com.pulumi.azurenative.web.outputs.ScaleResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure 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.azurenative.web.outputs;
import com.pulumi.azurenative.web.outputs.ScaleRuleResponse;
import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ScaleResponse {
/**
* @return Optional. Maximum number of container replicas. Defaults to 10 if not set.
*
*/
private @Nullable Integer maxReplicas;
/**
* @return Optional. Minimum number of container replicas.
*
*/
private @Nullable Integer minReplicas;
/**
* @return Scaling rules.
*
*/
private @Nullable List rules;
private ScaleResponse() {}
/**
* @return Optional. Maximum number of container replicas. Defaults to 10 if not set.
*
*/
public Optional maxReplicas() {
return Optional.ofNullable(this.maxReplicas);
}
/**
* @return Optional. Minimum number of container replicas.
*
*/
public Optional minReplicas() {
return Optional.ofNullable(this.minReplicas);
}
/**
* @return Scaling rules.
*
*/
public List rules() {
return this.rules == null ? List.of() : this.rules;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ScaleResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer maxReplicas;
private @Nullable Integer minReplicas;
private @Nullable List rules;
public Builder() {}
public Builder(ScaleResponse defaults) {
Objects.requireNonNull(defaults);
this.maxReplicas = defaults.maxReplicas;
this.minReplicas = defaults.minReplicas;
this.rules = defaults.rules;
}
@CustomType.Setter
public Builder maxReplicas(@Nullable Integer maxReplicas) {
this.maxReplicas = maxReplicas;
return this;
}
@CustomType.Setter
public Builder minReplicas(@Nullable Integer minReplicas) {
this.minReplicas = minReplicas;
return this;
}
@CustomType.Setter
public Builder rules(@Nullable List rules) {
this.rules = rules;
return this;
}
public Builder rules(ScaleRuleResponse... rules) {
return rules(List.of(rules));
}
public ScaleResponse build() {
final var _resultValue = new ScaleResponse();
_resultValue.maxReplicas = maxReplicas;
_resultValue.minReplicas = minReplicas;
_resultValue.rules = rules;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy