Class MigrationSecretParameters
java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.MigrationSecretParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MigrationSecretParameters>
public final class MigrationSecretParameters
extends Object
implements com.azure.json.JsonSerializable<MigrationSecretParameters>
Migration secret parameters.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of MigrationSecretParameters class. -
Method Summary
Modifier and TypeMethodDescriptionGet the adminCredentials property: Credentials of administrator users for source and target servers.static MigrationSecretParametersfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MigrationSecretParameters from the JsonReader.Get the sourceServerUsername property: Gets or sets the name of the user for the source server.Get the targetServerUsername property: Gets or sets the name of the user for the target server.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAdminCredentials(AdminCredentials adminCredentials) Set the adminCredentials property: Credentials of administrator users for source and target servers.withSourceServerUsername(String sourceServerUsername) Set the sourceServerUsername property: Gets or sets the name of the user for the source server.withTargetServerUsername(String targetServerUsername) Set the targetServerUsername property: Gets or sets the name of the user for the target server.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
-
MigrationSecretParameters
public MigrationSecretParameters()Creates an instance of MigrationSecretParameters class.
-
-
Method Details
-
adminCredentials
Get the adminCredentials property: Credentials of administrator users for source and target servers.- Returns:
- the adminCredentials value.
-
withAdminCredentials
Set the adminCredentials property: Credentials of administrator users for source and target servers.- Parameters:
adminCredentials- the adminCredentials value to set.- Returns:
- the MigrationSecretParameters object itself.
-
sourceServerUsername
Get the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't need to be an administrator.- Returns:
- the sourceServerUsername value.
-
withSourceServerUsername
Set the sourceServerUsername property: Gets or sets the name of the user for the source server. This user doesn't need to be an administrator.- Parameters:
sourceServerUsername- the sourceServerUsername value to set.- Returns:
- the MigrationSecretParameters object itself.
-
targetServerUsername
Get the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't need to be an administrator.- Returns:
- the targetServerUsername value.
-
withTargetServerUsername
Set the targetServerUsername property: Gets or sets the name of the user for the target server. This user doesn't need to be an administrator.- Parameters:
targetServerUsername- the targetServerUsername value to set.- Returns:
- the MigrationSecretParameters 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<MigrationSecretParameters>- Throws:
IOException
-
fromJson
public static MigrationSecretParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of MigrationSecretParameters from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MigrationSecretParameters 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 MigrationSecretParameters.
-