Class Manifests.ManifestObject
- java.lang.Object
-
- com.google.jenkins.plugins.k8sengine.Manifests.ManifestObject
-
-
Constructor Summary
Constructors Constructor Description ManifestObject(Map<String,Object> source, FilePath file)
Build the manifest object from source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLabel(String key, String value)
Adds the specified label key and value to thisManifests.ManifestObject
's metadata labels.String
describe()
String
getApiVersion()
FilePath
getFile()
String
getKind()
Optional<String>
getName()
Map<String,String>
getOrCreateLabels()
Ensures thisManifests.ManifestObject
has labels, modifying in-place as needed, finally returning the labels.Map<String,Object>
getSource()
-
-
-
Method Detail
-
getFile
public FilePath getFile()
- Returns:
- The file containing this manifest.
-
getApiVersion
public String getApiVersion()
- Returns:
- The apiVersion.
-
getKind
public String getKind()
- Returns:
- The kind.
-
getOrCreateLabels
public Map<String,String> getOrCreateLabels()
Ensures thisManifests.ManifestObject
has labels, modifying in-place as needed, finally returning the labels.- Returns:
- The labels for this
Manifests.ManifestObject
.
-
addLabel
public void addLabel(String key, String value)
Adds the specified label key and value to thisManifests.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}
-
-