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 classBuilds instances of typeImmutableCtxProperty. -
Method Summary
Modifier and TypeMethodDescription@Nullable CtxEnumReturns allowable enumeration values or null.baseName()Returns the OpenApi property name.static ImmutableCtxProperty.Builderbuilder()Creates a builder forImmutableCtxProperty.static ImmutableCtxPropertycopyOf(CtxProperty instance) Creates an immutable copy of aCtxPropertyvalue.@Nullable StringdataType()Returns dataType in an enumeration or null.Returns the java type name.@Nullable StringReturns the property default value, or null.Returns the optional description of the property.booleanThis instance is equal to all instances ofImmutableCtxPropertythat have equal attribute values.example()Returns an optional property example.getter()Returns the name of the getter.inthashCode()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.booleanisArray()Returns true if this property should be rendered as an array, otherwise false.booleanReturns true if this property is a container, otherwise false.booleanisDate()Returns true if this property should be rendered as a date, otherwise false.booleanReturns true if this property should be rendered as a date-time, otherwise false.booleanisEnum()Returns true if this property should render an enumeration, otherwise false.booleanisMap()Returns true if this property should be rendered as a map, otherwise false.booleanisSet()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.booleannotNull()Returns true if the property must be NotNull.booleanrequired()Returns true if this property is required.setter()Returns the name of the setter.toString()Prints the immutable valueCtxPropertywith attribute values.Returns context for bean validation if relevant for this property.final ImmutableCtxPropertywithAllowableValues(@Nullable CtxEnum value) Copy the current immutable object by setting a value for theallowableValuesattribute.final ImmutableCtxPropertywithBaseName(String value) Copy the current immutable object by setting a value for thebaseNameattribute.final ImmutableCtxPropertywithDataType(@Nullable String value) Copy the current immutable object by setting a value for thedataTypeattribute.final ImmutableCtxPropertywithDatatypeWithEnum(String value) Copy the current immutable object by setting a value for thedatatypeWithEnumattribute.final ImmutableCtxPropertywithDefaultValue(@Nullable String value) Copy the current immutable object by setting a value for thedefaultValueattribute.final ImmutableCtxPropertywithDescription(String value) Copy the current immutable object by setting a present value for the optionaldescriptionattribute.final ImmutableCtxPropertywithDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescriptionattribute.final ImmutableCtxPropertywithExample(String value) Copy the current immutable object by setting a present value for the optionalexampleattribute.final ImmutableCtxPropertywithExample(Optional<String> optional) Copy the current immutable object by setting an optional value for theexampleattribute.final ImmutableCtxPropertywithGetter(String value) Copy the current immutable object by setting a value for thegetterattribute.final ImmutableCtxPropertywithIsArray(boolean value) Copy the current immutable object by setting a value for theisArrayattribute.final ImmutableCtxPropertywithIsContainer(boolean value) Copy the current immutable object by setting a value for theisContainerattribute.final ImmutableCtxPropertywithIsDate(boolean value) Copy the current immutable object by setting a value for theisDateattribute.final ImmutableCtxPropertywithIsDateTime(boolean value) Copy the current immutable object by setting a value for theisDateTimeattribute.final ImmutableCtxPropertywithIsEnum(boolean value) Copy the current immutable object by setting a value for theisEnumattribute.final ImmutableCtxPropertywithIsMap(boolean value) Copy the current immutable object by setting a value for theisMapattribute.final ImmutableCtxPropertywithIsSet(boolean value) Copy the current immutable object by setting a value for theisSetattribute.final ImmutableCtxPropertywithMadaProp(CtxPropertyExt value) Copy the current immutable object by setting a value for themadaPropattribute.final ImmutableCtxPropertyCopy the current immutable object by setting a value for thenameattribute.final ImmutableCtxPropertywithNameInCamelCase(String value) Copy the current immutable object by setting a value for thenameInCamelCaseattribute.final ImmutableCtxPropertywithNameInSnakeCase(String value) Copy the current immutable object by setting a value for thenameInSnakeCaseattribute.final ImmutableCtxPropertywithNotNull(boolean value) Copy the current immutable object by setting a value for thenotNullattribute.final ImmutableCtxPropertywithRequired(boolean value) Copy the current immutable object by setting a value for therequiredattribute.final ImmutableCtxPropertywithSetter(String value) Copy the current immutable object by setting a value for thesetterattribute.final ImmutableCtxPropertywithValidation(CtxValidation value) Copy the current immutable object by setting a present value for the optionalvalidationattribute.final ImmutableCtxPropertywithValidation(Optional<? extends CtxValidation> optional) Copy the current immutable object by setting an optional value for thevalidationattribute.
-
Method Details
-
name
Returns the java field name.- Specified by:
namein interfaceCtxProperty- Returns:
- the java field name
-
baseName
Returns the OpenApi property name.- Specified by:
baseNamein interfaceCtxProperty- Returns:
- the OpenApi property name
-
nameInCamelCase
Returns the java field name in camel case, used to construct method names.- Specified by:
nameInCamelCasein 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:
nameInSnakeCasein interfaceCtxProperty- Returns:
- the java field name in snake case, used to construct constant names
-
datatypeWithEnum
Returns the java type name.- Specified by:
datatypeWithEnumin interfaceCtxProperty- Returns:
- the java type name
-
getter
Returns the name of the getter.- Specified by:
getterin interfaceCtxProperty- Returns:
- the name of the getter
-
setter
Returns the name of the setter.- Specified by:
setterin interfaceCtxProperty- Returns:
- the name of the setter
-
dataType
Returns dataType in an enumeration or null.- Specified by:
dataTypein interfaceCtxProperty- Returns:
- dataType in an enumeration or null
-
allowableValues
Returns allowable enumeration values or null.- Specified by:
allowableValuesin interfaceCtxProperty- Returns:
- allowable enumeration values or null
-
defaultValue
Returns the property default value, or null.- Specified by:
defaultValuein interfaceCtxProperty- Returns:
- the property default value, or null
-
description
Returns the optional description of the property.- Specified by:
descriptionin interfaceCtxProperty- Returns:
- the optional description of the property
-
validation
Returns context for bean validation if relevant for this property.- Specified by:
validationin 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:
isArrayin 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:
isMapin 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:
isSetin 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:
isContainerin 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:
isDatein 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:
isDateTimein 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:
isEnumin 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:
requiredin interfaceCtxProperty- Returns:
- true if this property is required
-
notNull
public boolean notNull()Returns true if the property must be NotNull.- Specified by:
notNullin interfaceCtxProperty- Returns:
- true if the property must be NotNull
-
example
Returns an optional property example.- Specified by:
examplein interfaceCtxProperty- Returns:
- an optional property example
-
madaProp
Returns additional custom template data for the property.- Specified by:
madaPropin interfaceCtxProperty- Returns:
- additional custom template data for the property
-
withName
Copy the current immutable object by setting a value for thenameattribute. 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
thisobject
-
withBaseName
Copy the current immutable object by setting a value for thebaseNameattribute. 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
thisobject
-
withNameInCamelCase
Copy the current immutable object by setting a value for thenameInCamelCaseattribute. 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
thisobject
-
withNameInSnakeCase
Copy the current immutable object by setting a value for thenameInSnakeCaseattribute. 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
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- Returns:
- A modified copy or the
thisobject
-
withGetter
Copy the current immutable object by setting a value for thegetterattribute. 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
thisobject
-
withSetter
Copy the current immutable object by setting a value for thesetterattribute. 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
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
-
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
-
withDefaultValue
Copy the current immutable object by setting a value for thedefaultValueattribute. 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
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
-
withValidation
Copy the current immutable object by setting a present value for the optionalvalidationattribute.- Parameters:
value- The value for validation- Returns:
- A modified copy or
thisif not changed
-
withValidation
Copy the current immutable object by setting an optional value for thevalidationattribute. 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 validation- Returns:
- A modified copy or
thisif not changed
-
withIsArray
Copy the current immutable object by setting a value for theisArrayattribute. 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
thisobject
-
withIsMap
Copy the current immutable object by setting a value for theisMapattribute. 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
thisobject
-
withIsSet
Copy the current immutable object by setting a value for theisSetattribute. 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
thisobject
-
withIsContainer
Copy the current immutable object by setting a value for theisContainerattribute. 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
thisobject
-
withIsDate
Copy the current immutable object by setting a value for theisDateattribute. 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
thisobject
-
withIsDateTime
Copy the current immutable object by setting a value for theisDateTimeattribute. 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
thisobject
-
withIsEnum
Copy the current immutable object by setting a value for theisEnumattribute. 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
thisobject
-
withRequired
Copy the current immutable object by setting a value for therequiredattribute. 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
thisobject
-
withNotNull
Copy the current immutable object by setting a value for thenotNullattribute. 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
thisobject
-
withExample
Copy the current immutable object by setting a present value for the optionalexampleattribute.- Parameters:
value- The value for example- Returns:
- A modified copy or
thisif not changed
-
withExample
Copy the current immutable object by setting an optional value for theexampleattribute. 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
thisif not changed
-
withMadaProp
Copy the current immutable object by setting a value for themadaPropattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableCtxPropertythat 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 valueCtxPropertywith attribute values. -
copyOf
Creates an immutable copy of aCtxPropertyvalue. 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) // requiredname.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
-