messaging_api_line/models/
test_webhook_endpoint_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 TestWebhookEndpointResponse {
16    /// Result of the communication from the LINE platform to the webhook URL.
17    #[serde(rename = "success", skip_serializing_if = "Option::is_none")]
18    pub success: Option<bool>,
19    /// Time of the event in milliseconds. Even in the case of a redelivered webhook, it represents the time the event occurred, not the time it was redelivered. 
20    #[serde(rename = "timestamp")]
21    pub timestamp: String,
22    /// The HTTP status code. If the webhook response isn't received, the status code is set to zero or a negative number.
23    #[serde(rename = "statusCode")]
24    pub status_code: i32,
25    /// Reason for the response.
26    #[serde(rename = "reason")]
27    pub reason: String,
28    /// Details of the response.
29    #[serde(rename = "detail")]
30    pub detail: String,
31}
32
33impl TestWebhookEndpointResponse {
34    pub fn new(timestamp: String, status_code: i32, reason: String, detail: String) -> TestWebhookEndpointResponse {
35        TestWebhookEndpointResponse {
36            success: None,
37            timestamp,
38            status_code,
39            reason,
40            detail,
41        }
42    }
43}
44