Class JobTarget
java.lang.Object
com.azure.resourcemanager.sql.models.JobTarget
- All Implemented Interfaces:
com.azure.json.JsonSerializable<JobTarget>
A job target, for example a specific database or a container of databases that is evaluated during job execution.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the databaseName property: The target database name.Get the elasticPoolName property: The target elastic pool name.static JobTargetfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of JobTarget from the JsonReader.Get the membershipType property: Whether the target is included or excluded from the group.Get the refreshCredential property: The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target.Get the serverName property: The target server name.Get the shardMapName property: The target shard map.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The target type.voidvalidate()Validates the instance.withDatabaseName(String databaseName) Set the databaseName property: The target database name.withElasticPoolName(String elasticPoolName) Set the elasticPoolName property: The target elastic pool name.withMembershipType(JobTargetGroupMembershipType membershipType) Set the membershipType property: Whether the target is included or excluded from the group.withRefreshCredential(String refreshCredential) Set the refreshCredential property: The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target.withServerName(String serverName) Set the serverName property: The target server name.withShardMapName(String shardMapName) Set the shardMapName property: The target shard map.withType(JobTargetType type) Set the type property: The target type.Methods inherited from class java.lang.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
-
JobTarget
public JobTarget()Creates an instance of JobTarget class.
-
-
Method Details
-
membershipType
Get the membershipType property: Whether the target is included or excluded from the group.- Returns:
- the membershipType value.
-
withMembershipType
Set the membershipType property: Whether the target is included or excluded from the group.- Parameters:
membershipType- the membershipType value to set.- Returns:
- the JobTarget object itself.
-
type
Get the type property: The target type.- Returns:
- the type value.
-
withType
Set the type property: The target type.- Parameters:
type- the type value to set.- Returns:
- the JobTarget object itself.
-
serverName
Get the serverName property: The target server name.- Returns:
- the serverName value.
-
withServerName
Set the serverName property: The target server name.- Parameters:
serverName- the serverName value to set.- Returns:
- the JobTarget object itself.
-
databaseName
Get the databaseName property: The target database name.- Returns:
- the databaseName value.
-
withDatabaseName
Set the databaseName property: The target database name.- Parameters:
databaseName- the databaseName value to set.- Returns:
- the JobTarget object itself.
-
elasticPoolName
Get the elasticPoolName property: The target elastic pool name.- Returns:
- the elasticPoolName value.
-
withElasticPoolName
Set the elasticPoolName property: The target elastic pool name.- Parameters:
elasticPoolName- the elasticPoolName value to set.- Returns:
- the JobTarget object itself.
-
shardMapName
Get the shardMapName property: The target shard map.- Returns:
- the shardMapName value.
-
withShardMapName
Set the shardMapName property: The target shard map.- Parameters:
shardMapName- the shardMapName value to set.- Returns:
- the JobTarget object itself.
-
refreshCredential
Get the refreshCredential property: The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target.- Returns:
- the refreshCredential value.
-
withRefreshCredential
Set the refreshCredential property: The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target.- Parameters:
refreshCredential- the refreshCredential value to set.- Returns:
- the JobTarget 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<JobTarget>- Throws:
IOException
-
fromJson
Reads an instance of JobTarget from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of JobTarget 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 JobTarget.
-