openapi_github/models/
webhook_registry_package_updated_registry_package.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WebhookRegistryPackageUpdatedRegistryPackage {
16    #[serde(rename = "created_at")]
17    pub created_at: String,
18    #[serde(rename = "description", deserialize_with = "Option::deserialize")]
19    pub description: Option<serde_json::Value>,
20    #[serde(rename = "ecosystem")]
21    pub ecosystem: String,
22    #[serde(rename = "html_url")]
23    pub html_url: String,
24    #[serde(rename = "id")]
25    pub id: i32,
26    #[serde(rename = "name")]
27    pub name: String,
28    #[serde(rename = "namespace")]
29    pub namespace: String,
30    #[serde(rename = "owner")]
31    pub owner: Box<models::WebhookRegistryPackagePublishedRegistryPackageOwner>,
32    #[serde(rename = "package_type")]
33    pub package_type: String,
34    #[serde(rename = "package_version")]
35    pub package_version: Box<models::WebhookRegistryPackageUpdatedRegistryPackagePackageVersion>,
36    #[serde(rename = "registry", deserialize_with = "Option::deserialize")]
37    pub registry: Option<serde_json::Value>,
38    #[serde(rename = "updated_at")]
39    pub updated_at: String,
40}
41
42impl WebhookRegistryPackageUpdatedRegistryPackage {
43    pub fn new(created_at: String, description: Option<serde_json::Value>, ecosystem: String, html_url: String, id: i32, name: String, namespace: String, owner: models::WebhookRegistryPackagePublishedRegistryPackageOwner, package_type: String, package_version: models::WebhookRegistryPackageUpdatedRegistryPackagePackageVersion, registry: Option<serde_json::Value>, updated_at: String) -> WebhookRegistryPackageUpdatedRegistryPackage {
44        WebhookRegistryPackageUpdatedRegistryPackage {
45            created_at,
46            description,
47            ecosystem,
48            html_url,
49            id,
50            name,
51            namespace,
52            owner: Box::new(owner),
53            package_type,
54            package_version: Box::new(package_version),
55            registry,
56            updated_at,
57        }
58    }
59}
60