Class ImmutableCtxPropertyExt

java.lang.Object
dk.mada.jaxrs.generator.mpclient.dto.tmpl.ImmutableCtxPropertyExt
All Implemented Interfaces:
CtxPropertyExt

@Generated(from="CtxPropertyExt", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableCtxPropertyExt extends Object implements CtxPropertyExt
Immutable implementation of CtxPropertyExt.

Use the builder to create immutable instances: ImmutableCtxPropertyExt.builder().

  • Method Details

    • innerDatatypeWithEnum

      public @Nullable String innerDatatypeWithEnum()
      Returns the java inner type, or null.
      Specified by:
      innerDatatypeWithEnum in interface CtxPropertyExt
      Returns:
      the java inner type, or null
    • enumClassName

      public @Nullable String enumClassName()
      Returns the (embedded) enumeration class name. Used in enumerations that are rendered next to the (only) property where they are referenced. See enumClass.mustache. This is handled separately from the standard dataType/datatypeWithEnum values because they are both used separately by both containers and enumerations. Which prevents handling of enumerations in containers (or rather, I broke the templates somehow to match behavior from openapi-generator - and this is easier to read for me).
      Specified by:
      enumClassName in interface CtxPropertyExt
      Returns:
      the enumeration class name
    • enumTypeName

      public @Nullable String enumTypeName()
      Returns the enumeration type name.
      Specified by:
      enumTypeName in interface CtxPropertyExt
      Returns:
      the enumeration type name
    • enumSchemaOptions

      public Optional<String> enumSchemaOptions()
      Returns the optional schema options for an inline enumeration type.
      Specified by:
      enumSchemaOptions in interface CtxPropertyExt
      Returns:
      the optional schema options for an inline enumeration type
    • schemaOptions

      public Optional<String> schemaOptions()
      Returns the optional schema options (for use in @Schema).
      Specified by:
      schemaOptions in interface CtxPropertyExt
      Returns:
      the optional schema options (for use in @Schema)
    • isUseBigDecimalForDouble

      public boolean isUseBigDecimalForDouble()
      Returns true to use BigDecimal, false to use Double.
      Specified by:
      isUseBigDecimalForDouble in interface CtxPropertyExt
      Returns:
      true to use BigDecimal, false to use Double
    • isUseEmptyCollections

      public boolean isUseEmptyCollections()
      Returns true to initialize collections, false to leave as null.
      Specified by:
      isUseEmptyCollections in interface CtxPropertyExt
      Returns:
      true to initialize collections, false to leave as null
    • isByteArray

      public boolean isByteArray()
      Returns true if this property is a byte array.
      Specified by:
      isByteArray in interface CtxPropertyExt
      Returns:
      true if this property is a byte array
    • isEqualsPrimitive

      public boolean isEqualsPrimitive()
      Returns true if this property is primitive and can use == for equals.
      Specified by:
      isEqualsPrimitive in interface CtxPropertyExt
      Returns:
      true if this property is primitive and can use == for equals
    • getter

      public String getter()
      Returns the getter name.
      Specified by:
      getter in interface CtxPropertyExt
      Returns:
      the getter name
    • setter

      public String setter()
      Returns the setter name.
      Specified by:
      setter in interface CtxPropertyExt
      Returns:
      the setter name
    • jsonb

      public boolean jsonb()
      Returns true if rendering for jsonb, false otherwise.
      Specified by:
      jsonb in interface CtxPropertyExt
      Returns:
      true if rendering for jsonb, false otherwise
    • descriptionString

      public @Nullable String descriptionString()
      Returns the summary as a java string, or null.
      Specified by:
      descriptionString in interface CtxPropertyExt
      Returns:
      the summary as a java string, or null
    • multipartType

      public @Nullable String multipartType()
      Returns the multipart type associated with this property, or null.
      Specified by:
      multipartType in interface CtxPropertyExt
      Returns:
      the multipart type associated with this property, or null
    • jsonPropertyConstant

      public @Nullable String jsonPropertyConstant()
      Returns a json property constant value, or null.
      Specified by:
      jsonPropertyConstant in interface CtxPropertyExt
      Returns:
      a json property constant value, or null
    • isNullable

      public boolean isNullable()
      Returns true if this property is nullable.
      Specified by:
      isNullable in interface CtxPropertyExt
      Returns:
      true if this property is nullable
    • isRequireNonNull

      public boolean isRequireNonNull()
      Returns true if this property should guard against nulls with Objects.requireNonNull.
      Specified by:
      isRequireNonNull in interface CtxPropertyExt
      Returns:
      true if this property should guard against nulls with Objects.requireNonNull
    • withInnerDatatypeWithEnum

      public final ImmutableCtxPropertyExt withInnerDatatypeWithEnum(@Nullable String value)
      Copy the current immutable object by setting a value for the innerDatatypeWithEnum attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for innerDatatypeWithEnum (can be null)
      Returns:
      A modified copy or the this object
    • withEnumClassName

      public final ImmutableCtxPropertyExt withEnumClassName(@Nullable String value)
      Copy the current immutable object by setting a value for the enumClassName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for enumClassName (can be null)
      Returns:
      A modified copy or the this object
    • withEnumTypeName

      public final ImmutableCtxPropertyExt withEnumTypeName(@Nullable String value)
      Copy the current immutable object by setting a value for the enumTypeName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for enumTypeName (can be null)
      Returns:
      A modified copy or the this object
    • withEnumSchemaOptions

      public final ImmutableCtxPropertyExt withEnumSchemaOptions(String value)
      Copy the current immutable object by setting a present value for the optional enumSchemaOptions attribute.
      Parameters:
      value - The value for enumSchemaOptions
      Returns:
      A modified copy or this if not changed
    • withEnumSchemaOptions

      public final ImmutableCtxPropertyExt withEnumSchemaOptions(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the enumSchemaOptions attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for enumSchemaOptions
      Returns:
      A modified copy or this if not changed
    • withSchemaOptions

      public final ImmutableCtxPropertyExt withSchemaOptions(String value)
      Copy the current immutable object by setting a present value for the optional schemaOptions attribute.
      Parameters:
      value - The value for schemaOptions
      Returns:
      A modified copy or this if not changed
    • withSchemaOptions

      public final ImmutableCtxPropertyExt withSchemaOptions(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the schemaOptions attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for schemaOptions
      Returns:
      A modified copy or this if not changed
    • withIsUseBigDecimalForDouble

      public final ImmutableCtxPropertyExt withIsUseBigDecimalForDouble(boolean value)
      Copy the current immutable object by setting a value for the isUseBigDecimalForDouble attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isUseBigDecimalForDouble
      Returns:
      A modified copy or the this object
    • withIsUseEmptyCollections

      public final ImmutableCtxPropertyExt withIsUseEmptyCollections(boolean value)
      Copy the current immutable object by setting a value for the isUseEmptyCollections attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isUseEmptyCollections
      Returns:
      A modified copy or the this object
    • withIsByteArray

      public final ImmutableCtxPropertyExt withIsByteArray(boolean value)
      Copy the current immutable object by setting a value for the isByteArray attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isByteArray
      Returns:
      A modified copy or the this object
    • withIsEqualsPrimitive

      public final ImmutableCtxPropertyExt withIsEqualsPrimitive(boolean value)
      Copy the current immutable object by setting a value for the isEqualsPrimitive attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isEqualsPrimitive
      Returns:
      A modified copy or the this object
    • withGetter

      public final ImmutableCtxPropertyExt withGetter(String value)
      Copy the current immutable object by setting a value for the getter attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for getter
      Returns:
      A modified copy or the this object
    • withSetter

      public final ImmutableCtxPropertyExt withSetter(String value)
      Copy the current immutable object by setting a value for the setter attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for setter
      Returns:
      A modified copy or the this object
    • withJsonb

      public final ImmutableCtxPropertyExt withJsonb(boolean value)
      Copy the current immutable object by setting a value for the jsonb attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for jsonb
      Returns:
      A modified copy or the this object
    • withDescriptionString

      public final ImmutableCtxPropertyExt withDescriptionString(@Nullable String value)
      Copy the current immutable object by setting a value for the descriptionString attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for descriptionString (can be null)
      Returns:
      A modified copy or the this object
    • withMultipartType

      public final ImmutableCtxPropertyExt withMultipartType(@Nullable String value)
      Copy the current immutable object by setting a value for the multipartType attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for multipartType (can be null)
      Returns:
      A modified copy or the this object
    • withJsonPropertyConstant

      public final ImmutableCtxPropertyExt withJsonPropertyConstant(@Nullable String value)
      Copy the current immutable object by setting a value for the jsonPropertyConstant attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for jsonPropertyConstant (can be null)
      Returns:
      A modified copy or the this object
    • withIsNullable

      public final ImmutableCtxPropertyExt withIsNullable(boolean value)
      Copy the current immutable object by setting a value for the isNullable attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isNullable
      Returns:
      A modified copy or the this object
    • withIsRequireNonNull

      public final ImmutableCtxPropertyExt withIsRequireNonNull(boolean value)
      Copy the current immutable object by setting a value for the isRequireNonNull attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isRequireNonNull
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableCtxPropertyExt that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: innerDatatypeWithEnum, enumClassName, enumTypeName, enumSchemaOptions, schemaOptions, isUseBigDecimalForDouble, isUseEmptyCollections, isByteArray, isEqualsPrimitive, getter, setter, jsonb, descriptionString, multipartType, jsonPropertyConstant, isNullable, isRequireNonNull.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value CtxPropertyExt with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableCtxPropertyExt copyOf(CtxPropertyExt instance)
      Creates an immutable copy of a CtxPropertyExt 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 CtxPropertyExt instance
    • builder

      public static ImmutableCtxPropertyExt.Builder builder()
      Creates a builder for ImmutableCtxPropertyExt.
       ImmutableCtxPropertyExt.builder()
          .innerDatatypeWithEnum(String | null) // nullable innerDatatypeWithEnum
          .enumClassName(String | null) // nullable enumClassName
          .enumTypeName(String | null) // nullable enumTypeName
          .enumSchemaOptions(Optional<String>) // optional enumSchemaOptions
          .schemaOptions(Optional<String>) // optional schemaOptions
          .isUseBigDecimalForDouble(boolean) // required isUseBigDecimalForDouble
          .isUseEmptyCollections(boolean) // required isUseEmptyCollections
          .isByteArray(boolean) // required isByteArray
          .isEqualsPrimitive(boolean) // required isEqualsPrimitive
          .getter(String) // required getter
          .setter(String) // required setter
          .jsonb(boolean) // required jsonb
          .descriptionString(String | null) // nullable descriptionString
          .multipartType(String | null) // nullable multipartType
          .jsonPropertyConstant(String | null) // nullable jsonPropertyConstant
          .isNullable(boolean) // required isNullable
          .isRequireNonNull(boolean) // required isRequireNonNull
          .build();
       
      Returns:
      A new ImmutableCtxPropertyExt builder