Class ImmutableCtxDto
java.lang.Object
dk.mada.jaxrs.generator.mpclient.dto.tmpl.ImmutableCtxDto
- All Implemented Interfaces:
CtxDto
@Generated(from="CtxDto",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableCtxDto
extends Object
implements CtxDto
Immutable implementation of
CtxDto.
Use the builder to create immutable instances:
ImmutableCtxDto.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable CtxEnumReturns the enumeration constants/values, or null.Returns the optional application description.appName()Returns the application name.static ImmutableCtxDto.Builderbuilder()Creates a builder forImmutableCtxDto.Returns the classname for the class.Returns the class name used in equals method.static ImmutableCtxDtoCreates an immutable copy of aCtxDtovalue.@Nullable StringdataType()Returns the data type of an enumeration, or null.@Nullable StringReturns unknown, kept from upstream template.Returns the optional description of the class.Returns an optional discriminator for sub-class selection.booleanThis instance is equal to all instances ofImmutableCtxDtothat have equal attribute values.Returns the name of the Generated annotation class.Returns the optional date of the generation.Returns the name of the generator class.Returns the imports needed in the template.inthashCode()Computes a hash code from attributes:appName,version,appDescription,infoEmail,imports,description,packageName,classname,classVarName,vars,isRecord,allowableValues,dataType,datatypeWithEnum,isNullable,parent,vendorExtensions,jackson,generatedAnnotationClass,generatorClass,generatedDate,discriminator,madaDto.Returns the optional application contact email.booleanReturns true if the is an enumeration that can be deserialized as null.booleanisRecord()Returns true if this DTO should be rendered as a record.booleanjackson()Returns true if a jackson serializer is used, otherwise false.madaDto()Returns additional custom template data for the dto.Returns the package name for the class.parent()Returns the optional name of a parent class.toString()Prints the immutable valueCtxDtowith attribute values.vars()Returns the properties of the class.Returns optional vendor extensions.version()Returns the application version.final ImmutableCtxDtowithAllowableValues(@Nullable CtxEnum value) Copy the current immutable object by setting a value for theallowableValuesattribute.final ImmutableCtxDtowithAppDescription(String value) Copy the current immutable object by setting a present value for the optionalappDescriptionattribute.final ImmutableCtxDtowithAppDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for theappDescriptionattribute.final ImmutableCtxDtowithAppName(String value) Copy the current immutable object by setting a value for theappNameattribute.final ImmutableCtxDtowithClassname(String value) Copy the current immutable object by setting a value for theclassnameattribute.final ImmutableCtxDtowithClassVarName(String value) Copy the current immutable object by setting a value for theclassVarNameattribute.final ImmutableCtxDtowithDataType(@Nullable String value) Copy the current immutable object by setting a value for thedataTypeattribute.final ImmutableCtxDtowithDatatypeWithEnum(@Nullable String value) Copy the current immutable object by setting a value for thedatatypeWithEnumattribute.final ImmutableCtxDtowithDescription(String value) Copy the current immutable object by setting a present value for the optionaldescriptionattribute.final ImmutableCtxDtowithDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescriptionattribute.final ImmutableCtxDtoCopy the current immutable object by setting a present value for the optionaldiscriminatorattribute.final ImmutableCtxDtowithDiscriminator(Optional<? extends CtxDtoDiscriminator> optional) Copy the current immutable object by setting an optional value for thediscriminatorattribute.final ImmutableCtxDtoCopy the current immutable object by setting a value for thegeneratedAnnotationClassattribute.final ImmutableCtxDtowithGeneratedDate(String value) Copy the current immutable object by setting a present value for the optionalgeneratedDateattribute.final ImmutableCtxDtowithGeneratedDate(Optional<String> optional) Copy the current immutable object by setting an optional value for thegeneratedDateattribute.final ImmutableCtxDtowithGeneratorClass(String value) Copy the current immutable object by setting a value for thegeneratorClassattribute.final ImmutableCtxDtowithImports(SortedSet<String> value) Copy the current immutable object by setting a value for theimportsattribute.final ImmutableCtxDtowithInfoEmail(String value) Copy the current immutable object by setting a present value for the optionalinfoEmailattribute.final ImmutableCtxDtowithInfoEmail(Optional<String> optional) Copy the current immutable object by setting an optional value for theinfoEmailattribute.final ImmutableCtxDtowithIsNullable(boolean value) Copy the current immutable object by setting a value for theisNullableattribute.final ImmutableCtxDtowithIsRecord(boolean value) Copy the current immutable object by setting a value for theisRecordattribute.final ImmutableCtxDtowithJackson(boolean value) Copy the current immutable object by setting a value for thejacksonattribute.final ImmutableCtxDtowithMadaDto(CtxDtoExt value) Copy the current immutable object by setting a value for themadaDtoattribute.final ImmutableCtxDtowithPackageName(String value) Copy the current immutable object by setting a value for thepackageNameattribute.final ImmutableCtxDtowithParent(String value) Copy the current immutable object by setting a present value for the optionalparentattribute.final ImmutableCtxDtowithParent(Optional<String> optional) Copy the current immutable object by setting an optional value for theparentattribute.final ImmutableCtxDtowithVars(CtxProperty... elements) Copy the current immutable object with elements that replace the content ofvars.final ImmutableCtxDtowithVars(Iterable<? extends CtxProperty> elements) Copy the current immutable object with elements that replace the content ofvars.final ImmutableCtxDtowithVendorExtensions(Map<String, ? extends String> entries) Copy the current immutable object by replacing thevendorExtensionsmap with the specified map.final ImmutableCtxDtowithVersion(String value) Copy the current immutable object by setting a value for theversionattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxDto
hasImports, hasVars, isEnum
-
Method Details
-
appName
Returns the application name. -
version
Returns the application version. -
appDescription
Returns the optional application description.- Specified by:
appDescriptionin interfaceCtxDto- Returns:
- the optional application description
-
infoEmail
Returns the optional application contact email. -
getImports
Returns the imports needed in the template.- Specified by:
getImportsin interfaceCtxDto- Returns:
- the imports needed in the template
-
description
Returns the optional description of the class.- Specified by:
descriptionin interfaceCtxDto- Returns:
- the optional description of the class
-
packageName
Returns the package name for the class.- Specified by:
packageNamein interfaceCtxDto- Returns:
- the package name for the class
-
classname
Returns the classname for the class. -
classVarName
Returns the class name used in equals method.- Specified by:
classVarNamein interfaceCtxDto- Returns:
- the class name used in equals method
-
vars
Returns the properties of the class. -
isRecord
public boolean isRecord()Returns true if this DTO should be rendered as a record. -
allowableValues
Returns the enumeration constants/values, or null.- Specified by:
allowableValuesin interfaceCtxDto- Returns:
- the enumeration constants/values, or null
-
dataType
Returns the data type of an enumeration, or null. -
datatypeWithEnum
Returns unknown, kept from upstream template.- Specified by:
datatypeWithEnumin interfaceCtxDto- Returns:
- unknown, kept from upstream template
-
isNullable
public boolean isNullable()Returns true if the is an enumeration that can be deserialized as null.- Specified by:
isNullablein interfaceCtxDto- Returns:
- true if the is an enumeration that can be deserialized as null
-
parent
Returns the optional name of a parent class. -
vendorExtensions
Returns optional vendor extensions.- Specified by:
vendorExtensionsin interfaceCtxDto- Returns:
- optional vendor extensions
-
jackson
public boolean jackson()Returns true if a jackson serializer is used, otherwise false. -
generatedAnnotationClass
Returns the name of the Generated annotation class.- Specified by:
generatedAnnotationClassin interfaceCtxDto- Returns:
- the name of the Generated annotation class
-
generatorClass
Returns the name of the generator class.- Specified by:
generatorClassin interfaceCtxDto- Returns:
- the name of the generator class
-
generatedDate
Returns the optional date of the generation.- Specified by:
generatedDatein interfaceCtxDto- Returns:
- the optional date of the generation
-
discriminator
Returns an optional discriminator for sub-class selection.- Specified by:
discriminatorin interfaceCtxDto- Returns:
- an optional discriminator for sub-class selection
-
madaDto
Returns additional custom template data for the dto. -
withAppName
Copy the current immutable object by setting a value for theappNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for appName- Returns:
- A modified copy or the
thisobject
-
withVersion
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 or the
thisobject
-
withAppDescription
Copy the current immutable object by setting a present value for the optionalappDescriptionattribute.- Parameters:
value- The value for appDescription- Returns:
- A modified copy or
thisif not changed
-
withAppDescription
Copy the current immutable object by setting an optional value for theappDescriptionattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for appDescription- Returns:
- A modified copy or
thisif not changed
-
withInfoEmail
Copy the current immutable object by setting a present value for the optionalinfoEmailattribute.- Parameters:
value- The value for infoEmail- Returns:
- A modified copy or
thisif not changed
-
withInfoEmail
Copy the current immutable object by setting an optional value for theinfoEmailattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for infoEmail- Returns:
- A modified copy or
thisif not changed
-
withImports
Copy the current immutable object by setting a value for theimportsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for imports- Returns:
- A modified copy or the
thisobject
-
withDescription
Copy the current immutable object by setting a present value for the optionaldescriptionattribute.- Parameters:
value- The value for description- Returns:
- A modified copy or
thisif not changed
-
withDescription
Copy the current immutable object by setting an optional value for thedescriptionattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for description- Returns:
- A modified copy or
thisif not changed
-
withPackageName
Copy the current immutable object by setting a value for thepackageNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for packageName- Returns:
- A modified copy or the
thisobject
-
withClassname
Copy the current immutable object by setting a value for theclassnameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for classname- Returns:
- A modified copy or the
thisobject
-
withClassVarName
Copy the current immutable object by setting a value for theclassVarNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for classVarName- Returns:
- A modified copy or the
thisobject
-
withVars
Copy the current immutable object with elements that replace the content ofvars.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withVars
Copy the current immutable object with elements that replace the content ofvars. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of vars elements to set- Returns:
- A modified copy or
thisif not changed
-
withIsRecord
Copy the current immutable object by setting a value for theisRecordattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isRecord- Returns:
- A modified copy or the
thisobject
-
withAllowableValues
Copy the current immutable object by setting a value for theallowableValuesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for allowableValues (can benull)- Returns:
- A modified copy or the
thisobject
-
withDataType
Copy the current immutable object by setting a value for thedataTypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for dataType (can benull)- Returns:
- A modified copy or the
thisobject
-
withDatatypeWithEnum
Copy the current immutable object by setting a value for thedatatypeWithEnumattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for datatypeWithEnum (can benull)- Returns:
- A modified copy or the
thisobject
-
withIsNullable
Copy the current immutable object by setting a value for theisNullableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isNullable- Returns:
- A modified copy or the
thisobject
-
withParent
Copy the current immutable object by setting a present value for the optionalparentattribute.- Parameters:
value- The value for parent- Returns:
- A modified copy or
thisif not changed
-
withParent
Copy the current immutable object by setting an optional value for theparentattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for parent- Returns:
- A modified copy or
thisif not changed
-
withVendorExtensions
Copy the current immutable object by replacing thevendorExtensionsmap 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 replace the vendorExtensions map- Returns:
- A modified copy or
thisif not changed
-
withJackson
Copy the current immutable object by setting a value for thejacksonattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for jackson- Returns:
- A modified copy or the
thisobject
-
withGeneratedAnnotationClass
Copy the current immutable object by setting a value for thegeneratedAnnotationClassattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for generatedAnnotationClass- Returns:
- A modified copy or the
thisobject
-
withGeneratorClass
Copy the current immutable object by setting a value for thegeneratorClassattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for generatorClass- Returns:
- A modified copy or the
thisobject
-
withGeneratedDate
Copy the current immutable object by setting a present value for the optionalgeneratedDateattribute.- Parameters:
value- The value for generatedDate- Returns:
- A modified copy or
thisif not changed
-
withGeneratedDate
Copy the current immutable object by setting an optional value for thegeneratedDateattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for generatedDate- Returns:
- A modified copy or
thisif not changed
-
withDiscriminator
Copy the current immutable object by setting a present value for the optionaldiscriminatorattribute.- Parameters:
value- The value for discriminator- Returns:
- A modified copy or
thisif not changed
-
withDiscriminator
Copy the current immutable object by setting an optional value for thediscriminatorattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for discriminator- Returns:
- A modified copy or
thisif not changed
-
withMadaDto
Copy the current immutable object by setting a value for themadaDtoattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for madaDto- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableCtxDtothat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:appName,version,appDescription,infoEmail,imports,description,packageName,classname,classVarName,vars,isRecord,allowableValues,dataType,datatypeWithEnum,isNullable,parent,vendorExtensions,jackson,generatedAnnotationClass,generatorClass,generatedDate,discriminator,madaDto. -
toString
Prints the immutable valueCtxDtowith attribute values. -
copyOf
Creates an immutable copy of aCtxDtovalue. 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 CtxDto instance
-
builder
Creates a builder forImmutableCtxDto.ImmutableCtxDto.builder() .appName(String) // requiredappName.version(String) // requiredversion.appDescription(Optional<String>) // optionalappDescription.infoEmail(Optional<String>) // optionalinfoEmail.imports(SortedSet<String>) // requiredimports.description(Optional<String>) // optionaldescription.packageName(String) // requiredpackageName.classname(String) // requiredclassname.classVarName(String) // requiredclassVarName.addVars|addAllVars(dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxProperty) //varselements .isRecord(boolean) // requiredisRecord.allowableValues(dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxEnum | null) // nullableallowableValues.dataType(String | null) // nullabledataType.datatypeWithEnum(String | null) // nullabledatatypeWithEnum.isNullable(boolean) // requiredisNullable.parent(Optional<String>) // optionalparent.vendorExtensions(Map<String, String> | null) // nullablevendorExtensions.jackson(boolean) // requiredjackson.generatedAnnotationClass(String) // requiredgeneratedAnnotationClass.generatorClass(String) // requiredgeneratorClass.generatedDate(Optional<String>) // optionalgeneratedDate.discriminator(Optional<dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxDtoDiscriminator>) // optionaldiscriminator.madaDto(dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxDtoExt) // requiredmadaDto.build();- Returns:
- A new ImmutableCtxDto builder
-