Class BatchTaskAddResult

java.lang.Object
com.azure.compute.batch.models.BatchTaskAddResult
All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchTaskAddResult>

public final class BatchTaskAddResult extends Object implements com.azure.json.JsonSerializable<BatchTaskAddResult>
Result for a single Task added as part of an add Task collection operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of BatchTaskAddResult from the JsonReader.
    Get the error property: The error encountered while attempting to add the Task.
    Get the eTag property: The ETag of the Task, if the Task was successfully added.
    Get the lastModified property: The last modified time of the Task.
    Get the location property: The URL of the Task, if the Task was successfully added.
    Get the status property: The status of the add Task request.
    Get the taskId property: The ID of the Task for which this is the result.
    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
  • Method Details

    • getStatus

      public BatchTaskAddStatus getStatus()
      Get the status property: The status of the add Task request.
      Returns:
      the status value.
    • getTaskId

      public String getTaskId()
      Get the taskId property: The ID of the Task for which this is the result.
      Returns:
      the taskId value.
    • getETag

      public String getETag()
      Get the eTag property: The ETag of the Task, if the Task was successfully added. You can use this to detect whether the Task has changed between requests. In particular, you can be pass the ETag with an Update Task request to specify that your changes should take effect only if nobody else has modified the Job in the meantime.
      Returns:
      the eTag value.
    • getLastModified

      public OffsetDateTime getLastModified()
      Get the lastModified property: The last modified time of the Task.
      Returns:
      the lastModified value.
    • getLocation

      public String getLocation()
      Get the location property: The URL of the Task, if the Task was successfully added.
      Returns:
      the location value.
    • getError

      public BatchError getError()
      Get the error property: The error encountered while attempting to add the Task.
      Returns:
      the error value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<BatchTaskAddResult>
      Throws:
      IOException
    • fromJson

      public static BatchTaskAddResult fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of BatchTaskAddResult from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of BatchTaskAddResult 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 BatchTaskAddResult.