rusty_falcon 0.7.1

Rust bindings for CrowdStrike Falcon API
Documentation
/*
 * CrowdStrike API Specification
 *
 * Use this API specification as a reference for the API endpoints you can use to interact with your Falcon environment. These endpoints support authentication via OAuth2 and interact with detections and network containment. For detailed usage guides and examples, see our [documentation inside the Falcon console](https://falcon.crowdstrike.com/support/documentation).     To use the APIs described below, combine the base URL with the path shown for each API endpoint. For commercial cloud customers, your base URL is `https://api.crowdstrike.com`.    Each API endpoint requires authorization via an OAuth2 token. Your first API request should retrieve an OAuth2 token using the `oauth2/token` endpoint, such as `https://api.crowdstrike.com/oauth2/token`. For subsequent requests, include the OAuth2 token in an HTTP authorization header. Tokens expire after 30 minutes, after which you should make a new token request to continue making API requests.
 *
 * The version of the OpenAPI document: rolling
 *
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainGpa {
    /// algorithm header name
    #[serde(
        rename = "algorithm_header_name",
        skip_serializing_if = "Option::is_none"
    )]
    pub algorithm_header_name: Option<String>,
    /// encoding of the signature, defaults to base64
    #[serde(rename = "encoding", skip_serializing_if = "Option::is_none")]
    pub encoding: Option<String>,
    /// delimiter used between fields
    #[serde(rename = "field_delimiter", skip_serializing_if = "Option::is_none")]
    pub field_delimiter: Option<String>,
    /// fields of the signature
    #[serde(rename = "fields", skip_serializing_if = "Option::is_none")]
    pub fields: Option<Vec<String>>,
    /// hash function to use; defaults to sha256
    #[serde(rename = "hash_function", skip_serializing_if = "Option::is_none")]
    pub hash_function: Option<String>,
    /// header value for signature using ${} wrapped variables
    #[serde(rename = "header_format", skip_serializing_if = "Option::is_none")]
    pub header_format: Option<String>,
    /// name of the header the base64 encoded signature is matched; example: X-CS-Primary-SecretKey; default: Authorization
    #[serde(rename = "header_name", skip_serializing_if = "Option::is_none")]
    pub header_name: Option<String>,
    /// private key used to hash
    #[serde(rename = "key")]
    pub key: String,
    /// the timestamp format; defaults to RFC3339
    #[serde(rename = "timestamp_format", skip_serializing_if = "Option::is_none")]
    pub timestamp_format: Option<String>,
    #[serde(
        rename = "timestamp_header_name",
        skip_serializing_if = "Option::is_none"
    )]
    pub timestamp_header_name: Option<String>,
    /// Preset type of hmac config. This takes precedence over other config fields, so if this field is set, then it uses the native implementation to generate the hmac signature
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
}

impl DomainGpa {
    pub fn new(key: String) -> DomainGpa {
        DomainGpa {
            algorithm_header_name: None,
            encoding: None,
            field_delimiter: None,
            fields: None,
            hash_function: None,
            header_format: None,
            header_name: None,
            key,
            timestamp_format: None,
            timestamp_header_name: None,
            r#type: None,
        }
    }
}