Class SecretResponse

    • Constructor Detail

      • SecretResponse

        public SecretResponse()
    • Method Detail

      • getData

        public final Map<String,​Object> getData()
        Get complete data object.
        Returns:
        data map
        Since:
        0.4.0
      • getMetadata

        public final VersionMetadata getMetadata()
        Get secret metadata. This is only available for KV v2 secrets.
        Returns:
        Metadata of the secret.
        Since:
        0.8
      • get

        public final Object get​(String key)
        Get a single value for given key.
        Parameters:
        key - the key
        Returns:
        the value or null if absent
        Since:
        0.4.0
      • getValue

        @Deprecated
        public final String getValue()
        Deprecated.
        Deprecated artifact, will be removed at latest at v1.0.0
        Get data element for key "value". Method for backwards compatibility in case of simple secrets.
        Returns:
        the value
      • getValue

        @Deprecated
        public final <T> T getValue​(Class<T> type)
                             throws InvalidResponseException
        Deprecated.
        Deprecated artifact, will be removed at latest at v1.0.0
        Get response parsed as JSON.
        Type Parameters:
        T - Class to parse response
        Parameters:
        type - Class to parse response
        Returns:
        Parsed object
        Throws:
        InvalidResponseException - on parsing error
        Since:
        0.3
      • get

        public final <T> T get​(String key,
                               Class<T> type)
                        throws InvalidResponseException
        Get response parsed as JSON.
        Type Parameters:
        T - Class to parse response
        Parameters:
        key - the key
        type - Class to parse response
        Returns:
        Parsed object or null if absent
        Throws:
        InvalidResponseException - on parsing error
        Since:
        0.4.0