Permission Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.Permission

Implements

public final class Permission
implements JsonSerializable<Permission>

The set of data plane operations permitted through this Role Definition.

Constructor Summary

Constructor Description
Permission()

Creates an instance of Permission class.

Method Summary

Modifier and Type Method and Description
List<String> dataActions()

Get the dataActions property: An array of data actions that are allowed.

static Permission fromJson(JsonReader jsonReader)

Reads an instance of Permission from the JsonReader.

String id()

Get the id property: The id for the permission.

List<String> notDataActions()

Get the notDataActions property: An array of data actions that are denied.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Permission withDataActions(List<String> dataActions)

Set the dataActions property: An array of data actions that are allowed.

Permission withId(String id)

Set the id property: The id for the permission.

Permission withNotDataActions(List<String> notDataActions)

Set the notDataActions property: An array of data actions that are denied.

Methods inherited from java.lang.Object

Constructor Details

Permission

public Permission()

Creates an instance of Permission class.

Method Details

dataActions

public List<String> dataActions()

Get the dataActions property: An array of data actions that are allowed.

Returns:

the dataActions value.

fromJson

public static Permission fromJson(JsonReader jsonReader)

Reads an instance of Permission from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the Permission.

id

public String id()

Get the id property: The id for the permission.

Returns:

the id value.

notDataActions

public List<String> notDataActions()

Get the notDataActions property: An array of data actions that are denied.

Returns:

the notDataActions value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDataActions

public Permission withDataActions(List<String> dataActions)

Set the dataActions property: An array of data actions that are allowed.

Parameters:

dataActions - the dataActions value to set.

Returns:

the Permission object itself.

withId

public Permission withId(String id)

Set the id property: The id for the permission.

Parameters:

id - the id value to set.

Returns:

the Permission object itself.

withNotDataActions

public Permission withNotDataActions(List<String> notDataActions)

Set the notDataActions property: An array of data actions that are denied.

Parameters:

notDataActions - the notDataActions value to set.

Returns:

the Permission object itself.

Applies to