Class AccessRule

java.lang.Object
com.azure.resourcemanager.search.models.AccessRule
All Implemented Interfaces:
com.azure.json.JsonSerializable<AccessRule>

public final class AccessRule extends Object implements com.azure.json.JsonSerializable<AccessRule>
Access rule in a network security perimeter configuration profile.
  • Constructor Details

    • AccessRule

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

    • name

      public String name()
      Get the name property: Name of the access rule.
      Returns:
      the name value.
    • withName

      public AccessRule withName(String name)
      Set the name property: Name of the access rule.
      Parameters:
      name - the name value to set.
      Returns:
      the AccessRule object itself.
    • properties

      public AccessRuleProperties properties()
      Get the properties property: Properties of Access Rule.
      Returns:
      the properties value.
    • withProperties

      public AccessRule withProperties(AccessRuleProperties properties)
      Set the properties property: Properties of Access Rule.
      Parameters:
      properties - the properties value to set.
      Returns:
      the AccessRule 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<AccessRule>
      Throws:
      IOException
    • fromJson

      public static AccessRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AccessRule from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AccessRule 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 AccessRule.