Class ImmutableCtxApi
java.lang.Object
dk.mada.jaxrs.generator.mpclient.api.tmpl.ImmutableCtxApi
- All Implemented Interfaces:
CtxApi
@Generated(from="CtxApi",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableCtxApi
extends Object
implements CtxApi
Immutable implementation of
CtxApi
.
Use the builder to create immutable instances:
ImmutableCtxApi.builder()
.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApi
CtxApi.CtxOperationExternalDoc, CtxApi.CtxOperationRef
-
Method Summary
Modifier and TypeMethodDescriptionReturns the optional application description.appName()
Returns the application name.static ImmutableCtxApi.Builder
builder()
Creates a builder forImmutableCtxApi
.Returns the class name.Returns the common REST path for all operations in this API class.static ImmutableCtxApi
Creates an immutable copy of aCtxApi
value.boolean
This instance is equal to all instances ofImmutableCtxApi
that have equal attribute values.Returns a list of external documentation references.Returns the name of the Generated annotation class.Returns the optional generation date.Returns the name of the generator.Returns the imports needed for this API class.int
hashCode()
Computes a hash code from attributes:appName
,version
,appDescription
,infoEmail
,externalDocs
,returnContainer
,imports
,operations
,packageName
,classname
,generatedAnnotationClass
,generatorClass
,generatedDate
,commonPath
,madaApi
.Returns the optional information email.madaApi()
Returns additional custom template data for the api.Returns the operation contexts in this API class.Returns the package name.Returns the return type information for containers. This is wrong..toString()
Prints the immutable valueCtxApi
with attribute values.version()
Returns the application version.final ImmutableCtxApi
withAppDescription
(String value) Copy the current immutable object by setting a present value for the optionalappDescription
attribute.final ImmutableCtxApi
withAppDescription
(Optional<String> optional) Copy the current immutable object by setting an optional value for theappDescription
attribute.final ImmutableCtxApi
withAppName
(String value) Copy the current immutable object by setting a value for theappName
attribute.final ImmutableCtxApi
withClassname
(String value) Copy the current immutable object by setting a value for theclassname
attribute.final ImmutableCtxApi
withCommonPath
(String value) Copy the current immutable object by setting a value for thecommonPath
attribute.final ImmutableCtxApi
withExternalDocs
(CtxApi.CtxOperationExternalDoc... elements) Copy the current immutable object with elements that replace the content ofexternalDocs
.final ImmutableCtxApi
withExternalDocs
(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Copy the current immutable object with elements that replace the content ofexternalDocs
.final ImmutableCtxApi
Copy the current immutable object by setting a value for thegeneratedAnnotationClass
attribute.final ImmutableCtxApi
withGeneratedDate
(String value) Copy the current immutable object by setting a present value for the optionalgeneratedDate
attribute.final ImmutableCtxApi
withGeneratedDate
(Optional<String> optional) Copy the current immutable object by setting an optional value for thegeneratedDate
attribute.final ImmutableCtxApi
withGeneratorClass
(String value) Copy the current immutable object by setting a value for thegeneratorClass
attribute.final ImmutableCtxApi
withImports
(SortedSet<String> value) Copy the current immutable object by setting a value for theimports
attribute.final ImmutableCtxApi
withInfoEmail
(String value) Copy the current immutable object by setting a present value for the optionalinfoEmail
attribute.final ImmutableCtxApi
withInfoEmail
(Optional<String> optional) Copy the current immutable object by setting an optional value for theinfoEmail
attribute.final ImmutableCtxApi
withMadaApi
(CtxApiExt value) Copy the current immutable object by setting a value for themadaApi
attribute.final ImmutableCtxApi
withOperations
(CtxApi.CtxOperationRef... elements) Copy the current immutable object with elements that replace the content ofoperations
.final ImmutableCtxApi
withOperations
(Iterable<? extends CtxApi.CtxOperationRef> elements) Copy the current immutable object with elements that replace the content ofoperations
.final ImmutableCtxApi
withPackageName
(String value) Copy the current immutable object by setting a value for thepackageName
attribute.final ImmutableCtxApi
withReturnContainer
(Map<String, ? extends String> entries) Copy the current immutable object by replacing thereturnContainer
map with the specified map.final ImmutableCtxApi
withVersion
(String value) Copy the current immutable object by setting a value for theversion
attribute.
-
Method Details
-
appName
Returns the application name. -
version
Returns the application version. -
appDescription
Returns the optional application description.- Specified by:
appDescription
in interfaceCtxApi
- Returns:
- the optional application description
-
infoEmail
Returns the optional information email. -
externalDocs
Returns a list of external documentation references.- Specified by:
externalDocs
in interfaceCtxApi
- Returns:
- a list of external documentation references
-
returnContainer
Returns the return type information for containers. This is wrong..- Specified by:
returnContainer
in interfaceCtxApi
- Returns:
- the return type information for containers. This is wrong.
-
getImports
Returns the imports needed for this API class.- Specified by:
getImports
in interfaceCtxApi
- Returns:
- the imports needed for this API class
-
operations
Returns the operation contexts in this API class.- Specified by:
operations
in interfaceCtxApi
- Returns:
- the operation contexts in this API class
-
packageName
Returns the package name.- Specified by:
packageName
in interfaceCtxApi
- Returns:
- the package name
-
classname
Returns the class name. -
generatedAnnotationClass
Returns the name of the Generated annotation class.- Specified by:
generatedAnnotationClass
in interfaceCtxApi
- Returns:
- the name of the Generated annotation class
-
generatorClass
Returns the name of the generator.- Specified by:
generatorClass
in interfaceCtxApi
- Returns:
- the name of the generator
-
generatedDate
Returns the optional generation date.- Specified by:
generatedDate
in interfaceCtxApi
- Returns:
- the optional generation date
-
commonPath
Returns the common REST path for all operations in this API class.- Specified by:
commonPath
in interfaceCtxApi
- Returns:
- the common REST path for all operations in this API class
-
madaApi
Returns additional custom template data for the api. -
withAppName
Copy the current immutable object by setting a value for theappName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for appName- Returns:
- A modified copy or the
this
object
-
withVersion
Copy the current immutable object by setting a value for theversion
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for version- Returns:
- A modified copy or the
this
object
-
withAppDescription
Copy the current immutable object by setting a present value for the optionalappDescription
attribute.- Parameters:
value
- The value for appDescription- Returns:
- A modified copy or
this
if not changed
-
withAppDescription
Copy the current immutable object by setting an optional value for theappDescription
attribute. An equality check is used on inner value to prevent copying of the same value by returningthis
.- Parameters:
optional
- An optional value for appDescription- Returns:
- A modified copy or
this
if not changed
-
withInfoEmail
Copy the current immutable object by setting a present value for the optionalinfoEmail
attribute.- Parameters:
value
- The value for infoEmail- Returns:
- A modified copy or
this
if not changed
-
withInfoEmail
Copy the current immutable object by setting an optional value for theinfoEmail
attribute. An equality check is used on inner value to prevent copying of the same value by returningthis
.- Parameters:
optional
- An optional value for infoEmail- Returns:
- A modified copy or
this
if not changed
-
withExternalDocs
Copy the current immutable object with elements that replace the content ofexternalDocs
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withExternalDocs
public final ImmutableCtxApi withExternalDocs(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Copy the current immutable object with elements that replace the content ofexternalDocs
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of externalDocs elements to set- Returns:
- A modified copy or
this
if not changed
-
withReturnContainer
Copy the current immutable object by replacing thereturnContainer
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to replace the returnContainer map- Returns:
- A modified copy or
this
if not changed
-
withImports
Copy the current immutable object by setting a value for theimports
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for imports- Returns:
- A modified copy or the
this
object
-
withOperations
Copy the current immutable object with elements that replace the content ofoperations
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withOperations
Copy the current immutable object with elements that replace the content ofoperations
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of operations elements to set- Returns:
- A modified copy or
this
if not changed
-
withPackageName
Copy the current immutable object by setting a value for thepackageName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for packageName- Returns:
- A modified copy or the
this
object
-
withClassname
Copy the current immutable object by setting a value for theclassname
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for classname- Returns:
- A modified copy or the
this
object
-
withGeneratedAnnotationClass
Copy the current immutable object by setting a value for thegeneratedAnnotationClass
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for generatedAnnotationClass- Returns:
- A modified copy or the
this
object
-
withGeneratorClass
Copy the current immutable object by setting a value for thegeneratorClass
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for generatorClass- Returns:
- A modified copy or the
this
object
-
withGeneratedDate
Copy the current immutable object by setting a present value for the optionalgeneratedDate
attribute.- Parameters:
value
- The value for generatedDate- Returns:
- A modified copy or
this
if not changed
-
withGeneratedDate
Copy the current immutable object by setting an optional value for thegeneratedDate
attribute. An equality check is used on inner value to prevent copying of the same value by returningthis
.- Parameters:
optional
- An optional value for generatedDate- Returns:
- A modified copy or
this
if not changed
-
withCommonPath
Copy the current immutable object by setting a value for thecommonPath
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for commonPath- Returns:
- A modified copy or the
this
object
-
withMadaApi
Copy the current immutable object by setting a value for themadaApi
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for madaApi- Returns:
- A modified copy or the
this
object
-
equals
This instance is equal to all instances ofImmutableCtxApi
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:appName
,version
,appDescription
,infoEmail
,externalDocs
,returnContainer
,imports
,operations
,packageName
,classname
,generatedAnnotationClass
,generatorClass
,generatedDate
,commonPath
,madaApi
. -
toString
Prints the immutable valueCtxApi
with attribute values. -
copyOf
Creates an immutable copy of aCtxApi
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable CtxApi instance
-
builder
Creates a builder forImmutableCtxApi
.ImmutableCtxApi.builder() .appName(String) // required
appName
.version(String) // requiredversion
.appDescription(Optional<String>) // optionalappDescription
.infoEmail(Optional<String>) // optionalinfoEmail
.addExternalDocs|addAllExternalDocs(dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApi.CtxOperationExternalDoc) //externalDocs
elements .returnContainer(Map<String, String> | null) // nullablereturnContainer
.imports(SortedSet<String>) // requiredimports
.addOperations|addAllOperations(dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApi.CtxOperationRef) //operations
elements .packageName(String) // requiredpackageName
.classname(String) // requiredclassname
.generatedAnnotationClass(String) // requiredgeneratedAnnotationClass
.generatorClass(String) // requiredgeneratorClass
.generatedDate(Optional<String>) // optionalgeneratedDate
.commonPath(String) // requiredcommonPath
.madaApi(dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApiExt) // requiredmadaApi
.build();- Returns:
- A new ImmutableCtxApi builder
-