google_cloud_storage/http/object_access_controls/
mod.rs1pub mod delete;
2pub mod get;
3pub mod insert;
4pub mod list;
5pub mod patch;
6
7#[derive(Clone, PartialEq, Eq, Default, serde::Deserialize, serde::Serialize, Debug)]
9#[serde(rename_all = "camelCase")]
10pub struct ObjectAccessControl {
11 pub bucket: Option<String>,
12 pub domain: Option<String>,
13 pub email: Option<String>,
14 pub entity: String,
15 pub entity_id: Option<String>,
16 pub etag: String,
17 #[serde(deserialize_with = "crate::http::from_str_option")]
18 #[serde(default)]
19 pub generation: Option<i64>,
20 pub id: Option<String>,
21 pub kind: String,
22 pub object: Option<String>,
23 pub project_team: Option<ProjectTeam>,
24 pub role: ObjectACLRole,
25 pub self_link: Option<String>,
26}
27
28#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, serde::Deserialize, serde::Serialize, Debug, Default)]
30pub enum ObjectACLRole {
31 #[default]
32 READER,
33 OWNER,
34}
35
36#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, serde::Deserialize, serde::Serialize, Debug)]
38#[serde(rename_all = "camelCase")]
39pub enum PredefinedObjectAcl {
40 AuthenticatedRead,
43 BucketOwnerFullControl,
46 BucketOwnerRead,
49 Private,
51 ProjectPrivate,
54 PublicRead,
57}
58
59#[derive(Clone, PartialEq, Eq, Default, serde::Deserialize, serde::Serialize, Debug)]
61#[serde(rename_all = "camelCase")]
62pub struct ProjectTeam {
63 #[serde(default)]
65 pub project_number: String,
66 #[serde(default)]
68 pub team: String,
69}
70
71#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, serde::Deserialize, serde::Serialize, Debug)]
73#[serde(rename_all = "camelCase")]
74pub enum Projection {
75 NoAcl,
77 Full,
79}