15 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OBJECT_ACCESS_CONTROL_H
16 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OBJECT_ACCESS_CONTROL_H
18 #include "google/cloud/storage/internal/access_control_common.h"
19 #include "google/cloud/storage/internal/common_metadata.h"
20 #include "google/cloud/storage/internal/patch_builder.h"
21 #include "google/cloud/storage/version.h"
22 #include "google/cloud/status_or.h"
30 struct ObjectAccessControlParser;
31 struct GrpcObjectAccessControlParser;
48 using AccessControlCommon::ROLE_OWNER;
49 using AccessControlCommon::ROLE_READER;
50 using AccessControlCommon::TEAM_EDITORS;
51 using AccessControlCommon::TEAM_OWNERS;
52 using AccessControlCommon::TEAM_VIEWERS;
54 using AccessControlCommon::bucket;
55 using AccessControlCommon::domain;
56 using AccessControlCommon::email;
58 using AccessControlCommon::entity;
60 AccessControlCommon::set_entity(std::move(v));
64 using AccessControlCommon::entity_id;
65 using AccessControlCommon::etag;
66 using AccessControlCommon::has_project_team;
67 using AccessControlCommon::id;
68 using AccessControlCommon::kind;
69 using AccessControlCommon::project_team;
70 using AccessControlCommon::project_team_as_optional;
72 using AccessControlCommon::role;
74 AccessControlCommon::set_role(std::move(v));
78 using AccessControlCommon::self_link;
81 std::string
const&
object()
const {
return object_; }
91 friend struct internal::ObjectAccessControlParser;
92 friend struct internal::GrpcObjectAccessControlParser;
94 std::int64_t generation_ = 0;
121 impl_.SetStringField(
"entity", v);
126 impl_.RemoveField(
"entity");
131 impl_.SetStringField(
"role", v);
136 impl_.RemoveField(
"role");
141 friend struct internal::GrpcObjectAccessControlParser;
143 internal::PatchBuilder impl_;