Class ImmutableCtxApiOpExt

java.lang.Object
dk.mada.jaxrs.generator.mpclient.api.tmpl.ImmutableCtxApiOpExt
All Implemented Interfaces:
CtxApiOpExt

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

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

  • Method Details

    • renderJavadocMacroSpacer

      public boolean renderJavadocMacroSpacer()
      Returns true if a spacer is needed before javadoc macros.
      Specified by:
      renderJavadocMacroSpacer in interface CtxApiOpExt
      Returns:
      true if a spacer is needed before javadoc macros
    • renderJavadocReturn

      public boolean renderJavadocReturn()
      Returns true if the javadoc @return statement should be rendered.
      Specified by:
      renderJavadocReturn in interface CtxApiOpExt
      Returns:
      true if the javadoc @return statement should be rendered
    • produces

      public Optional<String> produces()
      Returns the optional @Produces value for the operation.
      Specified by:
      produces in interface CtxApiOpExt
      Returns:
      the optional @Produces value for the operation
    • consumes

      public Optional<String> consumes()
      Returns the optional @Consumes value for the operation.
      Specified by:
      consumes in interface CtxApiOpExt
      Returns:
      the optional @Consumes value for the operation
    • responseSchema

      public boolean responseSchema()
      Use simpler @APIResponseSchema instead of @APIResponses+@APIResponse. Only possible for simple classes (not containers).
      Specified by:
      responseSchema in interface CtxApiOpExt
      Returns:
      true if the shorter ApiResponseSchema annotation should be used
    • hasResponses

      public boolean hasResponses()
      Returns true if the operation has any responses, otherwise false.
      Specified by:
      hasResponses in interface CtxApiOpExt
      Returns:
      true if the operation has any responses, otherwise false
    • summaryString

      public Optional<String> summaryString()
      Returns an optional summary as a java string.
      Specified by:
      summaryString in interface CtxApiOpExt
      Returns:
      an optional summary as a java string
    • withRenderJavadocMacroSpacer

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

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

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

      public final ImmutableCtxApiOpExt withProduces(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the produces 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 produces
      Returns:
      A modified copy or this if not changed
    • withConsumes

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

      public final ImmutableCtxApiOpExt withConsumes(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the consumes 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 consumes
      Returns:
      A modified copy or this if not changed
    • withResponseSchema

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

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

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

      public final ImmutableCtxApiOpExt withSummaryString(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the summaryString 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 summaryString
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableCtxApiOpExt 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: renderJavadocMacroSpacer, renderJavadocReturn, produces, consumes, responseSchema, hasResponses, summaryString.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableCtxApiOpExt.Builder builder()
      Creates a builder for ImmutableCtxApiOpExt.
       ImmutableCtxApiOpExt.builder()
          .renderJavadocMacroSpacer(boolean) // required renderJavadocMacroSpacer
          .renderJavadocReturn(boolean) // required renderJavadocReturn
          .produces(Optional<String>) // optional produces
          .consumes(Optional<String>) // optional consumes
          .responseSchema(boolean) // required responseSchema
          .hasResponses(boolean) // required hasResponses
          .summaryString(Optional<String>) // optional summaryString
          .build();
       
      Returns:
      A new ImmutableCtxApiOpExt builder