pub struct Bot { /* private fields */ }Expand description
Represents a Zulip bot.
Modified from openapi-generator-cli output:
$ openapi-generator-cli generate -g rust -i ./zerver/openapi/zulip.yaml -o zulip-openapi --skip-validate-spec/*
* Zulip REST API
*
* Powerful open source group chat
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/See zerver/openapi/zulip.yaml for the original OpenAPI configuration.
Configuration slightly modified to work with the Rust generator of openapi-generator-cli.
Implementations§
Source§impl Bot
impl Bot
Sourcepub fn set_user_id(&mut self, val: u64)
pub fn set_user_id(&mut self, val: u64)
Sets the Bot user_id.
The user ID of the bot.
Sourcepub fn unset_user_id(&mut self) -> Option<u64>
pub fn unset_user_id(&mut self) -> Option<u64>
Unsets the Bot user_id.
The user ID of the bot.
Sourcepub fn with_user_id(self, val: u64) -> Self
pub fn with_user_id(self, val: u64) -> Self
Builder function that sets the Bot user_id.
The user ID of the bot.
Sourcepub const fn default_all_public_streams(&self) -> Option<bool>
pub const fn default_all_public_streams(&self) -> Option<bool>
Gets the Bot default_all_public_streams.
Whether the bot can send messages to all channels by default.
Sourcepub fn set_default_all_public_streams(&mut self, val: bool)
pub fn set_default_all_public_streams(&mut self, val: bool)
Sets the Bot default_all_public_streams.
Whether the bot can send messages to all channels by default.
Sourcepub fn unset_default_all_public_streams(&mut self) -> Option<bool>
pub fn unset_default_all_public_streams(&mut self) -> Option<bool>
Unsets the Bot default_all_public_streams.
Whether the bot can send messages to all channels by default.
Sourcepub fn with_default_all_public_streams(self, val: bool) -> Self
pub fn with_default_all_public_streams(self, val: bool) -> Self
Builder function that sets the Bot default_all_public_streams.
Whether the bot can send messages to all channels by default.
Sourcepub fn set_owner_id(&mut self, val: u64)
pub fn set_owner_id(&mut self, val: u64)
Sourcepub fn unset_owner_id(&mut self) -> Option<u64>
pub fn unset_owner_id(&mut self) -> Option<u64>
Sourcepub fn with_owner_id(self, val: u64) -> Self
pub fn with_owner_id(self, val: u64) -> Self
Builder function that sets the Bot owner_id.
The user ID of the bot’s owner.
If null, the bot has no owner.
Sourcepub const fn bot_type(&self) -> Option<BotType>
pub const fn bot_type(&self) -> Option<BotType>
Gets the Bot bot_type.
An integer describing the type of bot.
Sourcepub fn set_bot_type(&mut self, val: BotType)
pub fn set_bot_type(&mut self, val: BotType)
Sets the Bot bot_type.
An integer describing the type of bot.
Sourcepub fn unset_bot_type(&mut self) -> Option<BotType>
pub fn unset_bot_type(&mut self) -> Option<BotType>
Unsets the Bot bot_type.
An integer describing the type of bot.
Sourcepub fn with_bot_type(self, val: BotType) -> Self
pub fn with_bot_type(self, val: BotType) -> Self
Builder function that sets the Bot bot_type.
An integer describing the type of bot.
Sourcepub const fn is_active(&self) -> Option<bool>
pub const fn is_active(&self) -> Option<bool>
Gets the Bot is_active.
A boolean describing whether the user account has been deactivated.
Sourcepub fn set_is_active(&mut self, val: bool)
pub fn set_is_active(&mut self, val: bool)
Sets the Bot is_active.
A boolean describing whether the user account has been deactivated.
Sourcepub fn unset_is_active(&mut self) -> Option<bool>
pub fn unset_is_active(&mut self) -> Option<bool>
Unsets the Bot is_active.
A boolean describing whether the user account has been deactivated.
Sourcepub fn with_is_active(self, val: bool) -> Self
pub fn with_is_active(self, val: bool) -> Self
Builder function that sets the Bot is_active.
A boolean describing whether the user account has been deactivated.
Source§impl Bot
impl Bot
Sourcepub fn set_full_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_full_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Bot full_name.
The full name of the bot.
Sourcepub fn unset_full_name(&mut self) -> Option<String>
pub fn unset_full_name(&mut self) -> Option<String>
Unsets the Bot full_name.
The full name of the bot.
Sourcepub fn with_full_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_full_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Bot full_name.
The full name of the bot.
Sourcepub fn api_key(&self) -> Option<&str>
pub fn api_key(&self) -> Option<&str>
Gets the Bot api_key.
The API key of the bot which it uses to make API requests.
Sourcepub fn set_api_key<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_api_key<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Bot api_key.
The API key of the bot which it uses to make API requests.
Sourcepub fn unset_api_key(&mut self) -> Option<String>
pub fn unset_api_key(&mut self) -> Option<String>
Unsets the Bot api_key.
The API key of the bot which it uses to make API requests.
Sourcepub fn with_api_key<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_api_key<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Bot api_key.
The API key of the bot which it uses to make API requests.
Sourcepub fn default_sending_stream(&self) -> Option<&str>
pub fn default_sending_stream(&self) -> Option<&str>
Gets the Bot default_sending_stream.
The default sending channel of the bot. If null, the bot doesn’t have a default sending channel.
Sourcepub fn set_default_sending_stream<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_default_sending_stream<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Bot default_sending_stream.
The default sending channel of the bot. If null, the bot doesn’t have a default sending channel.
Sourcepub fn unset_default_sending_stream(&mut self) -> Option<String>
pub fn unset_default_sending_stream(&mut self) -> Option<String>
Unsets the Bot default_sending_stream.
The default sending channel of the bot. If null, the bot doesn’t have a default sending channel.
Sourcepub fn with_default_sending_stream<'a, C: Into<Cow<'a, str>>>(
self,
val: C,
) -> Self
pub fn with_default_sending_stream<'a, C: Into<Cow<'a, str>>>( self, val: C, ) -> Self
Builder function that sets the Bot default_sending_stream.
The default sending channel of the bot. If null, the bot doesn’t have a default sending channel.
Sourcepub fn default_events_register_stream(&self) -> Option<&str>
pub fn default_events_register_stream(&self) -> Option<&str>
Gets the Bot default_events_register_stream.
The default channel for which the bot receives events/register data.
If null, the bot doesn’t have such a default channel.
Sourcepub fn set_default_events_register_stream<'a, C: Into<Cow<'a, str>>>(
&mut self,
val: C,
)
pub fn set_default_events_register_stream<'a, C: Into<Cow<'a, str>>>( &mut self, val: C, )
Sets the Bot default_events_register_stream.
The default channel for which the bot receives events/register data.
If null, the bot doesn’t have such a default channel.
Sourcepub fn unset_default_events_register_stream(&mut self) -> Option<String>
pub fn unset_default_events_register_stream(&mut self) -> Option<String>
Unsets the Bot default_events_register_stream.
The default channel for which the bot receives events/register data.
If null, the bot doesn’t have such a default channel.
Sourcepub fn with_default_events_register_stream<'a, C: Into<Cow<'a, str>>>(
self,
val: C,
) -> Self
pub fn with_default_events_register_stream<'a, C: Into<Cow<'a, str>>>( self, val: C, ) -> Self
Builder function that sets the Bot default_events_register_stream.
The default channel for which the bot receives events/register data.
If null, the bot doesn’t have such a default channel.
Sourcepub fn avatar_url(&self) -> Option<&str>
pub fn avatar_url(&self) -> Option<&str>
Gets the Bot avatar_url.
The URL of the bot’s avatar.
Sourcepub fn set_avatar_url<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_avatar_url<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Bot avatar_url.
The URL of the bot’s avatar.
Sourcepub fn unset_avatar_url(&mut self) -> Option<String>
pub fn unset_avatar_url(&mut self) -> Option<String>
Unsets the Bot avatar_url.
The URL of the bot’s avatar.
Sourcepub fn with_avatar_url<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_avatar_url<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Bot avatar_url.
The URL of the bot’s avatar.
Sourcepub fn services(&self) -> Option<&[BotService]>
pub fn services(&self) -> Option<&[BotService]>
Gets the Bot services.
An array containing extra configuration fields only relevant for
outgoing webhook bots and embedded bots. This is always a single-element
array.
We consider this part of the Zulip API to be unstable; it is used only
for UI elements for administering bots and is likely to change.
Sourcepub fn set_services<'a, C: Into<Cow<'a, [BotService]>>>(&mut self, val: C)
pub fn set_services<'a, C: Into<Cow<'a, [BotService]>>>(&mut self, val: C)
Sets the Bot services.
An array containing extra configuration fields only relevant for
outgoing webhook bots and embedded bots. This is always a single-element
array.
We consider this part of the Zulip API to be unstable; it is used only
for UI elements for administering bots and is likely to change.
Sourcepub fn unset_services(&mut self) -> Option<Vec<BotService>>
pub fn unset_services(&mut self) -> Option<Vec<BotService>>
Unsets the Bot services.
An array containing extra configuration fields only relevant for
outgoing webhook bots and embedded bots. This is always a single-element
array.
We consider this part of the Zulip API to be unstable; it is used only
for UI elements for administering bots and is likely to change.
Sourcepub fn with_services<'a, C: Into<Cow<'a, [BotService]>>>(self, val: C) -> Self
pub fn with_services<'a, C: Into<Cow<'a, [BotService]>>>(self, val: C) -> Self
Builder function that sets the Bot services.
An array containing extra configuration fields only relevant for
outgoing webhook bots and embedded bots. This is always a single-element
array.
We consider this part of the Zulip API to be unstable; it is used only
for UI elements for administering bots and is likely to change.
Sourcepub fn set_email<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_email<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Bot email.
The email of the bot.
Sourcepub fn unset_email(&mut self) -> Option<String>
pub fn unset_email(&mut self) -> Option<String>
Unsets the Bot email.
The email of the bot.