Class ImmutableFeatureRequest.Builder

java.lang.Object
com.iland.core.web.rest.request.feature.ImmutableFeatureRequest.Builder
Enclosing class:
ImmutableFeatureRequest

@Generated(from="FeatureRequest", generator="Immutables") @NotThreadSafe public static final class ImmutableFeatureRequest.Builder extends Object
Builds instances of type ImmutableFeatureRequest. 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 ImmutableFeatureRequest.Builder from(FeatureRequest instance)
      Fill a builder with attribute values from the provided FeatureRequest 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
    • name

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

      @CanIgnoreReturnValue public final ImmutableFeatureRequest.Builder description(String description)
      Initializes the optional value description to description.
      Parameters:
      description - The value for description
      Returns:
      this builder for chained invocation
    • description

      @CanIgnoreReturnValue public final ImmutableFeatureRequest.Builder description(Optional<String> description)
      Initializes the optional value description to description.
      Parameters:
      description - The value for description
      Returns:
      this builder for use in a chained invocation
    • enabled

      @CanIgnoreReturnValue public final ImmutableFeatureRequest.Builder enabled(Boolean enabled)
      Initializes the value for the enabled attribute.

      If not set, this attribute will have a default value as returned by the initializer of enabled.

      Parameters:
      enabled - The value for enabled
      Returns:
      this builder for use in a chained invocation
    • addUsers

      @CanIgnoreReturnValue public final ImmutableFeatureRequest.Builder addUsers(String element)
      Adds one element to users list.
      Parameters:
      element - A users element
      Returns:
      this builder for use in a chained invocation
    • addUsers

      @CanIgnoreReturnValue public final ImmutableFeatureRequest.Builder addUsers(String... elements)
      Adds elements to users list.
      Parameters:
      elements - An array of users elements
      Returns:
      this builder for use in a chained invocation
    • users

      @CanIgnoreReturnValue public final ImmutableFeatureRequest.Builder users(Iterable<String> elements)
      Sets or replaces all elements for users list.
      Parameters:
      elements - An iterable of users elements
      Returns:
      this builder for use in a chained invocation
    • addAllUsers

      @CanIgnoreReturnValue public final ImmutableFeatureRequest.Builder addAllUsers(Iterable<String> elements)
      Adds elements to users list.
      Parameters:
      elements - An iterable of users elements
      Returns:
      this builder for use in a chained invocation
    • build

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