Class FullSizePreview.Builder
java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.entity.fullsizepreview.FullSizePreview.Builder
- Enclosing class:
FullSizePreview
@Generated(from="FullSizePreviewIF",
generator="Immutables")
@NotThreadSafe
public static final class FullSizePreview.Builder
extends Object
Builds instances of type
FullSizePreview.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newFullSizePreview.final FullSizePreview.Builderfrom(FullSizePreviewIF instance) Fill a builder with attribute values from the providedFullSizePreviewIFinstance.final FullSizePreview.BuildersetError(FullSizePreviewError error) Initializes the optional valueerrorto error.final FullSizePreview.BuildersetError(Optional<? extends FullSizePreviewError> error) Initializes the optional valueerrorto error.final FullSizePreview.BuildersetMimeType(String mimeType) Initializes the optional valuemimeTypeto mimeType.final FullSizePreview.BuildersetMimeType(Optional<String> mimeType) Initializes the optional valuemimeTypeto mimeType.final FullSizePreview.BuildersetPreviewUrl(String previewUrl) Initializes the optional valuepreviewUrlto previewUrl.final FullSizePreview.BuildersetPreviewUrl(Optional<String> previewUrl) Initializes the optional valuepreviewUrlto previewUrl.final FullSizePreview.BuildersetSupported(boolean supported) Initializes the value for thesupportedattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedFullSizePreviewIFinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setSupported
Initializes the value for thesupportedattribute.- Parameters:
supported- The value for supported- Returns:
thisbuilder for use in a chained invocation
-
setPreviewUrl
Initializes the optional valuepreviewUrlto previewUrl.- Parameters:
previewUrl- The value for previewUrl,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setPreviewUrl
Initializes the optional valuepreviewUrlto previewUrl.- Parameters:
previewUrl- The value for previewUrl- Returns:
thisbuilder for use in a chained invocation
-
setMimeType
Initializes the optional valuemimeTypeto mimeType.- Parameters:
mimeType- The value for mimeType,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setMimeType
Initializes the optional valuemimeTypeto mimeType.- Parameters:
mimeType- The value for mimeType- Returns:
thisbuilder for use in a chained invocation
-
setError
Initializes the optional valueerrorto error.- Parameters:
error- The value for error,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setError
Initializes the optional valueerrorto error.- Parameters:
error- The value for error- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newFullSizePreview.- Returns:
- An immutable instance of FullSizePreview
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-