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 Details

    • from

      public final ImmutableCtxApi.Builder from(CtxApi instance)
      Fill a builder with attribute values from the provided CtxApi 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

      public final ImmutableCtxApi.Builder appName(String appName)
      Initializes the value for the appName attribute.
      Parameters:
      appName - The value for appName
      Returns:
      this builder for use in a chained invocation
    • version

      public final ImmutableCtxApi.Builder version(String version)
      Initializes the value for the version attribute.
      Parameters:
      version - The value for version
      Returns:
      this builder for use in a chained invocation
    • appDescription

      public final ImmutableCtxApi.Builder appDescription(String appDescription)
      Initializes the optional value appDescription to appDescription.
      Parameters:
      appDescription - The value for appDescription
      Returns:
      this builder for chained invocation
    • appDescription

      public final ImmutableCtxApi.Builder appDescription(Optional<String> appDescription)
      Initializes the optional value appDescription to appDescription.
      Parameters:
      appDescription - The value for appDescription
      Returns:
      this builder for use in a chained invocation
    • infoEmail

      public final ImmutableCtxApi.Builder infoEmail(String infoEmail)
      Initializes the optional value infoEmail to infoEmail.
      Parameters:
      infoEmail - The value for infoEmail
      Returns:
      this builder for chained invocation
    • infoEmail

      public final ImmutableCtxApi.Builder infoEmail(Optional<String> infoEmail)
      Initializes the optional value infoEmail to infoEmail.
      Parameters:
      infoEmail - The value for infoEmail
      Returns:
      this builder for use in a chained invocation
    • addExternalDocs

      public final ImmutableCtxApi.Builder addExternalDocs(CtxApi.CtxOperationExternalDoc element)
      Adds one element to externalDocs list.
      Parameters:
      element - A externalDocs element
      Returns:
      this builder for use in a chained invocation
    • addExternalDocs

      public final ImmutableCtxApi.Builder addExternalDocs(CtxApi.CtxOperationExternalDoc... elements)
      Adds elements to externalDocs 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 for externalDocs 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 to externalDocs list.
      Parameters:
      elements - An iterable of externalDocs elements
      Returns:
      this builder for use in a chained invocation
    • putReturnContainer

      public final ImmutableCtxApi.Builder putReturnContainer(String key, String value)
      Put one entry to the returnContainer map.
      Parameters:
      key - The key in the returnContainer map
      value - The associated value in the returnContainer map
      Returns:
      this builder for use in a chained invocation
    • putReturnContainer

      public final ImmutableCtxApi.Builder putReturnContainer(Map.Entry<String,? extends String> entry)
      Put one entry to the returnContainer map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • returnContainer

      public final ImmutableCtxApi.Builder returnContainer(Map<String,? extends String> entries)
      Sets or replaces all mappings from the specified map as entries for the returnContainer 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

      public final ImmutableCtxApi.Builder putAllReturnContainer(Map<String,? extends String> entries)
      Put all mappings from the specified map as entries to returnContainer 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

      public final ImmutableCtxApi.Builder imports(SortedSet<String> imports)
      Initializes the value for the imports attribute.
      Parameters:
      imports - The value for imports
      Returns:
      this builder for use in a chained invocation
    • addOperations

      public final ImmutableCtxApi.Builder addOperations(CtxApi.CtxOperationRef element)
      Adds one element to operations list.
      Parameters:
      element - A operations element
      Returns:
      this builder for use in a chained invocation
    • addOperations

      public final ImmutableCtxApi.Builder addOperations(CtxApi.CtxOperationRef... elements)
      Adds elements to operations 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 for operations 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 to operations list.
      Parameters:
      elements - An iterable of operations elements
      Returns:
      this builder for use in a chained invocation
    • packageName

      public final ImmutableCtxApi.Builder packageName(String packageName)
      Initializes the value for the packageName attribute.
      Parameters:
      packageName - The value for packageName
      Returns:
      this builder for use in a chained invocation
    • classname

      public final ImmutableCtxApi.Builder classname(String classname)
      Initializes the value for the classname attribute.
      Parameters:
      classname - The value for classname
      Returns:
      this builder for use in a chained invocation
    • generatedAnnotationClass

      public final ImmutableCtxApi.Builder generatedAnnotationClass(String generatedAnnotationClass)
      Initializes the value for the generatedAnnotationClass attribute.
      Parameters:
      generatedAnnotationClass - The value for generatedAnnotationClass
      Returns:
      this builder for use in a chained invocation
    • generatorClass

      public final ImmutableCtxApi.Builder generatorClass(String generatorClass)
      Initializes the value for the generatorClass attribute.
      Parameters:
      generatorClass - The value for generatorClass
      Returns:
      this builder for use in a chained invocation
    • generatedDate

      public final ImmutableCtxApi.Builder generatedDate(String generatedDate)
      Initializes the optional value generatedDate to generatedDate.
      Parameters:
      generatedDate - The value for generatedDate
      Returns:
      this builder for chained invocation
    • generatedDate

      public final ImmutableCtxApi.Builder generatedDate(Optional<String> generatedDate)
      Initializes the optional value generatedDate to generatedDate.
      Parameters:
      generatedDate - The value for generatedDate
      Returns:
      this builder for use in a chained invocation
    • commonPath

      public final ImmutableCtxApi.Builder commonPath(String commonPath)
      Initializes the value for the commonPath attribute.
      Parameters:
      commonPath - The value for commonPath
      Returns:
      this builder for use in a chained invocation
    • madaApi

      public final ImmutableCtxApi.Builder madaApi(CtxApiExt madaApi)
      Initializes the value for the madaApi attribute.
      Parameters:
      madaApi - The value for madaApi
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableCtxApi build()
      Builds a new ImmutableCtxApi.
      Returns:
      An immutable instance of CtxApi
      Throws:
      IllegalStateException - if any required attributes are missing