Class NspAccessRule

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

public final class NspAccessRule extends Object implements com.azure.json.JsonSerializable<NspAccessRule>
Information of Access Rule in Network Profile.
  • Constructor Details

    • NspAccessRule

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

    • id

      public String id()
      Get the id property: Fully qualified identifier of the resource.
      Returns:
      the id value.
    • withId

      public NspAccessRule withId(String id)
      Set the id property: Fully qualified identifier of the resource.
      Parameters:
      id - the id value to set.
      Returns:
      the NspAccessRule object itself.
    • name

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

      public NspAccessRule withName(String name)
      Set the name property: Name of the resource.
      Parameters:
      name - the name value to set.
      Returns:
      the NspAccessRule object itself.
    • type

      public String type()
      Get the type property: Type of the resource.
      Returns:
      the type value.
    • withType

      public NspAccessRule withType(String type)
      Set the type property: Type of the resource.
      Parameters:
      type - the type value to set.
      Returns:
      the NspAccessRule object itself.
    • properties

      public NspAccessRuleProperties properties()
      Get the properties property: Properties of Access Rule.
      Returns:
      the properties value.
    • 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<NspAccessRule>
      Throws:
      IOException
    • fromJson

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