messaging_api_line/models/
error_response.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ErrorResponse {
16    /// Message containing information about the error.
17    #[serde(rename = "message")]
18    pub message: String,
19    /// An array of error details. If the array is empty, this property will not be included in the response.
20    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
21    pub details: Option<Vec<models::ErrorDetail>>,
22    /// Array of sent messages.
23    #[serde(rename = "sentMessages", skip_serializing_if = "Option::is_none")]
24    pub sent_messages: Option<Vec<models::SentMessage>>,
25}
26
27impl ErrorResponse {
28    pub fn new(message: String) -> ErrorResponse {
29        ErrorResponse {
30            message,
31            details: None,
32            sent_messages: None,
33        }
34    }
35}
36