Class FullSizePreview
java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.entity.fullsizepreview.FullSizePreview
- All Implemented Interfaces:
FullSizePreviewIF
@Generated(from="FullSizePreviewIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class FullSizePreview
extends Object
implements FullSizePreviewIF
Immutable implementation of
FullSizePreviewIF.
Use the builder to create immutable instances:
FullSizePreview.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic FullSizePreview.Builderbuilder()Creates a builder forFullSizePreview.static FullSizePreviewcopyOf(FullSizePreviewIF instance) Creates an immutable copy of aFullSizePreviewIFvalue.booleanThis instance is equal to all instances ofFullSizePreviewthat have equal attribute values.getError()inthashCode()Computes a hash code from attributes:supported,previewUrl,mimeType,error.booleantoString()Prints the immutable valueFullSizePreviewwith attribute values.final FullSizePreviewwithError(FullSizePreviewError value) Copy the current immutable object by setting a present value for the optionalerrorattribute.final FullSizePreviewwithError(Optional<? extends FullSizePreviewError> optional) Copy the current immutable object by setting an optional value for theerrorattribute.final FullSizePreviewwithMimeType(String value) Copy the current immutable object by setting a present value for the optionalmimeTypeattribute.final FullSizePreviewwithMimeType(Optional<String> optional) Copy the current immutable object by setting an optional value for themimeTypeattribute.final FullSizePreviewwithPreviewUrl(String value) Copy the current immutable object by setting a present value for the optionalpreviewUrlattribute.final FullSizePreviewwithPreviewUrl(Optional<String> optional) Copy the current immutable object by setting an optional value for thepreviewUrlattribute.final FullSizePreviewwithSupported(boolean value) Copy the current immutable object by setting a value for thesupportedattribute.
-
Method Details
-
isSupported
public boolean isSupported()- Specified by:
isSupportedin interfaceFullSizePreviewIF- Returns:
- The value of the
supportedattribute
-
getPreviewUrl
- Specified by:
getPreviewUrlin interfaceFullSizePreviewIF- Returns:
- The value of the
previewUrlattribute
-
getMimeType
- Specified by:
getMimeTypein interfaceFullSizePreviewIF- Returns:
- The value of the
mimeTypeattribute
-
getError
- Specified by:
getErrorin interfaceFullSizePreviewIF- Returns:
- The value of the
errorattribute
-
withSupported
Copy the current immutable object by setting a value for thesupportedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for supported- Returns:
- A modified copy or the
thisobject
-
withPreviewUrl
Copy the current immutable object by setting a present value for the optionalpreviewUrlattribute.- Parameters:
value- The value for previewUrl,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withPreviewUrl
Copy the current immutable object by setting an optional value for thepreviewUrlattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for previewUrl- Returns:
- A modified copy or
thisif not changed
-
withMimeType
Copy the current immutable object by setting a present value for the optionalmimeTypeattribute.- Parameters:
value- The value for mimeType,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withMimeType
Copy the current immutable object by setting an optional value for themimeTypeattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for mimeType- Returns:
- A modified copy or
thisif not changed
-
withError
Copy the current immutable object by setting a present value for the optionalerrorattribute.- Parameters:
value- The value for error,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withError
Copy the current immutable object by setting an optional value for theerrorattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for error- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofFullSizePreviewthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:supported,previewUrl,mimeType,error. -
toString
Prints the immutable valueFullSizePreviewwith attribute values. -
copyOf
Creates an immutable copy of aFullSizePreviewIFvalue. 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 FullSizePreview instance
-
builder
Creates a builder forFullSizePreview.FullSizePreview.builder() .setSupported(boolean) // requiredsupported.setPreviewUrl(Optional<String>) // optionalpreviewUrl.setMimeType(Optional<String>) // optionalmimeType.setError(Optional<FullSizePreviewError>) // optionalerror.build();- Returns:
- A new FullSizePreview builder
-