Class ImmutableCtxApiParam.Builder
java.lang.Object
dk.mada.jaxrs.generator.mpclient.api.tmpl.ImmutableCtxApiParam.Builder
- Enclosing class:
ImmutableCtxApiParam
@Generated(from="CtxApiParam",
generator="Immutables")
public static final class ImmutableCtxApiParam.Builder
extends Object
Builds instances of type
ImmutableCtxApiParam
.
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 TypeMethodDescriptionInitializes the value for thebaseName
attribute.build()
Builds a newImmutableCtxApiParam
.Initializes the value for thedataType
attribute.defaultValue
(String defaultValue) Initializes the optional valuedefaultValue
to defaultValue.defaultValue
(Optional<String> defaultValue) Initializes the optional valuedefaultValue
to defaultValue.description
(String description) Initializes the optional valuedescription
to description.description
(Optional<String> description) Initializes the optional valuedescription
to description.from
(CtxApiParam instance) Fill a builder with attribute values from the providedCtxApiParam
instance.isBodyParam
(boolean isBodyParam) Initializes the value for theisBodyParam
attribute.isContainer
(boolean isContainer) Initializes the value for theisContainer
attribute.isFormParam
(boolean isFormParam) Initializes the value for theisFormParam
attribute.isHeaderParam
(boolean isHeaderParam) Initializes the value for theisHeaderParam
attribute.isMultipartForm
(boolean isMultipartForm) Initializes the value for theisMultipartForm
attribute.isNullable
(boolean isNullable) Initializes the value for theisNullable
attribute.isPathParam
(boolean isPathParam) Initializes the value for theisPathParam
attribute.isQueryParam
(boolean isQueryParam) Initializes the value for theisQueryParam
attribute.Initializes the value for theparamName
attribute.validation
(CtxValidation validation) Initializes the optional valuevalidation
to validation.validation
(Optional<? extends CtxValidation> validation) Initializes the optional valuevalidation
to validation.
-
Method Details
-
from
Fill a builder with attribute values from the providedCtxApiParam
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
isContainer
Initializes the value for theisContainer
attribute.- Parameters:
isContainer
- The value for isContainer- 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
-
defaultValue
Initializes the optional valuedefaultValue
to defaultValue.- Parameters:
defaultValue
- The value for defaultValue- Returns:
this
builder for chained invocation
-
defaultValue
Initializes the optional valuedefaultValue
to defaultValue.- Parameters:
defaultValue
- The value for defaultValue- Returns:
this
builder for use in a chained invocation
-
baseName
Initializes the value for thebaseName
attribute.- Parameters:
baseName
- The value for baseName- Returns:
this
builder for use in a chained invocation
-
paramName
Initializes the value for theparamName
attribute.- Parameters:
paramName
- The value for paramName- Returns:
this
builder for use in a chained invocation
-
dataType
Initializes the value for thedataType
attribute.- Parameters:
dataType
- The value for dataType- Returns:
this
builder for use in a chained invocation
-
isBodyParam
Initializes the value for theisBodyParam
attribute.- Parameters:
isBodyParam
- The value for isBodyParam- Returns:
this
builder for use in a chained invocation
-
isHeaderParam
Initializes the value for theisHeaderParam
attribute.- Parameters:
isHeaderParam
- The value for isHeaderParam- Returns:
this
builder for use in a chained invocation
-
isPathParam
Initializes the value for theisPathParam
attribute.- Parameters:
isPathParam
- The value for isPathParam- Returns:
this
builder for use in a chained invocation
-
isQueryParam
Initializes the value for theisQueryParam
attribute.- Parameters:
isQueryParam
- The value for isQueryParam- Returns:
this
builder for use in a chained invocation
-
isFormParam
Initializes the value for theisFormParam
attribute.- Parameters:
isFormParam
- The value for isFormParam- Returns:
this
builder for use in a chained invocation
-
validation
Initializes the optional valuevalidation
to validation.- Parameters:
validation
- The value for validation- Returns:
this
builder for chained invocation
-
validation
Initializes the optional valuevalidation
to validation.- Parameters:
validation
- The value for validation- Returns:
this
builder for use in a chained invocation
-
isMultipartForm
Initializes the value for theisMultipartForm
attribute.- Parameters:
isMultipartForm
- The value for isMultipartForm- Returns:
this
builder for use in a chained invocation
-
isNullable
Initializes the value for theisNullable
attribute.- Parameters:
isNullable
- The value for isNullable- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableCtxApiParam
.- Returns:
- An immutable instance of CtxApiParam
- Throws:
IllegalStateException
- if any required attributes are missing
-