Class RangerAdminSpecDatabase

java.lang.Object
com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase
All Implemented Interfaces:
com.azure.json.JsonSerializable<RangerAdminSpecDatabase>

public final class RangerAdminSpecDatabase extends Object implements com.azure.json.JsonSerializable<RangerAdminSpecDatabase>
The RangerAdminSpecDatabase model.
  • Constructor Details

    • RangerAdminSpecDatabase

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

    • host

      public String host()
      Get the host property: The database URL.
      Returns:
      the host value.
    • withHost

      public RangerAdminSpecDatabase withHost(String host)
      Set the host property: The database URL.
      Parameters:
      host - the host value to set.
      Returns:
      the RangerAdminSpecDatabase object itself.
    • name

      public String name()
      Get the name property: The database name.
      Returns:
      the name value.
    • withName

      public RangerAdminSpecDatabase withName(String name)
      Set the name property: The database name.
      Parameters:
      name - the name value to set.
      Returns:
      the RangerAdminSpecDatabase object itself.
    • passwordSecretRef

      public String passwordSecretRef()
      Get the passwordSecretRef property: Reference for the database password.
      Returns:
      the passwordSecretRef value.
    • withPasswordSecretRef

      public RangerAdminSpecDatabase withPasswordSecretRef(String passwordSecretRef)
      Set the passwordSecretRef property: Reference for the database password.
      Parameters:
      passwordSecretRef - the passwordSecretRef value to set.
      Returns:
      the RangerAdminSpecDatabase object itself.
    • username

      public String username()
      Get the username property: The name of the database user.
      Returns:
      the username value.
    • withUsername

      public RangerAdminSpecDatabase withUsername(String username)
      Set the username property: The name of the database user.
      Parameters:
      username - the username value to set.
      Returns:
      the RangerAdminSpecDatabase 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<RangerAdminSpecDatabase>
      Throws:
      IOException
    • fromJson

      public static RangerAdminSpecDatabase fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RangerAdminSpecDatabase from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RangerAdminSpecDatabase if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the RangerAdminSpecDatabase.