Partage via


ConnectionInfo Class

  • java.lang.Object
    • com.azure.resourcemanager.datamigration.models.ConnectionInfo

Implements

public class ConnectionInfo
implements JsonSerializable<ConnectionInfo>

Defines the connection properties of a server.

Constructor Summary

Constructor Description
ConnectionInfo()

Creates an instance of ConnectionInfo class.

Method Summary

Modifier and Type Method and Description
static ConnectionInfo fromJson(JsonReader jsonReader)

Reads an instance of ConnectionInfo from the JsonReader.

String password()

Get the password property: Password credential.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Type of connection info.

String username()

Get the username property: User name.

void validate()

Validates the instance.

ConnectionInfo withPassword(String password)

Set the password property: Password credential.

ConnectionInfo withUsername(String username)

Set the username property: User name.

Methods inherited from java.lang.Object

Constructor Details

ConnectionInfo

public ConnectionInfo()

Creates an instance of ConnectionInfo class.

Method Details

fromJson

public static ConnectionInfo fromJson(JsonReader jsonReader)

Reads an instance of ConnectionInfo from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ConnectionInfo 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 ConnectionInfo.

password

public String password()

Get the password property: Password credential.

Returns:

the password value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Type of connection info.

Returns:

the type value.

username

public String username()

Get the username property: User name.

Returns:

the username value.

validate

public void validate()

Validates the instance.

withPassword

public ConnectionInfo withPassword(String password)

Set the password property: Password credential.

Parameters:

password - the password value to set.

Returns:

the ConnectionInfo object itself.

withUsername

public ConnectionInfo withUsername(String username)

Set the username property: User name.

Parameters:

username - the username value to set.

Returns:

the ConnectionInfo object itself.

Applies to