public static class ImmutableCamelCatalog.Builder extends Object
ImmutableCamelCatalog.
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
ImmutableCamelCatalog instances. |
| Modifier and Type | Method and Description |
|---|---|
CamelCatalog.Builder |
apiVersion(String apiVersion)
Initializes the value for the
apiVersion attribute. |
ImmutableCamelCatalog |
build()
Builds a new
ImmutableCamelCatalog. |
CamelCatalog.Builder |
from(CamelCatalog instance)
Fill a builder with attribute values from the provided
CamelCatalog instance. |
CamelCatalog.Builder |
kind(String kind)
Initializes the value for the
kind attribute. |
CamelCatalog.Builder |
metadata(ObjectMeta metadata)
Initializes the value for the
metadata attribute. |
CamelCatalog.Builder |
spec(CamelCatalogSpec spec)
Initializes the value for the
spec attribute. |
public Builder()
ImmutableCamelCatalog instances.
new CamelCatalog.Builder()
.apiVersion(String) // optional apiVersion
.kind(String) // optional kind
.metadata(org.apache.camel.k.tooling.maven.model.k8s.ObjectMeta) // required metadata
.spec(org.apache.camel.k.tooling.maven.model.crd.CamelCatalogSpec) // required spec
.build();
public final CamelCatalog.Builder from(CamelCatalog instance)
CamelCatalog 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 CamelCatalog.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 CamelCatalog.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 final CamelCatalog.Builder metadata(ObjectMeta metadata)
metadata attribute.metadata - The value for metadatathis builder for use in a chained invocationpublic final CamelCatalog.Builder spec(CamelCatalogSpec spec)
spec attribute.spec - The value for specthis builder for use in a chained invocationpublic ImmutableCamelCatalog build()
ImmutableCamelCatalog.IllegalStateException - if any required attributes are missingCopyright © 2019 The Apache Software Foundation. All rights reserved.