Partilhar via


RoleManagementPolicyRule Class

  • java.lang.Object
    • com.azure.resourcemanager.authorization.models.RoleManagementPolicyRule

Implements

public class RoleManagementPolicyRule
implements JsonSerializable<RoleManagementPolicyRule>

The role management policy rule.

Constructor Summary

Constructor Description
RoleManagementPolicyRule()

Creates an instance of RoleManagementPolicyRule class.

Method Summary

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

Reads an instance of RoleManagementPolicyRule from the JsonReader.

String id()

Get the id property: The id of the rule.

RoleManagementPolicyRuleType ruleType()

Get the ruleType property: The type of rule.

RoleManagementPolicyRuleTarget target()

Get the target property: The target of the current rule.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RoleManagementPolicyRule withId(String id)

Set the id property: The id of the rule.

RoleManagementPolicyRule withTarget(RoleManagementPolicyRuleTarget target)

Set the target property: The target of the current rule.

Methods inherited from java.lang.Object

Constructor Details

RoleManagementPolicyRule

public RoleManagementPolicyRule()

Creates an instance of RoleManagementPolicyRule class.

Method Details

fromJson

public static RoleManagementPolicyRule fromJson(JsonReader jsonReader)

Reads an instance of RoleManagementPolicyRule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

id

public String id()

Get the id property: The id of the rule.

Returns:

the id value.

ruleType

public RoleManagementPolicyRuleType ruleType()

Get the ruleType property: The type of rule.

Returns:

the ruleType value.

target

public RoleManagementPolicyRuleTarget target()

Get the target property: The target of the current rule.

Returns:

the target value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withId

public RoleManagementPolicyRule withId(String id)

Set the id property: The id of the rule.

Parameters:

id - the id value to set.

Returns:

the RoleManagementPolicyRule object itself.

withTarget

public RoleManagementPolicyRule withTarget(RoleManagementPolicyRuleTarget target)

Set the target property: The target of the current rule.

Parameters:

target - the target value to set.

Returns:

the RoleManagementPolicyRule object itself.

Applies to