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
65
66
67
68
69
70
71
72
use serde::{Deserialize, Serialize}; /*
* Cloud Resource Manager API
*
* Creates, reads, and updates metadata for Google Cloud Platform resource containers.
*
* The version of the OpenAPI document: v3
*
* Generated by: https://openapi-generator.tech
*/
use crate::google_rest_apis::cloudresourcemanager_v3::models;
/// Folder : A folder in an organization's resource hierarchy, used to organize that organization's resources.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Folder {
/// Output only. Timestamp when the folder was created.
#[serde(rename = "createTime", skip_serializing_if = "Option::is_none")]
pub create_time: Option<String>,
/// Output only. Timestamp when the folder was requested to be deleted.
#[serde(rename = "deleteTime", skip_serializing_if = "Option::is_none")]
pub delete_time: Option<String>,
/// The folder's display name. A folder's display name must be unique amongst its siblings. For example, no two folders with the same parent can share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens and underscores and can be no longer than 30 characters. This is captured by the regular expression: `[\\p{L}\\p{N}]([\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?`.
#[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
/// Output only. A checksum computed by the server based on the current value of the folder resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
#[serde(rename = "etag", skip_serializing_if = "Option::is_none")]
pub etag: Option<String>,
/// Output only. The resource name of the folder. Its format is `folders/{folder_id}`, for example: \"folders/1234\".
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Required. The folder's parent's resource name. Updates to the folder's parent must be performed using MoveFolder.
#[serde(rename = "parent", skip_serializing_if = "Option::is_none")]
pub parent: Option<String>,
/// Output only. The lifecycle state of the folder. Updates to the state must be performed using DeleteFolder and UndeleteFolder.
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<State>,
/// Output only. Timestamp when the folder was last modified.
#[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")]
pub update_time: Option<String>,
}
impl Folder {
/// A folder in an organization's resource hierarchy, used to organize that organization's resources.
pub fn new() -> Folder {
Folder {
create_time: None,
delete_time: None,
display_name: None,
etag: None,
name: None,
parent: None,
state: None,
update_time: None,
}
}
}
/// Output only. The lifecycle state of the folder. Updates to the state must be performed using DeleteFolder and UndeleteFolder.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum State {
#[serde(rename = "STATE_UNSPECIFIED")]
StateUnspecified,
#[serde(rename = "ACTIVE")]
Active,
#[serde(rename = "DELETE_REQUESTED")]
DeleteRequested,
}
impl Default for State {
fn default() -> State {
Self::StateUnspecified
}
}