/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.147.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SubmitFeedbackRequest {
/// What kind of feedback this is.
#[serde(rename = "type")]
pub r#type: Type,
/// One line describing the problem or the missing capability. Also the dedup key.
#[serde(rename = "summary")]
pub summary: String,
/// Longer explanation: what you were trying to do, steps to reproduce, the use case.
#[serde(rename = "details", skip_serializing_if = "Option::is_none")]
pub details: Option<String>,
/// The endpoint involved, e.g. `POST /v1/posts`.
#[serde(rename = "endpoint", skip_serializing_if = "Option::is_none")]
pub endpoint: Option<String>,
/// The `x-request-id` header of the failing response, if any.
#[serde(rename = "requestId", skip_serializing_if = "Option::is_none")]
pub request_id: Option<String>,
/// What you expected to happen.
#[serde(rename = "expected", skip_serializing_if = "Option::is_none")]
pub expected: Option<String>,
/// What actually happened, e.g. the error message.
#[serde(rename = "actual", skip_serializing_if = "Option::is_none")]
pub actual: Option<String>,
#[serde(rename = "agent", skip_serializing_if = "Option::is_none")]
pub agent: Option<Box<models::SubmitFeedbackRequestAgent>>,
}
impl SubmitFeedbackRequest {
pub fn new(r#type: Type, summary: String) -> SubmitFeedbackRequest {
SubmitFeedbackRequest {
r#type,
summary,
details: None,
endpoint: None,
request_id: None,
expected: None,
actual: None,
agent: None,
}
}
}
/// What kind of feedback this is.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "bug")]
Bug,
#[serde(rename = "missing_feature")]
MissingFeature,
#[serde(rename = "docs")]
Docs,
#[serde(rename = "other")]
Other,
}
impl Default for Type {
fn default() -> Type {
Self::Bug
}
}