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

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

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

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of SyncProperties from the JsonReader.
    Get the gatewayEndpoint property: The gateway endpoint used by the connected registry to communicate with its parent.
    Get the lastSyncTime property: The last time a sync occurred between the connected registry and its parent.
    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)
    Get the tokenId property: The resource ID of the ACR token used to authenticate the connected registry to its parent during sync.
    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.
    Set the tokenId property: The resource ID of the ACR token used to authenticate the connected registry to its parent during sync.

    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

    • SyncProperties

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

    • tokenId

      public String tokenId()
      Get the tokenId property: The resource ID of the ACR token used to authenticate the connected registry to its parent during sync.
      Returns:
      the tokenId value.
    • withTokenId

      public SyncProperties withTokenId(String tokenId)
      Set the tokenId property: The resource ID of the ACR token used to authenticate the connected registry to its parent during sync.
      Parameters:
      tokenId - the tokenId value to set.
      Returns:
      the SyncProperties object itself.
    • 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 SyncProperties 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 SyncProperties 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 SyncProperties 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 SyncProperties 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 SyncProperties 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 SyncProperties object itself.
    • lastSyncTime

      public OffsetDateTime lastSyncTime()
      Get the lastSyncTime property: The last time a sync occurred between the connected registry and its parent.
      Returns:
      the lastSyncTime value.
    • gatewayEndpoint

      public String gatewayEndpoint()
      Get the gatewayEndpoint property: The gateway endpoint used by the connected registry to communicate with its parent.
      Returns:
      the gatewayEndpoint value.
    • 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<SyncProperties>
      Throws:
      IOException
    • fromJson

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