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.Builderbuilder()Creates a builder forImmutableCtxApi.Returns the class name.Returns the common REST path for all operations in this API class.static ImmutableCtxApiCreates an immutable copy of aCtxApivalue.booleanThis instance is equal to all instances ofImmutableCtxApithat 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.inthashCode()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 valueCtxApiwith attribute values.version()Returns the application version.final ImmutableCtxApiwithAppDescription(String value) Copy the current immutable object by setting a present value for the optionalappDescriptionattribute.final ImmutableCtxApiwithAppDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for theappDescriptionattribute.final ImmutableCtxApiwithAppName(String value) Copy the current immutable object by setting a value for theappNameattribute.final ImmutableCtxApiwithClassname(String value) Copy the current immutable object by setting a value for theclassnameattribute.final ImmutableCtxApiwithCommonPath(String value) Copy the current immutable object by setting a value for thecommonPathattribute.final ImmutableCtxApiwithExternalDocs(CtxApi.CtxOperationExternalDoc... elements) Copy the current immutable object with elements that replace the content ofexternalDocs.final ImmutableCtxApiwithExternalDocs(Iterable<? extends CtxApi.CtxOperationExternalDoc> elements) Copy the current immutable object with elements that replace the content ofexternalDocs.final ImmutableCtxApiCopy the current immutable object by setting a value for thegeneratedAnnotationClassattribute.final ImmutableCtxApiwithGeneratedDate(String value) Copy the current immutable object by setting a present value for the optionalgeneratedDateattribute.final ImmutableCtxApiwithGeneratedDate(Optional<String> optional) Copy the current immutable object by setting an optional value for thegeneratedDateattribute.final ImmutableCtxApiwithGeneratorClass(String value) Copy the current immutable object by setting a value for thegeneratorClassattribute.final ImmutableCtxApiwithImports(SortedSet<String> value) Copy the current immutable object by setting a value for theimportsattribute.final ImmutableCtxApiwithInfoEmail(String value) Copy the current immutable object by setting a present value for the optionalinfoEmailattribute.final ImmutableCtxApiwithInfoEmail(Optional<String> optional) Copy the current immutable object by setting an optional value for theinfoEmailattribute.final ImmutableCtxApiwithMadaApi(CtxApiExt value) Copy the current immutable object by setting a value for themadaApiattribute.final ImmutableCtxApiwithOperations(CtxApi.CtxOperationRef... elements) Copy the current immutable object with elements that replace the content ofoperations.final ImmutableCtxApiwithOperations(Iterable<? extends CtxApi.CtxOperationRef> elements) Copy the current immutable object with elements that replace the content ofoperations.final ImmutableCtxApiwithPackageName(String value) Copy the current immutable object by setting a value for thepackageNameattribute.final ImmutableCtxApiwithReturnContainer(Map<String, ? extends String> entries) Copy the current immutable object by replacing thereturnContainermap with the specified map.final ImmutableCtxApiwithVersion(String value) Copy the current immutable object by setting a value for theversionattribute.
-
Method Details
-
appName
Returns the application name. -
version
Returns the application version. -
appDescription
Returns the optional application description.- Specified by:
appDescriptionin interfaceCtxApi- Returns:
- the optional application description
-
infoEmail
Returns the optional information email. -
externalDocs
Returns a list of external documentation references.- Specified by:
externalDocsin interfaceCtxApi- Returns:
- a list of external documentation references
-
returnContainer
Returns the return type information for containers. This is wrong..- Specified by:
returnContainerin interfaceCtxApi- Returns:
- the return type information for containers. This is wrong.
-
getImports
Returns the imports needed for this API class.- Specified by:
getImportsin interfaceCtxApi- Returns:
- the imports needed for this API class
-
operations
Returns the operation contexts in this API class.- Specified by:
operationsin interfaceCtxApi- Returns:
- the operation contexts in this API class
-
packageName
Returns the package name.- Specified by:
packageNamein interfaceCtxApi- Returns:
- the package name
-
classname
Returns the class name. -
generatedAnnotationClass
Returns the name of the Generated annotation class.- Specified by:
generatedAnnotationClassin interfaceCtxApi- Returns:
- the name of the Generated annotation class
-
generatorClass
Returns the name of the generator.- Specified by:
generatorClassin interfaceCtxApi- Returns:
- the name of the generator
-
generatedDate
Returns the optional generation date.- Specified by:
generatedDatein interfaceCtxApi- Returns:
- the optional generation date
-
commonPath
Returns the common REST path for all operations in this API class.- Specified by:
commonPathin 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 theappNameattribute. 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
thisobject
-
withVersion
Copy the current immutable object by setting a value for theversionattribute. 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
thisobject
-
withAppDescription
Copy the current immutable object by setting a present value for the optionalappDescriptionattribute.- Parameters:
value- The value for appDescription- Returns:
- A modified copy or
thisif not changed
-
withAppDescription
Copy the current immutable object by setting an optional value for theappDescriptionattribute. 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
thisif not changed
-
withInfoEmail
Copy the current immutable object by setting a present value for the optionalinfoEmailattribute.- Parameters:
value- The value for infoEmail- Returns:
- A modified copy or
thisif not changed
-
withInfoEmail
Copy the current immutable object by setting an optional value for theinfoEmailattribute. 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
thisif 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
thisobject
-
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
thisif not changed
-
withReturnContainer
Copy the current immutable object by replacing thereturnContainermap 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
thisif not changed
-
withImports
Copy the current immutable object by setting a value for theimportsattribute. 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
thisobject
-
withOperations
Copy the current immutable object with elements that replace the content ofoperations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
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
thisif not changed
-
withPackageName
Copy the current immutable object by setting a value for thepackageNameattribute. 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
thisobject
-
withClassname
Copy the current immutable object by setting a value for theclassnameattribute. 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
thisobject
-
withGeneratedAnnotationClass
Copy the current immutable object by setting a value for thegeneratedAnnotationClassattribute. 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
thisobject
-
withGeneratorClass
Copy the current immutable object by setting a value for thegeneratorClassattribute. 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
thisobject
-
withGeneratedDate
Copy the current immutable object by setting a present value for the optionalgeneratedDateattribute.- Parameters:
value- The value for generatedDate- Returns:
- A modified copy or
thisif not changed
-
withGeneratedDate
Copy the current immutable object by setting an optional value for thegeneratedDateattribute. 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
thisif not changed
-
withCommonPath
Copy the current immutable object by setting a value for thecommonPathattribute. 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
thisobject
-
withMadaApi
Copy the current immutable object by setting a value for themadaApiattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableCtxApithat 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 valueCtxApiwith attribute values. -
copyOf
Creates an immutable copy of aCtxApivalue. 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) // requiredappName.version(String) // requiredversion.appDescription(Optional<String>) // optionalappDescription.infoEmail(Optional<String>) // optionalinfoEmail.addExternalDocs|addAllExternalDocs(dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApi.CtxOperationExternalDoc) //externalDocselements .returnContainer(Map<String, String> | null) // nullablereturnContainer.imports(SortedSet<String>) // requiredimports.addOperations|addAllOperations(dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApi.CtxOperationRef) //operationselements .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
-