Class CommonMetadata.Builder<T extends CommonMetadata.Builder>

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Builder​(java.lang.String name, java.lang.String user, java.lang.String version)
      Constructor with required fields.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T withDescription​(java.lang.String description)
      Set the description for the resource.
      T withMetadata​(com.fasterxml.jackson.databind.JsonNode metadata)
      With the metadata to set for the job as a JsonNode.
      T withMetadata​(java.lang.String metadata)
      With the ad-hoc metadata to set for the resource as a string of valid JSON.
      T withTags​(java.util.Set<java.lang.String> tags)
      Set the tags to use for the resource.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Builder

        protected Builder​(java.lang.String name,
                          java.lang.String user,
                          java.lang.String version)
        Constructor with required fields.
        Parameters:
        name - The name of the resource
        user - The user owning the resource
        version - The version of hte resource
    • Method Detail

      • withDescription

        public T withDescription​(@Nullable
                                 java.lang.String description)
        Set the description for the resource.
        Parameters:
        description - The description to use
        Returns:
        The builder
      • withTags

        public T withTags​(@Nullable
                          java.util.Set<java.lang.String> tags)
        Set the tags to use for the resource.
        Parameters:
        tags - The tags to use. Blanks will be removed
        Returns:
        The builder
      • withMetadata

        public T withMetadata​(@Nullable
                              com.fasterxml.jackson.databind.JsonNode metadata)
        With the metadata to set for the job as a JsonNode.
        Parameters:
        metadata - The metadata to set
        Returns:
        The builder
      • withMetadata

        public T withMetadata​(@Nullable
                              java.lang.String metadata)
                       throws java.lang.IllegalArgumentException
        With the ad-hoc metadata to set for the resource as a string of valid JSON.
        Parameters:
        metadata - The metadata to set. Must be valid JSON
        Returns:
        The builder
        Throws:
        java.lang.IllegalArgumentException - On invalid JSON