Skip to main content

nautobot_openapi/models/
graph_qlapi_request.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct GraphQlapiRequest {
13    /// GraphQL query
14    #[serde(rename = "query")]
15    pub query: String,
16    /// Variables in JSON Format
17    #[serde(
18        rename = "variables",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub variables: Option<Option<serde_json::Value>>,
24}
25
26impl GraphQlapiRequest {
27    pub fn new(query: String) -> GraphQlapiRequest {
28        GraphQlapiRequest {
29            query,
30            variables: None,
31        }
32    }
33}