Share via


BatchApplicationPackageReference Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchApplicationPackageReference

Implements

public final class BatchApplicationPackageReference
implements JsonSerializable<BatchApplicationPackageReference>

A reference to an Package to be deployed to Compute Nodes.

Constructor Summary

Constructor Description
BatchApplicationPackageReference(String applicationId)

Creates an instance of BatchApplicationPackageReference class.

Method Summary

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

Reads an instance of BatchApplicationPackageReference from the JsonReader.

String getApplicationId()

Get the applicationId property: The ID of the application to deploy.

String getVersion()

Get the version property: The version of the application to deploy.

BatchApplicationPackageReference setVersion(String version)

Set the version property: The version of the application to deploy.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchApplicationPackageReference

public BatchApplicationPackageReference(String applicationId)

Creates an instance of BatchApplicationPackageReference class.

Parameters:

applicationId - the applicationId value to set.

Method Details

fromJson

public static BatchApplicationPackageReference fromJson(JsonReader jsonReader)

Reads an instance of BatchApplicationPackageReference from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getApplicationId

public String getApplicationId()

Get the applicationId property: The ID of the application to deploy. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}).

Returns:

the applicationId value.

getVersion

public String getVersion()

Get the version property: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted on a Pool, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If this is omitted on a Task, and no default version is specified for this application, the Task fails with a pre-processing error.

Returns:

the version value.

setVersion

public BatchApplicationPackageReference setVersion(String version)

Set the version property: The version of the application to deploy. If omitted, the default version is deployed. If this is omitted on a Pool, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If this is omitted on a Task, and no default version is specified for this application, the Task fails with a pre-processing error.

Parameters:

version - the version value to set.

Returns:

the BatchApplicationPackageReference object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to