Class WorkObject
java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.WorkObject
- All Implemented Interfaces:
WorkObjectBase,WorkObjectIF
@Generated(from="WorkObjectIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class WorkObject
extends Object
implements WorkObjectIF
Immutable implementation of
WorkObjectIF.
Use the builder to create immutable instances:
WorkObject.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkObject.Builderbuilder()Creates a builder forWorkObject.static WorkObjectcopyOf(WorkObjectIF instance) Creates an immutable copy of aWorkObjectIFvalue.booleanThis instance is equal to all instances ofWorkObjectthat have equal attribute values.getUrl()inthashCode()Computes a hash code from attributes:entityType,entityPayload,url,externalRef,appUnfurlUrl.toString()Prints the immutable valueWorkObjectwith attribute values.final WorkObjectwithAppUnfurlUrl(String value) Copy the current immutable object by setting a value for theappUnfurlUrlattribute.final WorkObjectwithEntityPayload(EntityPayload value) Copy the current immutable object by setting a value for theentityPayloadattribute.final WorkObjectwithEntityType(EntityType value) Copy the current immutable object by setting a value for theentityTypeattribute.final WorkObjectwithExternalRef(ExternalRef value) Copy the current immutable object by setting a value for theexternalRefattribute.final WorkObjectCopy the current immutable object by setting a value for theurlattribute.
-
Method Details
-
getEntityType
- Specified by:
getEntityTypein interfaceWorkObjectBase- Returns:
- The value of the
entityTypeattribute
-
getEntityPayload
- Specified by:
getEntityPayloadin interfaceWorkObjectBase- Returns:
- The value of the
entityPayloadattribute
-
getUrl
- Specified by:
getUrlin interfaceWorkObjectBase- Returns:
- The value of the
urlattribute
-
getExternalRef
- Specified by:
getExternalRefin interfaceWorkObjectBase- Returns:
- The value of the
externalRefattribute
-
getAppUnfurlUrl
- Specified by:
getAppUnfurlUrlin interfaceWorkObjectIF- Returns:
- The value of the
appUnfurlUrlattribute
-
withEntityType
Copy the current immutable object by setting a value for theentityTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for entityType- Returns:
- A modified copy or the
thisobject
-
withEntityPayload
Copy the current immutable object by setting a value for theentityPayloadattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for entityPayload- Returns:
- A modified copy or the
thisobject
-
withUrl
Copy the current immutable object by setting a value for theurlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for url- Returns:
- A modified copy or the
thisobject
-
withExternalRef
Copy the current immutable object by setting a value for theexternalRefattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for externalRef- Returns:
- A modified copy or the
thisobject
-
withAppUnfurlUrl
Copy the current immutable object by setting a value for theappUnfurlUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for appUnfurlUrl- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofWorkObjectthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:entityType,entityPayload,url,externalRef,appUnfurlUrl. -
toString
Prints the immutable valueWorkObjectwith attribute values. -
copyOf
Creates an immutable copy of aWorkObjectIFvalue. 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 WorkObject instance
-
builder
Creates a builder forWorkObject.WorkObject.builder() .setEntityType(com.hubspot.slack.client.methods.params.chat.workobject.EntityType) // requiredentityType.setEntityPayload(com.hubspot.slack.client.methods.params.chat.workobject.entity.EntityPayload) // requiredentityPayload.setUrl(String) // requiredurl.setExternalRef(com.hubspot.slack.client.methods.params.chat.workobject.ExternalRef) // requiredexternalRef.setAppUnfurlUrl(String) // requiredappUnfurlUrl.build();- Returns:
- A new WorkObject builder
-