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 class
Builds instances of typeImmutableCtxApiOpExt
. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableCtxApiOpExt.Builder
builder()
Creates a builder forImmutableCtxApiOpExt
.consumes()
Returns the optional @Consumes value for the operation.static ImmutableCtxApiOpExt
copyOf
(CtxApiOpExt instance) Creates an immutable copy of aCtxApiOpExt
value.boolean
This instance is equal to all instances ofImmutableCtxApiOpExt
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:renderJavadocMacroSpacer
,renderJavadocReturn
,produces
,consumes
,responseSchema
,hasResponses
,summaryString
.boolean
Returns true if the operation has any responses, otherwise false.produces()
Returns the optional @Produces value for the operation.boolean
Returns true if a spacer is needed before javadoc macros.boolean
Returns true if the javadoc @return statement should be rendered.boolean
Use simpler @APIResponseSchema instead of @APIResponses+@APIResponse.Returns an optional summary as a java string.toString()
Prints the immutable valueCtxApiOpExt
with attribute values.final ImmutableCtxApiOpExt
withConsumes
(String value) Copy the current immutable object by setting a present value for the optionalconsumes
attribute.final ImmutableCtxApiOpExt
withConsumes
(Optional<String> optional) Copy the current immutable object by setting an optional value for theconsumes
attribute.final ImmutableCtxApiOpExt
withHasResponses
(boolean value) Copy the current immutable object by setting a value for thehasResponses
attribute.final ImmutableCtxApiOpExt
withProduces
(String value) Copy the current immutable object by setting a present value for the optionalproduces
attribute.final ImmutableCtxApiOpExt
withProduces
(Optional<String> optional) Copy the current immutable object by setting an optional value for theproduces
attribute.final ImmutableCtxApiOpExt
withRenderJavadocMacroSpacer
(boolean value) Copy the current immutable object by setting a value for therenderJavadocMacroSpacer
attribute.final ImmutableCtxApiOpExt
withRenderJavadocReturn
(boolean value) Copy the current immutable object by setting a value for therenderJavadocReturn
attribute.final ImmutableCtxApiOpExt
withResponseSchema
(boolean value) Copy the current immutable object by setting a value for theresponseSchema
attribute.final ImmutableCtxApiOpExt
withSummaryString
(String value) Copy the current immutable object by setting a present value for the optionalsummaryString
attribute.final ImmutableCtxApiOpExt
withSummaryString
(Optional<String> optional) Copy the current immutable object by setting an optional value for thesummaryString
attribute.
-
Method Details
-
renderJavadocMacroSpacer
public boolean renderJavadocMacroSpacer()Returns true if a spacer is needed before javadoc macros.- Specified by:
renderJavadocMacroSpacer
in 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:
renderJavadocReturn
in interfaceCtxApiOpExt
- Returns:
- true if the javadoc @return statement should be rendered
-
produces
Returns the optional @Produces value for the operation.- Specified by:
produces
in interfaceCtxApiOpExt
- Returns:
- the optional @Produces value for the operation
-
consumes
Returns the optional @Consumes value for the operation.- Specified by:
consumes
in 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:
responseSchema
in 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:
hasResponses
in interfaceCtxApiOpExt
- Returns:
- true if the operation has any responses, otherwise false
-
summaryString
Returns an optional summary as a java string.- Specified by:
summaryString
in interfaceCtxApiOpExt
- Returns:
- an optional summary as a java string
-
withRenderJavadocMacroSpacer
Copy the current immutable object by setting a value for therenderJavadocMacroSpacer
attribute. 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
this
object
-
withRenderJavadocReturn
Copy the current immutable object by setting a value for therenderJavadocReturn
attribute. 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
this
object
-
withProduces
Copy the current immutable object by setting a present value for the optionalproduces
attribute.- Parameters:
value
- The value for produces- Returns:
- A modified copy or
this
if not changed
-
withProduces
Copy the current immutable object by setting an optional value for theproduces
attribute. 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
this
if not changed
-
withConsumes
Copy the current immutable object by setting a present value for the optionalconsumes
attribute.- Parameters:
value
- The value for consumes- Returns:
- A modified copy or
this
if not changed
-
withConsumes
Copy the current immutable object by setting an optional value for theconsumes
attribute. 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
this
if not changed
-
withResponseSchema
Copy the current immutable object by setting a value for theresponseSchema
attribute. 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
this
object
-
withHasResponses
Copy the current immutable object by setting a value for thehasResponses
attribute. 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
this
object
-
withSummaryString
Copy the current immutable object by setting a present value for the optionalsummaryString
attribute.- Parameters:
value
- The value for summaryString- Returns:
- A modified copy or
this
if not changed
-
withSummaryString
Copy the current immutable object by setting an optional value for thesummaryString
attribute. 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
this
if not changed
-
equals
This instance is equal to all instances ofImmutableCtxApiOpExt
that 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 valueCtxApiOpExt
with attribute values. -
copyOf
Creates an immutable copy of aCtxApiOpExt
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
Creates a builder forImmutableCtxApiOpExt
.ImmutableCtxApiOpExt.builder() .renderJavadocMacroSpacer(boolean) // required
renderJavadocMacroSpacer
.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
-