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 Summary
ConstructorsConstructorDescriptionCreates an instance of RangerAdminSpecDatabase class. -
Method Summary
Modifier and TypeMethodDescriptionstatic RangerAdminSpecDatabasefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RangerAdminSpecDatabase from the JsonReader.host()Get the host property: The database URL.name()Get the name property: The database name.Get the passwordSecretRef property: Reference for the database password.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) username()Get the username property: The name of the database user.voidvalidate()Validates the instance.Set the host property: The database URL.Set the name property: The database name.withPasswordSecretRef(String passwordSecretRef) Set the passwordSecretRef property: Reference for the database password.withUsername(String username) Set the username property: The name of the database user.Methods inherited from class 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
-
RangerAdminSpecDatabase
public RangerAdminSpecDatabase()Creates an instance of RangerAdminSpecDatabase class.
-
-
Method Details
-
host
-
withHost
Set the host property: The database URL.- Parameters:
host- the host value to set.- Returns:
- the RangerAdminSpecDatabase object itself.
-
name
-
withName
Set the name property: The database name.- Parameters:
name- the name value to set.- Returns:
- the RangerAdminSpecDatabase object itself.
-
passwordSecretRef
Get the passwordSecretRef property: Reference for the database password.- Returns:
- the passwordSecretRef value.
-
withPasswordSecretRef
Set the passwordSecretRef property: Reference for the database password.- Parameters:
passwordSecretRef- the passwordSecretRef value to set.- Returns:
- the RangerAdminSpecDatabase object itself.
-
username
Get the username property: The name of the database user.- Returns:
- the username value.
-
withUsername
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
- Specified by:
toJsonin interfacecom.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.
-