Class ImmutableCtxProperty
java.lang.Object
dk.mada.jaxrs.generator.mpclient.dto.tmpl.ImmutableCtxProperty
- All Implemented Interfaces:
CtxProperty
@Generated(from="CtxProperty",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableCtxProperty
extends Object
implements CtxProperty
Immutable implementation of
CtxProperty
.
Use the builder to create immutable instances:
ImmutableCtxProperty.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableCtxProperty
. -
Method Summary
Modifier and TypeMethodDescription@Nullable CtxEnum
Returns allowable enumeration values or null.baseName()
Returns the OpenApi property name.static ImmutableCtxProperty.Builder
builder()
Creates a builder forImmutableCtxProperty
.static ImmutableCtxProperty
copyOf
(CtxProperty instance) Creates an immutable copy of aCtxProperty
value.@Nullable String
dataType()
Returns dataType in an enumeration or null.Returns the java type name.@Nullable String
Returns the property default value, or null.Returns the optional description of the property.boolean
This instance is equal to all instances ofImmutableCtxProperty
that have equal attribute values.example()
Returns an optional property example.getter()
Returns the name of the getter.int
hashCode()
Computes a hash code from attributes:name
,baseName
,nameInCamelCase
,nameInSnakeCase
,datatypeWithEnum
,getter
,setter
,dataType
,allowableValues
,defaultValue
,description
,validation
,isArray
,isMap
,isSet
,isContainer
,isDate
,isDateTime
,isEnum
,required
,notNull
,example
,madaProp
.boolean
isArray()
Returns true if this property should be rendered as an array, otherwise false.boolean
Returns true if this property is a container, otherwise false.boolean
isDate()
Returns true if this property should be rendered as a date, otherwise false.boolean
Returns true if this property should be rendered as a date-time, otherwise false.boolean
isEnum()
Returns true if this property should render an enumeration, otherwise false.boolean
isMap()
Returns true if this property should be rendered as a map, otherwise false.boolean
isSet()
Returns true if this property should be rendered as a set, otherwise false.madaProp()
Returns additional custom template data for the property.name()
Returns the java field name.Returns the java field name in camel case, used to construct method names.Returns the java field name in snake case, used to construct constant names.boolean
notNull()
Returns true if the property must be NotNull.boolean
required()
Returns true if this property is required.setter()
Returns the name of the setter.toString()
Prints the immutable valueCtxProperty
with attribute values.Returns context for bean validation if relevant for this property.final ImmutableCtxProperty
withAllowableValues
(@Nullable CtxEnum value) Copy the current immutable object by setting a value for theallowableValues
attribute.final ImmutableCtxProperty
withBaseName
(String value) Copy the current immutable object by setting a value for thebaseName
attribute.final ImmutableCtxProperty
withDataType
(@Nullable String value) Copy the current immutable object by setting a value for thedataType
attribute.final ImmutableCtxProperty
withDatatypeWithEnum
(String value) Copy the current immutable object by setting a value for thedatatypeWithEnum
attribute.final ImmutableCtxProperty
withDefaultValue
(@Nullable String value) Copy the current immutable object by setting a value for thedefaultValue
attribute.final ImmutableCtxProperty
withDescription
(String value) Copy the current immutable object by setting a present value for the optionaldescription
attribute.final ImmutableCtxProperty
withDescription
(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescription
attribute.final ImmutableCtxProperty
withExample
(String value) Copy the current immutable object by setting a present value for the optionalexample
attribute.final ImmutableCtxProperty
withExample
(Optional<String> optional) Copy the current immutable object by setting an optional value for theexample
attribute.final ImmutableCtxProperty
withGetter
(String value) Copy the current immutable object by setting a value for thegetter
attribute.final ImmutableCtxProperty
withIsArray
(boolean value) Copy the current immutable object by setting a value for theisArray
attribute.final ImmutableCtxProperty
withIsContainer
(boolean value) Copy the current immutable object by setting a value for theisContainer
attribute.final ImmutableCtxProperty
withIsDate
(boolean value) Copy the current immutable object by setting a value for theisDate
attribute.final ImmutableCtxProperty
withIsDateTime
(boolean value) Copy the current immutable object by setting a value for theisDateTime
attribute.final ImmutableCtxProperty
withIsEnum
(boolean value) Copy the current immutable object by setting a value for theisEnum
attribute.final ImmutableCtxProperty
withIsMap
(boolean value) Copy the current immutable object by setting a value for theisMap
attribute.final ImmutableCtxProperty
withIsSet
(boolean value) Copy the current immutable object by setting a value for theisSet
attribute.final ImmutableCtxProperty
withMadaProp
(CtxPropertyExt value) Copy the current immutable object by setting a value for themadaProp
attribute.final ImmutableCtxProperty
Copy the current immutable object by setting a value for thename
attribute.final ImmutableCtxProperty
withNameInCamelCase
(String value) Copy the current immutable object by setting a value for thenameInCamelCase
attribute.final ImmutableCtxProperty
withNameInSnakeCase
(String value) Copy the current immutable object by setting a value for thenameInSnakeCase
attribute.final ImmutableCtxProperty
withNotNull
(boolean value) Copy the current immutable object by setting a value for thenotNull
attribute.final ImmutableCtxProperty
withRequired
(boolean value) Copy the current immutable object by setting a value for therequired
attribute.final ImmutableCtxProperty
withSetter
(String value) Copy the current immutable object by setting a value for thesetter
attribute.final ImmutableCtxProperty
withValidation
(CtxValidation value) Copy the current immutable object by setting a present value for the optionalvalidation
attribute.final ImmutableCtxProperty
withValidation
(Optional<? extends CtxValidation> optional) Copy the current immutable object by setting an optional value for thevalidation
attribute.
-
Method Details
-
name
Returns the java field name.- Specified by:
name
in interfaceCtxProperty
- Returns:
- the java field name
-
baseName
Returns the OpenApi property name.- Specified by:
baseName
in interfaceCtxProperty
- Returns:
- the OpenApi property name
-
nameInCamelCase
Returns the java field name in camel case, used to construct method names.- Specified by:
nameInCamelCase
in interfaceCtxProperty
- Returns:
- the java field name in camel case, used to construct method names
-
nameInSnakeCase
Returns the java field name in snake case, used to construct constant names.- Specified by:
nameInSnakeCase
in interfaceCtxProperty
- Returns:
- the java field name in snake case, used to construct constant names
-
datatypeWithEnum
Returns the java type name.- Specified by:
datatypeWithEnum
in interfaceCtxProperty
- Returns:
- the java type name
-
getter
Returns the name of the getter.- Specified by:
getter
in interfaceCtxProperty
- Returns:
- the name of the getter
-
setter
Returns the name of the setter.- Specified by:
setter
in interfaceCtxProperty
- Returns:
- the name of the setter
-
dataType
Returns dataType in an enumeration or null.- Specified by:
dataType
in interfaceCtxProperty
- Returns:
- dataType in an enumeration or null
-
allowableValues
Returns allowable enumeration values or null.- Specified by:
allowableValues
in interfaceCtxProperty
- Returns:
- allowable enumeration values or null
-
defaultValue
Returns the property default value, or null.- Specified by:
defaultValue
in interfaceCtxProperty
- Returns:
- the property default value, or null
-
description
Returns the optional description of the property.- Specified by:
description
in interfaceCtxProperty
- Returns:
- the optional description of the property
-
validation
Returns context for bean validation if relevant for this property.- Specified by:
validation
in interfaceCtxProperty
- Returns:
- context for bean validation if relevant for this property
-
isArray
public boolean isArray()Returns true if this property should be rendered as an array, otherwise false.- Specified by:
isArray
in interfaceCtxProperty
- Returns:
- true if this property should be rendered as an array, otherwise false
-
isMap
public boolean isMap()Returns true if this property should be rendered as a map, otherwise false.- Specified by:
isMap
in interfaceCtxProperty
- Returns:
- true if this property should be rendered as a map, otherwise false
-
isSet
public boolean isSet()Returns true if this property should be rendered as a set, otherwise false.- Specified by:
isSet
in interfaceCtxProperty
- Returns:
- true if this property should be rendered as a set, otherwise false
-
isContainer
public boolean isContainer()Returns true if this property is a container, otherwise false.- Specified by:
isContainer
in interfaceCtxProperty
- Returns:
- true if this property is a container, otherwise false
-
isDate
public boolean isDate()Returns true if this property should be rendered as a date, otherwise false.- Specified by:
isDate
in interfaceCtxProperty
- Returns:
- true if this property should be rendered as a date, otherwise false
-
isDateTime
public boolean isDateTime()Returns true if this property should be rendered as a date-time, otherwise false.- Specified by:
isDateTime
in interfaceCtxProperty
- Returns:
- true if this property should be rendered as a date-time, otherwise false
-
isEnum
public boolean isEnum()Returns true if this property should render an enumeration, otherwise false.- Specified by:
isEnum
in interfaceCtxProperty
- Returns:
- true if this property should render an enumeration, otherwise false
-
required
public boolean required()Returns true if this property is required.- Specified by:
required
in interfaceCtxProperty
- Returns:
- true if this property is required
-
notNull
public boolean notNull()Returns true if the property must be NotNull.- Specified by:
notNull
in interfaceCtxProperty
- Returns:
- true if the property must be NotNull
-
example
Returns an optional property example.- Specified by:
example
in interfaceCtxProperty
- Returns:
- an optional property example
-
madaProp
Returns additional custom template data for the property.- Specified by:
madaProp
in interfaceCtxProperty
- Returns:
- additional custom template data for the property
-
withName
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name- Returns:
- A modified copy or the
this
object
-
withBaseName
Copy the current immutable object by setting a value for thebaseName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for baseName- Returns:
- A modified copy or the
this
object
-
withNameInCamelCase
Copy the current immutable object by setting a value for thenameInCamelCase
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for nameInCamelCase- Returns:
- A modified copy or the
this
object
-
withNameInSnakeCase
Copy the current immutable object by setting a value for thenameInSnakeCase
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for nameInSnakeCase- 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- Returns:
- A modified copy or the
this
object
-
withGetter
Copy the current immutable object by setting a value for thegetter
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for getter- Returns:
- A modified copy or the
this
object
-
withSetter
Copy the current immutable object by setting a value for thesetter
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for setter- 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
-
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
-
withDefaultValue
Copy the current immutable object by setting a value for thedefaultValue
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for defaultValue (can benull
)- 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
-
withValidation
Copy the current immutable object by setting a present value for the optionalvalidation
attribute.- Parameters:
value
- The value for validation- Returns:
- A modified copy or
this
if not changed
-
withValidation
Copy the current immutable object by setting an optional value for thevalidation
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 validation- Returns:
- A modified copy or
this
if not changed
-
withIsArray
Copy the current immutable object by setting a value for theisArray
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for isArray- Returns:
- A modified copy or the
this
object
-
withIsMap
Copy the current immutable object by setting a value for theisMap
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for isMap- Returns:
- A modified copy or the
this
object
-
withIsSet
Copy the current immutable object by setting a value for theisSet
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for isSet- Returns:
- A modified copy or the
this
object
-
withIsContainer
Copy the current immutable object by setting a value for theisContainer
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for isContainer- Returns:
- A modified copy or the
this
object
-
withIsDate
Copy the current immutable object by setting a value for theisDate
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for isDate- Returns:
- A modified copy or the
this
object
-
withIsDateTime
Copy the current immutable object by setting a value for theisDateTime
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for isDateTime- Returns:
- A modified copy or the
this
object
-
withIsEnum
Copy the current immutable object by setting a value for theisEnum
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for isEnum- Returns:
- A modified copy or the
this
object
-
withRequired
Copy the current immutable object by setting a value for therequired
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for required- Returns:
- A modified copy or the
this
object
-
withNotNull
Copy the current immutable object by setting a value for thenotNull
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for notNull- Returns:
- A modified copy or the
this
object
-
withExample
Copy the current immutable object by setting a present value for the optionalexample
attribute.- Parameters:
value
- The value for example- Returns:
- A modified copy or
this
if not changed
-
withExample
Copy the current immutable object by setting an optional value for theexample
attribute. An equality check is used on inner value to prevent copying of the same value by returningthis
.- Parameters:
optional
- An optional value for example- Returns:
- A modified copy or
this
if not changed
-
withMadaProp
Copy the current immutable object by setting a value for themadaProp
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for madaProp- Returns:
- A modified copy or the
this
object
-
equals
This instance is equal to all instances ofImmutableCtxProperty
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name
,baseName
,nameInCamelCase
,nameInSnakeCase
,datatypeWithEnum
,getter
,setter
,dataType
,allowableValues
,defaultValue
,description
,validation
,isArray
,isMap
,isSet
,isContainer
,isDate
,isDateTime
,isEnum
,required
,notNull
,example
,madaProp
. -
toString
Prints the immutable valueCtxProperty
with attribute values. -
copyOf
Creates an immutable copy of aCtxProperty
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 CtxProperty instance
-
builder
Creates a builder forImmutableCtxProperty
.ImmutableCtxProperty.builder() .name(String) // required
name
.baseName(String) // requiredbaseName
.nameInCamelCase(String) // requirednameInCamelCase
.nameInSnakeCase(String) // requirednameInSnakeCase
.datatypeWithEnum(String) // requireddatatypeWithEnum
.getter(String) // requiredgetter
.setter(String) // requiredsetter
.dataType(String | null) // nullabledataType
.allowableValues(dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxEnum | null) // nullableallowableValues
.defaultValue(String | null) // nullabledefaultValue
.description(Optional<String>) // optionaldescription
.validation(Optional<dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxValidation>) // optionalvalidation
.isArray(boolean) // requiredisArray
.isMap(boolean) // requiredisMap
.isSet(boolean) // requiredisSet
.isContainer(boolean) // requiredisContainer
.isDate(boolean) // requiredisDate
.isDateTime(boolean) // requiredisDateTime
.isEnum(boolean) // requiredisEnum
.required(boolean) // requiredrequired
.notNull(boolean) // requirednotNull
.example(Optional<String>) // optionalexample
.madaProp(dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxPropertyExt) // requiredmadaProp
.build();- Returns:
- A new ImmutableCtxProperty builder
-