1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[allow(unused_imports)]
use super::*;
/// Provides the information for updating the tags of an event for the {@link #updateEvent(UpdateEventRequest) updateEvent} operation.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UpdateEventDetails {
/// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: {@code {\"Department\": \"Finance\"}}
#[serde(skip_serializing_if = "Option::is_none")]
pub freeform_tags: Option<HashMap<String, String>>,
/// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: {@code {\"Operations\": {\"CostCenter\": \"42\"}}}
#[serde(skip_serializing_if = "Option::is_none")]
pub defined_tags: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
}
impl UpdateEventDetails {
/// Create a new UpdateEventDetails
pub fn new() -> Self {
Self {
freeform_tags: None,
defined_tags: None,
}
}
/// Set freeform_tags
pub fn set_freeform_tags(mut self, value: Option<HashMap<String, String>>) -> Self {
self.freeform_tags = value;
self
}
/// Set defined_tags
pub fn set_defined_tags(
mut self,
value: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
) -> Self {
self.defined_tags = value;
self
}
/// Set freeform_tags (unwraps Option)
pub fn with_freeform_tags(mut self, value: HashMap<String, String>) -> Self {
self.freeform_tags = Some(value);
self
}
/// Set defined_tags (unwraps Option)
pub fn with_defined_tags(
mut self,
value: HashMap<String, HashMap<String, serde_json::Value>>,
) -> Self {
self.defined_tags = Some(value);
self
}
}
impl Default for UpdateEventDetails {
fn default() -> Self {
Self::new()
}
}