Role Class

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

Implements

public final class Role
implements JsonSerializable<Role>

The set of roles permitted through this Role Definition.

Constructor Summary

Constructor Description
Role()

Creates an instance of Role class.

Method Summary

Modifier and Type Method and Description
String db()

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

static Role fromJson(JsonReader jsonReader)

Reads an instance of Role from the JsonReader.

String role()

Get the role property: The role name.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Role withDb(String db)

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

Role withRole(String role)

Set the role property: The role name.

Methods inherited from java.lang.Object

Constructor Details

Role

public Role()

Creates an instance of Role class.

Method Details

db

public String db()

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

Returns:

the db value.

fromJson

public static Role fromJson(JsonReader jsonReader)

Reads an instance of Role from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

role

public String role()

Get the role property: The role name.

Returns:

the role value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDb

public Role withDb(String db)

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

Parameters:

db - the db value to set.

Returns:

the Role object itself.

withRole

public Role withRole(String role)

Set the role property: The role name.

Parameters:

role - the role value to set.

Returns:

the Role object itself.

Applies to