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 CtxEnum
Returns the enumeration constants/values, or null.Returns the optional application description.appName()
Returns the application name.static ImmutableCtxDto.Builder
builder()
Creates a builder forImmutableCtxDto
.Returns the classname for the class.Returns the class name used in equals method.static ImmutableCtxDto
Creates an immutable copy of aCtxDto
value.@Nullable String
dataType()
Returns the data type of an enumeration, or null.@Nullable String
Returns unknown, kept from upstream template.Returns the optional description of the class.Returns an optional discriminator for sub-class selection.boolean
This instance is equal to all instances ofImmutableCtxDto
that 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.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
.Returns the optional application contact email.boolean
Returns true if the is an enumeration that can be deserialized as null.boolean
isRecord()
Returns true if this DTO should be rendered as a record.boolean
jackson()
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 valueCtxDto
with attribute values.vars()
Returns the properties of the class.Returns optional vendor extensions.version()
Returns the application version.final ImmutableCtxDto
withAllowableValues
(@Nullable CtxEnum value) Copy the current immutable object by setting a value for theallowableValues
attribute.final ImmutableCtxDto
withAppDescription
(String value) Copy the current immutable object by setting a present value for the optionalappDescription
attribute.final ImmutableCtxDto
withAppDescription
(Optional<String> optional) Copy the current immutable object by setting an optional value for theappDescription
attribute.final ImmutableCtxDto
withAppName
(String value) Copy the current immutable object by setting a value for theappName
attribute.final ImmutableCtxDto
withClassname
(String value) Copy the current immutable object by setting a value for theclassname
attribute.final ImmutableCtxDto
withClassVarName
(String value) Copy the current immutable object by setting a value for theclassVarName
attribute.final ImmutableCtxDto
withDataType
(@Nullable String value) Copy the current immutable object by setting a value for thedataType
attribute.final ImmutableCtxDto
withDatatypeWithEnum
(@Nullable String value) Copy the current immutable object by setting a value for thedatatypeWithEnum
attribute.final ImmutableCtxDto
withDescription
(String value) Copy the current immutable object by setting a present value for the optionaldescription
attribute.final ImmutableCtxDto
withDescription
(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescription
attribute.final ImmutableCtxDto
Copy the current immutable object by setting a present value for the optionaldiscriminator
attribute.final ImmutableCtxDto
withDiscriminator
(Optional<? extends CtxDtoDiscriminator> optional) Copy the current immutable object by setting an optional value for thediscriminator
attribute.final ImmutableCtxDto
Copy the current immutable object by setting a value for thegeneratedAnnotationClass
attribute.final ImmutableCtxDto
withGeneratedDate
(String value) Copy the current immutable object by setting a present value for the optionalgeneratedDate
attribute.final ImmutableCtxDto
withGeneratedDate
(Optional<String> optional) Copy the current immutable object by setting an optional value for thegeneratedDate
attribute.final ImmutableCtxDto
withGeneratorClass
(String value) Copy the current immutable object by setting a value for thegeneratorClass
attribute.final ImmutableCtxDto
withImports
(SortedSet<String> value) Copy the current immutable object by setting a value for theimports
attribute.final ImmutableCtxDto
withInfoEmail
(String value) Copy the current immutable object by setting a present value for the optionalinfoEmail
attribute.final ImmutableCtxDto
withInfoEmail
(Optional<String> optional) Copy the current immutable object by setting an optional value for theinfoEmail
attribute.final ImmutableCtxDto
withIsNullable
(boolean value) Copy the current immutable object by setting a value for theisNullable
attribute.final ImmutableCtxDto
withIsRecord
(boolean value) Copy the current immutable object by setting a value for theisRecord
attribute.final ImmutableCtxDto
withJackson
(boolean value) Copy the current immutable object by setting a value for thejackson
attribute.final ImmutableCtxDto
withMadaDto
(CtxDtoExt value) Copy the current immutable object by setting a value for themadaDto
attribute.final ImmutableCtxDto
withPackageName
(String value) Copy the current immutable object by setting a value for thepackageName
attribute.final ImmutableCtxDto
withParent
(String value) Copy the current immutable object by setting a present value for the optionalparent
attribute.final ImmutableCtxDto
withParent
(Optional<String> optional) Copy the current immutable object by setting an optional value for theparent
attribute.final ImmutableCtxDto
withVars
(CtxProperty... elements) Copy the current immutable object with elements that replace the content ofvars
.final ImmutableCtxDto
withVars
(Iterable<? extends CtxProperty> elements) Copy the current immutable object with elements that replace the content ofvars
.final ImmutableCtxDto
withVendorExtensions
(Map<String, ? extends String> entries) Copy the current immutable object by replacing thevendorExtensions
map with the specified map.final ImmutableCtxDto
withVersion
(String value) Copy the current immutable object by setting a value for theversion
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
appDescription
in interfaceCtxDto
- Returns:
- the optional application description
-
infoEmail
Returns the optional application contact email. -
getImports
Returns the imports needed in the template.- Specified by:
getImports
in interfaceCtxDto
- Returns:
- the imports needed in the template
-
description
Returns the optional description of the class.- Specified by:
description
in interfaceCtxDto
- Returns:
- the optional description of the class
-
packageName
Returns the package name for the class.- Specified by:
packageName
in 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:
classVarName
in 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:
allowableValues
in 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:
datatypeWithEnum
in 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:
isNullable
in 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:
vendorExtensions
in 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:
generatedAnnotationClass
in interfaceCtxDto
- Returns:
- the name of the Generated annotation class
-
generatorClass
Returns the name of the generator class.- Specified by:
generatorClass
in interfaceCtxDto
- Returns:
- the name of the generator class
-
generatedDate
Returns the optional date of the generation.- Specified by:
generatedDate
in interfaceCtxDto
- Returns:
- the optional date of the generation
-
discriminator
Returns an optional discriminator for sub-class selection.- Specified by:
discriminator
in 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 theappName
attribute. 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
this
object
-
withVersion
Copy the current immutable object by setting a value for theversion
attribute. 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
this
object
-
withAppDescription
Copy the current immutable object by setting a present value for the optionalappDescription
attribute.- Parameters:
value
- The value for appDescription- Returns:
- A modified copy or
this
if not changed
-
withAppDescription
Copy the current immutable object by setting an optional value for theappDescription
attribute. 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
this
if not changed
-
withInfoEmail
Copy the current immutable object by setting a present value for the optionalinfoEmail
attribute.- Parameters:
value
- The value for infoEmail- Returns:
- A modified copy or
this
if not changed
-
withInfoEmail
Copy the current immutable object by setting an optional value for theinfoEmail
attribute. 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
this
if not changed
-
withImports
Copy the current immutable object by setting a value for theimports
attribute. 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
this
object
-
withDescription
Copy the current immutable object by setting a present value for the optionaldescription
attribute.- Parameters:
value
- The value for description- Returns:
- A modified copy or
this
if not changed
-
withDescription
Copy the current immutable object by setting an optional value for thedescription
attribute. 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
this
if not changed
-
withPackageName
Copy the current immutable object by setting a value for thepackageName
attribute. 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
this
object
-
withClassname
Copy the current immutable object by setting a value for theclassname
attribute. 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
this
object
-
withClassVarName
Copy the current immutable object by setting a value for theclassVarName
attribute. 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
this
object
-
withVars
Copy the current immutable object with elements that replace the content ofvars
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
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
this
if not changed
-
withIsRecord
Copy the current immutable object by setting a value for theisRecord
attribute. 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
this
object
-
withAllowableValues
Copy the current immutable object by setting a value for theallowableValues
attribute. 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
this
object
-
withDataType
Copy the current immutable object by setting a value for thedataType
attribute. 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
this
object
-
withDatatypeWithEnum
Copy the current immutable object by setting a value for thedatatypeWithEnum
attribute. 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
this
object
-
withIsNullable
Copy the current immutable object by setting a value for theisNullable
attribute. 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
this
object
-
withParent
Copy the current immutable object by setting a present value for the optionalparent
attribute.- Parameters:
value
- The value for parent- Returns:
- A modified copy or
this
if not changed
-
withParent
Copy the current immutable object by setting an optional value for theparent
attribute. 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
this
if not changed
-
withVendorExtensions
Copy the current immutable object by replacing thevendorExtensions
map 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
this
if not changed
-
withJackson
Copy the current immutable object by setting a value for thejackson
attribute. 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
this
object
-
withGeneratedAnnotationClass
Copy the current immutable object by setting a value for thegeneratedAnnotationClass
attribute. 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
this
object
-
withGeneratorClass
Copy the current immutable object by setting a value for thegeneratorClass
attribute. 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
this
object
-
withGeneratedDate
Copy the current immutable object by setting a present value for the optionalgeneratedDate
attribute.- Parameters:
value
- The value for generatedDate- Returns:
- A modified copy or
this
if not changed
-
withGeneratedDate
Copy the current immutable object by setting an optional value for thegeneratedDate
attribute. 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
this
if not changed
-
withDiscriminator
Copy the current immutable object by setting a present value for the optionaldiscriminator
attribute.- Parameters:
value
- The value for discriminator- Returns:
- A modified copy or
this
if not changed
-
withDiscriminator
Copy the current immutable object by setting an optional value for thediscriminator
attribute. A shallow reference equality check on the inner value is used to prevent copying of the same value by returningthis
.- Parameters:
optional
- An optional value for discriminator- Returns:
- A modified copy or
this
if not changed
-
withMadaDto
Copy the current immutable object by setting a value for themadaDto
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableCtxDto
that 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 valueCtxDto
with attribute values. -
copyOf
Creates an immutable copy of aCtxDto
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 CtxDto instance
-
builder
Creates a builder forImmutableCtxDto
.ImmutableCtxDto.builder() .appName(String) // required
appName
.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) //vars
elements .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
-