Class CMAApiKey


  • public class CMAApiKey
    extends CMAResource
    Class representing api keys created.
    • Constructor Detail

      • CMAApiKey

        public CMAApiKey()
        Create a new api key.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns:
        What is the name of this key?
      • setName

        public CMAApiKey setName​(java.lang.String name)
        Update the name of the key.
        Parameters:
        name - new name to be used.
        Returns:
        this instance for ease of chaining.
      • getDescription

        public java.lang.String getDescription()
        Returns:
        the description of this key.
      • setDescription

        public CMAApiKey setDescription​(java.lang.String description)
        Update the description of this key.
        Parameters:
        description - to be changed to.
        Returns:
        this instance for chaining.
      • getAccessToken

        public java.lang.String getAccessToken()
        Returns:
        readonly api access token for this key.
      • setAccessToken

        public CMAApiKey setAccessToken​(java.lang.String accessToken)
      • getPreviewApiKey

        public CMALink getPreviewApiKey()
        Returns:
        readonly preview api key part.
      • setPreviewApiKey

        public CMAApiKey setPreviewApiKey​(CMALink previewApiKey)
      • getEnvironments

        public java.util.List<CMALink> getEnvironments()
        Returns:
        list of links to environments this key is active on.
      • addEnvironment

        public CMAApiKey addEnvironment​(java.lang.String environment)
        Add environment ids to the api key.

        Parameters:
        environment - a new environment to be affected by this key. A link for the payload will be created automatically.
        Returns:
        the api key for easy chaining.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class CMAResource
        Returns:
        a human readable string, representing the object.