Interface KotlinMicronautClientOptionsBuilder

All Superinterfaces:
GeneratorOptionsBuilder

public interface KotlinMicronautClientOptionsBuilder extends GeneratorOptionsBuilder
The client generator options builder.
  • Method Details

    • withAuthorization

      KotlinMicronautClientOptionsBuilder withAuthorization(boolean useAuth)
      If set to true the client will be configured for authorization.
      Parameters:
      useAuth - the authorization flag
      Returns:
      this builder
    • withGenerateAuthClasses

      KotlinMicronautClientOptionsBuilder withGenerateAuthClasses(boolean generateAuthorizationClasses)
      Generate authorization classes or not.
      Parameters:
      generateAuthorizationClasses - Generate authorization classes or not.
      Returns:
      this builder
    • withAuthFilter

      KotlinMicronautClientOptionsBuilder withAuthFilter(boolean authFilter)
      Generate AuthorizationFilter or not.
      Parameters:
      authFilter - Generate AuthorizationFilter or not.
      Returns:
      this builder
    • withUseOauth

      KotlinMicronautClientOptionsBuilder withUseOauth(boolean useOauth)
      Generate AuthorizationFilter with support OAuth2.0 or not.
      Parameters:
      useOauth - if true, then AuthorizationFilter will be created with support OAuth2.0
      Returns:
      this builder
    • withUseBasicAuth

      KotlinMicronautClientOptionsBuilder withUseBasicAuth(boolean useBasicAuth)
      Generate HttpBasicAuthConfig class or not.
      Parameters:
      useBasicAuth - if true, then HttpBasicAuthConfig class will be generated
      Returns:
      this builder
    • withUseApiKeyAuth

      KotlinMicronautClientOptionsBuilder withUseApiKeyAuth(boolean useApiKeyAuth)
      Generate ApiKeyAuthConfig config or not.
      Parameters:
      useApiKeyAuth - if true, then ApiKeyAuthConfig class will be generated
      Returns:
      this builder
    • withAuthorizationFilterPattern

      KotlinMicronautClientOptionsBuilder withAuthorizationFilterPattern(String authorizationFilterPattern)
      Sets the authorization filter pattern. Can be a list of strings, or single string with `;` separator
      Parameters:
      authorizationFilterPattern - the filter pattern
      Returns:
      this builder
    • withAuthorizationFilterPatternStyle

      KotlinMicronautClientOptionsBuilder withAuthorizationFilterPatternStyle(String authorizationFilterPatternStyle)
      Sets the authorization filter pattern style. Available values: ANT, REGEX.

      Default: ANT

      Parameters:
      authorizationFilterPatternStyle - the filter pattern style. Default: ANT
      Returns:
      this builder
    • withAuthFilterClientIds

      KotlinMicronautClientOptionsBuilder withAuthFilterClientIds(List<String> authFilterClientIds)
      Sets serviceId annotation property for AuthorizationFilter. Usefully, when use one filter for several clients. Can be a list of strings, or single string with `;` separator.

      By default, if you don't set any authFilterClientIds, value will be a list with one element - `clientId` property value. If you don't want to add any serviceId annotation property for AuthorizationFilter, just set empty list (not null!).

      Parameters:
      authFilterClientIds - the list of client IDs, for which this filter will be used
      Returns:
      this builder
    • withAuthFilterExcludedClientIds

      KotlinMicronautClientOptionsBuilder withAuthFilterExcludedClientIds(List<String> authFilterExcludedClientIds)
      The list of client IDs, for which this filter will NOT be used. Can be a list of strings, or single string with `;` separator (if you set this property, by additionalProperties)
      Parameters:
      authFilterExcludedClientIds - the list of client IDs, for which this filter will NOT be used
      Returns:
      this builder
    • withAuthConfigName

      KotlinMicronautClientOptionsBuilder withAuthConfigName(String authConfigName)
      Authorization config name. Using in config properties for HttpBasicAuthConfig and ApiKeyAuthConfig. If not set, clientId value will be used.
      Parameters:
      authConfigName - the client id
      Returns:
      this builder
    • withClientId

      Sets the client id.
      Parameters:
      clientId - the client id
      Returns:
      this builder
    • withAdditionalClientTypeAnnotations

      KotlinMicronautClientOptionsBuilder withAdditionalClientTypeAnnotations(List<String> additionalClientTypeAnnotations)
      Sets annotations for client type (class level annotations). Can be a list of strings, or single string with `;` separator
      Parameters:
      additionalClientTypeAnnotations - the type annotations
      Returns:
      this builder
    • withBasePathSeparator

      KotlinMicronautClientOptionsBuilder withBasePathSeparator(String basePathSeparator)
      Sets the separator to use between the application name and base path when referencing the property.
      Parameters:
      basePathSeparator - the base path separator
      Returns:
      this builder
    • withPlural

      KotlinMicronautClientOptionsBuilder withPlural(boolean plural)
      If set to true, the generated code will pluralize parameters and properties for arrays.
      Parameters:
      plural - generate pluralized parameters and properties for arrays
      Returns:
      this builder
    • withFluxForArrays

      KotlinMicronautClientOptionsBuilder withFluxForArrays(boolean fluxForArrays)
      If set to true, generated code will be with Flux<?> instead Mono<List<?>>.
      Parameters:
      fluxForArrays - generate code with Flux<?> instead Mono<List<?>> or not
      Returns:
      this builder
    • withGeneratedAnnotation

      KotlinMicronautClientOptionsBuilder withGeneratedAnnotation(boolean generatedAnnotation)
      If set to true, generated code will be with jakarta.annotation.Generated annotation.
      Parameters:
      generatedAnnotation - generate code with jakarta.annotation.Generated annotation or not
      Returns:
      this builder
    • withClientPath

      KotlinMicronautClientOptionsBuilder withClientPath(boolean clientPath)
      If set to true, Api annotation @Client will be with `path` attribute.
      Parameters:
      clientPath - do we need add path attribute to @Client annotation
      Returns:
      this builder
    • withKsp

      If set to true, generated code will be fully compatible with KSP, but not 100% with KAPT.
      Parameters:
      ksp - do we need to generate code compatible only with KSP
      Returns:
      this builder
    • withCoroutines

      KotlinMicronautClientOptionsBuilder withCoroutines(boolean coroutines)
      If set to true, generated code will be with suspend methods.
      Parameters:
      coroutines - do we need to generate suspend methods
      Returns:
      this builder
    • withJvmOverloads

      KotlinMicronautClientOptionsBuilder withJvmOverloads(boolean jvmOverloads)
      Add or not @JvmOverloads annotation for classes with properties with default values. Default: false
      Parameters:
      jvmOverloads - if true, then @JvmOverload annotation will be added to classes with properties with default values
      Returns:
      this builder
    • withJvmRecord

      KotlinMicronautClientOptionsBuilder withJvmRecord(boolean jvmRecord)
      Add or not @JvmRecord annotation to data classes. Default: false
      Parameters:
      jvmRecord - if true, then @JvmRecord annotation will be added to data classes
      Returns:
      this builder
    • withJavaCompatibility

      KotlinMicronautClientOptionsBuilder withJavaCompatibility(boolean javaCompatibility)
      Add or not @JvmField, @JvmStatic and @JvmRepeatable annotations to improve java compatibility. Default: true
      Parameters:
      javaCompatibility - if true, then @JvmField, @JvmStatic and @JvmRepeatable annotations wil be added where it needed to improve java compatibility
      Returns:
      this builder
    • withModelMutable

      KotlinMicronautClientOptionsBuilder withModelMutable(boolean modelMutable)
      If set to true, generated model will be with `var` keywords, otherwise - `val`.
      Parameters:
      modelMutable - generate code with mutable / immutable models
      Returns:
      this builder
    • withExplicitApi

      KotlinMicronautClientOptionsBuilder withExplicitApi(boolean explicitApi)
      Generates code with explicit access modifiers to comply with Kotlin Explicit API Mode.
      Parameters:
      explicitApi - if true, then `public` modifier will be added t public methods and classes.
      Returns:
      this builder
    • withNonPublicApi

      KotlinMicronautClientOptionsBuilder withNonPublicApi(boolean nonPublicApi)
      If true, generated code will be with `internal` modifier.
      Parameters:
      nonPublicApi - If true, generated code will be with `internal` modifier.
      Returns:
      this builder
    • withRetryable

      KotlinMicronautClientOptionsBuilder withRetryable(boolean retryable)
      Add or not @Retryable annotation to client interface. Default: false
      Parameters:
      retryable - if true, then @Retryable annotation will be added to client interface
      Returns:
      this builder
    • withRetryableIncludes

      KotlinMicronautClientOptionsBuilder withRetryableIncludes(List<String> retryableIncludes)
      Set includes parameter for Retryable annotation.
      Parameters:
      retryableIncludes - includes value for Retryable annotation
      Returns:
      this builder
    • withRetryableExcludes

      KotlinMicronautClientOptionsBuilder withRetryableExcludes(List<String> retryableExcludes)
      Set excludes parameter for Retryable annotation.
      Parameters:
      retryableExcludes - excludes value for Retryable annotation
      Returns:
      this builder
    • withRetryableAttempts

      KotlinMicronautClientOptionsBuilder withRetryableAttempts(int retryableAttempts)
      Set attempts parameter for Retryable annotation.
      Parameters:
      retryableAttempts - attempts value for Retryable annotation
      Returns:
      this builder
    • withRetryableDelay

      KotlinMicronautClientOptionsBuilder withRetryableDelay(String retryableDelay)
      Set delay parameter for Retryable annotation.
      Parameters:
      retryableDelay - delay value for Retryable annotation
      Returns:
      this builder
    • withRetryableMaxDelay

      KotlinMicronautClientOptionsBuilder withRetryableMaxDelay(String retryableMaxDelay)
      Set maxDelay parameter for Retryable annotation.
      Parameters:
      retryableMaxDelay - maxDelay value for Retryable annotation
      Returns:
      this builder
    • withRetryableMultiplier

      KotlinMicronautClientOptionsBuilder withRetryableMultiplier(String retryableMultiplier)
      Set multiplier parameter for Retryable annotation.
      Parameters:
      retryableMultiplier - multiplier value for Retryable annotation
      Returns:
      this builder
    • withRetryableJitter

      KotlinMicronautClientOptionsBuilder withRetryableJitter(String retryableJitter)
      Set jitter parameter for Retryable annotation.
      Parameters:
      retryableJitter - jitter value for Retryable annotation
      Returns:
      this builder
    • withRetryablePredicate

      KotlinMicronautClientOptionsBuilder withRetryablePredicate(String retryablePredicate)
      Set predicate parameter for Retryable annotation.
      Parameters:
      retryablePredicate - predicate value for Retryable annotation
      Returns:
      this builder
    • withRetryableCapturedException

      KotlinMicronautClientOptionsBuilder withRetryableCapturedException(String retryableCapturedException)
      Set capturedException parameter for Retryable annotation.
      Parameters:
      retryableCapturedException - capturedException value for Retryable annotation
      Returns:
      this builder