line_bot_sdk_rust/line_module/models/module_bot.rs
1/*
2* Copyright (C) 2016 LINE Corp.
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*/
16
17/*
18 * LINE Messaging API
19 *
20 * This document describes LINE Messaging API.
21 *
22 * The version of the OpenAPI document: 0.0.1
23 *
24 * Generated by: https://openapi-generator.tech
25 */
26
27use crate::line_module::models;
28use serde::{Deserialize, Serialize};
29
30/// ModuleBot : basic information about the bot.
31#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
32pub struct ModuleBot {
33 /// Bot's user ID
34 #[serde(rename = "userId")]
35 pub user_id: String,
36 /// Bot's basic ID
37 #[serde(rename = "basicId")]
38 pub basic_id: String,
39 /// Bot's premium ID. Not included in the response if the premium ID isn't set.
40 #[serde(rename = "premiumId", skip_serializing_if = "Option::is_none")]
41 pub premium_id: Option<String>,
42 /// Bot's display name
43 #[serde(rename = "displayName")]
44 pub display_name: String,
45 /// Profile image URL. Image URL starting with `https://`. Not included in the response if the bot doesn't have a profile image.
46 #[serde(rename = "pictureUrl", skip_serializing_if = "Option::is_none")]
47 pub picture_url: Option<String>,
48}
49
50impl ModuleBot {
51 /// basic information about the bot.
52 pub fn new(user_id: String, basic_id: String, display_name: String) -> ModuleBot {
53 ModuleBot {
54 user_id,
55 basic_id,
56 premium_id: None,
57 display_name,
58 picture_url: None,
59 }
60 }
61}