Class ImmutableQuestionnaireCreatedEvent
- java.lang.Object
-
- io.dialob.questionnaire.service.api.event.ImmutableQuestionnaireCreatedEvent
-
- All Implemented Interfaces:
Event,TenantScopedEvent,QuestionnaireCreatedEvent,QuestionnaireEvent,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableQuestionnaireCreatedEvent extends Object implements QuestionnaireCreatedEvent
Immutable implementation ofQuestionnaireCreatedEvent.Use the builder to create immutable instances:
ImmutableQuestionnaireCreatedEvent.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableQuestionnaireCreatedEvent.BuilderBuilds instances of typeImmutableQuestionnaireCreatedEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableQuestionnaireCreatedEvent.Builderbuilder()Creates a builder forImmutableQuestionnaireCreatedEvent.static ImmutableQuestionnaireCreatedEventcopyOf(QuestionnaireCreatedEvent instance)Creates an immutable copy of aQuestionnaireCreatedEventvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableQuestionnaireCreatedEventthat have equal attribute values.StringgetQuestionnaireId()io.dialob.security.tenant.TenantgetTenant()inthashCode()Computes a hash code from attributes:tenant,questionnaireId.StringtoString()Prints the immutable valueQuestionnaireCreatedEventwith attribute values.ImmutableQuestionnaireCreatedEventwithQuestionnaireId(String value)Copy the current immutable object by setting a value for thequestionnaireIdattribute.ImmutableQuestionnaireCreatedEventwithTenant(io.dialob.security.tenant.Tenant value)Copy the current immutable object by setting a value for thetenantattribute.
-
-
-
Method Detail
-
getTenant
public io.dialob.security.tenant.Tenant getTenant()
- Specified by:
getTenantin interfaceTenantScopedEvent- Returns:
- The value of the
tenantattribute
-
getQuestionnaireId
public String getQuestionnaireId()
- Specified by:
getQuestionnaireIdin interfaceQuestionnaireEvent- Returns:
- questionnaire id of event
-
withTenant
public final ImmutableQuestionnaireCreatedEvent withTenant(io.dialob.security.tenant.Tenant value)
Copy the current immutable object by setting a value for thetenantattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tenant- Returns:
- A modified copy of the
thisobject
-
withQuestionnaireId
public final ImmutableQuestionnaireCreatedEvent withQuestionnaireId(String value)
Copy the current immutable object by setting a value for thequestionnaireIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for questionnaireId- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableQuestionnaireCreatedEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:tenant,questionnaireId.
-
toString
public String toString()
Prints the immutable valueQuestionnaireCreatedEventwith attribute values.
-
copyOf
public static ImmutableQuestionnaireCreatedEvent copyOf(QuestionnaireCreatedEvent instance)
Creates an immutable copy of aQuestionnaireCreatedEventvalue. 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 QuestionnaireCreatedEvent instance
-
builder
public static ImmutableQuestionnaireCreatedEvent.Builder builder()
Creates a builder forImmutableQuestionnaireCreatedEvent.ImmutableQuestionnaireCreatedEvent.builder() .tenant(io.dialob.security.tenant.Tenant) // requiredtenant.questionnaireId(String) // requiredquestionnaireId.build();- Returns:
- A new ImmutableQuestionnaireCreatedEvent builder
-
-