netbox_openapi/models/generic_object_request.rs
1/*
2 * NetBox REST API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 4.4.2-Docker-3.4.1 (4.4)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// GenericObjectRequest : Minimal representation of some generic object identified by ContentType and PK.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct GenericObjectRequest {
15 #[serde(rename = "object_type")]
16 pub object_type: String,
17 #[serde(rename = "object_id")]
18 pub object_id: i32,
19}
20
21impl GenericObjectRequest {
22 /// Minimal representation of some generic object identified by ContentType and PK.
23 pub fn new(object_type: String, object_id: i32) -> GenericObjectRequest {
24 GenericObjectRequest {
25 object_type,
26 object_id,
27 }
28 }
29}