Class ManagementPolicyRule
- java.lang.Object
-
- com.azure.resourcemanager.storage.models.ManagementPolicyRule
-
public final class ManagementPolicyRule extends Object
An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.
-
-
Constructor Summary
Constructors Constructor Description ManagementPolicyRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagementPolicyDefinitiondefinition()Get the definition property: An object that defines the Lifecycle rule.Booleanenabled()Get the enabled property: Rule is enabled if set to true.Stringname()Get the name property: A rule name can contain any combination of alpha numeric characters.RuleTypetype()Get the type property: The valid value is Lifecycle.voidvalidate()Validates the instance.ManagementPolicyRulewithDefinition(ManagementPolicyDefinition definition)Set the definition property: An object that defines the Lifecycle rule.ManagementPolicyRulewithEnabled(Boolean enabled)Set the enabled property: Rule is enabled if set to true.ManagementPolicyRulewithName(String name)Set the name property: A rule name can contain any combination of alpha numeric characters.ManagementPolicyRulewithType(RuleType type)Set the type property: The valid value is Lifecycle.
-
-
-
Method Detail
-
enabled
public Boolean enabled()
Get the enabled property: Rule is enabled if set to true.- Returns:
- the enabled value.
-
withEnabled
public ManagementPolicyRule withEnabled(Boolean enabled)
Set the enabled property: Rule is enabled if set to true.- Parameters:
enabled- the enabled value to set.- Returns:
- the ManagementPolicyRule object itself.
-
name
public String name()
Get the name property: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.- Returns:
- the name value.
-
withName
public ManagementPolicyRule withName(String name)
Set the name property: A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.- Parameters:
name- the name value to set.- Returns:
- the ManagementPolicyRule object itself.
-
type
public RuleType type()
Get the type property: The valid value is Lifecycle.- Returns:
- the type value.
-
withType
public ManagementPolicyRule withType(RuleType type)
Set the type property: The valid value is Lifecycle.- Parameters:
type- the type value to set.- Returns:
- the ManagementPolicyRule object itself.
-
definition
public ManagementPolicyDefinition definition()
Get the definition property: An object that defines the Lifecycle rule.- Returns:
- the definition value.
-
withDefinition
public ManagementPolicyRule withDefinition(ManagementPolicyDefinition definition)
Set the definition property: An object that defines the Lifecycle rule.- Parameters:
definition- the definition value to set.- Returns:
- the ManagementPolicyRule object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-