
com.pulumi.azurenative.insights.outputs.AutoscaleProfileResponse 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.insights.outputs;
import com.pulumi.azurenative.insights.outputs.RecurrenceResponse;
import com.pulumi.azurenative.insights.outputs.ScaleCapacityResponse;
import com.pulumi.azurenative.insights.outputs.ScaleRuleResponse;
import com.pulumi.azurenative.insights.outputs.TimeWindowResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class AutoscaleProfileResponse {
/**
* @return the number of instances that can be used during this profile.
*
*/
private ScaleCapacityResponse capacity;
/**
* @return the specific date-time for the profile. This element is not used if the Recurrence element is used.
*
*/
private @Nullable TimeWindowResponse fixedDate;
/**
* @return the name of the profile.
*
*/
private String name;
/**
* @return the repeating times at which this profile begins. This element is not used if the FixedDate element is used.
*
*/
private @Nullable RecurrenceResponse recurrence;
/**
* @return the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified.
*
*/
private List rules;
private AutoscaleProfileResponse() {}
/**
* @return the number of instances that can be used during this profile.
*
*/
public ScaleCapacityResponse capacity() {
return this.capacity;
}
/**
* @return the specific date-time for the profile. This element is not used if the Recurrence element is used.
*
*/
public Optional fixedDate() {
return Optional.ofNullable(this.fixedDate);
}
/**
* @return the name of the profile.
*
*/
public String name() {
return this.name;
}
/**
* @return the repeating times at which this profile begins. This element is not used if the FixedDate element is used.
*
*/
public Optional recurrence() {
return Optional.ofNullable(this.recurrence);
}
/**
* @return the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified.
*
*/
public List rules() {
return this.rules;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AutoscaleProfileResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private ScaleCapacityResponse capacity;
private @Nullable TimeWindowResponse fixedDate;
private String name;
private @Nullable RecurrenceResponse recurrence;
private List rules;
public Builder() {}
public Builder(AutoscaleProfileResponse defaults) {
Objects.requireNonNull(defaults);
this.capacity = defaults.capacity;
this.fixedDate = defaults.fixedDate;
this.name = defaults.name;
this.recurrence = defaults.recurrence;
this.rules = defaults.rules;
}
@CustomType.Setter
public Builder capacity(ScaleCapacityResponse capacity) {
if (capacity == null) {
throw new MissingRequiredPropertyException("AutoscaleProfileResponse", "capacity");
}
this.capacity = capacity;
return this;
}
@CustomType.Setter
public Builder fixedDate(@Nullable TimeWindowResponse fixedDate) {
this.fixedDate = fixedDate;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("AutoscaleProfileResponse", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder recurrence(@Nullable RecurrenceResponse recurrence) {
this.recurrence = recurrence;
return this;
}
@CustomType.Setter
public Builder rules(List rules) {
if (rules == null) {
throw new MissingRequiredPropertyException("AutoscaleProfileResponse", "rules");
}
this.rules = rules;
return this;
}
public Builder rules(ScaleRuleResponse... rules) {
return rules(List.of(rules));
}
public AutoscaleProfileResponse build() {
final var _resultValue = new AutoscaleProfileResponse();
_resultValue.capacity = capacity;
_resultValue.fixedDate = fixedDate;
_resultValue.name = name;
_resultValue.recurrence = recurrence;
_resultValue.rules = rules;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy