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 Details

    • BatchApplicationPackageReference

      public BatchApplicationPackageReference(String applicationId)
      Creates an instance of BatchApplicationPackageReference class.
      Parameters:
      applicationId - the applicationId value to set.
  • Method Details

    • 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 com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.