BlobInventoryPolicyRule Class

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

Implements

public final class BlobInventoryPolicyRule
implements JsonSerializable<BlobInventoryPolicyRule>

An object that wraps the blob inventory rule. Each rule is uniquely defined by name.

Constructor Summary

Constructor Description
BlobInventoryPolicyRule()

Creates an instance of BlobInventoryPolicyRule class.

Method Summary

Modifier and Type Method and Description
BlobInventoryPolicyDefinition definition()

Get the definition property: An object that defines the blob inventory policy rule.

String destination()

Get the destination property: Container name where blob inventory files are stored.

boolean enabled()

Get the enabled property: Rule is enabled when set to true.

static BlobInventoryPolicyRule fromJson(JsonReader jsonReader)

Reads an instance of BlobInventoryPolicyRule from the JsonReader.

String name()

Get the name property: A rule name can contain any combination of alpha numeric characters.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

BlobInventoryPolicyRule withDefinition(BlobInventoryPolicyDefinition definition)

Set the definition property: An object that defines the blob inventory policy rule.

BlobInventoryPolicyRule withDestination(String destination)

Set the destination property: Container name where blob inventory files are stored.

BlobInventoryPolicyRule withEnabled(boolean enabled)

Set the enabled property: Rule is enabled when set to true.

BlobInventoryPolicyRule withName(String name)

Set the name property: A rule name can contain any combination of alpha numeric characters.

Methods inherited from java.lang.Object

Constructor Details

BlobInventoryPolicyRule

public BlobInventoryPolicyRule()

Creates an instance of BlobInventoryPolicyRule class.

Method Details

definition

public BlobInventoryPolicyDefinition definition()

Get the definition property: An object that defines the blob inventory policy rule.

Returns:

the definition value.

destination

public String destination()

Get the destination property: Container name where blob inventory files are stored. Must be pre-created.

Returns:

the destination value.

enabled

public boolean enabled()

Get the enabled property: Rule is enabled when set to true.

Returns:

the enabled value.

fromJson

public static BlobInventoryPolicyRule fromJson(JsonReader jsonReader)

Reads an instance of BlobInventoryPolicyRule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BlobInventoryPolicyRule 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.

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDefinition

public BlobInventoryPolicyRule withDefinition(BlobInventoryPolicyDefinition definition)

Set the definition property: An object that defines the blob inventory policy rule.

Parameters:

definition - the definition value to set.

Returns:

the BlobInventoryPolicyRule object itself.

withDestination

public BlobInventoryPolicyRule withDestination(String destination)

Set the destination property: Container name where blob inventory files are stored. Must be pre-created.

Parameters:

destination - the destination value to set.

Returns:

the BlobInventoryPolicyRule object itself.

withEnabled

public BlobInventoryPolicyRule withEnabled(boolean enabled)

Set the enabled property: Rule is enabled when set to true.

Parameters:

enabled - the enabled value to set.

Returns:

the BlobInventoryPolicyRule object itself.

withName

public BlobInventoryPolicyRule 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 BlobInventoryPolicyRule object itself.

Applies to