
com.pulumi.azurenative.storage.outputs.ManagementPolicyRuleResponse Maven / Gradle / Ivy
// *** 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.storage.outputs;
import com.pulumi.azurenative.storage.outputs.ManagementPolicyDefinitionResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ManagementPolicyRuleResponse {
/**
* @return An object that defines the Lifecycle rule.
*
*/
private ManagementPolicyDefinitionResponse definition;
/**
* @return Rule is enabled if set to true.
*
*/
private @Nullable Boolean enabled;
/**
* @return A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
*
*/
private String name;
/**
* @return The valid value is Lifecycle
*
*/
private String type;
private ManagementPolicyRuleResponse() {}
/**
* @return An object that defines the Lifecycle rule.
*
*/
public ManagementPolicyDefinitionResponse definition() {
return this.definition;
}
/**
* @return Rule is enabled if set to true.
*
*/
public Optional enabled() {
return Optional.ofNullable(this.enabled);
}
/**
* @return A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
*
*/
public String name() {
return this.name;
}
/**
* @return The valid value is Lifecycle
*
*/
public String type() {
return this.type;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ManagementPolicyRuleResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private ManagementPolicyDefinitionResponse definition;
private @Nullable Boolean enabled;
private String name;
private String type;
public Builder() {}
public Builder(ManagementPolicyRuleResponse defaults) {
Objects.requireNonNull(defaults);
this.definition = defaults.definition;
this.enabled = defaults.enabled;
this.name = defaults.name;
this.type = defaults.type;
}
@CustomType.Setter
public Builder definition(ManagementPolicyDefinitionResponse definition) {
if (definition == null) {
throw new MissingRequiredPropertyException("ManagementPolicyRuleResponse", "definition");
}
this.definition = definition;
return this;
}
@CustomType.Setter
public Builder enabled(@Nullable Boolean enabled) {
this.enabled = enabled;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("ManagementPolicyRuleResponse", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder type(String type) {
if (type == null) {
throw new MissingRequiredPropertyException("ManagementPolicyRuleResponse", "type");
}
this.type = type;
return this;
}
public ManagementPolicyRuleResponse build() {
final var _resultValue = new ManagementPolicyRuleResponse();
_resultValue.definition = definition;
_resultValue.enabled = enabled;
_resultValue.name = name;
_resultValue.type = type;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy