com.pulumi.alicloud.emrv2.outputs.ClusterSubscriptionConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alicloud Show documentation
Show all versions of alicloud Show documentation
A Pulumi package for creating and managing AliCloud 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.alicloud.emrv2.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ClusterSubscriptionConfig {
/**
* @return Auto pay order for payment type of subscription, ’true’ or ‘false’ .
*
*/
private @Nullable Boolean autoPayOrder;
/**
* @return Auto renew for prepaid, ’true’ or ‘false’ . Default value: false.
*
*/
private @Nullable Boolean autoRenew;
/**
* @return If paymentType is Subscription, this should be specified. Supported value: 1、2、3、4、5、6、7、8、9、12、24、36、48.
*
*/
private @Nullable Integer autoRenewDuration;
/**
* @return If paymentType is Subscription, this should be specified. Supported value: Month or Year.
*
*/
private @Nullable String autoRenewDurationUnit;
/**
* @return If paymentType is Subscription, this should be specified. Supported value: 1、2、3、4、5、6、7、8、9、12、24、36、48.
*
*/
private Integer paymentDuration;
/**
* @return If paymentType is Subscription, this should be specified. Supported value: Month or Year.
*
*/
private String paymentDurationUnit;
private ClusterSubscriptionConfig() {}
/**
* @return Auto pay order for payment type of subscription, ’true’ or ‘false’ .
*
*/
public Optional autoPayOrder() {
return Optional.ofNullable(this.autoPayOrder);
}
/**
* @return Auto renew for prepaid, ’true’ or ‘false’ . Default value: false.
*
*/
public Optional autoRenew() {
return Optional.ofNullable(this.autoRenew);
}
/**
* @return If paymentType is Subscription, this should be specified. Supported value: 1、2、3、4、5、6、7、8、9、12、24、36、48.
*
*/
public Optional autoRenewDuration() {
return Optional.ofNullable(this.autoRenewDuration);
}
/**
* @return If paymentType is Subscription, this should be specified. Supported value: Month or Year.
*
*/
public Optional autoRenewDurationUnit() {
return Optional.ofNullable(this.autoRenewDurationUnit);
}
/**
* @return If paymentType is Subscription, this should be specified. Supported value: 1、2、3、4、5、6、7、8、9、12、24、36、48.
*
*/
public Integer paymentDuration() {
return this.paymentDuration;
}
/**
* @return If paymentType is Subscription, this should be specified. Supported value: Month or Year.
*
*/
public String paymentDurationUnit() {
return this.paymentDurationUnit;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ClusterSubscriptionConfig defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Boolean autoPayOrder;
private @Nullable Boolean autoRenew;
private @Nullable Integer autoRenewDuration;
private @Nullable String autoRenewDurationUnit;
private Integer paymentDuration;
private String paymentDurationUnit;
public Builder() {}
public Builder(ClusterSubscriptionConfig defaults) {
Objects.requireNonNull(defaults);
this.autoPayOrder = defaults.autoPayOrder;
this.autoRenew = defaults.autoRenew;
this.autoRenewDuration = defaults.autoRenewDuration;
this.autoRenewDurationUnit = defaults.autoRenewDurationUnit;
this.paymentDuration = defaults.paymentDuration;
this.paymentDurationUnit = defaults.paymentDurationUnit;
}
@CustomType.Setter
public Builder autoPayOrder(@Nullable Boolean autoPayOrder) {
this.autoPayOrder = autoPayOrder;
return this;
}
@CustomType.Setter
public Builder autoRenew(@Nullable Boolean autoRenew) {
this.autoRenew = autoRenew;
return this;
}
@CustomType.Setter
public Builder autoRenewDuration(@Nullable Integer autoRenewDuration) {
this.autoRenewDuration = autoRenewDuration;
return this;
}
@CustomType.Setter
public Builder autoRenewDurationUnit(@Nullable String autoRenewDurationUnit) {
this.autoRenewDurationUnit = autoRenewDurationUnit;
return this;
}
@CustomType.Setter
public Builder paymentDuration(Integer paymentDuration) {
if (paymentDuration == null) {
throw new MissingRequiredPropertyException("ClusterSubscriptionConfig", "paymentDuration");
}
this.paymentDuration = paymentDuration;
return this;
}
@CustomType.Setter
public Builder paymentDurationUnit(String paymentDurationUnit) {
if (paymentDurationUnit == null) {
throw new MissingRequiredPropertyException("ClusterSubscriptionConfig", "paymentDurationUnit");
}
this.paymentDurationUnit = paymentDurationUnit;
return this;
}
public ClusterSubscriptionConfig build() {
final var _resultValue = new ClusterSubscriptionConfig();
_resultValue.autoPayOrder = autoPayOrder;
_resultValue.autoRenew = autoRenew;
_resultValue.autoRenewDuration = autoRenewDuration;
_resultValue.autoRenewDurationUnit = autoRenewDurationUnit;
_resultValue.paymentDuration = paymentDuration;
_resultValue.paymentDurationUnit = paymentDurationUnit;
return _resultValue;
}
}
}