Class ImmutableDialobClientConfig

  • All Implemented Interfaces:
    DialobClientConfig

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableDialobClientConfig
    extends Object
    implements DialobClientConfig
    Immutable implementation of DialobClientConfig.

    Use the builder to create immutable instances: ImmutableDialobClientConfig.builder().

    • Method Detail

      • withStore

        public final ImmutableDialobClientConfig withStore​(DialobStore value)
        Copy the current immutable object by setting a value for the store attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for store
        Returns:
        A modified copy of the this object
      • withCache

        public final ImmutableDialobClientConfig withCache​(DialobCache value)
        Copy the current immutable object by setting a value for the cache attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for cache
        Returns:
        A modified copy of the this object
      • withFactory

        public final ImmutableDialobClientConfig withFactory​(DialobSessionEvalContextFactory value)
        Copy the current immutable object by setting a value for the factory attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for factory
        Returns:
        A modified copy of the this object
      • withAsyncFunctionInvoker

        public final ImmutableDialobClientConfig withAsyncFunctionInvoker​(AsyncFunctionInvoker value)
        Copy the current immutable object by setting a value for the asyncFunctionInvoker attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for asyncFunctionInvoker
        Returns:
        A modified copy of the this object
      • withEventPublisher

        public final ImmutableDialobClientConfig withEventPublisher​(QuestionnaireEventPublisher value)
        Copy the current immutable object by setting a value for the eventPublisher attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for eventPublisher
        Returns:
        A modified copy of the this object
      • withMapper

        public final ImmutableDialobClientConfig withMapper​(DialobClient.TypesMapper value)
        Copy the current immutable object by setting a value for the mapper attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for mapper
        Returns:
        A modified copy of the this object
      • withCompiler

        public final ImmutableDialobClientConfig withCompiler​(DialobProgramFromFormCompiler value)
        Copy the current immutable object by setting a value for the compiler attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for compiler
        Returns:
        A modified copy of the this object
      • withErrorHandler

        public final ImmutableDialobClientConfig withErrorHandler​(DialobErrorHandler value)
        Copy the current immutable object by setting a value for the errorHandler attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for errorHandler
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableDialobClientConfig that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: store, cache, factory, asyncFunctionInvoker, eventPublisher, mapper, compiler, errorHandler.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value DialobClientConfig with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableDialobClientConfig copyOf​(DialobClientConfig instance)
        Creates an immutable copy of a DialobClientConfig 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 DialobClientConfig instance
      • builder

        public static ImmutableDialobClientConfig.Builder builder()
        Creates a builder for ImmutableDialobClientConfig.
         ImmutableDialobClientConfig.builder()
            .store(io.dialob.client.api.DialobStore) // required store
            .cache(io.dialob.client.api.DialobCache) // required cache
            .factory(io.dialob.program.DialobSessionEvalContextFactory) // required factory
            .asyncFunctionInvoker(io.dialob.client.spi.function.AsyncFunctionInvoker) // required asyncFunctionInvoker
            .eventPublisher(io.dialob.client.spi.event.QuestionnaireEventPublisher) // required eventPublisher
            .mapper(io.dialob.client.api.DialobClient.TypesMapper) // required mapper
            .compiler(io.dialob.compiler.DialobProgramFromFormCompiler) // required compiler
            .errorHandler(io.dialob.client.api.DialobErrorHandler) // required errorHandler
            .build();
         
        Returns:
        A new ImmutableDialobClientConfig builder