messaging_api_line/models/rich_menu_batch_link_operation.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/// RichMenuBatchLinkOperation : Replace the rich menu with the rich menu specified in the `to` property for all users linked to the rich menu specified in the `from` property.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RichMenuBatchLinkOperation {
17 /// The type of operation to the rich menu linked to the user. One of link, unlink, or unlinkAll.
18 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
19 pub r#type: Option<String>,
20 #[serde(rename = "from")]
21 pub from: String,
22 #[serde(rename = "to")]
23 pub to: String,
24}
25
26impl RichMenuBatchLinkOperation {
27 /// Replace the rich menu with the rich menu specified in the `to` property for all users linked to the rich menu specified in the `from` property.
28 pub fn new(r#type: String, from: String, to: String) -> RichMenuBatchLinkOperation {
29 RichMenuBatchLinkOperation {
30 r#type: Some(r#type),
31 from,
32 to,
33 }
34 }
35}