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
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use super::*;
/// Id and name of a resource to simplify the display for the user.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Id {
/// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource that is immutable on creation.
pub id: String,
/// User-friendly name.
pub display_name: String,
}
/// Required fields for Id
pub struct IdRequired {
/// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource that is immutable on creation.
pub id: String,
/// User-friendly name.
pub display_name: String,
}
impl Id {
/// Create a new Id with required fields
pub fn new(required: IdRequired) -> Self {
Self {
id: required.id,
display_name: required.display_name,
}
}
/// Set id
pub fn set_id(mut self, value: String) -> Self {
self.id = value;
self
}
/// Set display_name
pub fn set_display_name(mut self, value: String) -> Self {
self.display_name = value;
self
}
}