public static class ImmutableTypeMeta.Builder extends Object
ImmutableTypeMeta.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Constructor and Description |
|---|
Builder()
Creates a builder for
ImmutableTypeMeta instances. |
| Modifier and Type | Method and Description |
|---|---|
TypeMeta.Builder |
apiVersion(String apiVersion)
Initializes the value for the
apiVersion attribute. |
ImmutableTypeMeta |
build()
Builds a new
ImmutableTypeMeta. |
TypeMeta.Builder |
from(TypeMeta instance)
Fill a builder with attribute values from the provided
TypeMeta instance. |
TypeMeta.Builder |
kind(String kind)
Initializes the value for the
kind attribute. |
public Builder()
ImmutableTypeMeta instances.
new TypeMeta.Builder()
.apiVersion(String) // optional apiVersion
.kind(String) // optional kind
.build();
public final TypeMeta.Builder from(TypeMeta instance)
TypeMeta instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final TypeMeta.Builder apiVersion(String apiVersion)
apiVersion attribute.
If not set, this attribute will have a default value as returned by the initializer of apiVersion.
apiVersion - The value for apiVersionthis builder for use in a chained invocationpublic final TypeMeta.Builder kind(String kind)
kind attribute.
If not set, this attribute will have a default value as returned by the initializer of kind.
kind - The value for kindthis builder for use in a chained invocationpublic ImmutableTypeMeta build()
ImmutableTypeMeta.IllegalStateException - if any required attributes are missingCopyright © 2019 The Apache Software Foundation. All rights reserved.