Class ImmutableRuntimeSpec
- java.lang.Object
-
- org.apache.camel.k.tooling.maven.model.crd.ImmutableRuntimeSpec
-
- All Implemented Interfaces:
RuntimeSpec
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableRuntimeSpec extends Object implements RuntimeSpec
Immutable implementation ofRuntimeSpec.Use the builder to create immutable instances:
new RuntimeSpec.Builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableRuntimeSpec.BuilderBuilds instances of typeImmutableRuntimeSpec.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRuntimeSpeccopyOf(RuntimeSpec instance)Creates an immutable copy of aRuntimeSpecvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableRuntimeSpecthat have equal attribute values.StringgetApplicationClass()Map<String,CamelCapability>getCapabilities()Set<MavenArtifact>getDependencies()Map<String,String>getMetadata()StringgetProvider()StringgetVersion()inthashCode()Computes a hash code from attributes:version,provider,applicationClass,metadata,dependencies,capabilities.StringtoString()Prints the immutable valueRuntimeSpecwith attribute values.ImmutableRuntimeSpecwithApplicationClass(String value)Copy the current immutable object by setting a value for theapplicationClassattribute.ImmutableRuntimeSpecwithCapabilities(Map<String,? extends CamelCapability> entries)Copy the current immutable object by replacing thecapabilitiesmap with the specified map.ImmutableRuntimeSpecwithDependencies(Iterable<? extends MavenArtifact> elements)Copy the current immutable object with elements that replace the content ofdependencies.ImmutableRuntimeSpecwithDependencies(MavenArtifact... elements)Copy the current immutable object with elements that replace the content ofdependencies.ImmutableRuntimeSpecwithMetadata(Map<String,? extends String> entries)Copy the current immutable object by replacing themetadatamap with the specified map.ImmutableRuntimeSpecwithProvider(String value)Copy the current immutable object by setting a value for theproviderattribute.ImmutableRuntimeSpecwithVersion(String value)Copy the current immutable object by setting a value for theversionattribute.
-
-
-
Method Detail
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfaceRuntimeSpec- Returns:
- The value of the
versionattribute
-
getProvider
public String getProvider()
- Specified by:
getProviderin interfaceRuntimeSpec- Returns:
- The value of the
providerattribute
-
getApplicationClass
public String getApplicationClass()
- Specified by:
getApplicationClassin interfaceRuntimeSpec- Returns:
- The value of the
applicationClassattribute
-
getMetadata
public Map<String,String> getMetadata()
- Specified by:
getMetadatain interfaceRuntimeSpec- Returns:
- The value of the
metadataattribute
-
getDependencies
public Set<MavenArtifact> getDependencies()
- Specified by:
getDependenciesin interfaceRuntimeSpec- Returns:
- The value of the
dependenciesattribute
-
getCapabilities
public Map<String,CamelCapability> getCapabilities()
- Specified by:
getCapabilitiesin interfaceRuntimeSpec- Returns:
- The value of the
capabilitiesattribute
-
withVersion
public final ImmutableRuntimeSpec withVersion(String value)
Copy the current immutable object by setting a value for theversionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy of the
thisobject
-
withProvider
public final ImmutableRuntimeSpec withProvider(String value)
Copy the current immutable object by setting a value for theproviderattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for provider- Returns:
- A modified copy of the
thisobject
-
withApplicationClass
public final ImmutableRuntimeSpec withApplicationClass(String value)
Copy the current immutable object by setting a value for theapplicationClassattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for applicationClass- Returns:
- A modified copy of the
thisobject
-
withMetadata
public final ImmutableRuntimeSpec withMetadata(Map<String,? extends String> entries)
Copy the current immutable object by replacing themetadatamap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the metadata map- Returns:
- A modified copy of
thisobject
-
withDependencies
public final ImmutableRuntimeSpec withDependencies(MavenArtifact... elements)
Copy the current immutable object with elements that replace the content ofdependencies.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDependencies
public final ImmutableRuntimeSpec withDependencies(Iterable<? extends MavenArtifact> elements)
Copy the current immutable object with elements that replace the content ofdependencies. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of dependencies elements to set- Returns:
- A modified copy of
thisobject
-
withCapabilities
public final ImmutableRuntimeSpec withCapabilities(Map<String,? extends CamelCapability> entries)
Copy the current immutable object by replacing thecapabilitiesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the capabilities map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableRuntimeSpecthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:version,provider,applicationClass,metadata,dependencies,capabilities.
-
toString
public String toString()
Prints the immutable valueRuntimeSpecwith attribute values.
-
copyOf
public static ImmutableRuntimeSpec copyOf(RuntimeSpec instance)
Creates an immutable copy of aRuntimeSpecvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable RuntimeSpec instance
-
-