openapi-github 0.1.0

OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
Documentation
/*
 * GitHub's official OpenAPI spec + Octokit extension
 *
 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
 *
 * The version of the OpenAPI document: 16.6.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Dependency {
    /// Package-url (PURL) of dependency. See https://github.com/package-url/purl-spec for more details.
    #[serde(rename = "package_url", skip_serializing_if = "Option::is_none")]
    pub package_url: Option<String>,
    /// User-defined metadata to store domain-specific information limited to 8 keys with scalar values.
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<std::collections::HashMap<String, models::MetadataValue>>,
    /// A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency.
    #[serde(rename = "relationship", skip_serializing_if = "Option::is_none")]
    pub relationship: Option<Relationship>,
    /// A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes.
    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
    pub scope: Option<Scope>,
    /// Array of package-url (PURLs) of direct child dependencies.
    #[serde(rename = "dependencies", skip_serializing_if = "Option::is_none")]
    pub dependencies: Option<Vec<String>>,
}

impl Dependency {
    pub fn new() -> Dependency {
        Dependency {
            package_url: None,
            metadata: None,
            relationship: None,
            scope: None,
            dependencies: None,
        }
    }
}
/// A notation of whether a dependency is requested directly by this manifest or is a dependency of another dependency.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Relationship {
    #[serde(rename = "direct")]
    Direct,
    #[serde(rename = "indirect")]
    Indirect,
}

impl Default for Relationship {
    fn default() -> Relationship {
        Self::Direct
    }
}
/// A notation of whether the dependency is required for the primary build artifact (runtime) or is only used for development. Future versions of this specification may allow for more granular scopes.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Scope {
    #[serde(rename = "runtime")]
    Runtime,
    #[serde(rename = "development")]
    Development,
}

impl Default for Scope {
    fn default() -> Scope {
        Self::Runtime
    }
}