pub struct CrossRealmBot { /* private fields */ }Expand description
Represents the Cross-realm bot field of the response to a Register Zulip API request.
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 CrossRealmBot
impl CrossRealmBot
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new CrossRealmBot.
Source§impl CrossRealmBot
impl CrossRealmBot
Sourcepub const fn user_id(&self) -> Option<u64>
pub const fn user_id(&self) -> Option<u64>
Gets the CrossRealmBot user_id.
The unique ID of the user.
Sourcepub fn set_user_id(&mut self, val: u64)
pub fn set_user_id(&mut self, val: u64)
Sets the CrossRealmBot user_id.
The unique ID of the user.
Sourcepub fn unset_user_id(&mut self) -> Option<u64>
pub fn unset_user_id(&mut self) -> Option<u64>
Unsets the CrossRealmBot user_id.
The unique ID of the user.
Sourcepub fn with_user_id(self, val: u64) -> Self
pub fn with_user_id(self, val: u64) -> Self
Builder function that sets the CrossRealmBot user_id.
The unique ID of the user.
Sourcepub const fn is_active(&self) -> Option<bool>
pub const fn is_active(&self) -> Option<bool>
Gets the CrossRealmBot is_active.
A boolean specifying 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 CrossRealmBot is_active.
A boolean specifying 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 CrossRealmBot is_active.
A boolean specifying 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 CrossRealmBot is_active.
A boolean specifying whether the user account has been deactivated.
Sourcepub const fn is_owner(&self) -> Option<bool>
pub const fn is_owner(&self) -> Option<bool>
Gets the CrossRealmBot is_owner.
A boolean specifying whether the user is an organization owner.
Sourcepub fn set_is_owner(&mut self, val: bool)
pub fn set_is_owner(&mut self, val: bool)
Sets the CrossRealmBot is_owner.
A boolean specifying whether the user is an organization owner.
Sourcepub fn unset_is_owner(&mut self) -> Option<bool>
pub fn unset_is_owner(&mut self) -> Option<bool>
Unsets the CrossRealmBot is_owner.
A boolean specifying whether the user is an organization owner.
Sourcepub fn with_is_owner(self, val: bool) -> Self
pub fn with_is_owner(self, val: bool) -> Self
Builder function that sets the CrossRealmBot is_owner.
A boolean specifying whether the user is an organization owner.
Sourcepub const fn is_admin(&self) -> Option<bool>
pub const fn is_admin(&self) -> Option<bool>
Gets the CrossRealmBot is_admin.
A boolean specifying whether the user is an organization administrator.
Sourcepub fn set_is_admin(&mut self, val: bool)
pub fn set_is_admin(&mut self, val: bool)
Sets the CrossRealmBot is_admin.
A boolean specifying whether the user is an organization administrator.
Sourcepub fn unset_is_admin(&mut self) -> Option<bool>
pub fn unset_is_admin(&mut self) -> Option<bool>
Unsets the CrossRealmBot is_admin.
A boolean specifying whether the user is an organization administrator.
Sourcepub fn with_is_admin(self, val: bool) -> Self
pub fn with_is_admin(self, val: bool) -> Self
Builder function that sets the CrossRealmBot is_admin.
A boolean specifying whether the user is an organization administrator.
Sourcepub const fn is_guest(&self) -> Option<bool>
pub const fn is_guest(&self) -> Option<bool>
Gets the CrossRealmBot is_guest.
A boolean specifying whether the user is a guest user.
Sourcepub fn set_is_guest(&mut self, val: bool)
pub fn set_is_guest(&mut self, val: bool)
Sets the CrossRealmBot is_guest.
A boolean specifying whether the user is a guest user.
Sourcepub fn unset_is_guest(&mut self) -> Option<bool>
pub fn unset_is_guest(&mut self) -> Option<bool>
Unsets the CrossRealmBot is_guest.
A boolean specifying whether the user is a guest user.
Sourcepub fn with_is_guest(self, val: bool) -> Self
pub fn with_is_guest(self, val: bool) -> Self
Builder function that sets the CrossRealmBot is_guest.
A boolean specifying whether the user is a guest user.
Sourcepub const fn is_bot(&self) -> Option<bool>
pub const fn is_bot(&self) -> Option<bool>
Gets the CrossRealmBot is_bot.
A boolean specifying whether the user is a bot or full account.
Sourcepub fn set_is_bot(&mut self, val: bool)
pub fn set_is_bot(&mut self, val: bool)
Sets the CrossRealmBot is_bot.
A boolean specifying whether the user is a bot or full account.
Sourcepub fn unset_is_bot(&mut self) -> Option<bool>
pub fn unset_is_bot(&mut self) -> Option<bool>
Unsets the CrossRealmBot is_bot.
A boolean specifying whether the user is a bot or full account.
Sourcepub fn with_is_bot(self, val: bool) -> Self
pub fn with_is_bot(self, val: bool) -> Self
Builder function that sets the CrossRealmBot is_bot.
A boolean specifying whether the user is a bot or full account.
Sourcepub const fn bot_type(&self) -> Option<BotType>
pub const fn bot_type(&self) -> Option<BotType>
Gets the CrossRealmBot 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 CrossRealmBot 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 CrossRealmBot 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 CrossRealmBot bot_type.
An integer describing the type of bot.
Sourcepub const fn bot_owner_id(&self) -> Option<u64>
pub const fn bot_owner_id(&self) -> Option<u64>
Gets the CrossRealmBot bot_owner_id.
If the user is a bot (i.e. is_bot is true), then bot_owner_id
is the user ID of the bot’s owner (usually, whoever created the bot).
Will be null for legacy bots that do not have an owner.
Changes: New in Zulip 3.0 (feature level 1). In previous
versions, there was a bot_owner field containing the email
address of the bot’s owner.
Sourcepub fn set_bot_owner_id(&mut self, val: u64)
pub fn set_bot_owner_id(&mut self, val: u64)
Sets the CrossRealmBot bot_owner_id.
If the user is a bot (i.e. is_bot is true), then bot_owner_id
is the user ID of the bot’s owner (usually, whoever created the bot).
Will be null for legacy bots that do not have an owner.
Changes: New in Zulip 3.0 (feature level 1). In previous
versions, there was a bot_owner field containing the email
address of the bot’s owner.
Sourcepub fn unset_bot_owner_id(&mut self) -> Option<u64>
pub fn unset_bot_owner_id(&mut self) -> Option<u64>
Unsets the CrossRealmBot bot_owner_id.
If the user is a bot (i.e. is_bot is true), then bot_owner_id
is the user ID of the bot’s owner (usually, whoever created the bot).
Will be null for legacy bots that do not have an owner.
Changes: New in Zulip 3.0 (feature level 1). In previous
versions, there was a bot_owner field containing the email
address of the bot’s owner.
Sourcepub fn with_bot_owner_id(self, val: u64) -> Self
pub fn with_bot_owner_id(self, val: u64) -> Self
Builder function that sets the CrossRealmBot bot_owner_id.
If the user is a bot (i.e. is_bot is true), then bot_owner_id
is the user ID of the bot’s owner (usually, whoever created the bot).
Will be null for legacy bots that do not have an owner.
Changes: New in Zulip 3.0 (feature level 1). In previous
versions, there was a bot_owner field containing the email
address of the bot’s owner.
Sourcepub const fn role(&self) -> Option<Role>
pub const fn role(&self) -> Option<Role>
Gets the CrossRealmBot role.
Organization-level role of the user.
Sourcepub fn set_role(&mut self, val: Role)
pub fn set_role(&mut self, val: Role)
Sets the CrossRealmBot role.
Organization-level role of the user.
Sourcepub fn unset_role(&mut self) -> Option<Role>
pub fn unset_role(&mut self) -> Option<Role>
Unsets the CrossRealmBot role.
Organization-level role of the user.
Sourcepub fn with_role(self, val: Role) -> Self
pub fn with_role(self, val: Role) -> Self
Builder function that sets the CrossRealmBot role.
Organization-level role of the user.
Sourcepub const fn avatar_version(&self) -> Option<u64>
pub const fn avatar_version(&self) -> Option<u64>
Gets the CrossRealmBot avatar_version.
Version for the user’s avatar. Used for cache-busting requests
for the user’s avatar. Clients generally shouldn’t need to use this;
most avatar URLs sent by Zulip will already end with ?v={avatar_version}.
Sourcepub fn set_avatar_version(&mut self, val: u64)
pub fn set_avatar_version(&mut self, val: u64)
Sets the CrossRealmBot avatar_version.
Version for the user’s avatar. Used for cache-busting requests
for the user’s avatar. Clients generally shouldn’t need to use this;
most avatar URLs sent by Zulip will already end with ?v={avatar_version}.
Sourcepub fn unset_avatar_version(&mut self) -> Option<u64>
pub fn unset_avatar_version(&mut self) -> Option<u64>
Unsets the CrossRealmBot avatar_version.
Version for the user’s avatar. Used for cache-busting requests
for the user’s avatar. Clients generally shouldn’t need to use this;
most avatar URLs sent by Zulip will already end with ?v={avatar_version}.
Sourcepub fn with_avatar_version(self, val: u64) -> Self
pub fn with_avatar_version(self, val: u64) -> Self
Builder function that sets the CrossRealmBot avatar_version.
Version for the user’s avatar. Used for cache-busting requests
for the user’s avatar. Clients generally shouldn’t need to use this;
most avatar URLs sent by Zulip will already end with ?v={avatar_version}.
Sourcepub const fn is_system_bot(&self) -> Option<bool>
pub const fn is_system_bot(&self) -> Option<bool>
Gets the CrossRealmBot is_system_bot.
Whether the user is a system bot.
System bots are special bot user accounts that are managed by the system, rather than the organization’s administrators.
Changes: This field was called is_cross_realm_bot before Zulip 5.0 (feature level 83).
Sourcepub fn set_is_system_bot(&mut self, val: bool)
pub fn set_is_system_bot(&mut self, val: bool)
Sets the CrossRealmBot is_system_bot.
Whether the user is a system bot.
System bots are special bot user accounts that are managed by the system, rather than the organization’s administrators.
Changes: This field was called is_cross_realm_bot before Zulip 5.0 (feature level 83).
Sourcepub fn unset_is_system_bot(&mut self) -> Option<bool>
pub fn unset_is_system_bot(&mut self) -> Option<bool>
Unsets the CrossRealmBot is_system_bot.
Whether the user is a system bot.
System bots are special bot user accounts that are managed by the system, rather than the organization’s administrators.
Changes: This field was called is_cross_realm_bot before Zulip 5.0 (feature level 83).
Sourcepub fn with_is_system_bot(self, val: bool) -> Self
pub fn with_is_system_bot(self, val: bool) -> Self
Builder function that sets the CrossRealmBot is_system_bot.
Whether the user is a system bot.
System bots are special bot user accounts that are managed by the system, rather than the organization’s administrators.
Changes: This field was called is_cross_realm_bot before Zulip 5.0 (feature level 83).
Source§impl CrossRealmBot
impl CrossRealmBot
Sourcepub fn delivery_email(&self) -> Option<&str>
pub fn delivery_email(&self) -> Option<&str>
Gets the CrossRealmBot delivery_email.
The user’s real email address. This value will be null if you cannot
access user’s real email address. For bot users, this field is always
set to the real email of the bot, because bot users always have
email_address_visibility set to everyone.
Changes: Prior to Zulip 7.0 (feature level 163), this field was
present only when email_address_visibility was restricted and you had
access to the user’s real email. As of this feature level, this field
is always present, including the case when email_address_visibility
is set to everyone (and therefore not restricted).
Sourcepub fn set_delivery_email<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_delivery_email<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the CrossRealmBot delivery_email.
The user’s real email address. This value will be null if you cannot
access user’s real email address. For bot users, this field is always
set to the real email of the bot, because bot users always have
email_address_visibility set to everyone.
Changes: Prior to Zulip 7.0 (feature level 163), this field was
present only when email_address_visibility was restricted and you had
access to the user’s real email. As of this feature level, this field
is always present, including the case when email_address_visibility
is set to everyone (and therefore not restricted).
Sourcepub fn unset_delivery_email(&mut self) -> Option<String>
pub fn unset_delivery_email(&mut self) -> Option<String>
Unsets the CrossRealmBot delivery_email.
The user’s real email address. This value will be null if you cannot
access user’s real email address. For bot users, this field is always
set to the real email of the bot, because bot users always have
email_address_visibility set to everyone.
Changes: Prior to Zulip 7.0 (feature level 163), this field was
present only when email_address_visibility was restricted and you had
access to the user’s real email. As of this feature level, this field
is always present, including the case when email_address_visibility
is set to everyone (and therefore not restricted).
Sourcepub fn with_delivery_email<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_delivery_email<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the CrossRealmBot delivery_email.
The user’s real email address. This value will be null if you cannot
access user’s real email address. For bot users, this field is always
set to the real email of the bot, because bot users always have
email_address_visibility set to everyone.
Changes: Prior to Zulip 7.0 (feature level 163), this field was
present only when email_address_visibility was restricted and you had
access to the user’s real email. As of this feature level, this field
is always present, including the case when email_address_visibility
is set to everyone (and therefore not restricted).
Sourcepub fn email(&self) -> Option<&str>
pub fn email(&self) -> Option<&str>
Gets the CrossRealmBot email.
The Zulip API email address of the user or bot.
If you do not have permission to view the email address of the target user,
this will be a fake email address that is usable for the Zulip API but nothing else.
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 CrossRealmBot email.
The Zulip API email address of the user or bot.
If you do not have permission to view the email address of the target user,
this will be a fake email address that is usable for the Zulip API but nothing else.
Sourcepub fn unset_email(&mut self) -> Option<String>
pub fn unset_email(&mut self) -> Option<String>
Unsets the CrossRealmBot email.
The Zulip API email address of the user or bot.
If you do not have permission to view the email address of the target user,
this will be a fake email address that is usable for the Zulip API but nothing else.
Sourcepub fn with_email<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_email<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the CrossRealmBot email.
The Zulip API email address of the user or bot.
If you do not have permission to view the email address of the target user,
this will be a fake email address that is usable for the Zulip API but nothing else.
Sourcepub fn full_name(&self) -> Option<&str>
pub fn full_name(&self) -> Option<&str>
Gets the CrossRealmBot full_name.
Full name of the user or bot, used for all display purposes.
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 CrossRealmBot full_name.
Full name of the user or bot, used for all display purposes.
Sourcepub fn unset_full_name(&mut self) -> Option<String>
pub fn unset_full_name(&mut self) -> Option<String>
Unsets the CrossRealmBot full_name.
Full name of the user or bot, used for all display purposes.
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 CrossRealmBot full_name.
Full name of the user or bot, used for all display purposes.
Sourcepub fn date_joined(&self) -> Option<&str>
pub fn date_joined(&self) -> Option<&str>
Gets the CrossRealmBot date_joined.
The time the user account was created.
Sourcepub fn set_date_joined<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_date_joined<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the CrossRealmBot date_joined.
The time the user account was created.
Sourcepub fn unset_date_joined(&mut self) -> Option<String>
pub fn unset_date_joined(&mut self) -> Option<String>
Unsets the CrossRealmBot date_joined.
The time the user account was created.
Sourcepub fn with_date_joined<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_date_joined<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the CrossRealmBot date_joined.
The time the user account was created.
Sourcepub fn timezone(&self) -> Option<&str>
pub fn timezone(&self) -> Option<&str>
Gets the CrossRealmBot timezone.
The IANA identifier of the user’s profile time zone,
which is used primarily to display the user’s local time to other users.
Sourcepub fn set_timezone<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_timezone<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the CrossRealmBot timezone.
The IANA identifier of the user’s profile time zone,
which is used primarily to display the user’s local time to other users.
Sourcepub fn unset_timezone(&mut self) -> Option<String>
pub fn unset_timezone(&mut self) -> Option<String>
Unsets the CrossRealmBot timezone.
The IANA identifier of the user’s profile time zone,
which is used primarily to display the user’s local time to other users.
Sourcepub fn with_timezone<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_timezone<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the CrossRealmBot timezone.
The IANA identifier of the user’s profile time zone,
which is used primarily to display the user’s local time to other users.
Sourcepub fn avatar_url(&self) -> Option<&str>
pub fn avatar_url(&self) -> Option<&str>
Gets the CrossRealmBot avatar_url.
URL for the user’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 CrossRealmBot avatar_url.
URL for the user’s avatar.
Sourcepub fn unset_avatar_url(&mut self) -> Option<String>
pub fn unset_avatar_url(&mut self) -> Option<String>
Unsets the CrossRealmBot avatar_url.
URL for the user’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 CrossRealmBot avatar_url.
URL for the user’s avatar.
Source§impl CrossRealmBot
impl CrossRealmBot
Sourcepub fn profile_data(&self) -> Option<&ProfileData>
pub fn profile_data(&self) -> Option<&ProfileData>
Gets the CrossRealmBot profile_data.
A dictionary containing the updated custom profile field data for the user.
Sourcepub fn set_profile_data<'a, C: Into<Cow<'a, ProfileData>>>(&mut self, val: C)
pub fn set_profile_data<'a, C: Into<Cow<'a, ProfileData>>>(&mut self, val: C)
Sets the CrossRealmBot profile_data.
A dictionary containing the updated custom profile field data for the user.
Sourcepub fn unset_profile_data(&mut self) -> Option<ProfileData>
pub fn unset_profile_data(&mut self) -> Option<ProfileData>
Unsets the CrossRealmBot profile_data.
A dictionary containing the updated custom profile field data for the user.
Sourcepub fn with_profile_data<'a, C: Into<Cow<'a, ProfileData>>>(
self,
val: C,
) -> Self
pub fn with_profile_data<'a, C: Into<Cow<'a, ProfileData>>>( self, val: C, ) -> Self
Builder function that sets the CrossRealmBot profile_data.
A dictionary containing the updated custom profile field data for the user.