/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.6
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListAssets200ResponseAssetsInnerUsagesInner {
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "kind")]
    pub kind: models::AssetUsageKind,
    #[serde(rename = "access_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub access_type: Option<Option<models::AssetUsageAccessType>>,
    /// The columns used (for tables)
    #[serde(rename = "columns", skip_serializing_if = "Option::is_none")]
    pub columns: Option<std::collections::HashMap<String, models::AssetUsageAccessType>>,
    /// When the asset was detected
    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<Box<models::ListAssets200ResponseAssetsInnerUsagesInnerMetadata>>,
}

impl ListAssets200ResponseAssetsInnerUsagesInner {
    pub fn new(path: String, kind: models::AssetUsageKind) -> ListAssets200ResponseAssetsInnerUsagesInner {
        ListAssets200ResponseAssetsInnerUsagesInner {
            path,
            kind,
            access_type: None,
            columns: None,
            created_at: None,
            metadata: None,
        }
    }
}

