ManagementPolicyRule Class
- java.
lang. Object - com.
azure. resourcemanager. storage. models. ManagementPolicyRule
- com.
Implements
public final class ManagementPolicyRule
implements JsonSerializable<ManagementPolicyRule>
An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.
Constructor Summary
Constructor | Description |
---|---|
ManagementPolicyRule() |
Creates an instance of Management |
Method Summary
Modifier and Type | Method and Description |
---|---|
Management |
definition()
Get the definition property: An object that defines the Lifecycle rule. |
Boolean |
enabled()
Get the enabled property: Rule is enabled if set to true. |
static
Management |
fromJson(JsonReader jsonReader)
Reads an instance of Management |
String |
name()
Get the name property: A rule name can contain any combination of alpha numeric characters. |
Json |
toJson(JsonWriter jsonWriter) |
Rule |
type()
Get the type property: The valid value is Lifecycle. |
void |
validate()
Validates the instance. |
Management |
withDefinition(ManagementPolicyDefinition definition)
Set the definition property: An object that defines the Lifecycle rule. |
Management |
withEnabled(Boolean enabled)
Set the enabled property: Rule is enabled if set to true. |
Management |
withName(String name)
Set the name property: A rule name can contain any combination of alpha numeric characters. |
Management |
withType(RuleType type)
Set the type property: The valid value is Lifecycle. |
Methods inherited from java.lang.Object
Constructor Details
ManagementPolicyRule
public ManagementPolicyRule()
Creates an instance of ManagementPolicyRule class.
Method Details
definition
public ManagementPolicyDefinition definition()
Get the definition property: An object that defines the Lifecycle rule.
Returns:
enabled
public Boolean enabled()
Get the enabled property: Rule is enabled if set to true.
Returns:
fromJson
public static ManagementPolicyRule fromJson(JsonReader jsonReader)
Reads an instance of ManagementPolicyRule from the JsonReader.
Parameters:
Returns:
Throws:
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:
toJson
type
public RuleType type()
Get the type property: The valid value is Lifecycle.
Returns:
validate
public void validate()
Validates the instance.
withDefinition
public ManagementPolicyRule withDefinition(ManagementPolicyDefinition definition)
Set the definition property: An object that defines the Lifecycle rule.
Parameters:
Returns:
withEnabled
public ManagementPolicyRule withEnabled(Boolean enabled)
Set the enabled property: Rule is enabled if set to true.
Parameters:
Returns:
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:
Returns:
withType
public ManagementPolicyRule withType(RuleType type)
Set the type property: The valid value is Lifecycle.
Parameters:
Returns:
Applies to
Azure SDK for Java