rusttwald/models/
extension_dry_run_webhook_200_response.rs

1/*
2 * Mittwald API
3 *
4 * ## Introduction  This OpenAPI spec documents the mittwald API. It follows the [OpenAPI 3.0.0 specification](https://spec.openapis.org/oas/v3.0.0.html).  ## Authentication  You will need an API token to access the API. You can obtain one by logging into the [mStudio](https://studio.mittwald.de) and navigating to the [\"API Tokens\" section in the user menu](https://studio.mittwald.de/app/profile/api-tokens).  When making requests to the API, you can authenticate by passing your API token in the `X-Access-Token` header or as a bearer token.  ## Rate Limiting  Please note that usage of the API is rate-limited to prevent abuse. You can inspect the rate limiting for your current user by observing the `X-Ratelimit-*` headers included in each response.  ## mStudio  A main consumer of the mittwald API is the management interface for our customers, the [mStudio](https://studio.mittwald.de).  ## Contact and support  For support, please use the [mStudio support area](https://studio.mittwald.de/app/support/conversations) or drop us an email at [support@mittwald.de](mailto:support@mittwald.de).  For security issues, please report to [security@mittwald.de](mailto:security@mittwald.de). 
5 *
6 * The version of the OpenAPI document: 2.0
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 ExtensionDryRunWebhook200Response {
16    /// The error message of an internal error.
17    #[serde(rename = "errorMessage", skip_serializing_if = "Option::is_none")]
18    pub error_message: Option<String>,
19    #[serde(rename = "responseBody", skip_serializing_if = "Option::is_none")]
20    pub response_body: Option<String>,
21    /// The http status code that the external application responded with.
22    #[serde(rename = "responseCode", skip_serializing_if = "Option::is_none")]
23    pub response_code: Option<f64>,
24    #[serde(rename = "responseHeaders", skip_serializing_if = "Option::is_none")]
25    pub response_headers: Option<String>,
26    #[serde(rename = "routeCalled")]
27    pub route_called: String,
28    /// This shows if the response of the external application has been accepted as successful.
29    #[serde(rename = "successful")]
30    pub successful: bool,
31}
32
33impl ExtensionDryRunWebhook200Response {
34    pub fn new(route_called: String, successful: bool) -> ExtensionDryRunWebhook200Response {
35        ExtensionDryRunWebhook200Response {
36            error_message: None,
37            response_body: None,
38            response_code: None,
39            response_headers: None,
40            route_called,
41            successful,
42        }
43    }
44}
45