module_line/models/
module_bot.rs

1/*
2 * LINE Messaging API
3 *
4 * This document describes LINE Messaging API.
5 *
6 * The version of the OpenAPI document: 0.0.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ModuleBot : basic information about the bot.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ModuleBot {
17    /// Bot's user ID
18    #[serde(rename = "userId")]
19    pub user_id: String,
20    /// Bot's basic ID
21    #[serde(rename = "basicId")]
22    pub basic_id: String,
23    /// Bot's premium ID. Not included in the response if the premium ID isn't set.
24    #[serde(rename = "premiumId", skip_serializing_if = "Option::is_none")]
25    pub premium_id: Option<String>,
26    /// Bot's display name
27    #[serde(rename = "displayName")]
28    pub display_name: String,
29    /// Profile image URL. Image URL starting with `https://`. Not included in the response if the bot doesn't have a profile image.
30    #[serde(rename = "pictureUrl", skip_serializing_if = "Option::is_none")]
31    pub picture_url: Option<String>,
32}
33
34impl ModuleBot {
35    /// basic information about the bot.
36    pub fn new(user_id: String, basic_id: String, display_name: String) -> ModuleBot {
37        ModuleBot {
38            user_id,
39            basic_id,
40            premium_id: None,
41            display_name,
42            picture_url: None,
43        }
44    }
45}
46