共用方式為


AccessControlRulesRole Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.AccessControlRulesRole

Implements

public final class AccessControlRulesRole
implements JsonSerializable<AccessControlRulesRole>

The properties of an Access Control Rule Role.

Constructor Summary

Constructor Description
AccessControlRulesRole()

Creates an instance of AccessControlRulesRole class.

Method Summary

Modifier and Type Method and Description
static AccessControlRulesRole fromJson(JsonReader jsonReader)

Reads an instance of AccessControlRulesRole from the JsonReader.

String name()

Get the name property: The name of the role.

List<String> privileges()

Get the privileges property: A list of privileges needed by this role.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

AccessControlRulesRole withName(String name)

Set the name property: The name of the role.

AccessControlRulesRole withPrivileges(List<String> privileges)

Set the privileges property: A list of privileges needed by this role.

Methods inherited from java.lang.Object

Constructor Details

AccessControlRulesRole

public AccessControlRulesRole()

Creates an instance of AccessControlRulesRole class.

Method Details

fromJson

public static AccessControlRulesRole fromJson(JsonReader jsonReader)

Reads an instance of AccessControlRulesRole from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AccessControlRulesRole 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: The name of the role.

Returns:

the name value.

privileges

public List privileges()

Get the privileges property: A list of privileges needed by this role.

Returns:

the privileges value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withName

public AccessControlRulesRole withName(String name)

Set the name property: The name of the role.

Parameters:

name - the name value to set.

Returns:

the AccessControlRulesRole object itself.

withPrivileges

public AccessControlRulesRole withPrivileges(List privileges)

Set the privileges property: A list of privileges needed by this role.

Parameters:

privileges - the privileges value to set.

Returns:

the AccessControlRulesRole object itself.

Applies to