Class UrlSource
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.UrlSource
- All Implemented Interfaces:
BlockElement,UrlSourceIF
@Generated(from="UrlSourceIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class UrlSource
extends Object
implements UrlSourceIF
Slack's URL source element displays a URL source for referencing within a task card block.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.UrlSourceIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic UrlSource.Builderbuilder()Creates a builder forUrlSource.static UrlSourcecopyOf(UrlSourceIF instance) Creates an immutable copy of aUrlSourceIFvalue.booleanThis instance is equal to all instances ofUrlSourcethat have equal attribute values.getText()getType()getUrl()inthashCode()Computes a hash code from attributes:type,url,text.static UrlSourceConstruct a new immutableUrlSourceinstance.toString()Prints the immutable valueUrlSourcewith attribute values.final UrlSourceCopy the current immutable object by setting a value for thetextattribute.final UrlSourceCopy the current immutable object by setting a value for theurlattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceUrlSourceIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getUrl
- Specified by:
getUrlin interfaceUrlSourceIF- Returns:
- The value of the
urlattribute
-
getText
- Specified by:
getTextin interfaceUrlSourceIF- Returns:
- The value of the
textattribute
-
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
-
withText
Copy the current immutable object by setting a value for thetextattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for text- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofUrlSourcethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,url,text. -
toString
Prints the immutable valueUrlSourcewith attribute values. -
of
Construct a new immutableUrlSourceinstance.- Parameters:
url- The value for theurlattributetext- The value for thetextattribute- Returns:
- An immutable UrlSource instance
-
copyOf
Creates an immutable copy of aUrlSourceIFvalue. 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 UrlSource instance
-
builder
Creates a builder forUrlSource.UrlSource.builder() .setUrl(String) // requiredurl.setText(String) // requiredtext.build();- Returns:
- A new UrlSource builder
-