line_bot_sdk_rust/line_module/models/acquire_chat_control_request.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/// AcquireChatControlRequest : Request entity of the Acquire Control API
31#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
32pub struct AcquireChatControlRequest {
33 /// `True`: After the time limit (ttl) has passed, the initiative (Chat Control) will return to the Primary Channel. (Default) `False`: There's no time limit and the initiative (Chat Control) doesn't change over time.
34 #[serde(rename = "expired", skip_serializing_if = "Option::is_none")]
35 pub expired: Option<bool>,
36 /// The time it takes for initiative (Chat Control) to return to the Primary Channel (the time that the module channel stays on the Active Channel). The value is specified in seconds. The maximum value is one year (3600 * 24 * 365). The default value is 3600 (1 hour). * Ignored if the value of expired is false.
37 #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")]
38 pub ttl: Option<i32>,
39}
40
41impl AcquireChatControlRequest {
42 /// Request entity of the Acquire Control API
43 pub fn new() -> AcquireChatControlRequest {
44 AcquireChatControlRequest {
45 expired: None,
46 ttl: None,
47 }
48 }
49}