openapi_github/models/
page_deployment.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/// PageDeployment : The GitHub Pages deployment status.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PageDeployment {
17    #[serde(rename = "id")]
18    pub id: Box<models::PageDeploymentId>,
19    /// The URI to monitor GitHub Pages deployment status.
20    #[serde(rename = "status_url")]
21    pub status_url: String,
22    /// The URI to the deployed GitHub Pages.
23    #[serde(rename = "page_url")]
24    pub page_url: String,
25    /// The URI to the deployed GitHub Pages preview.
26    #[serde(rename = "preview_url", skip_serializing_if = "Option::is_none")]
27    pub preview_url: Option<String>,
28}
29
30impl PageDeployment {
31    /// The GitHub Pages deployment status.
32    pub fn new(id: models::PageDeploymentId, status_url: String, page_url: String) -> PageDeployment {
33        PageDeployment {
34            id: Box::new(id),
35            status_url,
36            page_url,
37            preview_url: None,
38        }
39    }
40}
41