Class SyncUpdateProperties

java.lang.Object
com.azure.resourcemanager.containerregistry.models.SyncUpdateProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<SyncUpdateProperties>

public final class SyncUpdateProperties extends Object implements com.azure.json.JsonSerializable<SyncUpdateProperties>
The parameters for updating the sync properties of the connected registry with its parent.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of SyncUpdateProperties class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of SyncUpdateProperties from the JsonReader.
    Get the messageTtl property: The period of time for which a message is available to sync before it is expired.
    Get the schedule property: The cron expression indicating the schedule that the connected registry will sync with its parent.
    Get the syncWindow property: The time window during which sync is enabled for each schedule occurrence.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the messageTtl property: The period of time for which a message is available to sync before it is expired.
    withSchedule(String schedule)
    Set the schedule property: The cron expression indicating the schedule that the connected registry will sync with its parent.
    Set the syncWindow property: The time window during which sync is enabled for each schedule occurrence.

    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

    • SyncUpdateProperties

      public SyncUpdateProperties()
      Creates an instance of SyncUpdateProperties class.
  • Method Details

    • schedule

      public String schedule()
      Get the schedule property: The cron expression indicating the schedule that the connected registry will sync with its parent.
      Returns:
      the schedule value.
    • withSchedule

      public SyncUpdateProperties withSchedule(String schedule)
      Set the schedule property: The cron expression indicating the schedule that the connected registry will sync with its parent.
      Parameters:
      schedule - the schedule value to set.
      Returns:
      the SyncUpdateProperties object itself.
    • syncWindow

      public Duration syncWindow()
      Get the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601.
      Returns:
      the syncWindow value.
    • withSyncWindow

      public SyncUpdateProperties withSyncWindow(Duration syncWindow)
      Set the syncWindow property: The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601.
      Parameters:
      syncWindow - the syncWindow value to set.
      Returns:
      the SyncUpdateProperties object itself.
    • messageTtl

      public Duration messageTtl()
      Get the messageTtl property: The period of time for which a message is available to sync before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601.
      Returns:
      the messageTtl value.
    • withMessageTtl

      public SyncUpdateProperties withMessageTtl(Duration messageTtl)
      Set the messageTtl property: The period of time for which a message is available to sync before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601.
      Parameters:
      messageTtl - the messageTtl value to set.
      Returns:
      the SyncUpdateProperties object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

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

      public static SyncUpdateProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SyncUpdateProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SyncUpdateProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the SyncUpdateProperties.