Class CommonMetadata.Builder<T extends CommonMetadata.Builder>
java.lang.Object
com.netflix.genie.common.internal.dtos.CommonMetadata.Builder<T>
- Type Parameters:
T
- Type of builder that extends this
- Direct Known Subclasses:
ApplicationMetadata.Builder
,ClusterMetadata.Builder
,CommandMetadata.Builder
,FinishedJob.Builder
,JobMetadata.Builder
- Enclosing class:
- CommonMetadata
Builder for common fields.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithDescription
(String description) Set the description for the resource.withMetadata
(com.fasterxml.jackson.databind.JsonNode metadata) With the metadata to set for the job as a JsonNode.withMetadata
(String metadata) With the ad-hoc metadata to set for the resource as a string of valid JSON.Set the tags to use for the resource.
-
Constructor Details
-
Builder
Constructor with required fields.- Parameters:
name
- The name of the resourceuser
- The user owning the resourceversion
- The version of hte resource
-
-
Method Details
-
withDescription
Set the description for the resource.- Parameters:
description
- The description to use- Returns:
- The builder
-
withTags
Set the tags to use for the resource.- Parameters:
tags
- The tags to use. Blanks will be removed- Returns:
- The builder
-
withMetadata
With the metadata to set for the job as a JsonNode.- Parameters:
metadata
- The metadata to set- Returns:
- The builder
-
withMetadata
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:
IllegalArgumentException
- On invalid JSON
-