Google Cloud Storage C++ Client  1.26.0
A C++ Client Library for Google Cloud Storage
bucket_access_control.cc
Go to the documentation of this file.
1 // Copyright 2018 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
16 #include <nlohmann/json.hpp>
17 
18 namespace google {
19 namespace cloud {
20 namespace storage {
21 inline namespace STORAGE_CLIENT_NS {
23  BucketAccessControl const& rhs) {
24  return *static_cast<internal::AccessControlCommon const*>(&lhs) == rhs;
25 }
26 
27 std::ostream& operator<<(std::ostream& os, BucketAccessControl const& rhs) {
28  os << "BucketAccessControl={bucket=" << rhs.bucket()
29  << ", domain=" << rhs.domain() << ", email=" << rhs.email()
30  << ", entity=" << rhs.entity() << ", entity_id=" << rhs.entity_id()
31  << ", etag=" << rhs.etag() << ", id=" << rhs.id()
32  << ", kind=" << rhs.kind();
33 
34  if (rhs.has_project_team()) {
35  os << ", project_team.project_number=" << rhs.project_team().project_number
36  << ", project_team.team=" << rhs.project_team().team;
37  }
38 
39  return os << ", role=" << rhs.role() << ", self_link=" << rhs.self_link()
40  << "}";
41 }
42 } // namespace STORAGE_CLIENT_NS
43 } // namespace storage
44 } // namespace cloud
45 } // namespace google
google::cloud::storage::v1::operator<<
std::ostream & operator<<(std::ostream &os, BucketAccessControl const &rhs)
Definition: bucket_access_control.cc:27
bucket_access_control.h
STORAGE_CLIENT_NS
#define STORAGE_CLIENT_NS
Definition: version.h:30
google::cloud::storage::v1::operator==
bool operator==(BucketAccessControl const &lhs, BucketAccessControl const &rhs)
Definition: bucket_access_control.cc:22
google::cloud::storage::v1::BucketAccessControl
Wraps the bucketAccessControl resource in Google Cloud Storage.
Definition: bucket_access_control.h:42
google