pub struct VideoBlockBuilder { /* private fields */ }Expand description
Consuming builder for VideoBlock. Validation runs in Self::build.
Implementations§
Source§impl VideoBlockBuilder
impl VideoBlockBuilder
Sourcepub fn alt_text(self, value: impl Into<String>) -> Self
pub fn alt_text(self, value: impl Into<String>) -> Self
Sets a plain-text summary of the image or video for assistive technology.
Sourcepub fn thumbnail_url(self, value: impl Into<String>) -> Self
pub fn thumbnail_url(self, value: impl Into<String>) -> Self
Sets the URL of the image shown before the video plays.
Sourcepub fn title(self, value: impl Into<PlainTextInput>) -> Self
pub fn title(self, value: impl Into<PlainTextInput>) -> Self
Sets the video title.
Sourcepub fn video_url(self, value: impl Into<String>) -> Self
pub fn video_url(self, value: impl Into<String>) -> Self
Sets the embeddable URL of the video. The domain must be listed in the app’s unfurl domains.
Sourcepub fn block_id(self, value: impl Into<String>) -> Self
pub fn block_id(self, value: impl Into<String>) -> Self
Sets a unique identifier for this block. Slack returns it in interaction payloads, so use a stable value when you need to find the block again.
Sourcepub fn clear_block_id(self) -> Self
pub fn clear_block_id(self) -> Self
Omits block_id, including any model default.
Sets the name of the video’s author.
Omits author_name, including any model default.
Sourcepub fn description(self, value: impl Into<PlainTextInput>) -> Self
pub fn description(self, value: impl Into<PlainTextInput>) -> Self
Sets the video description.
Sourcepub fn clear_description(self) -> Self
pub fn clear_description(self) -> Self
Omits description, including any model default.
Sourcepub fn provider_icon_url(self, value: impl Into<String>) -> Self
pub fn provider_icon_url(self, value: impl Into<String>) -> Self
Sets the URL of the video provider’s icon.
Sourcepub fn clear_provider_icon_url(self) -> Self
pub fn clear_provider_icon_url(self) -> Self
Omits provider_icon_url, including any model default.
Sourcepub fn provider_name(self, value: impl Into<String>) -> Self
pub fn provider_name(self, value: impl Into<String>) -> Self
Sets the name of the video provider, such as YouTube.
Sourcepub fn clear_provider_name(self) -> Self
pub fn clear_provider_name(self) -> Self
Omits provider_name, including any model default.
Sourcepub fn title_url(self, value: impl Into<String>) -> Self
pub fn title_url(self, value: impl Into<String>) -> Self
Sets the HTTPS URL opened when the title is clicked.
Sourcepub fn clear_title_url(self) -> Self
pub fn clear_title_url(self) -> Self
Omits title_url, including any model default.
Sourcepub fn extension(self, key: impl Into<String>, value: impl Into<Value>) -> Self
pub fn extension(self, key: impl Into<String>, value: impl Into<Value>) -> Self
Adds or replaces an unmodeled extension; reserved names fail at build time.
Sourcepub fn build(self) -> Result<VideoBlock, ValidationError>
pub fn build(self) -> Result<VideoBlock, ValidationError>
Validates all fields and their receiving context.
§Errors
Returns a ValidationError for missing fields, invalid values, reserved
extension names, or unsupported field combinations and child contexts.