Class ImmutableCtxDto.Builder
java.lang.Object
dk.mada.jaxrs.generator.mpclient.dto.tmpl.ImmutableCtxDto.Builder
- Enclosing class:
ImmutableCtxDto
@Generated(from="CtxDto",
generator="Immutables")
public static final class ImmutableCtxDto.Builder
extends Object
Builds instances of type
ImmutableCtxDto
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionfinal ImmutableCtxDto.Builder
addAllVars
(Iterable<? extends CtxProperty> elements) Adds elements tovars
list.final ImmutableCtxDto.Builder
addVars
(CtxProperty element) Adds one element tovars
list.final ImmutableCtxDto.Builder
addVars
(CtxProperty... elements) Adds elements tovars
list.final ImmutableCtxDto.Builder
allowableValues
(@Nullable CtxEnum allowableValues) Initializes the value for theallowableValues
attribute.final ImmutableCtxDto.Builder
appDescription
(String appDescription) Initializes the optional valueappDescription
to appDescription.final ImmutableCtxDto.Builder
appDescription
(Optional<String> appDescription) Initializes the optional valueappDescription
to appDescription.final ImmutableCtxDto.Builder
Initializes the value for theappName
attribute.build()
Builds a newImmutableCtxDto
.final ImmutableCtxDto.Builder
Initializes the value for theclassname
attribute.final ImmutableCtxDto.Builder
classVarName
(String classVarName) Initializes the value for theclassVarName
attribute.final ImmutableCtxDto.Builder
Initializes the value for thedataType
attribute.final ImmutableCtxDto.Builder
datatypeWithEnum
(@Nullable String datatypeWithEnum) Initializes the value for thedatatypeWithEnum
attribute.final ImmutableCtxDto.Builder
description
(String description) Initializes the optional valuedescription
to description.final ImmutableCtxDto.Builder
description
(Optional<String> description) Initializes the optional valuedescription
to description.final ImmutableCtxDto.Builder
discriminator
(CtxDtoDiscriminator discriminator) Initializes the optional valuediscriminator
to discriminator.final ImmutableCtxDto.Builder
discriminator
(Optional<? extends CtxDtoDiscriminator> discriminator) Initializes the optional valuediscriminator
to discriminator.final ImmutableCtxDto.Builder
Fill a builder with attribute values from the providedCtxDto
instance.final ImmutableCtxDto.Builder
generatedAnnotationClass
(String generatedAnnotationClass) Initializes the value for thegeneratedAnnotationClass
attribute.final ImmutableCtxDto.Builder
generatedDate
(String generatedDate) Initializes the optional valuegeneratedDate
to generatedDate.final ImmutableCtxDto.Builder
generatedDate
(Optional<String> generatedDate) Initializes the optional valuegeneratedDate
to generatedDate.final ImmutableCtxDto.Builder
generatorClass
(String generatorClass) Initializes the value for thegeneratorClass
attribute.final ImmutableCtxDto.Builder
Initializes the value for theimports
attribute.final ImmutableCtxDto.Builder
Initializes the optional valueinfoEmail
to infoEmail.final ImmutableCtxDto.Builder
Initializes the optional valueinfoEmail
to infoEmail.final ImmutableCtxDto.Builder
isNullable
(boolean isNullable) Initializes the value for theisNullable
attribute.final ImmutableCtxDto.Builder
isRecord
(boolean isRecord) Initializes the value for theisRecord
attribute.final ImmutableCtxDto.Builder
jackson
(boolean jackson) Initializes the value for thejackson
attribute.final ImmutableCtxDto.Builder
Initializes the value for themadaDto
attribute.final ImmutableCtxDto.Builder
packageName
(String packageName) Initializes the value for thepackageName
attribute.final ImmutableCtxDto.Builder
Initializes the optional valueparent
to parent.final ImmutableCtxDto.Builder
Initializes the optional valueparent
to parent.final ImmutableCtxDto.Builder
putAllVendorExtensions
(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tovendorExtensions
map.final ImmutableCtxDto.Builder
putVendorExtensions
(String key, String value) Put one entry to thevendorExtensions
map.final ImmutableCtxDto.Builder
putVendorExtensions
(Map.Entry<String, ? extends String> entry) Put one entry to thevendorExtensions
map.final ImmutableCtxDto.Builder
vars
(Iterable<? extends CtxProperty> elements) Sets or replaces all elements forvars
list.final ImmutableCtxDto.Builder
vendorExtensions
(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thevendorExtensions
map.final ImmutableCtxDto.Builder
Initializes the value for theversion
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedCtxDto
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
appName
Initializes the value for theappName
attribute.- Parameters:
appName
- The value for appName- Returns:
this
builder for use in a chained invocation
-
version
Initializes the value for theversion
attribute.- Parameters:
version
- The value for version- Returns:
this
builder for use in a chained invocation
-
appDescription
Initializes the optional valueappDescription
to appDescription.- Parameters:
appDescription
- The value for appDescription- Returns:
this
builder for chained invocation
-
appDescription
Initializes the optional valueappDescription
to appDescription.- Parameters:
appDescription
- The value for appDescription- Returns:
this
builder for use in a chained invocation
-
infoEmail
Initializes the optional valueinfoEmail
to infoEmail.- Parameters:
infoEmail
- The value for infoEmail- Returns:
this
builder for chained invocation
-
infoEmail
Initializes the optional valueinfoEmail
to infoEmail.- Parameters:
infoEmail
- The value for infoEmail- Returns:
this
builder for use in a chained invocation
-
imports
Initializes the value for theimports
attribute.- Parameters:
imports
- The value for imports- Returns:
this
builder for use in a chained invocation
-
description
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for chained invocation
-
description
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for use in a chained invocation
-
packageName
Initializes the value for thepackageName
attribute.- Parameters:
packageName
- The value for packageName- Returns:
this
builder for use in a chained invocation
-
classname
Initializes the value for theclassname
attribute.- Parameters:
classname
- The value for classname- Returns:
this
builder for use in a chained invocation
-
classVarName
Initializes the value for theclassVarName
attribute.- Parameters:
classVarName
- The value for classVarName- Returns:
this
builder for use in a chained invocation
-
addVars
Adds one element tovars
list.- Parameters:
element
- A vars element- Returns:
this
builder for use in a chained invocation
-
addVars
Adds elements tovars
list.- Parameters:
elements
- An array of vars elements- Returns:
this
builder for use in a chained invocation
-
vars
Sets or replaces all elements forvars
list.- Parameters:
elements
- An iterable of vars elements- Returns:
this
builder for use in a chained invocation
-
addAllVars
Adds elements tovars
list.- Parameters:
elements
- An iterable of vars elements- Returns:
this
builder for use in a chained invocation
-
isRecord
Initializes the value for theisRecord
attribute.- Parameters:
isRecord
- The value for isRecord- Returns:
this
builder for use in a chained invocation
-
allowableValues
Initializes the value for theallowableValues
attribute.- Parameters:
allowableValues
- The value for allowableValues (can benull
)- Returns:
this
builder for use in a chained invocation
-
dataType
Initializes the value for thedataType
attribute.- Parameters:
dataType
- The value for dataType (can benull
)- Returns:
this
builder for use in a chained invocation
-
datatypeWithEnum
Initializes the value for thedatatypeWithEnum
attribute.- Parameters:
datatypeWithEnum
- The value for datatypeWithEnum (can benull
)- Returns:
this
builder for use in a chained invocation
-
isNullable
Initializes the value for theisNullable
attribute.- Parameters:
isNullable
- The value for isNullable- Returns:
this
builder for use in a chained invocation
-
parent
Initializes the optional valueparent
to parent.- Parameters:
parent
- The value for parent- Returns:
this
builder for chained invocation
-
parent
Initializes the optional valueparent
to parent.- Parameters:
parent
- The value for parent- Returns:
this
builder for use in a chained invocation
-
putVendorExtensions
Put one entry to thevendorExtensions
map.- Parameters:
key
- The key in the vendorExtensions mapvalue
- The associated value in the vendorExtensions map- Returns:
this
builder for use in a chained invocation
-
putVendorExtensions
Put one entry to thevendorExtensions
map. Nulls are not permitted- Parameters:
entry
- The key and value entry- Returns:
this
builder for use in a chained invocation
-
vendorExtensions
public final ImmutableCtxDto.Builder vendorExtensions(@Nullable Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thevendorExtensions
map. Nulls are not permitted as keys or values, but parameter itself can be null- Parameters:
entries
- The entries that will be added to the vendorExtensions map- Returns:
this
builder for use in a chained invocation
-
putAllVendorExtensions
Put all mappings from the specified map as entries tovendorExtensions
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the vendorExtensions map- Returns:
this
builder for use in a chained invocation
-
jackson
Initializes the value for thejackson
attribute.- Parameters:
jackson
- The value for jackson- Returns:
this
builder for use in a chained invocation
-
generatedAnnotationClass
Initializes the value for thegeneratedAnnotationClass
attribute.- Parameters:
generatedAnnotationClass
- The value for generatedAnnotationClass- Returns:
this
builder for use in a chained invocation
-
generatorClass
Initializes the value for thegeneratorClass
attribute.- Parameters:
generatorClass
- The value for generatorClass- Returns:
this
builder for use in a chained invocation
-
generatedDate
Initializes the optional valuegeneratedDate
to generatedDate.- Parameters:
generatedDate
- The value for generatedDate- Returns:
this
builder for chained invocation
-
generatedDate
Initializes the optional valuegeneratedDate
to generatedDate.- Parameters:
generatedDate
- The value for generatedDate- Returns:
this
builder for use in a chained invocation
-
discriminator
Initializes the optional valuediscriminator
to discriminator.- Parameters:
discriminator
- The value for discriminator- Returns:
this
builder for chained invocation
-
discriminator
public final ImmutableCtxDto.Builder discriminator(Optional<? extends CtxDtoDiscriminator> discriminator) Initializes the optional valuediscriminator
to discriminator.- Parameters:
discriminator
- The value for discriminator- Returns:
this
builder for use in a chained invocation
-
madaDto
Initializes the value for themadaDto
attribute.- Parameters:
madaDto
- The value for madaDto- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableCtxDto
.- Returns:
- An immutable instance of CtxDto
- Throws:
IllegalStateException
- if any required attributes are missing
-