Package com.azure.compute.batch.models
Class BatchApplicationPackageReference
java.lang.Object
com.azure.compute.batch.models.BatchApplicationPackageReference
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchApplicationPackageReference>
public final class BatchApplicationPackageReference
extends Object
implements com.azure.json.JsonSerializable<BatchApplicationPackageReference>
A reference to an Package to be deployed to Compute Nodes.
-
Constructor Summary
ConstructorsConstructorDescriptionBatchApplicationPackageReference
(String applicationId) Creates an instance of BatchApplicationPackageReference class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of BatchApplicationPackageReference from the JsonReader.Get the applicationId property: The ID of the application to deploy.Get the version property: The version of the application to deploy.setVersion
(String version) Set the version property: The version of the application to deploy.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
BatchApplicationPackageReference
Creates an instance of BatchApplicationPackageReference class.- Parameters:
applicationId
- the applicationId value to set.
-
-
Method Details
-
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
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
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<BatchApplicationPackageReference>
- Throws:
IOException
-
fromJson
public static BatchApplicationPackageReference fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the BatchApplicationPackageReference.
-