openapi_github/models/
repos_update_information_about_pages_site_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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ReposUpdateInformationAboutPagesSiteRequest {
16    /// Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see \"[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/).\"
17    #[serde(rename = "cname", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub cname: Option<Option<String>>,
19    /// Specify whether HTTPS should be enforced for the repository.
20    #[serde(rename = "https_enforced", skip_serializing_if = "Option::is_none")]
21    pub https_enforced: Option<bool>,
22    /// The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch.
23    #[serde(rename = "build_type", skip_serializing_if = "Option::is_none")]
24    pub build_type: Option<BuildType>,
25    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
26    pub source: Option<Box<models::ReposUpdateInformationAboutPagesSiteRequestSource>>,
27}
28
29impl ReposUpdateInformationAboutPagesSiteRequest {
30    pub fn new() -> ReposUpdateInformationAboutPagesSiteRequest {
31        ReposUpdateInformationAboutPagesSiteRequest {
32            cname: None,
33            https_enforced: None,
34            build_type: None,
35            source: None,
36        }
37    }
38}
39/// The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch.
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum BuildType {
42    #[serde(rename = "legacy")]
43    Legacy,
44    #[serde(rename = "workflow")]
45    Workflow,
46}
47
48impl Default for BuildType {
49    fn default() -> BuildType {
50        Self::Legacy
51    }
52}
53