JobTarget Class

  • java.lang.Object
    • com.azure.resourcemanager.sql.models.JobTarget

Implements

public final class JobTarget
implements JsonSerializable<JobTarget>

A job target, for example a specific database or a container of databases that is evaluated during job execution.

Constructor Summary

Constructor Description
JobTarget()

Creates an instance of JobTarget class.

Method Summary

Modifier and Type Method and Description
String databaseName()

Get the databaseName property: The target database name.

String elasticPoolName()

Get the elasticPoolName property: The target elastic pool name.

static JobTarget fromJson(JsonReader jsonReader)

Reads an instance of JobTarget from the JsonReader.

JobTargetGroupMembershipType membershipType()

Get the membershipType property: Whether the target is included or excluded from the group.

String 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.

String serverName()

Get the serverName property: The target server name.

String shardMapName()

Get the shardMapName property: The target shard map.

JsonWriter toJson(JsonWriter jsonWriter)
JobTargetType type()

Get the type property: The target type.

void validate()

Validates the instance.

JobTarget withDatabaseName(String databaseName)

Set the databaseName property: The target database name.

JobTarget withElasticPoolName(String elasticPoolName)

Set the elasticPoolName property: The target elastic pool name.

JobTarget withMembershipType(JobTargetGroupMembershipType membershipType)

Set the membershipType property: Whether the target is included or excluded from the group.

JobTarget 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.

JobTarget withServerName(String serverName)

Set the serverName property: The target server name.

JobTarget withShardMapName(String shardMapName)

Set the shardMapName property: The target shard map.

JobTarget withType(JobTargetType type)

Set the type property: The target type.

Methods inherited from java.lang.Object

Constructor Details

JobTarget

public JobTarget()

Creates an instance of JobTarget class.

Method Details

databaseName

public String databaseName()

Get the databaseName property: The target database name.

Returns:

the databaseName value.

elasticPoolName

public String elasticPoolName()

Get the elasticPoolName property: The target elastic pool name.

Returns:

the elasticPoolName value.

fromJson

public static JobTarget fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

membershipType

public JobTargetGroupMembershipType membershipType()

Get the membershipType property: Whether the target is included or excluded from the group.

Returns:

the membershipType value.

refreshCredential

public String 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.

serverName

public String serverName()

Get the serverName property: The target server name.

Returns:

the serverName value.

shardMapName

public String shardMapName()

Get the shardMapName property: The target shard map.

Returns:

the shardMapName value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public JobTargetType type()

Get the type property: The target type.

Returns:

the type value.

validate

public void validate()

Validates the instance.

withDatabaseName

public JobTarget withDatabaseName(String databaseName)

Set the databaseName property: The target database name.

Parameters:

databaseName - the databaseName value to set.

Returns:

the JobTarget object itself.

withElasticPoolName

public JobTarget withElasticPoolName(String elasticPoolName)

Set the elasticPoolName property: The target elastic pool name.

Parameters:

elasticPoolName - the elasticPoolName value to set.

Returns:

the JobTarget object itself.

withMembershipType

public JobTarget withMembershipType(JobTargetGroupMembershipType membershipType)

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.

withRefreshCredential

public JobTarget 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.

Parameters:

refreshCredential - the refreshCredential value to set.

Returns:

the JobTarget object itself.

withServerName

public JobTarget withServerName(String serverName)

Set the serverName property: The target server name.

Parameters:

serverName - the serverName value to set.

Returns:

the JobTarget object itself.

withShardMapName

public JobTarget withShardMapName(String shardMapName)

Set the shardMapName property: The target shard map.

Parameters:

shardMapName - the shardMapName value to set.

Returns:

the JobTarget object itself.

withType

public JobTarget withType(JobTargetType type)

Set the type property: The target type.

Parameters:

type - the type value to set.

Returns:

the JobTarget object itself.

Applies to