insight_line/models/
error_response.rs

1/*
2 * LINE Messaging API(Insight)
3 *
4 * This document describes LINE Messaging API(Insight).
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}
23
24impl ErrorResponse {
25    pub fn new(message: String) -> ErrorResponse {
26        ErrorResponse {
27            message,
28            details: None,
29        }
30    }
31}
32