Class Privilege
java.lang.Object
com.azure.resourcemanager.cosmos.models.Privilege
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Privilege>
The set of data plane operations permitted through this Role Definition.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactions()
Get the actions property: An array of actions that are allowed.static Privilege
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of Privilege from the JsonReader.resource()
Get the resource property: An Azure Cosmos DB Mongo DB Resource.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withActions
(List<String> actions) Set the actions property: An array of actions that are allowed.withResource
(PrivilegeResource resource) Set the resource property: An Azure Cosmos DB Mongo DB Resource.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
Privilege
public Privilege()Creates an instance of Privilege class.
-
-
Method Details
-
resource
Get the resource property: An Azure Cosmos DB Mongo DB Resource.- Returns:
- the resource value.
-
withResource
Set the resource property: An Azure Cosmos DB Mongo DB Resource.- Parameters:
resource
- the resource value to set.- Returns:
- the Privilege object itself.
-
actions
Get the actions property: An array of actions that are allowed.- Returns:
- the actions value.
-
withActions
Set the actions property: An array of actions that are allowed.- Parameters:
actions
- the actions value to set.- Returns:
- the Privilege object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<Privilege>
- Throws:
IOException
-
fromJson
Reads an instance of Privilege from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of Privilege 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 Privilege.
-