Class Manifests.ManifestObject

  • Enclosing class:
    Manifests

    public static class Manifests.ManifestObject
    extends Object
    ManifestObject wrapper that encapsulates an object spec loaded from a supplied manifest.
    • Constructor Detail

      • ManifestObject

        public ManifestObject​(Map<String,​Object> source,
                              FilePath file)
        Build the manifest object from source.
        Parameters:
        source - The YAML map source for the object.
        file - The file containing the manifest.
    • Method Detail

      • getFile

        public FilePath getFile()
        Returns:
        The file containing this manifest.
      • getSource

        public Map<String,​Object> getSource()
        Returns:
        The YAML map source for the object.
      • getApiVersion

        public String getApiVersion()
        Returns:
        The apiVersion.
      • getKind

        public String getKind()
        Returns:
        The kind.
      • addLabel

        public void addLabel​(String key,
                             String value)
        Adds the specified label key and value to this Manifests.ManifestObject's metadata labels. Will ensure a label map exists upon execution.
        Parameters:
        key - The key of the label to be added.
        value - The value of the label to be added.
      • describe

        public String describe()
        Returns:
        The description of the object in {ApiVersion}/{Kind}: {Name}