Skip to main content

CrossRealmBot

Struct CrossRealmBot 

Source
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

Source

pub const fn new() -> Self

Creates a new CrossRealmBot.

Source§

impl CrossRealmBot

Source

pub const fn user_id(&self) -> Option<u64>

Gets the CrossRealmBot user_id.

The unique ID of the user.

Source

pub fn set_user_id(&mut self, val: u64)

Sets the CrossRealmBot user_id.

The unique ID of the user.

Source

pub fn unset_user_id(&mut self) -> Option<u64>

Unsets the CrossRealmBot user_id.

The unique ID of the user.

Source

pub fn with_user_id(self, val: u64) -> Self

Builder function that sets the CrossRealmBot user_id.

The unique ID of the user.

Source

pub const fn is_active(&self) -> Option<bool>

Gets the CrossRealmBot is_active.

A boolean specifying whether the user account has been deactivated.

Source

pub fn set_is_active(&mut self, val: bool)

Sets the CrossRealmBot is_active.

A boolean specifying whether the user account has been deactivated.

Source

pub fn unset_is_active(&mut self) -> Option<bool>

Unsets the CrossRealmBot is_active.

A boolean specifying whether the user account has been deactivated.

Source

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.

Source

pub const fn is_owner(&self) -> Option<bool>

Gets the CrossRealmBot is_owner.

A boolean specifying whether the user is an organization owner.

Source

pub fn set_is_owner(&mut self, val: bool)

Sets the CrossRealmBot is_owner.

A boolean specifying whether the user is an organization owner.

Source

pub fn unset_is_owner(&mut self) -> Option<bool>

Unsets the CrossRealmBot is_owner.

A boolean specifying whether the user is an organization owner.

Source

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.

Source

pub const fn is_admin(&self) -> Option<bool>

Gets the CrossRealmBot is_admin.

A boolean specifying whether the user is an organization administrator.

Source

pub fn set_is_admin(&mut self, val: bool)

Sets the CrossRealmBot is_admin.

A boolean specifying whether the user is an organization administrator.

Source

pub fn unset_is_admin(&mut self) -> Option<bool>

Unsets the CrossRealmBot is_admin.

A boolean specifying whether the user is an organization administrator.

Source

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.

Source

pub const fn is_guest(&self) -> Option<bool>

Gets the CrossRealmBot is_guest.

A boolean specifying whether the user is a guest user.

Source

pub fn set_is_guest(&mut self, val: bool)

Sets the CrossRealmBot is_guest.

A boolean specifying whether the user is a guest user.

Source

pub fn unset_is_guest(&mut self) -> Option<bool>

Unsets the CrossRealmBot is_guest.

A boolean specifying whether the user is a guest user.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub const fn bot_type(&self) -> Option<BotType>

Gets the CrossRealmBot bot_type.

An integer describing the type of bot.

Source

pub fn set_bot_type(&mut self, val: BotType)

Sets the CrossRealmBot bot_type.

An integer describing the type of bot.

Source

pub fn unset_bot_type(&mut self) -> Option<BotType>

Unsets the CrossRealmBot bot_type.

An integer describing the type of bot.

Source

pub fn with_bot_type(self, val: BotType) -> Self

Builder function that sets the CrossRealmBot bot_type.

An integer describing the type of bot.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub const fn role(&self) -> Option<Role>

Gets the CrossRealmBot role.

Organization-level role of the user.

Source

pub fn set_role(&mut self, val: Role)

Sets the CrossRealmBot role.

Organization-level role of the user.

Source

pub fn unset_role(&mut self) -> Option<Role>

Unsets the CrossRealmBot role.

Organization-level role of the user.

Source

pub fn with_role(self, val: Role) -> Self

Builder function that sets the CrossRealmBot role.

Organization-level role of the user.

Source

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}.

Source

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}.

Source

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}.

Source

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}.

Source

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).

Source

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).

Source

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).

Source

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

Source

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).

Source

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).

Source

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).

Source

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).

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn full_name(&self) -> Option<&str>

Gets the CrossRealmBot full_name.

Full name of the user or bot, used for all display purposes.

Source

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.

Source

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.

Source

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.

Source

pub fn date_joined(&self) -> Option<&str>

Gets the CrossRealmBot date_joined.

The time the user account was created.

Source

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.

Source

pub fn unset_date_joined(&mut self) -> Option<String>

Unsets the CrossRealmBot date_joined.

The time the user account was created.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn avatar_url(&self) -> Option<&str>

Gets the CrossRealmBot avatar_url.

URL for the user’s avatar.

Source

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.

Source

pub fn unset_avatar_url(&mut self) -> Option<String>

Unsets the CrossRealmBot avatar_url.

URL for the user’s avatar.

Source

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

Source

pub fn profile_data(&self) -> Option<&ProfileData>

Gets the CrossRealmBot profile_data.

A dictionary containing the updated custom profile field data for the user.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for CrossRealmBot

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CrossRealmBot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CrossRealmBot

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CrossRealmBot

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for CrossRealmBot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for CrossRealmBot

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for CrossRealmBot

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CrossRealmBot

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more