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 toparameterslist.addAllResponses(Iterable<? extends Response> elements) Adds elements toresponseslist.addAllTags(Iterable<String> elements) Adds elements totagslist.addAuthorizationHeader(boolean addAuthorizationHeader) Initializes the value for theaddAuthorizationHeaderattribute.addParameters(Parameter element) Adds one element toparameterslist.addParameters(Parameter... elements) Adds elements toparameterslist.addResponses(Response element) Adds one element toresponseslist.addResponses(Response... elements) Adds elements toresponseslist.Adds one element totagslist.Adds elements totagslist.build()Builds a newImmutableOperation.deprecated(boolean deprecated) Initializes the value for thedeprecatedattribute.description(String description) Initializes the optional valuedescriptionto description.description(Optional<String> description) Initializes the optional valuedescriptionto description.Fill a builder with attribute values from the providedOperationinstance.httpMethod(HttpMethod httpMethod) Initializes the value for thehttpMethodattribute.operationId(String operationId) Initializes the optional valueoperationIdto operationId.operationId(Optional<String> operationId) Initializes the optional valueoperationIdto operationId.parameters(Iterable<? extends Parameter> elements) Sets or replaces all elements forparameterslist.Initializes the value for thepathattribute.requestBody(RequestBody requestBody) Initializes the optional valuerequestBodyto requestBody.requestBody(Optional<? extends RequestBody> requestBody) Initializes the optional valuerequestBodyto requestBody.Sets or replaces all elements forresponseslist.Initializes the optional valuesummaryto summary.Initializes the optional valuesummaryto summary.syntheticOpId(String syntheticOpId) Initializes the value for thesyntheticOpIdattribute.Sets or replaces all elements fortagslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedOperationinstance. 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:
thisbuilder for use in a chained invocation
-
path
Initializes the value for thepathattribute.- Parameters:
path- The value for path- Returns:
thisbuilder for use in a chained invocation
-
httpMethod
Initializes the value for thehttpMethodattribute.- Parameters:
httpMethod- The value for httpMethod- Returns:
thisbuilder for use in a chained invocation
-
addTags
Adds one element totagslist.- Parameters:
element- A tags element- Returns:
thisbuilder for use in a chained invocation
-
addTags
Adds elements totagslist.- Parameters:
elements- An array of tags elements- Returns:
thisbuilder for use in a chained invocation
-
tags
Sets or replaces all elements fortagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTags
Adds elements totagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
operationId
Initializes the optional valueoperationIdto operationId.- Parameters:
operationId- The value for operationId- Returns:
thisbuilder for chained invocation
-
operationId
Initializes the optional valueoperationIdto operationId.- Parameters:
operationId- The value for operationId- Returns:
thisbuilder for use in a chained invocation
-
syntheticOpId
Initializes the value for thesyntheticOpIdattribute.- Parameters:
syntheticOpId- The value for syntheticOpId- Returns:
thisbuilder for use in a chained invocation
-
description
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for chained invocation
-
description
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
summary
Initializes the optional valuesummaryto summary.- Parameters:
summary- The value for summary- Returns:
thisbuilder for chained invocation
-
summary
Initializes the optional valuesummaryto summary.- Parameters:
summary- The value for summary- Returns:
thisbuilder for use in a chained invocation
-
deprecated
Initializes the value for thedeprecatedattribute.- Parameters:
deprecated- The value for deprecated- Returns:
thisbuilder for use in a chained invocation
-
addResponses
Adds one element toresponseslist.- Parameters:
element- A responses element- Returns:
thisbuilder for use in a chained invocation
-
addResponses
Adds elements toresponseslist.- Parameters:
elements- An array of responses elements- Returns:
thisbuilder for use in a chained invocation
-
responses
Sets or replaces all elements forresponseslist.- Parameters:
elements- An iterable of responses elements- Returns:
thisbuilder for use in a chained invocation
-
addAllResponses
Adds elements toresponseslist.- Parameters:
elements- An iterable of responses elements- Returns:
thisbuilder for use in a chained invocation
-
addParameters
Adds one element toparameterslist.- Parameters:
element- A parameters element- Returns:
thisbuilder for use in a chained invocation
-
addParameters
Adds elements toparameterslist.- Parameters:
elements- An array of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
parameters
Sets or replaces all elements forparameterslist.- Parameters:
elements- An iterable of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
addAllParameters
Adds elements toparameterslist.- Parameters:
elements- An iterable of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
requestBody
Initializes the optional valuerequestBodyto requestBody.- Parameters:
requestBody- The value for requestBody- Returns:
thisbuilder for chained invocation
-
requestBody
Initializes the optional valuerequestBodyto requestBody.- Parameters:
requestBody- The value for requestBody- Returns:
thisbuilder for use in a chained invocation
-
addAuthorizationHeader
Initializes the value for theaddAuthorizationHeaderattribute.- Parameters:
addAuthorizationHeader- The value for addAuthorizationHeader- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableOperation.- Returns:
- An immutable instance of Operation
- Throws:
IllegalStateException- if any required attributes are missing
-