Package dk.mada.jaxrs.model.api
Class ImmutableOperation
java.lang.Object
dk.mada.jaxrs.model.api.ImmutableOperation
- All Implemented Interfaces:
Operation
@Generated(from="Operation",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableOperation
extends Object
implements Operation
Immutable implementation of
Operation.
Use the builder to create immutable instances:
ImmutableOperation.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if this operation requires an authentication parameter.static ImmutableOperation.Builderbuilder()Creates a builder forImmutableOperation.static ImmutableOperationCreates an immutable copy of aOperationvalue.booleanReturns true if the operation is deprecated.Returns an optional description of the operation.booleanThis instance is equal to all instances ofImmutableOperationthat have equal attribute values.inthashCode()Computes a hash code from attributes:path,httpMethod,tags,operationId,syntheticOpId,description,summary,deprecated,responses,parameters,requestBody,addAuthorizationHeader.Returns the operation HTTP method.Returns an optional operation id.Returns the operation parameters.path()Returns the operation resource path.Returns the optional request body.Returns the operation responses.summary()Returns an optional summary of the operation.Returns a synthetic operation id computed by path and http type.tags()Returns the operation tags.toString()Prints the immutable valueOperationwith attribute values.final ImmutableOperationwithAddAuthorizationHeader(boolean value) Copy the current immutable object by setting a value for theaddAuthorizationHeaderattribute.final ImmutableOperationwithDeprecated(boolean value) Copy the current immutable object by setting a value for thedeprecatedattribute.final ImmutableOperationwithDescription(String value) Copy the current immutable object by setting a present value for the optionaldescriptionattribute.final ImmutableOperationwithDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescriptionattribute.final ImmutableOperationwithHttpMethod(HttpMethod value) Copy the current immutable object by setting a value for thehttpMethodattribute.final ImmutableOperationwithOperationId(String value) Copy the current immutable object by setting a present value for the optionaloperationIdattribute.final ImmutableOperationwithOperationId(Optional<String> optional) Copy the current immutable object by setting an optional value for theoperationIdattribute.final ImmutableOperationwithParameters(Parameter... elements) Copy the current immutable object with elements that replace the content ofparameters.final ImmutableOperationwithParameters(Iterable<? extends Parameter> elements) Copy the current immutable object with elements that replace the content ofparameters.final ImmutableOperationCopy the current immutable object by setting a value for thepathattribute.final ImmutableOperationwithRequestBody(RequestBody value) Copy the current immutable object by setting a present value for the optionalrequestBodyattribute.final ImmutableOperationwithRequestBody(Optional<? extends RequestBody> optional) Copy the current immutable object by setting an optional value for therequestBodyattribute.final ImmutableOperationwithResponses(Response... elements) Copy the current immutable object with elements that replace the content ofresponses.final ImmutableOperationwithResponses(Iterable<? extends Response> elements) Copy the current immutable object with elements that replace the content ofresponses.final ImmutableOperationwithSummary(String value) Copy the current immutable object by setting a present value for the optionalsummaryattribute.final ImmutableOperationwithSummary(Optional<String> optional) Copy the current immutable object by setting an optional value for thesummaryattribute.final ImmutableOperationwithSyntheticOpId(String value) Copy the current immutable object by setting a value for thesyntheticOpIdattribute.final ImmutableOperationCopy the current immutable object with elements that replace the content oftags.final ImmutableOperationCopy the current immutable object with elements that replace the content oftags.
-
Method Details
-
path
Returns the operation resource path. -
httpMethod
Returns the operation HTTP method.- Specified by:
httpMethodin interfaceOperation- Returns:
- the operation HTTP method
-
tags
Returns the operation tags. -
operationId
Returns an optional operation id.- Specified by:
operationIdin interfaceOperation- Returns:
- an optional operation id
-
syntheticOpId
Returns a synthetic operation id computed by path and http type.- Specified by:
syntheticOpIdin interfaceOperation- Returns:
- a synthetic operation id computed by path and http type
-
description
Returns an optional description of the operation.- Specified by:
descriptionin interfaceOperation- Returns:
- an optional description of the operation
-
summary
Returns an optional summary of the operation. -
deprecated
public boolean deprecated()Returns true if the operation is deprecated.- Specified by:
deprecatedin interfaceOperation- Returns:
- true if the operation is deprecated
-
responses
Returns the operation responses. -
parameters
Returns the operation parameters.- Specified by:
parametersin interfaceOperation- Returns:
- the operation parameters
-
requestBody
Returns the optional request body.- Specified by:
requestBodyin interfaceOperation- Returns:
- the optional request body
-
addAuthorizationHeader
public boolean addAuthorizationHeader()Returns true if this operation requires an authentication parameter.- Specified by:
addAuthorizationHeaderin interfaceOperation- Returns:
- true if this operation requires an authentication parameter
-
withPath
Copy the current immutable object by setting a value for thepathattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for path- Returns:
- A modified copy or the
thisobject
-
withHttpMethod
Copy the current immutable object by setting a value for thehttpMethodattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for httpMethod- Returns:
- A modified copy or the
thisobject
-
withTags
Copy the current immutable object with elements that replace the content oftags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTags
Copy the current immutable object with elements that replace the content oftags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of tags elements to set- Returns:
- A modified copy or
thisif not changed
-
withOperationId
Copy the current immutable object by setting a present value for the optionaloperationIdattribute.- Parameters:
value- The value for operationId- Returns:
- A modified copy or
thisif not changed
-
withOperationId
Copy the current immutable object by setting an optional value for theoperationIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for operationId- Returns:
- A modified copy or
thisif not changed
-
withSyntheticOpId
Copy the current immutable object by setting a value for thesyntheticOpIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for syntheticOpId- 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
-
withSummary
Copy the current immutable object by setting a present value for the optionalsummaryattribute.- Parameters:
value- The value for summary- Returns:
- A modified copy or
thisif not changed
-
withSummary
Copy the current immutable object by setting an optional value for thesummaryattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for summary- Returns:
- A modified copy or
thisif not changed
-
withDeprecated
Copy the current immutable object by setting a value for thedeprecatedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deprecated- Returns:
- A modified copy or the
thisobject
-
withResponses
Copy the current immutable object with elements that replace the content ofresponses.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withResponses
Copy the current immutable object with elements that replace the content ofresponses. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of responses elements to set- Returns:
- A modified copy or
thisif not changed
-
withParameters
Copy the current immutable object with elements that replace the content ofparameters.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withParameters
Copy the current immutable object with elements that replace the content ofparameters. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of parameters elements to set- Returns:
- A modified copy or
thisif not changed
-
withRequestBody
Copy the current immutable object by setting a present value for the optionalrequestBodyattribute.- Parameters:
value- The value for requestBody- Returns:
- A modified copy or
thisif not changed
-
withRequestBody
Copy the current immutable object by setting an optional value for therequestBodyattribute. 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 requestBody- Returns:
- A modified copy or
thisif not changed
-
withAddAuthorizationHeader
Copy the current immutable object by setting a value for theaddAuthorizationHeaderattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for addAuthorizationHeader- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableOperationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:path,httpMethod,tags,operationId,syntheticOpId,description,summary,deprecated,responses,parameters,requestBody,addAuthorizationHeader. -
toString
Prints the immutable valueOperationwith attribute values. -
copyOf
Creates an immutable copy of aOperationvalue. 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 Operation instance
-
builder
Creates a builder forImmutableOperation.ImmutableOperation.builder() .path(String) // requiredpath.httpMethod(dk.mada.jaxrs.model.api.HttpMethod) // requiredhttpMethod.addTags|addAllTags(String) //tagselements .operationId(Optional<String>) // optionaloperationId.syntheticOpId(String) // requiredsyntheticOpId.description(Optional<String>) // optionaldescription.summary(Optional<String>) // optionalsummary.deprecated(boolean) // requireddeprecated.addResponses|addAllResponses(dk.mada.jaxrs.model.api.Response) //responseselements .addParameters|addAllParameters(dk.mada.jaxrs.model.api.Parameter) //parameterselements .requestBody(Optional<dk.mada.jaxrs.model.api.RequestBody>) // optionalrequestBody.addAuthorizationHeader(boolean) // requiredaddAuthorizationHeader.build();- Returns:
- A new ImmutableOperation builder
-