Class FieldRestrictions
- java.lang.Object
-
- com.azure.resourcemanager.policyinsights.models.FieldRestrictions
-
public final class FieldRestrictions extends Object
The restrictions that will be placed on a field in the resource by policy.
-
-
Constructor Summary
Constructors Constructor Description FieldRestrictions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
field()
Get the field property: The name of the field.List<FieldRestriction>
restrictions()
Get the restrictions property: The restrictions placed on that field by policy.void
validate()
Validates the instance.FieldRestrictions
withRestrictions(List<FieldRestriction> restrictions)
Set the restrictions property: The restrictions placed on that field by policy.
-
-
-
Method Detail
-
field
public String field()
Get the field property: The name of the field. This can be a top-level property like 'name' or 'type' or an Azure Policy field alias.- Returns:
- the field value.
-
restrictions
public List<FieldRestriction> restrictions()
Get the restrictions property: The restrictions placed on that field by policy.- Returns:
- the restrictions value.
-
withRestrictions
public FieldRestrictions withRestrictions(List<FieldRestriction> restrictions)
Set the restrictions property: The restrictions placed on that field by policy.- Parameters:
restrictions
- the restrictions value to set.- Returns:
- the FieldRestrictions object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-