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 valuedescriptionto description.description(Optional<String> description) Initializes the optional valuedescriptionto description.Fill a builder with attribute values from the providedParameterinstance.isFormParam(boolean isFormParam) Initializes the value for theisFormParamattribute.isHeaderParam(boolean isHeaderParam) Initializes the value for theisHeaderParamattribute.isPathParam(boolean isPathParam) Initializes the value for theisPathParamattribute.isQueryParam(boolean isQueryParam) Initializes the value for theisQueryParamattribute.Initializes the value for thenameattribute.Initializes the value for thereferenceattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedParameterinstance. 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:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
reference
Initializes the value for thereferenceattribute.- Parameters:
reference- The value for reference- 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
-
isHeaderParam
Initializes the value for theisHeaderParamattribute.- Parameters:
isHeaderParam- The value for isHeaderParam- Returns:
thisbuilder for use in a chained invocation
-
isPathParam
Initializes the value for theisPathParamattribute.- Parameters:
isPathParam- The value for isPathParam- Returns:
thisbuilder for use in a chained invocation
-
isQueryParam
Initializes the value for theisQueryParamattribute.- Parameters:
isQueryParam- The value for isQueryParam- Returns:
thisbuilder for use in a chained invocation
-
isFormParam
Initializes the value for theisFormParamattribute.- Parameters:
isFormParam- The value for isFormParam- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableParameter.- Returns:
- An immutable instance of Parameter
- Throws:
IllegalStateException- if any required attributes are missing
-