Class ImmutableFeatureRequest

java.lang.Object
com.iland.core.web.rest.request.feature.ImmutableFeatureRequest
All Implemented Interfaces:
FeatureRequest

@Generated(from="FeatureRequest", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableFeatureRequest extends Object implements FeatureRequest
Immutable implementation of FeatureRequest.

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

  • Method Details

    • name

      public String name()
      The name of the feature.
      Specified by:
      name in interface FeatureRequest
    • description

      public Optional<String> description()
      The optional description of the feature.
      Specified by:
      description in interface FeatureRequest
    • enabled

      public Boolean enabled()
      Whether the feature is currently enabled.
      Specified by:
      enabled in interface FeatureRequest
    • users

      public com.google.common.collect.ImmutableList<String> users()
      The list of users for which this feature should apply. Providing an empty list means the feature will apply to all users.
      Specified by:
      users in interface FeatureRequest
    • withName

      public final ImmutableFeatureRequest withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name
      Returns:
      A modified copy of the this object
    • withDescription

      public final ImmutableFeatureRequest withDescription(String value)
      Copy the current immutable object by setting a present value for the optional description attribute.
      Parameters:
      value - The value for description
      Returns:
      A modified copy of this object
    • withDescription

      public final ImmutableFeatureRequest withDescription(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the description attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for description
      Returns:
      A modified copy of this object
    • withEnabled

      public final ImmutableFeatureRequest withEnabled(Boolean value)
      Copy the current immutable object by setting a value for the enabled attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for enabled
      Returns:
      A modified copy of the this object
    • withUsers

      public final ImmutableFeatureRequest withUsers(String... elements)
      Copy the current immutable object with elements that replace the content of users.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withUsers

      public final ImmutableFeatureRequest withUsers(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of users. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of users elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableFeatureRequest 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: name, description, enabled, users.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableFeatureRequest.Builder builder()
      Creates a builder for ImmutableFeatureRequest.
       ImmutableFeatureRequest.builder()
          .name(String) // required name
          .description(String) // optional description
          .enabled(Boolean) // optional enabled
          .addUsers|addAllUsers(String) // users elements
          .build();
       
      Returns:
      A new ImmutableFeatureRequest builder