openapi_github/models/
custom_property_value.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/// CustomPropertyValue : Custom property name and associated value
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CustomPropertyValue {
17    /// The name of the property
18    #[serde(rename = "property_name")]
19    pub property_name: String,
20    #[serde(rename = "value", deserialize_with = "Option::deserialize")]
21    pub value: Option<Box<models::CustomPropertyValueValue>>,
22}
23
24impl CustomPropertyValue {
25    /// Custom property name and associated value
26    pub fn new(property_name: String, value: Option<models::CustomPropertyValueValue>) -> CustomPropertyValue {
27        CustomPropertyValue {
28            property_name,
29            value: value.map(Box::new),
30        }
31    }
32}
33