Class ImmutableTenantContext.Builder

java.lang.Object
io.resys.thena.datasource.ImmutableTenantContext.Builder
Enclosing class:
ImmutableTenantContext

@Generated(from="TenantContext", generator="Immutables") public static final class ImmutableTenantContext.Builder extends Object
Builds instances of type ImmutableTenantContext. 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

      @CanIgnoreReturnValue public final ImmutableTenantContext.Builder from(TenantContext instance)
      Fill a builder with attribute values from the provided TenantContext instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • db

      @CanIgnoreReturnValue public final ImmutableTenantContext.Builder db(String db)
      Initializes the value for the db attribute.
      Parameters:
      db - The value for db
      Returns:
      this builder for use in a chained invocation
    • tenant

      @CanIgnoreReturnValue public final ImmutableTenantContext.Builder tenant(String tenant)
      Initializes the value for the tenant attribute.
      Parameters:
      tenant - The value for tenant
      Returns:
      this builder for use in a chained invocation
    • prefix

      @CanIgnoreReturnValue public final ImmutableTenantContext.Builder prefix(String prefix)
      Initializes the value for the prefix attribute.
      Parameters:
      prefix - The value for prefix
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableTenantContext build()
      Returns:
      An immutable instance of TenantContext
      Throws:
      IllegalStateException - if any required attributes are missing