Class Key


  • public class Key
    extends Object
    Key
    • Constructor Detail

      • Key

        public Key()
    • Method Detail

      • identifier

        public Key identifier​(String identifier)
        The unique identifier of the shared key.
        Parameters:
        identifier -
        Returns:
        the current Key instance, allowing for method chaining
      • getIdentifier

        public String getIdentifier()
        The unique identifier of the shared key.
        Returns:
        identifier
      • setIdentifier

        public void setIdentifier​(String identifier)
        The unique identifier of the shared key.
        Parameters:
        identifier -
      • passphrase

        public Key passphrase​(String passphrase)
        The secure passphrase to protect the shared key.
        Parameters:
        passphrase -
        Returns:
        the current Key instance, allowing for method chaining
      • getPassphrase

        public String getPassphrase()
        The secure passphrase to protect the shared key.
        Returns:
        passphrase
      • setPassphrase

        public void setPassphrase​(String passphrase)
        The secure passphrase to protect the shared key.
        Parameters:
        passphrase -
      • version

        public Key version​(Integer version)
        The version number of the shared key.
        Parameters:
        version -
        Returns:
        the current Key instance, allowing for method chaining
      • getVersion

        public Integer getVersion()
        The version number of the shared key.
        Returns:
        version
      • setVersion

        public void setVersion​(Integer version)
        The version number of the shared key.
        Parameters:
        version -
      • equals

        public boolean equals​(Object o)
        Return true if this Key object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static Key fromJson​(String jsonString)
                            throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Key given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Key
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Key
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of Key to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException