Package com.hubspot.slack.client.models
Class Field
java.lang.Object
com.hubspot.slack.client.models.Field
- All Implemented Interfaces:
FieldIF
@Generated(from="FieldIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Field
extends Object
implements FieldIF
Immutable implementation of
FieldIF.
Use the builder to create immutable instances:
Field.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Field.Builderbuilder()Creates a builder forField.static FieldCreates an immutable copy of aFieldIFvalue.booleanThis instance is equal to all instances ofFieldthat have equal attribute values.getTitle()getValue()inthashCode()Computes a hash code from attributes:title,value,isShort.booleanisShort()toString()Prints the immutable valueFieldwith attribute values.final FieldwithShort(boolean value) Copy the current immutable object by setting a value for theshortattribute.final FieldCopy the current immutable object by setting a present value for the optionaltitleattribute.final FieldCopy the current immutable object by setting an optional value for thetitleattribute.final FieldCopy the current immutable object by setting a value for thevalueattribute.
-
Method Details
-
getTitle
-
getValue
-
isShort
public boolean isShort() -
withTitle
Copy the current immutable object by setting a present value for the optionaltitleattribute.- Parameters:
value- The value for title,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withTitle
Copy the current immutable object by setting an optional value for thetitleattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for title- Returns:
- A modified copy or
thisif not changed
-
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
-
withShort
Copy the current immutable object by setting a value for theshortattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isShort- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofFieldthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:title,value,isShort. -
toString
Prints the immutable valueFieldwith attribute values. -
copyOf
Creates an immutable copy of aFieldIFvalue. 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 Field instance
-
builder
Creates a builder forField.Field.builder() .setTitle(Optional<String>) // optionaltitle.setValue(String) // requiredvalue.setShort(boolean) // requiredshort.build();- Returns:
- A new Field builder
-