nile_client_rs/models/patch_operation.rs
1/*
2 * Nile API
3 *
4 * Making SaaS chill.
5 *
6 * The version of the OpenAPI document: 0.1.0-fdd7cd5
7 * Contact: support@thenile.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PatchOperation : The JSONPatch operations you would like to apply to the instance
12
13#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
14#[serde(tag = "op")]
15pub enum PatchOperation {
16 #[serde(rename = "AddOperation")]
17 AddOperation {
18 /// The JSON Pointer Path you want to add or replace
19 #[serde(rename = "path")]
20 path: String,
21 /// the value to add or replace
22 #[serde(rename = "value")]
23 value: serde_json::Value,
24 /// The JSON Pointer path you would like to move/copy from
25 #[serde(rename = "from")]
26 from: String,
27 },
28 #[serde(rename = "CopyOperation")]
29 CopyOperation {
30 /// The JSON Pointer path you would like to move/copy to
31 #[serde(rename = "path")]
32 path: String,
33 /// the value to add or replace
34 #[serde(rename = "value")]
35 value: serde_json::Value,
36 /// The JSON Pointer path you would like to move/copy from
37 #[serde(rename = "from")]
38 from: String,
39 },
40 #[serde(rename = "MoveOperation")]
41 MoveOperation {
42 /// The JSON Pointer path you would like to move/copy to
43 #[serde(rename = "path")]
44 path: String,
45 /// the value to add or replace
46 #[serde(rename = "value")]
47 value: serde_json::Value,
48 /// The JSON Pointer path you would like to move/copy from
49 #[serde(rename = "from")]
50 from: String,
51 },
52 #[serde(rename = "RemoveOperation")]
53 RemoveOperation {
54 /// The JSON Pointer path to remove
55 #[serde(rename = "path")]
56 path: String,
57 /// the value to add or replace
58 #[serde(rename = "value")]
59 value: serde_json::Value,
60 /// The JSON Pointer path you would like to move/copy from
61 #[serde(rename = "from")]
62 from: String,
63 },
64 #[serde(rename = "ReplaceOperation")]
65 ReplaceOperation {
66 /// The JSON Pointer Path you want to add or replace
67 #[serde(rename = "path")]
68 path: String,
69 /// the value to add or replace
70 #[serde(rename = "value")]
71 value: serde_json::Value,
72 /// The JSON Pointer path you would like to move/copy from
73 #[serde(rename = "from")]
74 from: String,
75 },
76}
77
78use serde::{Deserialize, Serialize};