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
 */

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainOciTenancyV1 {
    #[serde(rename = "cid")]
    pub cid: String,
    #[serde(rename = "conditions", skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<models::DomainCloudCondition>>,
    /// OCI Tenancy created date
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "cspm_enabled")]
    pub cspm_enabled: bool,
    /// OCI Tenancy Registration fingerprint
    #[serde(rename = "finger_print")]
    pub finger_print: String,
    /// OCI Tenancy group name
    #[serde(rename = "group_name")]
    pub group_name: String,
    /// Group OCID
    #[serde(rename = "group_ocid")]
    pub group_ocid: String,
    /// Region of OCI Account/Tenancy
    #[serde(rename = "home_region")]
    pub home_region: String,
    /// Connection to OCI succeeded or not
    #[serde(rename = "is_connected")]
    pub is_connected: bool,
    /// OCI Tenancy key age
    #[serde(rename = "key_age")]
    pub key_age: i32,
    /// OCI Tenancy Registration status
    #[serde(rename = "overall_status")]
    pub overall_status: String,
    /// OCI Tenancy policy name
    #[serde(rename = "policy_name")]
    pub policy_name: String,
    /// Policy OCID
    #[serde(rename = "policy_ocid")]
    pub policy_ocid: String,
    /// OCI Tenancy Registration private key
    #[serde(rename = "private_key", skip_serializing_if = "Option::is_none")]
    pub private_key: Option<String>,
    /// Tenancy registration details for each product and feature
    #[serde(rename = "products")]
    pub products: std::collections::HashMap<
        String,
        std::collections::HashMap<String, models::DomainProductFeatureStatus>,
    >,
    /// OCI Tenancy Registration public key
    #[serde(rename = "public_key")]
    pub public_key: String,
    /// OCI Tenancy stack name
    #[serde(rename = "stack_name")]
    pub stack_name: String,
    /// OCI Tenancy stack OCID
    #[serde(rename = "stack_ocid")]
    pub stack_ocid: String,
    #[serde(rename = "tenancy_name")]
    pub tenancy_name: String,
    /// OCI provided unique identifier for the account.
    #[serde(rename = "tenancy_ocid")]
    pub tenancy_ocid: String,
    /// OCI Tenancy updated date
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    /// User email
    #[serde(rename = "user_email")]
    pub user_email: String,
    /// OCI Tenancy user name
    #[serde(rename = "user_name")]
    pub user_name: String,
    /// User OCID
    #[serde(rename = "user_ocid")]
    pub user_ocid: String,
}

impl DomainOciTenancyV1 {
    pub fn new(
        cid: String,
        created_at: String,
        cspm_enabled: bool,
        finger_print: String,
        group_name: String,
        group_ocid: String,
        home_region: String,
        is_connected: bool,
        key_age: i32,
        overall_status: String,
        policy_name: String,
        policy_ocid: String,
        products: std::collections::HashMap<
            String,
            std::collections::HashMap<String, models::DomainProductFeatureStatus>,
        >,
        public_key: String,
        stack_name: String,
        stack_ocid: String,
        tenancy_name: String,
        tenancy_ocid: String,
        updated_at: String,
        user_email: String,
        user_name: String,
        user_ocid: String,
    ) -> DomainOciTenancyV1 {
        DomainOciTenancyV1 {
            cid,
            conditions: None,
            created_at,
            cspm_enabled,
            finger_print,
            group_name,
            group_ocid,
            home_region,
            is_connected,
            key_age,
            overall_status,
            policy_name,
            policy_ocid,
            private_key: None,
            products,
            public_key,
            stack_name,
            stack_ocid,
            tenancy_name,
            tenancy_ocid,
            updated_at,
            user_email,
            user_name,
            user_ocid,
        }
    }
}