Package dk.mada.jaxrs.model.api
Class ImmutableParameter.Builder
java.lang.Object
dk.mada.jaxrs.model.api.ImmutableParameter.Builder
- Enclosing class:
ImmutableParameter
@Generated(from="Parameter",
generator="Immutables")
public static final class ImmutableParameter.Builder
extends Object
Builds instances of type
ImmutableParameter
.
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 TypeMethodDescriptionbuild()
Builds a newImmutableParameter
.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 providedParameter
instance.isFormParam
(boolean isFormParam) Initializes the value for theisFormParam
attribute.isHeaderParam
(boolean isHeaderParam) Initializes the value for theisHeaderParam
attribute.isPathParam
(boolean isPathParam) Initializes the value for theisPathParam
attribute.isQueryParam
(boolean isQueryParam) Initializes the value for theisQueryParam
attribute.Initializes the value for thename
attribute.Initializes the value for thereference
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedParameter
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
-
name
Initializes the value for thename
attribute.- Parameters:
name
- The value for name- Returns:
this
builder for use in a chained invocation
-
reference
Initializes the value for thereference
attribute.- Parameters:
reference
- The value for reference- 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
-
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
-
build
Builds a newImmutableParameter
.- Returns:
- An immutable instance of Parameter
- Throws:
IllegalStateException
- if any required attributes are missing
-