Class ImmutableCamelCatalogSpec.Builder
java.lang.Object
org.apache.camel.k.catalog.model.k8s.crd.ImmutableCamelCatalogSpec.Builder
- Direct Known Subclasses:
CamelCatalogSpec.Builder
- Enclosing class:
- ImmutableCamelCatalogSpec
Builds instances of type
ImmutableCamelCatalogSpec.
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal CamelCatalogSpec.Builderartifacts(Map<String, ? extends CamelArtifact> entries) Sets or replaces all mappings from the specified map as entries for theartifactsmap.build()Builds a newImmutableCamelCatalogSpec.final CamelCatalogSpec.Builderfrom(CamelCatalogSpec instance) Fill a builder with attribute values from the providedCamelCatalogSpecinstance.final CamelCatalogSpec.Builderloaders(Map<String, ? extends CamelLoader> entries) Sets or replaces all mappings from the specified map as entries for theloadersmap.final CamelCatalogSpec.BuilderputAllArtifacts(Map<String, ? extends CamelArtifact> entries) Put all mappings from the specified map as entries toartifactsmap.final CamelCatalogSpec.BuilderputAllLoaders(Map<String, ? extends CamelLoader> entries) Put all mappings from the specified map as entries toloadersmap.final CamelCatalogSpec.BuilderputArtifact(String key, CamelArtifact value) Put one entry to theartifactsmap.final CamelCatalogSpec.BuilderputArtifact(Map.Entry<String, ? extends CamelArtifact> entry) Put one entry to theartifactsmap.final CamelCatalogSpec.BuilderputLoader(String key, CamelLoader value) Put one entry to theloadersmap.final CamelCatalogSpec.BuilderputLoader(Map.Entry<String, ? extends CamelLoader> entry) Put one entry to theloadersmap.final CamelCatalogSpec.Builderruntime(RuntimeSpec runtime) Initializes the value for theruntimeattribute.
-
Constructor Details
-
Builder
public Builder()Creates a builder forImmutableCamelCatalogSpecinstances.new CamelCatalogSpec.Builder() .runtime(org.apache.camel.k.catalog.model.k8s.crd.RuntimeSpec) // requiredruntime.putArtifact|putAllArtifacts(String => org.apache.camel.k.catalog.model.CamelArtifact) //artifactsmappings .putLoader|putAllLoaders(String => org.apache.camel.k.catalog.model.CamelLoader) //loadersmappings .build();
-
-
Method Details
-
from
Fill a builder with attribute values from the providedCamelCatalogSpecinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
runtime
Initializes the value for theruntimeattribute.- Parameters:
runtime- The value for runtime- Returns:
thisbuilder for use in a chained invocation
-
putArtifact
Put one entry to theartifactsmap.- Parameters:
key- The key in the artifacts mapvalue- The associated value in the artifacts map- Returns:
thisbuilder for use in a chained invocation
-
putArtifact
Put one entry to theartifactsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
artifacts
Sets or replaces all mappings from the specified map as entries for theartifactsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the artifacts map- Returns:
thisbuilder for use in a chained invocation
-
putAllArtifacts
Put all mappings from the specified map as entries toartifactsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the artifacts map- Returns:
thisbuilder for use in a chained invocation
-
putLoader
Put one entry to theloadersmap.- Parameters:
key- The key in the loaders mapvalue- The associated value in the loaders map- Returns:
thisbuilder for use in a chained invocation
-
putLoader
Put one entry to theloadersmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
loaders
Sets or replaces all mappings from the specified map as entries for theloadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the loaders map- Returns:
thisbuilder for use in a chained invocation
-
putAllLoaders
Put all mappings from the specified map as entries toloadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the loaders map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableCamelCatalogSpec.- Returns:
- An immutable instance of CamelCatalogSpec
- Throws:
IllegalStateException- if any required attributes are missing
-