openapi_github/models/
integration_installation_request.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/// IntegrationInstallationRequest : Request to install an integration on a target
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct IntegrationInstallationRequest {
17    /// Unique identifier of the request installation.
18    #[serde(rename = "id")]
19    pub id: i32,
20    #[serde(rename = "node_id", skip_serializing_if = "Option::is_none")]
21    pub node_id: Option<String>,
22    #[serde(rename = "account")]
23    pub account: Box<models::IntegrationInstallationRequestAccount>,
24    #[serde(rename = "requester")]
25    pub requester: Box<models::SimpleUser>,
26    #[serde(rename = "created_at")]
27    pub created_at: String,
28}
29
30impl IntegrationInstallationRequest {
31    /// Request to install an integration on a target
32    pub fn new(id: i32, account: models::IntegrationInstallationRequestAccount, requester: models::SimpleUser, created_at: String) -> IntegrationInstallationRequest {
33        IntegrationInstallationRequest {
34            id,
35            node_id: None,
36            account: Box::new(account),
37            requester: Box::new(requester),
38            created_at,
39        }
40    }
41}
42