openapi_github/models/repos_create_pages_deployment_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/// ReposCreatePagesDeploymentRequest : The object used to create GitHub Pages deployment
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ReposCreatePagesDeploymentRequest {
17 /// The ID of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required.
18 #[serde(rename = "artifact_id", skip_serializing_if = "Option::is_none")]
19 pub artifact_id: Option<f64>,
20 /// The URL of an artifact that contains the .zip or .tar of static assets to deploy. The artifact belongs to the repository. Either `artifact_id` or `artifact_url` are required.
21 #[serde(rename = "artifact_url", skip_serializing_if = "Option::is_none")]
22 pub artifact_url: Option<String>,
23 /// The target environment for this GitHub Pages deployment.
24 #[serde(rename = "environment", skip_serializing_if = "Option::is_none")]
25 pub environment: Option<String>,
26 /// A unique string that represents the version of the build for this deployment.
27 #[serde(rename = "pages_build_version")]
28 pub pages_build_version: String,
29 /// The OIDC token issued by GitHub Actions certifying the origin of the deployment.
30 #[serde(rename = "oidc_token")]
31 pub oidc_token: String,
32}
33
34impl ReposCreatePagesDeploymentRequest {
35 /// The object used to create GitHub Pages deployment
36 pub fn new(pages_build_version: String, oidc_token: String) -> ReposCreatePagesDeploymentRequest {
37 ReposCreatePagesDeploymentRequest {
38 artifact_id: None,
39 artifact_url: None,
40 environment: None,
41 pages_build_version,
42 oidc_token,
43 }
44 }
45}
46