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 -
Method Summary
Modifier and TypeMethodDescriptionstatic SyncUpdatePropertiesfromJson(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.schedule()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.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withMessageTtl(Duration messageTtl) 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.withSyncWindow(Duration syncWindow) 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, waitMethods 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
Get the schedule property: The cron expression indicating the schedule that the connected registry will sync with its parent.- Returns:
- the schedule value.
-
withSchedule
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
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
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
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
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
- Specified by:
toJsonin interfacecom.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.
-