Class ImmutableCtxProperty.Builder
java.lang.Object
dk.mada.jaxrs.generator.mpclient.dto.tmpl.ImmutableCtxProperty.Builder
- Enclosing class:
ImmutableCtxProperty
@Generated(from="CtxProperty",
generator="Immutables")
public static final class ImmutableCtxProperty.Builder
extends Object
Builds instances of type
ImmutableCtxProperty
.
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 TypeMethodDescriptionallowableValues
(@Nullable CtxEnum allowableValues) Initializes the value for theallowableValues
attribute.Initializes the value for thebaseName
attribute.build()
Builds a newImmutableCtxProperty
.Initializes the value for thedataType
attribute.datatypeWithEnum
(String datatypeWithEnum) Initializes the value for thedatatypeWithEnum
attribute.defaultValue
(@Nullable String defaultValue) Initializes the value for thedefaultValue
attribute.description
(String description) Initializes the optional valuedescription
to description.description
(Optional<String> description) Initializes the optional valuedescription
to description.Initializes the optional valueexample
to example.Initializes the optional valueexample
to example.from
(CtxProperty instance) Fill a builder with attribute values from the providedCtxProperty
instance.Initializes the value for thegetter
attribute.isArray
(boolean isArray) Initializes the value for theisArray
attribute.isContainer
(boolean isContainer) Initializes the value for theisContainer
attribute.isDate
(boolean isDate) Initializes the value for theisDate
attribute.isDateTime
(boolean isDateTime) Initializes the value for theisDateTime
attribute.isEnum
(boolean isEnum) Initializes the value for theisEnum
attribute.isMap
(boolean isMap) Initializes the value for theisMap
attribute.isSet
(boolean isSet) Initializes the value for theisSet
attribute.madaProp
(CtxPropertyExt madaProp) Initializes the value for themadaProp
attribute.Initializes the value for thename
attribute.nameInCamelCase
(String nameInCamelCase) Initializes the value for thenameInCamelCase
attribute.nameInSnakeCase
(String nameInSnakeCase) Initializes the value for thenameInSnakeCase
attribute.notNull
(boolean notNull) Initializes the value for thenotNull
attribute.required
(boolean required) Initializes the value for therequired
attribute.Initializes the value for thesetter
attribute.validation
(CtxValidation validation) Initializes the optional valuevalidation
to validation.validation
(Optional<? extends CtxValidation> validation) Initializes the optional valuevalidation
to validation.
-
Method Details
-
from
Fill a builder with attribute values from the providedCtxProperty
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
name
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
baseName
Initializes the value for thebaseName
attribute.- Parameters:
baseName
- The value for baseName- Returns:
this
builder for use in a chained invocation
-
nameInCamelCase
Initializes the value for thenameInCamelCase
attribute.- Parameters:
nameInCamelCase
- The value for nameInCamelCase- Returns:
this
builder for use in a chained invocation
-
nameInSnakeCase
Initializes the value for thenameInSnakeCase
attribute.- Parameters:
nameInSnakeCase
- The value for nameInSnakeCase- Returns:
this
builder for use in a chained invocation
-
datatypeWithEnum
Initializes the value for thedatatypeWithEnum
attribute.- Parameters:
datatypeWithEnum
- The value for datatypeWithEnum- Returns:
this
builder for use in a chained invocation
-
getter
Initializes the value for thegetter
attribute.- Parameters:
getter
- The value for getter- Returns:
this
builder for use in a chained invocation
-
setter
Initializes the value for thesetter
attribute.- Parameters:
setter
- The value for setter- 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
-
allowableValues
Initializes the value for theallowableValues
attribute.- Parameters:
allowableValues
- The value for allowableValues (can benull
)- Returns:
this
builder for use in a chained invocation
-
defaultValue
Initializes the value for thedefaultValue
attribute.- Parameters:
defaultValue
- The value for defaultValue (can benull
)- 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
-
validation
Initializes the optional valuevalidation
to validation.- Parameters:
validation
- The value for validation- Returns:
this
builder for chained invocation
-
validation
Initializes the optional valuevalidation
to validation.- Parameters:
validation
- The value for validation- Returns:
this
builder for use in a chained invocation
-
isArray
Initializes the value for theisArray
attribute.- Parameters:
isArray
- The value for isArray- Returns:
this
builder for use in a chained invocation
-
isMap
Initializes the value for theisMap
attribute.- Parameters:
isMap
- The value for isMap- Returns:
this
builder for use in a chained invocation
-
isSet
Initializes the value for theisSet
attribute.- Parameters:
isSet
- The value for isSet- Returns:
this
builder for use in a chained invocation
-
isContainer
Initializes the value for theisContainer
attribute.- Parameters:
isContainer
- The value for isContainer- Returns:
this
builder for use in a chained invocation
-
isDate
Initializes the value for theisDate
attribute.- Parameters:
isDate
- The value for isDate- Returns:
this
builder for use in a chained invocation
-
isDateTime
Initializes the value for theisDateTime
attribute.- Parameters:
isDateTime
- The value for isDateTime- Returns:
this
builder for use in a chained invocation
-
isEnum
Initializes the value for theisEnum
attribute.- Parameters:
isEnum
- The value for isEnum- Returns:
this
builder for use in a chained invocation
-
required
Initializes the value for therequired
attribute.- Parameters:
required
- The value for required- Returns:
this
builder for use in a chained invocation
-
notNull
Initializes the value for thenotNull
attribute.- Parameters:
notNull
- The value for notNull- Returns:
this
builder for use in a chained invocation
-
example
Initializes the optional valueexample
to example.- Parameters:
example
- The value for example- Returns:
this
builder for chained invocation
-
example
Initializes the optional valueexample
to example.- Parameters:
example
- The value for example- Returns:
this
builder for use in a chained invocation
-
madaProp
Initializes the value for themadaProp
attribute.- Parameters:
madaProp
- The value for madaProp- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableCtxProperty
.- Returns:
- An immutable instance of CtxProperty
- Throws:
IllegalStateException
- if any required attributes are missing
-