openapi-github 0.1.0

OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
Documentation
/*
 * GitHub's official OpenAPI spec + Octokit extension
 *
 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
 *
 * The version of the OpenAPI document: 16.6.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReposCreateAutolinkRequest {
    /// This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit.
    #[serde(rename = "key_prefix")]
    pub key_prefix: String,
    /// The URL must contain `<num>` for the reference number. `<num>` matches different characters depending on the value of `is_alphanumeric`.
    #[serde(rename = "url_template")]
    pub url_template: String,
    /// Whether this autolink reference matches alphanumeric characters. If true, the `<num>` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters.
    #[serde(rename = "is_alphanumeric", skip_serializing_if = "Option::is_none")]
    pub is_alphanumeric: Option<bool>,
}

impl ReposCreateAutolinkRequest {
    pub fn new(key_prefix: String, url_template: String) -> ReposCreateAutolinkRequest {
        ReposCreateAutolinkRequest {
            key_prefix,
            url_template,
            is_alphanumeric: None,
        }
    }
}