stadar 0.1.25

Rust SDK for the stadar.net esports data API.
/*
 * Stadar Esports Data API
 *
 * Read-only esports data across all major competitive titles. Flat-tier pricing (no per-game gates), monthly subscriptions, sandbox keys for evaluation. See https://stadar.net for tier pricing. All endpoints under `/v1/...`. The version in `info.version` matches the URL prefix; non-breaking field additions ship in `/v1`, breaking changes get a `/v2`. We commit to 24 months of `/v1` support after `/v2` ships. Times are UTC end-to-end (RFC 3339). Localization is the client's problem. Cursors are opaque base64 strings; treat them as such. 
 *
 * The version of the OpenAPI document: v1
 * Contact: api@stadar.net
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhooksTest200ResponseData {
    /// True when the receiver returned a 2xx response.
    #[serde(rename = "delivered")]
    pub delivered: bool,
    /// HTTP status from the receiver. 502 is synthesised on transport failure / timeout / DNS failure (no actual HTTP response was reached). 
    #[serde(rename = "status_code")]
    pub status_code: i32,
    /// Wall-clock duration of the POST in milliseconds.
    #[serde(rename = "duration_ms")]
    pub duration_ms: i32,
    /// Internal request id for correlating with server logs.
    #[serde(rename = "request_id")]
    pub request_id: String,
    /// Short cause when `delivered=false`. Omitted on success.
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

impl WebhooksTest200ResponseData {
    pub fn new(delivered: bool, status_code: i32, duration_ms: i32, request_id: String) -> WebhooksTest200ResponseData {
        WebhooksTest200ResponseData {
            delivered,
            status_code,
            duration_ms,
            request_id,
            error: None,
        }
    }
}