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 Details

    • ResourceSelector

      public ResourceSelector()
      Creates an instance of ResourceSelector class.
  • Method Details

    • name

      public String name()
      Get the name property: The name of the resource selector.
      Returns:
      the name value.
    • withName

      public ResourceSelector withName(String name)
      Set the name property: The name of the resource selector.
      Parameters:
      name - the name value to set.
      Returns:
      the ResourceSelector object itself.
    • selectors

      public List<Selector> selectors()
      Get the selectors property: The list of the selector expressions.
      Returns:
      the selectors value.
    • withSelectors

      public ResourceSelector withSelectors(List<Selector> selectors)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ResourceSelector>
      Throws:
      IOException
    • fromJson

      public static ResourceSelector fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.