ManagementPolicyDefinition Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.ManagementPolicyDefinition

Implements

public final class ManagementPolicyDefinition
implements JsonSerializable<ManagementPolicyDefinition>

An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.

Constructor Summary

Constructor Description
ManagementPolicyDefinition()

Creates an instance of ManagementPolicyDefinition class.

Method Summary

Modifier and Type Method and Description
ManagementPolicyAction actions()

Get the actions property: An object that defines the action set.

ManagementPolicyFilter filters()

Get the filters property: An object that defines the filter set.

static ManagementPolicyDefinition fromJson(JsonReader jsonReader)

Reads an instance of ManagementPolicyDefinition from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ManagementPolicyDefinition withActions(ManagementPolicyAction actions)

Set the actions property: An object that defines the action set.

ManagementPolicyDefinition withFilters(ManagementPolicyFilter filters)

Set the filters property: An object that defines the filter set.

Methods inherited from java.lang.Object

Constructor Details

ManagementPolicyDefinition

public ManagementPolicyDefinition()

Creates an instance of ManagementPolicyDefinition class.

Method Details

actions

public ManagementPolicyAction actions()

Get the actions property: An object that defines the action set.

Returns:

the actions value.

filters

public ManagementPolicyFilter filters()

Get the filters property: An object that defines the filter set.

Returns:

the filters value.

fromJson

public static ManagementPolicyDefinition fromJson(JsonReader jsonReader)

Reads an instance of ManagementPolicyDefinition from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ManagementPolicyDefinition if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withActions

public ManagementPolicyDefinition withActions(ManagementPolicyAction actions)

Set the actions property: An object that defines the action set.

Parameters:

actions - the actions value to set.

Returns:

the ManagementPolicyDefinition object itself.

withFilters

public ManagementPolicyDefinition withFilters(ManagementPolicyFilter filters)

Set the filters property: An object that defines the filter set.

Parameters:

filters - the filters value to set.

Returns:

the ManagementPolicyDefinition object itself.

Applies to