openapi_github/models/
actions_public_key.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/// ActionsPublicKey : The public key used for setting Actions Secrets.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ActionsPublicKey {
17    /// The identifier for the key.
18    #[serde(rename = "key_id")]
19    pub key_id: String,
20    /// The Base64 encoded public key.
21    #[serde(rename = "key")]
22    pub key: String,
23    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24    pub id: Option<i32>,
25    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
26    pub url: Option<String>,
27    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
28    pub title: Option<String>,
29    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
30    pub created_at: Option<String>,
31}
32
33impl ActionsPublicKey {
34    /// The public key used for setting Actions Secrets.
35    pub fn new(key_id: String, key: String) -> ActionsPublicKey {
36        ActionsPublicKey {
37            key_id,
38            key,
39            id: None,
40            url: None,
41            title: None,
42            created_at: None,
43        }
44    }
45}
46