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 - The unique identifier of the shared key.
        Returns:
        the current Key instance, allowing for method chaining
      • getIdentifier

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

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

        public Key passphrase​(String passphrase)
        The secure passphrase to protect the shared key. Must consist of: * At least 12 characters. * At least 1 uppercase letter: `[A-Z]`. * At least 1 lowercase letter: `[a-z]`. * At least 1 digit: `[0-9]`. * At least 1 special character. Limited to the following: `~`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `)`, `_`, `+`, `=`, `}`, `{`, `]`, `[`, `;`, `:`, `?`, `.`, `,`, `>`, `<`.
        Parameters:
        passphrase - The secure passphrase to protect the shared key. Must consist of: * At least 12 characters. * At least 1 uppercase letter: `[A-Z]`. * At least 1 lowercase letter: `[a-z]`. * At least 1 digit: `[0-9]`. * At least 1 special character. Limited to the following: `~`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `)`, `_`, `+`, `=`, `}`, `{`, `]`, `[`, `;`, `:`, `?`, `.`, `,`, `>`, `<`.
        Returns:
        the current Key instance, allowing for method chaining
      • getPassphrase

        public String getPassphrase()
        The secure passphrase to protect the shared key. Must consist of: * At least 12 characters. * At least 1 uppercase letter: `[A-Z]`. * At least 1 lowercase letter: `[a-z]`. * At least 1 digit: `[0-9]`. * At least 1 special character. Limited to the following: `~`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `)`, `_`, `+`, `=`, `}`, `{`, `]`, `[`, `;`, `:`, `?`, `.`, `,`, `>`, `<`.
        Returns:
        passphrase The secure passphrase to protect the shared key. Must consist of: * At least 12 characters. * At least 1 uppercase letter: `[A-Z]`. * At least 1 lowercase letter: `[a-z]`. * At least 1 digit: `[0-9]`. * At least 1 special character. Limited to the following: `~`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `)`, `_`, `+`, `=`, `}`, `{`, `]`, `[`, `;`, `:`, `?`, `.`, `,`, `>`, `<`.
      • setPassphrase

        public void setPassphrase​(String passphrase)
        The secure passphrase to protect the shared key. Must consist of: * At least 12 characters. * At least 1 uppercase letter: `[A-Z]`. * At least 1 lowercase letter: `[a-z]`. * At least 1 digit: `[0-9]`. * At least 1 special character. Limited to the following: `~`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `)`, `_`, `+`, `=`, `}`, `{`, `]`, `[`, `;`, `:`, `?`, `.`, `,`, `>`, `<`.
        Parameters:
        passphrase - The secure passphrase to protect the shared key. Must consist of: * At least 12 characters. * At least 1 uppercase letter: `[A-Z]`. * At least 1 lowercase letter: `[a-z]`. * At least 1 digit: `[0-9]`. * At least 1 special character. Limited to the following: `~`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `)`, `_`, `+`, `=`, `}`, `{`, `]`, `[`, `;`, `:`, `?`, `.`, `,`, `>`, `<`.
      • version

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

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

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

        public Key includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • 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
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • 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