openapi_github/models/codespaces_user_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/// CodespacesUserPublicKey : The public key used for setting user Codespaces' Secrets.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CodespacesUserPublicKey {
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}
24
25impl CodespacesUserPublicKey {
26 /// The public key used for setting user Codespaces' Secrets.
27 pub fn new(key_id: String, key: String) -> CodespacesUserPublicKey {
28 CodespacesUserPublicKey {
29 key_id,
30 key,
31 }
32 }
33}
34