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.BuilderaddAllExternalDocs(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Adds elements toexternalDocslist.final ImmutableCtxApi.BuilderaddAllOperations(Iterable<? extends CtxApi.CtxOperationRef> elements) Adds elements tooperationslist.final ImmutableCtxApi.BuilderAdds one element toexternalDocslist.final ImmutableCtxApi.BuilderaddExternalDocs(CtxApi.CtxOperationExternalDoc... elements) Adds elements toexternalDocslist.final ImmutableCtxApi.BuilderaddOperations(CtxApi.CtxOperationRef element) Adds one element tooperationslist.final ImmutableCtxApi.BuilderaddOperations(CtxApi.CtxOperationRef... elements) Adds elements tooperationslist.final ImmutableCtxApi.BuilderappDescription(String appDescription) Initializes the optional valueappDescriptionto appDescription.final ImmutableCtxApi.BuilderappDescription(Optional<String> appDescription) Initializes the optional valueappDescriptionto appDescription.final ImmutableCtxApi.BuilderInitializes the value for theappNameattribute.build()Builds a newImmutableCtxApi.final ImmutableCtxApi.BuilderInitializes the value for theclassnameattribute.final ImmutableCtxApi.BuildercommonPath(String commonPath) Initializes the value for thecommonPathattribute.final ImmutableCtxApi.BuilderexternalDocs(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Sets or replaces all elements forexternalDocslist.final ImmutableCtxApi.BuilderFill a builder with attribute values from the providedCtxApiinstance.final ImmutableCtxApi.BuildergeneratedAnnotationClass(String generatedAnnotationClass) Initializes the value for thegeneratedAnnotationClassattribute.final ImmutableCtxApi.BuildergeneratedDate(String generatedDate) Initializes the optional valuegeneratedDateto generatedDate.final ImmutableCtxApi.BuildergeneratedDate(Optional<String> generatedDate) Initializes the optional valuegeneratedDateto generatedDate.final ImmutableCtxApi.BuildergeneratorClass(String generatorClass) Initializes the value for thegeneratorClassattribute.final ImmutableCtxApi.BuilderInitializes the value for theimportsattribute.final ImmutableCtxApi.BuilderInitializes the optional valueinfoEmailto infoEmail.final ImmutableCtxApi.BuilderInitializes the optional valueinfoEmailto infoEmail.final ImmutableCtxApi.BuilderInitializes the value for themadaApiattribute.final ImmutableCtxApi.Builderoperations(Iterable<? extends CtxApi.CtxOperationRef> elements) Sets or replaces all elements foroperationslist.final ImmutableCtxApi.BuilderpackageName(String packageName) Initializes the value for thepackageNameattribute.final ImmutableCtxApi.BuilderputAllReturnContainer(Map<String, ? extends String> entries) Put all mappings from the specified map as entries toreturnContainermap.final ImmutableCtxApi.BuilderputReturnContainer(String key, String value) Put one entry to thereturnContainermap.final ImmutableCtxApi.BuilderputReturnContainer(Map.Entry<String, ? extends String> entry) Put one entry to thereturnContainermap.final ImmutableCtxApi.BuilderreturnContainer(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thereturnContainermap.final ImmutableCtxApi.BuilderInitializes the value for theversionattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedCtxApiinstance. 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:
thisbuilder for use in a chained invocation
-
appName
Initializes the value for theappNameattribute.- Parameters:
appName- The value for appName- Returns:
thisbuilder for use in a chained invocation
-
version
Initializes the value for theversionattribute.- Parameters:
version- The value for version- Returns:
thisbuilder for use in a chained invocation
-
appDescription
Initializes the optional valueappDescriptionto appDescription.- Parameters:
appDescription- The value for appDescription- Returns:
thisbuilder for chained invocation
-
appDescription
Initializes the optional valueappDescriptionto appDescription.- Parameters:
appDescription- The value for appDescription- Returns:
thisbuilder for use in a chained invocation
-
infoEmail
Initializes the optional valueinfoEmailto infoEmail.- Parameters:
infoEmail- The value for infoEmail- Returns:
thisbuilder for chained invocation
-
infoEmail
Initializes the optional valueinfoEmailto infoEmail.- Parameters:
infoEmail- The value for infoEmail- Returns:
thisbuilder for use in a chained invocation
-
addExternalDocs
Adds one element toexternalDocslist.- Parameters:
element- A externalDocs element- Returns:
thisbuilder for use in a chained invocation
-
addExternalDocs
Adds elements toexternalDocslist.- Parameters:
elements- An array of externalDocs elements- Returns:
thisbuilder for use in a chained invocation
-
externalDocs
public final ImmutableCtxApi.Builder externalDocs(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Sets or replaces all elements forexternalDocslist.- Parameters:
elements- An iterable of externalDocs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExternalDocs
public final ImmutableCtxApi.Builder addAllExternalDocs(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Adds elements toexternalDocslist.- Parameters:
elements- An iterable of externalDocs elements- Returns:
thisbuilder for use in a chained invocation
-
putReturnContainer
Put one entry to thereturnContainermap.- Parameters:
key- The key in the returnContainer mapvalue- The associated value in the returnContainer map- Returns:
thisbuilder for use in a chained invocation
-
putReturnContainer
Put one entry to thereturnContainermap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
returnContainer
Sets or replaces all mappings from the specified map as entries for thereturnContainermap. 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:
thisbuilder for use in a chained invocation
-
putAllReturnContainer
Put all mappings from the specified map as entries toreturnContainermap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the returnContainer map- Returns:
thisbuilder for use in a chained invocation
-
imports
Initializes the value for theimportsattribute.- Parameters:
imports- The value for imports- Returns:
thisbuilder for use in a chained invocation
-
addOperations
Adds one element tooperationslist.- Parameters:
element- A operations element- Returns:
thisbuilder for use in a chained invocation
-
addOperations
Adds elements tooperationslist.- Parameters:
elements- An array of operations elements- Returns:
thisbuilder for use in a chained invocation
-
operations
public final ImmutableCtxApi.Builder operations(Iterable<? extends CtxApi.CtxOperationRef> elements) Sets or replaces all elements foroperationslist.- Parameters:
elements- An iterable of operations elements- Returns:
thisbuilder for use in a chained invocation
-
addAllOperations
public final ImmutableCtxApi.Builder addAllOperations(Iterable<? extends CtxApi.CtxOperationRef> elements) Adds elements tooperationslist.- Parameters:
elements- An iterable of operations elements- Returns:
thisbuilder for use in a chained invocation
-
packageName
Initializes the value for thepackageNameattribute.- Parameters:
packageName- The value for packageName- Returns:
thisbuilder for use in a chained invocation
-
classname
Initializes the value for theclassnameattribute.- Parameters:
classname- The value for classname- Returns:
thisbuilder for use in a chained invocation
-
generatedAnnotationClass
Initializes the value for thegeneratedAnnotationClassattribute.- Parameters:
generatedAnnotationClass- The value for generatedAnnotationClass- Returns:
thisbuilder for use in a chained invocation
-
generatorClass
Initializes the value for thegeneratorClassattribute.- Parameters:
generatorClass- The value for generatorClass- Returns:
thisbuilder for use in a chained invocation
-
generatedDate
Initializes the optional valuegeneratedDateto generatedDate.- Parameters:
generatedDate- The value for generatedDate- Returns:
thisbuilder for chained invocation
-
generatedDate
Initializes the optional valuegeneratedDateto generatedDate.- Parameters:
generatedDate- The value for generatedDate- Returns:
thisbuilder for use in a chained invocation
-
commonPath
Initializes the value for thecommonPathattribute.- Parameters:
commonPath- The value for commonPath- Returns:
thisbuilder for use in a chained invocation
-
madaApi
Initializes the value for themadaApiattribute.- Parameters:
madaApi- The value for madaApi- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableCtxApi.- Returns:
- An immutable instance of CtxApi
- Throws:
IllegalStateException- if any required attributes are missing
-