Package io.resys.thena.api.entities
Class ImmutableTenant
java.lang.Object
io.resys.thena.api.entities.ImmutableTenant
- All Implemented Interfaces:
Tenant,TenantEntity
@Generated(from="Tenant",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTenant
extends Object
implements Tenant
Immutable implementation of
Tenant.
Use the builder to create immutable instances:
ImmutableTenant.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.resys.thena.api.entities.Tenant
Tenant.StructureType -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTenant.Builderbuilder()Creates a builder forImmutableTenant.static ImmutableTenantCreates an immutable copy of aTenantvalue.booleanThis instance is equal to all instances ofImmutableTenantthat have equal attribute values.getId()getName()getRev()getType()inthashCode()Computes a hash code from attributes:id,rev,prefix,name,externalId,type.toString()Prints the immutable valueTenantwith attribute values.final ImmutableTenantwithExternalId(String value) Copy the current immutable object by setting a value for theexternalIdattribute.final ImmutableTenantCopy the current immutable object by setting a value for theidattribute.final ImmutableTenantCopy the current immutable object by setting a value for thenameattribute.final ImmutableTenantwithPrefix(String value) Copy the current immutable object by setting a value for theprefixattribute.final ImmutableTenantCopy the current immutable object by setting a value for therevattribute.final ImmutableTenantwithType(Tenant.StructureType value) Copy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
getId
-
getRev
-
getPrefix
-
getName
-
getExternalId
- Specified by:
getExternalIdin interfaceTenant- Returns:
- The value of the
externalIdattribute
-
getType
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy or the
thisobject
-
withRev
Copy the current immutable object by setting a value for therevattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for rev- Returns:
- A modified copy or the
thisobject
-
withPrefix
Copy the current immutable object by setting a value for theprefixattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for prefix- Returns:
- A modified copy or the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withExternalId
Copy the current immutable object by setting a value for theexternalIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for externalId (can benull)- Returns:
- A modified copy or the
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableTenantthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,rev,prefix,name,externalId,type. -
toString
Prints the immutable valueTenantwith attribute values. -
copyOf
Creates an immutable copy of aTenantvalue. 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 Tenant instance
-
builder
Creates a builder forImmutableTenant.ImmutableTenant.builder() .id(String) // requiredid.rev(String) // requiredrev.prefix(String) // requiredprefix.name(String) // requiredname.externalId(String | null) // nullableexternalId.type(io.resys.thena.api.entities.Tenant.StructureType) // requiredtype.build();- Returns:
- A new ImmutableTenant builder
-