Class BatchJobSchedule

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

public final class BatchJobSchedule extends Object implements com.azure.json.JsonSerializable<BatchJobSchedule>
A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a specification used to create each Job.
  • Constructor Details

    • BatchJobSchedule

      public BatchJobSchedule(BatchJobSpecification jobSpecification)
      Creates an instance of BatchJobSchedule class.
      Parameters:
      jobSpecification - the jobSpecification value to set.
  • Method Details

    • getId

      public String getId()
      Get the id property: A string that uniquely identifies the schedule within the Account.
      Returns:
      the id value.
    • getDisplayName

      public String getDisplayName()
      Get the displayName property: The display name for the schedule.
      Returns:
      the displayName value.
    • getUrl

      public String getUrl()
      Get the url property: The URL of the Job Schedule.
      Returns:
      the url value.
    • getETag

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

      public OffsetDateTime getLastModified()
      Get the lastModified property: The last modified time of the Job Schedule. This is the last time at which the schedule level data, such as the Job specification or recurrence information, changed. It does not factor in job-level changes such as new Jobs being created or Jobs changing state.
      Returns:
      the lastModified value.
    • getCreationTime

      public OffsetDateTime getCreationTime()
      Get the creationTime property: The creation time of the Job Schedule.
      Returns:
      the creationTime value.
    • getState

      public BatchJobScheduleState getState()
      Get the state property: The current state of the Job Schedule.
      Returns:
      the state value.
    • getStateTransitionTime

      public OffsetDateTime getStateTransitionTime()
      Get the stateTransitionTime property: The time at which the Job Schedule entered the current state.
      Returns:
      the stateTransitionTime value.
    • getPreviousState

      public BatchJobScheduleState getPreviousState()
      Get the previousState property: The previous state of the Job Schedule. This property is not present if the Job Schedule is in its initial active state.
      Returns:
      the previousState value.
    • getPreviousStateTransitionTime

      public OffsetDateTime getPreviousStateTransitionTime()
      Get the previousStateTransitionTime property: The time at which the Job Schedule entered its previous state. This property is not present if the Job Schedule is in its initial active state.
      Returns:
      the previousStateTransitionTime value.
    • getSchedule

      public BatchJobScheduleConfiguration getSchedule()
      Get the schedule property: The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time.
      Returns:
      the schedule value.
    • setSchedule

      public BatchJobSchedule setSchedule(BatchJobScheduleConfiguration schedule)
      Set the schedule property: The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time.
      Parameters:
      schedule - the schedule value to set.
      Returns:
      the BatchJobSchedule object itself.
    • getJobSpecification

      public BatchJobSpecification getJobSpecification()
      Get the jobSpecification property: The details of the Jobs to be created on this schedule.
      Returns:
      the jobSpecification value.
    • getExecutionInfo

      public BatchJobScheduleExecutionInfo getExecutionInfo()
      Get the executionInfo property: Information about Jobs that have been and will be run under this schedule.
      Returns:
      the executionInfo value.
    • getMetadata

      public List<MetadataItem> getMetadata()
      Get the metadata property: A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
      Returns:
      the metadata value.
    • setMetadata

      public BatchJobSchedule setMetadata(List<MetadataItem> metadata)
      Set the metadata property: A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.
      Parameters:
      metadata - the metadata value to set.
      Returns:
      the BatchJobSchedule object itself.
    • getStats

      public BatchJobScheduleStatistics getStats()
      Get the stats property: The lifetime resource usage statistics for the Job Schedule. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes.
      Returns:
      the stats value.
    • toJson

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

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