Class ImmutableApiKey.Builder

  • Enclosing class:
    ImmutableApiKey

    @NotThreadSafe
    public static final class ImmutableApiKey.Builder
    extends Object
    Builds instances of type ImmutableApiKey. 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 Detail

      • from

        public final ImmutableApiKey.Builder from​(ApiKey instance)
        Fill a builder with attribute values from the provided ApiKey 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
      • clientId

        public final ImmutableApiKey.Builder clientId​(String clientId)
        Initializes the value for the clientId attribute.
        Parameters:
        clientId - The value for clientId
        Returns:
        this builder for use in a chained invocation
      • token

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

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

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

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

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

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

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

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

        public final ImmutableApiKey.Builder created​(LocalDateTime created)
        Initializes the optional value created to created.
        Parameters:
        created - The value for created
        Returns:
        this builder for chained invocation
      • startDateTime

        public final ImmutableApiKey.Builder startDateTime​(LocalDateTime startDateTime)
        Initializes the optional value startDateTime to startDateTime.
        Parameters:
        startDateTime - The value for startDateTime
        Returns:
        this builder for chained invocation
      • startDateTime

        public final ImmutableApiKey.Builder startDateTime​(Optional<? extends LocalDateTime> startDateTime)
        Initializes the optional value startDateTime to startDateTime.
        Parameters:
        startDateTime - The value for startDateTime
        Returns:
        this builder for use in a chained invocation
      • endDateTime

        public final ImmutableApiKey.Builder endDateTime​(LocalDateTime endDateTime)
        Initializes the optional value endDateTime to endDateTime.
        Parameters:
        endDateTime - The value for endDateTime
        Returns:
        this builder for chained invocation
      • endDateTime

        public final ImmutableApiKey.Builder endDateTime​(Optional<? extends LocalDateTime> endDateTime)
        Initializes the optional value endDateTime to endDateTime.
        Parameters:
        endDateTime - The value for endDateTime
        Returns:
        this builder for use in a chained invocation