Class ImmutableCtxApi.Builder
java.lang.Object
dk.mada.jaxrs.generator.mpclient.api.tmpl.ImmutableCtxApi.Builder
- Enclosing class:
ImmutableCtxApi
@Generated(from="CtxApi",
generator="Immutables")
public static final class ImmutableCtxApi.Builder
extends Object
Builds instances of type
ImmutableCtxApi
.
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 TypeMethodDescriptionfinal ImmutableCtxApi.Builder
addAllExternalDocs
(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Adds elements toexternalDocs
list.final ImmutableCtxApi.Builder
addAllOperations
(Iterable<? extends CtxApi.CtxOperationRef> elements) Adds elements tooperations
list.final ImmutableCtxApi.Builder
Adds one element toexternalDocs
list.final ImmutableCtxApi.Builder
addExternalDocs
(CtxApi.CtxOperationExternalDoc... elements) Adds elements toexternalDocs
list.final ImmutableCtxApi.Builder
addOperations
(CtxApi.CtxOperationRef element) Adds one element tooperations
list.final ImmutableCtxApi.Builder
addOperations
(CtxApi.CtxOperationRef... elements) Adds elements tooperations
list.final ImmutableCtxApi.Builder
appDescription
(String appDescription) Initializes the optional valueappDescription
to appDescription.final ImmutableCtxApi.Builder
appDescription
(Optional<String> appDescription) Initializes the optional valueappDescription
to appDescription.final ImmutableCtxApi.Builder
Initializes the value for theappName
attribute.build()
Builds a newImmutableCtxApi
.final ImmutableCtxApi.Builder
Initializes the value for theclassname
attribute.final ImmutableCtxApi.Builder
commonPath
(String commonPath) Initializes the value for thecommonPath
attribute.final ImmutableCtxApi.Builder
externalDocs
(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Sets or replaces all elements forexternalDocs
list.final ImmutableCtxApi.Builder
Fill a builder with attribute values from the providedCtxApi
instance.final ImmutableCtxApi.Builder
generatedAnnotationClass
(String generatedAnnotationClass) Initializes the value for thegeneratedAnnotationClass
attribute.final ImmutableCtxApi.Builder
generatedDate
(String generatedDate) Initializes the optional valuegeneratedDate
to generatedDate.final ImmutableCtxApi.Builder
generatedDate
(Optional<String> generatedDate) Initializes the optional valuegeneratedDate
to generatedDate.final ImmutableCtxApi.Builder
generatorClass
(String generatorClass) Initializes the value for thegeneratorClass
attribute.final ImmutableCtxApi.Builder
Initializes the value for theimports
attribute.final ImmutableCtxApi.Builder
Initializes the optional valueinfoEmail
to infoEmail.final ImmutableCtxApi.Builder
Initializes the optional valueinfoEmail
to infoEmail.final ImmutableCtxApi.Builder
Initializes the value for themadaApi
attribute.final ImmutableCtxApi.Builder
operations
(Iterable<? extends CtxApi.CtxOperationRef> elements) Sets or replaces all elements foroperations
list.final ImmutableCtxApi.Builder
packageName
(String packageName) Initializes the value for thepackageName
attribute.final ImmutableCtxApi.Builder
putAllReturnContainer
(Map<String, ? extends String> entries) Put all mappings from the specified map as entries toreturnContainer
map.final ImmutableCtxApi.Builder
putReturnContainer
(String key, String value) Put one entry to thereturnContainer
map.final ImmutableCtxApi.Builder
putReturnContainer
(Map.Entry<String, ? extends String> entry) Put one entry to thereturnContainer
map.final ImmutableCtxApi.Builder
returnContainer
(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thereturnContainer
map.final ImmutableCtxApi.Builder
Initializes the value for theversion
attribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedCtxApi
instance. 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:
this
builder for use in a chained invocation
-
appName
Initializes the value for theappName
attribute.- Parameters:
appName
- The value for appName- Returns:
this
builder for use in a chained invocation
-
version
Initializes the value for theversion
attribute.- Parameters:
version
- The value for version- Returns:
this
builder for use in a chained invocation
-
appDescription
Initializes the optional valueappDescription
to appDescription.- Parameters:
appDescription
- The value for appDescription- Returns:
this
builder for chained invocation
-
appDescription
Initializes the optional valueappDescription
to appDescription.- Parameters:
appDescription
- The value for appDescription- Returns:
this
builder for use in a chained invocation
-
infoEmail
Initializes the optional valueinfoEmail
to infoEmail.- Parameters:
infoEmail
- The value for infoEmail- Returns:
this
builder for chained invocation
-
infoEmail
Initializes the optional valueinfoEmail
to infoEmail.- Parameters:
infoEmail
- The value for infoEmail- Returns:
this
builder for use in a chained invocation
-
addExternalDocs
Adds one element toexternalDocs
list.- Parameters:
element
- A externalDocs element- Returns:
this
builder for use in a chained invocation
-
addExternalDocs
Adds elements toexternalDocs
list.- Parameters:
elements
- An array of externalDocs elements- Returns:
this
builder for use in a chained invocation
-
externalDocs
public final ImmutableCtxApi.Builder externalDocs(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Sets or replaces all elements forexternalDocs
list.- Parameters:
elements
- An iterable of externalDocs elements- Returns:
this
builder for use in a chained invocation
-
addAllExternalDocs
public final ImmutableCtxApi.Builder addAllExternalDocs(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Adds elements toexternalDocs
list.- Parameters:
elements
- An iterable of externalDocs elements- Returns:
this
builder for use in a chained invocation
-
putReturnContainer
Put one entry to thereturnContainer
map.- Parameters:
key
- The key in the returnContainer mapvalue
- The associated value in the returnContainer map- Returns:
this
builder for use in a chained invocation
-
putReturnContainer
Put one entry to thereturnContainer
map. Nulls are not permitted- Parameters:
entry
- The key and value entry- Returns:
this
builder for use in a chained invocation
-
returnContainer
Sets or replaces all mappings from the specified map as entries for thereturnContainer
map. Nulls are not permitted as keys or values, but parameter itself can be null- Parameters:
entries
- The entries that will be added to the returnContainer map- Returns:
this
builder for use in a chained invocation
-
putAllReturnContainer
Put all mappings from the specified map as entries toreturnContainer
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the returnContainer map- Returns:
this
builder for use in a chained invocation
-
imports
Initializes the value for theimports
attribute.- Parameters:
imports
- The value for imports- Returns:
this
builder for use in a chained invocation
-
addOperations
Adds one element tooperations
list.- Parameters:
element
- A operations element- Returns:
this
builder for use in a chained invocation
-
addOperations
Adds elements tooperations
list.- Parameters:
elements
- An array of operations elements- Returns:
this
builder for use in a chained invocation
-
operations
public final ImmutableCtxApi.Builder operations(Iterable<? extends CtxApi.CtxOperationRef> elements) Sets or replaces all elements foroperations
list.- Parameters:
elements
- An iterable of operations elements- Returns:
this
builder for use in a chained invocation
-
addAllOperations
public final ImmutableCtxApi.Builder addAllOperations(Iterable<? extends CtxApi.CtxOperationRef> elements) Adds elements tooperations
list.- Parameters:
elements
- An iterable of operations elements- Returns:
this
builder for use in a chained invocation
-
packageName
Initializes the value for thepackageName
attribute.- Parameters:
packageName
- The value for packageName- Returns:
this
builder for use in a chained invocation
-
classname
Initializes the value for theclassname
attribute.- Parameters:
classname
- The value for classname- Returns:
this
builder for use in a chained invocation
-
generatedAnnotationClass
Initializes the value for thegeneratedAnnotationClass
attribute.- Parameters:
generatedAnnotationClass
- The value for generatedAnnotationClass- Returns:
this
builder for use in a chained invocation
-
generatorClass
Initializes the value for thegeneratorClass
attribute.- Parameters:
generatorClass
- The value for generatorClass- Returns:
this
builder for use in a chained invocation
-
generatedDate
Initializes the optional valuegeneratedDate
to generatedDate.- Parameters:
generatedDate
- The value for generatedDate- Returns:
this
builder for chained invocation
-
generatedDate
Initializes the optional valuegeneratedDate
to generatedDate.- Parameters:
generatedDate
- The value for generatedDate- Returns:
this
builder for use in a chained invocation
-
commonPath
Initializes the value for thecommonPath
attribute.- Parameters:
commonPath
- The value for commonPath- Returns:
this
builder for use in a chained invocation
-
madaApi
Initializes the value for themadaApi
attribute.- Parameters:
madaApi
- The value for madaApi- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableCtxApi
.- Returns:
- An immutable instance of CtxApi
- Throws:
IllegalStateException
- if any required attributes are missing
-