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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCtxApiOpExt. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableCtxApiOpExt.Builderbuilder()Creates a builder forImmutableCtxApiOpExt.consumes()Returns the optional @Consumes value for the operation.static ImmutableCtxApiOpExtcopyOf(CtxApiOpExt instance) Creates an immutable copy of aCtxApiOpExtvalue.booleanThis instance is equal to all instances ofImmutableCtxApiOpExtthat have equal attribute values.inthashCode()Computes a hash code from attributes:renderJavadocMacroSpacer,renderJavadocReturn,produces,consumes,responseSchema,hasResponses,summaryString.booleanReturns true if the operation has any responses, otherwise false.produces()Returns the optional @Produces value for the operation.booleanReturns true if a spacer is needed before javadoc macros.booleanReturns true if the javadoc @return statement should be rendered.booleanUse simpler @APIResponseSchema instead of @APIResponses+@APIResponse.Returns an optional summary as a java string.toString()Prints the immutable valueCtxApiOpExtwith attribute values.final ImmutableCtxApiOpExtwithConsumes(String value) Copy the current immutable object by setting a present value for the optionalconsumesattribute.final ImmutableCtxApiOpExtwithConsumes(Optional<String> optional) Copy the current immutable object by setting an optional value for theconsumesattribute.final ImmutableCtxApiOpExtwithHasResponses(boolean value) Copy the current immutable object by setting a value for thehasResponsesattribute.final ImmutableCtxApiOpExtwithProduces(String value) Copy the current immutable object by setting a present value for the optionalproducesattribute.final ImmutableCtxApiOpExtwithProduces(Optional<String> optional) Copy the current immutable object by setting an optional value for theproducesattribute.final ImmutableCtxApiOpExtwithRenderJavadocMacroSpacer(boolean value) Copy the current immutable object by setting a value for therenderJavadocMacroSpacerattribute.final ImmutableCtxApiOpExtwithRenderJavadocReturn(boolean value) Copy the current immutable object by setting a value for therenderJavadocReturnattribute.final ImmutableCtxApiOpExtwithResponseSchema(boolean value) Copy the current immutable object by setting a value for theresponseSchemaattribute.final ImmutableCtxApiOpExtwithSummaryString(String value) Copy the current immutable object by setting a present value for the optionalsummaryStringattribute.final ImmutableCtxApiOpExtwithSummaryString(Optional<String> optional) Copy the current immutable object by setting an optional value for thesummaryStringattribute.
-
Method Details
-
renderJavadocMacroSpacer
public boolean renderJavadocMacroSpacer()Returns true if a spacer is needed before javadoc macros.- Specified by:
renderJavadocMacroSpacerin interfaceCtxApiOpExt- 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:
renderJavadocReturnin interfaceCtxApiOpExt- Returns:
- true if the javadoc @return statement should be rendered
-
produces
Returns the optional @Produces value for the operation.- Specified by:
producesin interfaceCtxApiOpExt- Returns:
- the optional @Produces value for the operation
-
consumes
Returns the optional @Consumes value for the operation.- Specified by:
consumesin interfaceCtxApiOpExt- 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:
responseSchemain interfaceCtxApiOpExt- 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:
hasResponsesin interfaceCtxApiOpExt- Returns:
- true if the operation has any responses, otherwise false
-
summaryString
Returns an optional summary as a java string.- Specified by:
summaryStringin interfaceCtxApiOpExt- Returns:
- an optional summary as a java string
-
withRenderJavadocMacroSpacer
Copy the current immutable object by setting a value for therenderJavadocMacroSpacerattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for renderJavadocMacroSpacer- Returns:
- A modified copy or the
thisobject
-
withRenderJavadocReturn
Copy the current immutable object by setting a value for therenderJavadocReturnattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for renderJavadocReturn- Returns:
- A modified copy or the
thisobject
-
withProduces
Copy the current immutable object by setting a present value for the optionalproducesattribute.- Parameters:
value- The value for produces- Returns:
- A modified copy or
thisif not changed
-
withProduces
Copy the current immutable object by setting an optional value for theproducesattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for produces- Returns:
- A modified copy or
thisif not changed
-
withConsumes
Copy the current immutable object by setting a present value for the optionalconsumesattribute.- Parameters:
value- The value for consumes- Returns:
- A modified copy or
thisif not changed
-
withConsumes
Copy the current immutable object by setting an optional value for theconsumesattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for consumes- Returns:
- A modified copy or
thisif not changed
-
withResponseSchema
Copy the current immutable object by setting a value for theresponseSchemaattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for responseSchema- Returns:
- A modified copy or the
thisobject
-
withHasResponses
Copy the current immutable object by setting a value for thehasResponsesattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hasResponses- Returns:
- A modified copy or the
thisobject
-
withSummaryString
Copy the current immutable object by setting a present value for the optionalsummaryStringattribute.- Parameters:
value- The value for summaryString- Returns:
- A modified copy or
thisif not changed
-
withSummaryString
Copy the current immutable object by setting an optional value for thesummaryStringattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for summaryString- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableCtxApiOpExtthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:renderJavadocMacroSpacer,renderJavadocReturn,produces,consumes,responseSchema,hasResponses,summaryString. -
toString
Prints the immutable valueCtxApiOpExtwith attribute values. -
copyOf
Creates an immutable copy of aCtxApiOpExtvalue. 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
Creates a builder forImmutableCtxApiOpExt.ImmutableCtxApiOpExt.builder() .renderJavadocMacroSpacer(boolean) // requiredrenderJavadocMacroSpacer.renderJavadocReturn(boolean) // requiredrenderJavadocReturn.produces(Optional<String>) // optionalproduces.consumes(Optional<String>) // optionalconsumes.responseSchema(boolean) // requiredresponseSchema.hasResponses(boolean) // requiredhasResponses.summaryString(Optional<String>) // optionalsummaryString.build();- Returns:
- A new ImmutableCtxApiOpExt builder
-