Compartilhar via


PrivilegeResource Class

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

Implements

public final class PrivilegeResource
implements JsonSerializable<PrivilegeResource>

An Azure Cosmos DB Mongo DB Resource.

Constructor Summary

Constructor Description
PrivilegeResource()

Creates an instance of PrivilegeResource class.

Method Summary

Modifier and Type Method and Description
String collection()

Get the collection property: The collection name the role is applied.

String db()

Get the db property: The database name the role is applied.

static PrivilegeResource fromJson(JsonReader jsonReader)

Reads an instance of PrivilegeResource from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

PrivilegeResource withCollection(String collection)

Set the collection property: The collection name the role is applied.

PrivilegeResource withDb(String db)

Set the db property: The database name the role is applied.

Methods inherited from java.lang.Object

Constructor Details

PrivilegeResource

public PrivilegeResource()

Creates an instance of PrivilegeResource class.

Method Details

collection

public String collection()

Get the collection property: The collection name the role is applied.

Returns:

the collection value.

db

public String db()

Get the db property: The database name the role is applied.

Returns:

the db value.

fromJson

public static PrivilegeResource fromJson(JsonReader jsonReader)

Reads an instance of PrivilegeResource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCollection

public PrivilegeResource withCollection(String collection)

Set the collection property: The collection name the role is applied.

Parameters:

collection - the collection value to set.

Returns:

the PrivilegeResource object itself.

withDb

public PrivilegeResource withDb(String db)

Set the db property: The database name the role is applied.

Parameters:

db - the db value to set.

Returns:

the PrivilegeResource object itself.

Applies to