Class SetUserProfileParams

java.lang.Object
com.hubspot.slack.client.methods.params.users.SetUserProfileParams
All Implemented Interfaces:
HasUser, SetUserProfileParamsIF

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

Use the builder to create immutable instances: SetUserProfileParams.builder(). Use the static factory method to create immutable instances: SetUserProfileParams.of().

  • Method Details

    • getUserId

      public String getUserId()
      Specified by:
      getUserId in interface HasUser
      Specified by:
      getUserId in interface SetUserProfileParamsIF
      Returns:
      The value of the userId attribute
    • getUserProfile

      public Optional<UserProfile> getUserProfile()
      Specified by:
      getUserProfile in interface SetUserProfileParamsIF
      Returns:
      The value of the userProfile attribute
    • getName

      public Optional<String> getName()
      Specified by:
      getName in interface SetUserProfileParamsIF
      Returns:
      The value of the name attribute
    • getValue

      public Optional<String> getValue()
      Specified by:
      getValue in interface SetUserProfileParamsIF
      Returns:
      The value of the value attribute
    • withUserId

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

      public final SetUserProfileParams withUserProfile(@Nullable UserProfile value)
      Copy the current immutable object by setting a present value for the optional userProfile attribute.
      Parameters:
      value - The value for userProfile, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUserProfile

      public final SetUserProfileParams withUserProfile(Optional<? extends UserProfile> optional)
      Copy the current immutable object by setting an optional value for the userProfile attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for userProfile
      Returns:
      A modified copy or this if not changed
    • withName

      public final SetUserProfileParams withName(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional name attribute.
      Parameters:
      value - The value for name, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withName

      public final SetUserProfileParams withName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the name attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for name
      Returns:
      A modified copy or this if not changed
    • withValue

      public final SetUserProfileParams withValue(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional value attribute.
      Parameters:
      value - The value for value, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withValue

      public final SetUserProfileParams withValue(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the value attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for value
      Returns:
      A modified copy or this if not changed
    • equals

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

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

      public static SetUserProfileParams of(String userId)
      Construct a new immutable SetUserProfileParams instance.
      Parameters:
      userId - The value for the userId attribute
      Returns:
      An immutable SetUserProfileParams instance
    • copyOf

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

      public static SetUserProfileParams.Builder builder()
      Creates a builder for SetUserProfileParams.
       SetUserProfileParams.builder()
          .setUserId(String) // required userId
          .setUserProfile(Optional<com.hubspot.slack.client.models.users.UserProfile>) // optional userProfile
          .setName(Optional<String>) // optional name
          .setValue(Optional<String>) // optional value
          .build();
       
      Returns:
      A new SetUserProfileParams builder