Package dk.mada.jaxrs.model.api
Class ImmutableOperation.Builder
java.lang.Object
dk.mada.jaxrs.model.api.ImmutableOperation.Builder
- Enclosing class:
ImmutableOperation
@Generated(from="Operation",
generator="Immutables")
public static final class ImmutableOperation.Builder
extends Object
Builds instances of type
ImmutableOperation
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllParameters
(Iterable<? extends Parameter> elements) Adds elements toparameters
list.addAllResponses
(Iterable<? extends Response> elements) Adds elements toresponses
list.addAllTags
(Iterable<String> elements) Adds elements totags
list.addAuthorizationHeader
(boolean addAuthorizationHeader) Initializes the value for theaddAuthorizationHeader
attribute.addParameters
(Parameter element) Adds one element toparameters
list.addParameters
(Parameter... elements) Adds elements toparameters
list.addResponses
(Response element) Adds one element toresponses
list.addResponses
(Response... elements) Adds elements toresponses
list.Adds one element totags
list.Adds elements totags
list.build()
Builds a newImmutableOperation
.deprecated
(boolean deprecated) Initializes the value for thedeprecated
attribute.description
(String description) Initializes the optional valuedescription
to description.description
(Optional<String> description) Initializes the optional valuedescription
to description.Fill a builder with attribute values from the providedOperation
instance.httpMethod
(HttpMethod httpMethod) Initializes the value for thehttpMethod
attribute.operationId
(String operationId) Initializes the optional valueoperationId
to operationId.operationId
(Optional<String> operationId) Initializes the optional valueoperationId
to operationId.parameters
(Iterable<? extends Parameter> elements) Sets or replaces all elements forparameters
list.Initializes the value for thepath
attribute.requestBody
(RequestBody requestBody) Initializes the optional valuerequestBody
to requestBody.requestBody
(Optional<? extends RequestBody> requestBody) Initializes the optional valuerequestBody
to requestBody.Sets or replaces all elements forresponses
list.Initializes the optional valuesummary
to summary.Initializes the optional valuesummary
to summary.syntheticOpId
(String syntheticOpId) Initializes the value for thesyntheticOpId
attribute.Sets or replaces all elements fortags
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedOperation
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
path
Initializes the value for thepath
attribute.- Parameters:
path
- The value for path- Returns:
this
builder for use in a chained invocation
-
httpMethod
Initializes the value for thehttpMethod
attribute.- Parameters:
httpMethod
- The value for httpMethod- Returns:
this
builder for use in a chained invocation
-
addTags
Adds one element totags
list.- Parameters:
element
- A tags element- Returns:
this
builder for use in a chained invocation
-
addTags
Adds elements totags
list.- Parameters:
elements
- An array of tags elements- Returns:
this
builder for use in a chained invocation
-
tags
Sets or replaces all elements fortags
list.- Parameters:
elements
- An iterable of tags elements- Returns:
this
builder for use in a chained invocation
-
addAllTags
Adds elements totags
list.- Parameters:
elements
- An iterable of tags elements- Returns:
this
builder for use in a chained invocation
-
operationId
Initializes the optional valueoperationId
to operationId.- Parameters:
operationId
- The value for operationId- Returns:
this
builder for chained invocation
-
operationId
Initializes the optional valueoperationId
to operationId.- Parameters:
operationId
- The value for operationId- Returns:
this
builder for use in a chained invocation
-
syntheticOpId
Initializes the value for thesyntheticOpId
attribute.- Parameters:
syntheticOpId
- The value for syntheticOpId- Returns:
this
builder for use in a chained invocation
-
description
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for chained invocation
-
description
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for use in a chained invocation
-
summary
Initializes the optional valuesummary
to summary.- Parameters:
summary
- The value for summary- Returns:
this
builder for chained invocation
-
summary
Initializes the optional valuesummary
to summary.- Parameters:
summary
- The value for summary- Returns:
this
builder for use in a chained invocation
-
deprecated
Initializes the value for thedeprecated
attribute.- Parameters:
deprecated
- The value for deprecated- Returns:
this
builder for use in a chained invocation
-
addResponses
Adds one element toresponses
list.- Parameters:
element
- A responses element- Returns:
this
builder for use in a chained invocation
-
addResponses
Adds elements toresponses
list.- Parameters:
elements
- An array of responses elements- Returns:
this
builder for use in a chained invocation
-
responses
Sets or replaces all elements forresponses
list.- Parameters:
elements
- An iterable of responses elements- Returns:
this
builder for use in a chained invocation
-
addAllResponses
Adds elements toresponses
list.- Parameters:
elements
- An iterable of responses elements- Returns:
this
builder for use in a chained invocation
-
addParameters
Adds one element toparameters
list.- Parameters:
element
- A parameters element- Returns:
this
builder for use in a chained invocation
-
addParameters
Adds elements toparameters
list.- Parameters:
elements
- An array of parameters elements- Returns:
this
builder for use in a chained invocation
-
parameters
Sets or replaces all elements forparameters
list.- Parameters:
elements
- An iterable of parameters elements- Returns:
this
builder for use in a chained invocation
-
addAllParameters
Adds elements toparameters
list.- Parameters:
elements
- An iterable of parameters elements- Returns:
this
builder for use in a chained invocation
-
requestBody
Initializes the optional valuerequestBody
to requestBody.- Parameters:
requestBody
- The value for requestBody- Returns:
this
builder for chained invocation
-
requestBody
Initializes the optional valuerequestBody
to requestBody.- Parameters:
requestBody
- The value for requestBody- Returns:
this
builder for use in a chained invocation
-
addAuthorizationHeader
Initializes the value for theaddAuthorizationHeader
attribute.- Parameters:
addAuthorizationHeader
- The value for addAuthorizationHeader- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableOperation
.- Returns:
- An immutable instance of Operation
- Throws:
IllegalStateException
- if any required attributes are missing
-