Class KeyValueProperties


  • public final class KeyValueProperties
    extends Object
    All key-value properties.
    • Constructor Detail

      • KeyValueProperties

        public KeyValueProperties()
    • Method Detail

      • key

        public String key()
        Get the key property: The primary identifier of a key-value. The key is used in unison with the label to uniquely identify a key-value.
        Returns:
        the key value.
      • label

        public String label()
        Get the label property: A value used to group key-values. The label is used in unison with the key to uniquely identify a key-value.
        Returns:
        the label value.
      • value

        public String value()
        Get the value property: The value of the key-value.
        Returns:
        the value value.
      • withValue

        public KeyValueProperties withValue​(String value)
        Set the value property: The value of the key-value.
        Parameters:
        value - the value value to set.
        Returns:
        the KeyValueProperties object itself.
      • contentType

        public String contentType()
        Get the contentType property: The content type of the key-value's value. Providing a proper content-type can enable transformations of values when they are retrieved by applications.
        Returns:
        the contentType value.
      • withContentType

        public KeyValueProperties withContentType​(String contentType)
        Set the contentType property: The content type of the key-value's value. Providing a proper content-type can enable transformations of values when they are retrieved by applications.
        Parameters:
        contentType - the contentType value to set.
        Returns:
        the KeyValueProperties object itself.
      • etag

        public String etag()
        Get the etag property: An ETag indicating the state of a key-value within a configuration store.
        Returns:
        the etag value.
      • lastModified

        public OffsetDateTime lastModified()
        Get the lastModified property: The last time a modifying operation was performed on the given key-value.
        Returns:
        the lastModified value.
      • locked

        public Boolean locked()
        Get the locked property: A value indicating whether the key-value is locked. A locked key-value may not be modified until it is unlocked.
        Returns:
        the locked value.
      • tags

        public Map<String,​String> tags()
        Get the tags property: A dictionary of tags that can help identify what a key-value may be applicable for.
        Returns:
        the tags value.
      • withTags

        public KeyValueProperties withTags​(Map<String,​String> tags)
        Set the tags property: A dictionary of tags that can help identify what a key-value may be applicable for.
        Parameters:
        tags - the tags value to set.
        Returns:
        the KeyValueProperties object itself.
      • validate

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