Class ImmutableTypeMeta
- java.lang.Object
-
- org.apache.camel.k.tooling.maven.model.k8s.ImmutableTypeMeta
-
- All Implemented Interfaces:
TypeMeta
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableTypeMeta extends Object implements TypeMeta
Immutable implementation ofTypeMeta
.Use the builder to create immutable instances:
new TypeMeta.Builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableTypeMeta.Builder
Builds instances of typeImmutableTypeMeta
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTypeMeta
copyOf(TypeMeta instance)
Creates an immutable copy of aTypeMeta
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableTypeMeta
that have equal attribute values.String
getApiVersion()
String
getKind()
int
hashCode()
Computes a hash code from attributes:apiVersion
,kind
.String
toString()
Prints the immutable valueTypeMeta
with attribute values.ImmutableTypeMeta
withApiVersion(String value)
Copy the current immutable object by setting a value for theapiVersion
attribute.ImmutableTypeMeta
withKind(String value)
Copy the current immutable object by setting a value for thekind
attribute.
-
-
-
Method Detail
-
getApiVersion
public String getApiVersion()
- Specified by:
getApiVersion
in interfaceTypeMeta
- Returns:
- The value of the
apiVersion
attribute
-
getKind
public String getKind()
-
withApiVersion
public final ImmutableTypeMeta withApiVersion(String value)
Copy the current immutable object by setting a value for theapiVersion
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for apiVersion- Returns:
- A modified copy of the
this
object
-
withKind
public final ImmutableTypeMeta withKind(String value)
Copy the current immutable object by setting a value for thekind
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for kind- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableTypeMeta
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:apiVersion
,kind
.
-
toString
public String toString()
Prints the immutable valueTypeMeta
with attribute values.
-
copyOf
public static ImmutableTypeMeta copyOf(TypeMeta instance)
Creates an immutable copy of aTypeMeta
value. 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 TypeMeta instance
-
-