santati 0.3.0

Official Rust SDK for the Santati audit-log API
Documentation
/*
 * Santati
 *
 * Santati's HTTP API. Operations under `/api/v0/` take a team API key in `Authorization: Api-Key <key>`; a missing, invalid or under-scoped key is answered with `403`, never `401`. Errors on `/api/v0/` use one of three bodies: `ErrorDetail` (`{\"detail\": ...}`), `FieldErrors` (messages keyed by request field) or `ErrorEnvelope` (`{\"error\": {\"code\", \"message\", \"field\"}}`, returned by event ingestion and log stream quota checks). Lists on `/api/v0/` are cursor-paginated: follow `next` until it is `null`.
 *
 * The version of the OpenAPI document: 0.3.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// PatchedEventDefinitionWriteRequest : The writable part of a definition, for create and (partially) for update.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PatchedEventDefinitionWriteRequest {
    /// The action name, e.g. invoice.voided: dotted segments of letters, digits, '-' and '_'. Sending a new value on an update renames the action; its schema versions go with it.
    #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
    pub action: Option<String>,
    /// What this action means, for the people reading the catalog.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Target types an event with this action may name; empty means any target type.
    #[serde(rename = "allowed_target_types", skip_serializing_if = "Option::is_none")]
    pub allowed_target_types: Option<Vec<String>>,
    /// True while the action is in force. A definition that is not active is treated as undefined when a team has any definitions at all.
    #[serde(rename = "is_active", skip_serializing_if = "Option::is_none")]
    pub is_active: Option<bool>,
}

impl PatchedEventDefinitionWriteRequest {
    /// The writable part of a definition, for create and (partially) for update.
    pub fn new() -> PatchedEventDefinitionWriteRequest {
        PatchedEventDefinitionWriteRequest {
            action: None,
            description: None,
            allowed_target_types: None,
            is_active: None,
        }
    }
}