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 thebaseNameattribute.build()Builds a newImmutableCtxApiParam.Initializes the value for thedataTypeattribute.defaultValue(String defaultValue) Initializes the optional valuedefaultValueto defaultValue.defaultValue(Optional<String> defaultValue) Initializes the optional valuedefaultValueto defaultValue.description(String description) Initializes the optional valuedescriptionto description.description(Optional<String> description) Initializes the optional valuedescriptionto description.from(CtxApiParam instance) Fill a builder with attribute values from the providedCtxApiParaminstance.isBodyParam(boolean isBodyParam) Initializes the value for theisBodyParamattribute.isContainer(boolean isContainer) Initializes the value for theisContainerattribute.isFormParam(boolean isFormParam) Initializes the value for theisFormParamattribute.isHeaderParam(boolean isHeaderParam) Initializes the value for theisHeaderParamattribute.isMultipartForm(boolean isMultipartForm) Initializes the value for theisMultipartFormattribute.isNullable(boolean isNullable) Initializes the value for theisNullableattribute.isPathParam(boolean isPathParam) Initializes the value for theisPathParamattribute.isQueryParam(boolean isQueryParam) Initializes the value for theisQueryParamattribute.Initializes the value for theparamNameattribute.validation(CtxValidation validation) Initializes the optional valuevalidationto validation.validation(Optional<? extends CtxValidation> validation) Initializes the optional valuevalidationto validation.
-
Method Details
-
from
Fill a builder with attribute values from the providedCtxApiParaminstance. 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
-
isContainer
Initializes the value for theisContainerattribute.- Parameters:
isContainer- The value for isContainer- 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
-
defaultValue
Initializes the optional valuedefaultValueto defaultValue.- Parameters:
defaultValue- The value for defaultValue- Returns:
thisbuilder for chained invocation
-
defaultValue
Initializes the optional valuedefaultValueto defaultValue.- Parameters:
defaultValue- The value for defaultValue- Returns:
thisbuilder for use in a chained invocation
-
baseName
Initializes the value for thebaseNameattribute.- Parameters:
baseName- The value for baseName- Returns:
thisbuilder for use in a chained invocation
-
paramName
Initializes the value for theparamNameattribute.- Parameters:
paramName- The value for paramName- Returns:
thisbuilder for use in a chained invocation
-
dataType
Initializes the value for thedataTypeattribute.- Parameters:
dataType- The value for dataType- Returns:
thisbuilder for use in a chained invocation
-
isBodyParam
Initializes the value for theisBodyParamattribute.- Parameters:
isBodyParam- The value for isBodyParam- 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
-
validation
Initializes the optional valuevalidationto validation.- Parameters:
validation- The value for validation- Returns:
thisbuilder for chained invocation
-
validation
Initializes the optional valuevalidationto validation.- Parameters:
validation- The value for validation- Returns:
thisbuilder for use in a chained invocation
-
isMultipartForm
Initializes the value for theisMultipartFormattribute.- Parameters:
isMultipartForm- The value for isMultipartForm- Returns:
thisbuilder for use in a chained invocation
-
isNullable
Initializes the value for theisNullableattribute.- Parameters:
isNullable- The value for isNullable- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableCtxApiParam.- Returns:
- An immutable instance of CtxApiParam
- Throws:
IllegalStateException- if any required attributes are missing
-