Class ProfileField
java.lang.Object
com.hubspot.slack.client.models.users.ProfileField
- All Implemented Interfaces:
ProfileFieldIF
@Generated(from="ProfileFieldIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ProfileField
extends Object
implements ProfileFieldIF
Immutable implementation of
ProfileFieldIF.
Use the builder to create immutable instances:
ProfileField.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ProfileField.Builderbuilder()Creates a builder forProfileField.static ProfileFieldcopyOf(ProfileFieldIF instance) Creates an immutable copy of aProfileFieldIFvalue.booleanThis instance is equal to all instances ofProfileFieldthat have equal attribute values.getAlt()getValue()inthashCode()Computes a hash code from attributes:value,alt.toString()Prints the immutable valueProfileFieldwith attribute values.final ProfileFieldCopy the current immutable object by setting a present value for the optionalaltattribute.final ProfileFieldCopy the current immutable object by setting an optional value for thealtattribute.final ProfileFieldCopy the current immutable object by setting a value for thevalueattribute.
-
Method Details
-
getValue
- Specified by:
getValuein interfaceProfileFieldIF- Returns:
- The value of the
valueattribute
-
getAlt
- Specified by:
getAltin interfaceProfileFieldIF- Returns:
- The value of the
altattribute
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy or the
thisobject
-
withAlt
Copy the current immutable object by setting a present value for the optionalaltattribute.- Parameters:
value- The value for alt,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withAlt
Copy the current immutable object by setting an optional value for thealtattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for alt- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofProfileFieldthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:value,alt. -
toString
Prints the immutable valueProfileFieldwith attribute values. -
copyOf
Creates an immutable copy of aProfileFieldIFvalue. 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 ProfileField instance
-
builder
Creates a builder forProfileField.ProfileField.builder() .setValue(String) // requiredvalue.setAlt(Optional<String>) // optionalalt.build();- Returns:
- A new ProfileField builder
-