Share via


ApplicationPackageReference Class

  • java.lang.Object
    • com.azure.resourcemanager.batch.models.ApplicationPackageReference

Implements

public final class ApplicationPackageReference
implements JsonSerializable<ApplicationPackageReference>

Link to an application package inside the batch account.

Constructor Summary

Constructor Description
ApplicationPackageReference()

Creates an instance of ApplicationPackageReference class.

Method Summary

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

Reads an instance of ApplicationPackageReference from the JsonReader.

String id()

Get the id property: The ID of the application package to install.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String version()

Get the version property: If this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences.

ApplicationPackageReference withId(String id)

Set the id property: The ID of the application package to install.

ApplicationPackageReference withVersion(String version)

Set the version property: If this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences.

Methods inherited from java.lang.Object

Constructor Details

ApplicationPackageReference

public ApplicationPackageReference()

Creates an instance of ApplicationPackageReference class.

Method Details

fromJson

public static ApplicationPackageReference fromJson(JsonReader jsonReader)

Reads an instance of ApplicationPackageReference from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

id

public String id()

Get the id property: The ID of the application package to install. This must be inside the same batch account as the pool. This can either be a reference to a specific version or the default version if one exists.

Returns:

the id value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

version

public String version()

Get the version property: If this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409.

Returns:

the version value.

withId

public ApplicationPackageReference withId(String id)

Set the id property: The ID of the application package to install. This must be inside the same batch account as the pool. This can either be a reference to a specific version or the default version if one exists.

Parameters:

id - the id value to set.

Returns:

the ApplicationPackageReference object itself.

withVersion

public ApplicationPackageReference withVersion(String version)

Set the version property: If this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409.

Parameters:

version - the version value to set.

Returns:

the ApplicationPackageReference object itself.

Applies to