Class ResourceSelector
java.lang.Object
com.azure.resourcemanager.resources.models.ResourceSelector
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ResourceSelector>
public final class ResourceSelector
extends Object
implements com.azure.json.JsonSerializable<ResourceSelector>
The resource selector to filter policies by resource properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceSelectorfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ResourceSelector from the JsonReader.name()Get the name property: The name of the resource selector.Get the selectors property: The list of the selector expressions.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the name property: The name of the resource selector.withSelectors(List<Selector> selectors) Set the selectors property: The list of the selector expressions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ResourceSelector
public ResourceSelector()Creates an instance of ResourceSelector class.
-
-
Method Details
-
name
Get the name property: The name of the resource selector.- Returns:
- the name value.
-
withName
Set the name property: The name of the resource selector.- Parameters:
name- the name value to set.- Returns:
- the ResourceSelector object itself.
-
selectors
Get the selectors property: The list of the selector expressions.- Returns:
- the selectors value.
-
withSelectors
Set the selectors property: The list of the selector expressions.- Parameters:
selectors- the selectors value to set.- Returns:
- the ResourceSelector object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ResourceSelector>- Throws:
IOException
-
fromJson
Reads an instance of ResourceSelector from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ResourceSelector 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 ResourceSelector.
-