Skip to main content

nautobot_openapi/models/
patched_bulk_writable_graph_ql_query_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/// PatchedBulkWritableGraphQlQueryRequest : Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see <https://github.com/encode/django-rest-framework/issues/3144>)
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedBulkWritableGraphQlQueryRequest {
15    #[serde(rename = "id")]
16    pub id: uuid::Uuid,
17    #[serde(
18        rename = "owner_content_type",
19        default,
20        with = "::serde_with::rust::double_option",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub owner_content_type: Option<Option<String>>,
24    #[serde(
25        rename = "owner_object_id",
26        default,
27        with = "::serde_with::rust::double_option",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub owner_object_id: Option<Option<uuid::Uuid>>,
31    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
32    pub name: Option<String>,
33    #[serde(rename = "query", skip_serializing_if = "Option::is_none")]
34    pub query: Option<String>,
35}
36
37impl PatchedBulkWritableGraphQlQueryRequest {
38    /// Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see <https://github.com/encode/django-rest-framework/issues/3144>)
39    pub fn new(id: uuid::Uuid) -> PatchedBulkWritableGraphQlQueryRequest {
40        PatchedBulkWritableGraphQlQueryRequest {
41            id,
42            owner_content_type: None,
43            owner_object_id: None,
44            name: None,
45            query: None,
46        }
47    }
48}