MongoConnectionInformation Class
- java.
lang. Object - com.
azure. resourcemanager. datamigration. models. MongoConnectionInformation
- com.
Implements
public final class MongoConnectionInformation
implements JsonSerializable<MongoConnectionInformation>
Mongo Connection.
Constructor Summary
| Constructor | Description |
|---|---|
| MongoConnectionInformation() |
Creates an instance of Mongo |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| String |
connectionString()
Get the connection |
|
static
Mongo |
fromJson(JsonReader jsonReader)
Reads an instance of Mongo |
| String |
host()
Get the host property: Host of mongo connection. |
| String |
password()
Get the password property: Password to connect to Mongo. |
| Integer |
port()
Get the port property: Port of mongo connection. |
|
Json |
toJson(JsonWriter jsonWriter) |
| String |
username()
Get the username property: User name to connect to Mongo. |
| Boolean |
useSsl()
Get the use |
| void |
validate()
Validates the instance. |
|
Mongo |
withConnectionString(String connectionString)
Set the connection |
|
Mongo |
withHost(String host)
Set the host property: Host of mongo connection. |
|
Mongo |
withPassword(String password)
Set the password property: Password to connect to Mongo. |
|
Mongo |
withPort(Integer port)
Set the port property: Port of mongo connection. |
|
Mongo |
withUsername(String username)
Set the username property: User name to connect to Mongo. |
|
Mongo |
withUseSsl(Boolean useSsl)
Set the use |
Methods inherited from java.lang.Object
Constructor Details
MongoConnectionInformation
public MongoConnectionInformation()
Creates an instance of MongoConnectionInformation class.
Method Details
connectionString
public String connectionString()
Get the connectionString property: ConnectionString to connect to Mongo.
Returns:
fromJson
public static MongoConnectionInformation fromJson(JsonReader jsonReader)
Reads an instance of MongoConnectionInformation from the JsonReader.
Parameters:
Returns:
Throws:
host
public String host()
Get the host property: Host of mongo connection.
Returns:
password
public String password()
Get the password property: Password to connect to Mongo.
Returns:
port
public Integer port()
Get the port property: Port of mongo connection.
Returns:
toJson
username
public String username()
Get the username property: User name to connect to Mongo.
Returns:
useSsl
public Boolean useSsl()
Get the useSsl property: Whether to UseSsl or UseTls to connect to Mongo. Default is true.
Returns:
validate
public void validate()
Validates the instance.
withConnectionString
public MongoConnectionInformation withConnectionString(String connectionString)
Set the connectionString property: ConnectionString to connect to Mongo.
Parameters:
Returns:
withHost
public MongoConnectionInformation withHost(String host)
Set the host property: Host of mongo connection.
Parameters:
Returns:
withPassword
public MongoConnectionInformation withPassword(String password)
Set the password property: Password to connect to Mongo.
Parameters:
Returns:
withPort
public MongoConnectionInformation withPort(Integer port)
Set the port property: Port of mongo connection.
Parameters:
Returns:
withUsername
public MongoConnectionInformation withUsername(String username)
Set the username property: User name to connect to Mongo.
Parameters:
Returns:
withUseSsl
public MongoConnectionInformation withUseSsl(Boolean useSsl)
Set the useSsl property: Whether to UseSsl or UseTls to connect to Mongo. Default is true.
Parameters:
Returns: