Class ConfigurationSnapshot

java.lang.Object
com.azure.data.appconfiguration.models.ConfigurationSnapshot
All Implemented Interfaces:
com.azure.json.JsonSerializable<ConfigurationSnapshot>

public final class ConfigurationSnapshot extends Object implements com.azure.json.JsonSerializable<ConfigurationSnapshot>
The ConfigurationSnapshot model.
  • Constructor Details

    • ConfigurationSnapshot

      public ConfigurationSnapshot(List<ConfigurationSettingsFilter> filters)
      Creates an instance of ConfigurationSnapshot class.
      Parameters:
      filters - the filters value to set.
  • Method Details

    • getName

      public String getName()
      Get the name property: The name of the snapshot.
      Returns:
      the name value.
    • getStatus

      public ConfigurationSnapshotStatus getStatus()
      Get the status property: The current status of the snapshot.
      Returns:
      the status value.
    • getFilters

      public List<ConfigurationSettingsFilter> getFilters()
      Get the filters property: A list of filters used to filter the key-values included in the snapshot.
      Returns:
      the filters value.
    • getSnapshotComposition

      public SnapshotComposition getSnapshotComposition()
      Get the snapshotComposition property: The composition type describes how the key-values within the snapshot are composed. The 'key' composition type ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are no two key-values containing the same key and label.
      Returns:
      the snapshotComposition value.
    • setSnapshotComposition

      public ConfigurationSnapshot setSnapshotComposition(SnapshotComposition snapshotComposition)
      Set the snapshotComposition property: The composition type describes how the key-values within the snapshot are composed. The 'key' composition type ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are no two key-values containing the same key and label.
      Parameters:
      snapshotComposition - the snapshotComposition value to set.
      Returns:
      the ConfigurationSnapshot object itself.
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      Get the createdAt property: The time that the snapshot was created.
      Returns:
      the createdAt value.
    • getExpiresAt

      public OffsetDateTime getExpiresAt()
      Get the expiresAt property: The time that the snapshot will expire.
      Returns:
      the expiresAt value.
    • getRetentionPeriod

      public Duration getRetentionPeriod()
      Get the retentionPeriod property: The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used.
      Returns:
      the retentionPeriod value.
    • setRetentionPeriod

      public ConfigurationSnapshot setRetentionPeriod(Duration retentionPeriod)
      Set the retentionPeriod property: The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used.
      Parameters:
      retentionPeriod - the retentionPeriod value to set.
      Returns:
      the ConfigurationSnapshot object itself.
    • getSizeInBytes

      public Long getSizeInBytes()
      Get the sizeInBytes property: The size in bytes of the snapshot.
      Returns:
      the sizeInBytes value.
    • getItemCount

      public Long getItemCount()
      Get the itemCount property: The amount of key-values in the snapshot.
      Returns:
      the itemCount value.
    • getTags

      public Map<String,String> getTags()
      Get the tags property: The tags of the snapshot.
      Returns:
      the tags value.
    • setTags

      public ConfigurationSnapshot setTags(Map<String,String> tags)
      Set the tags property: The tags of the snapshot.
      Parameters:
      tags - the tags value to set.
      Returns:
      the ConfigurationSnapshot object itself.
    • getETag

      public String getETag()
      Get the eTag property: A value representing the current state of the snapshot.
      Returns:
      the eTag value.
    • toJson

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

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