Skip to content

Commit 37f85ba

Browse files
authored
fix!: moved IAM-related symbols to the correct namespace (#3453)
**BREAKING CHANGE**: there were a few symbols in `google::cloud::bigtable::v0` and `google::cloud::storage::v0`, while the rest of the symbols are in `google::cloud::*::v1`. Both `v0` and `v1` are inlined namespaces, and we anticipate that most applications never spell the inlined namespace, and we expect the feature (access control via IAM) is rarely used from C++. Nevertheless, this is a breaking change and we apologize for the inconvenience. This change affects: `storage::NativeExpression`, `storage::NativeIamBinding`, `storage::NativeIamPolicy`, `bigtable::Expression`, `bigtable::IamBinding`, `bigtable::IamSetCondition`, `bigtable::IamPolicy`, and `bigtable::RemoveBindingFromPolicy`.
1 parent 1275f93 commit 37f85ba

14 files changed

Lines changed: 26 additions & 26 deletions
123 Bytes
Binary file not shown.
-286 Bytes
Binary file not shown.

google/cloud/bigtable/expr.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace google {
1818
namespace cloud {
1919
namespace bigtable {
20-
inline namespace GOOGLE_CLOUD_CPP_NS {
20+
inline namespace BIGTABLE_CLIENT_NS {
2121
google::type::Expr Expression(std::string expression, std::string title,
2222
std::string description, std::string location) {
2323
google::type::Expr expr;
@@ -43,7 +43,7 @@ std::ostream& operator<<(std::ostream& stream, google::type::Expr const& e) {
4343
return stream;
4444
}
4545

46-
} // namespace GOOGLE_CLOUD_CPP_NS
46+
} // namespace BIGTABLE_CLIENT_NS
4747
} // namespace bigtable
4848
} // namespace cloud
4949
} // namespace google

google/cloud/bigtable/expr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_EXPR_H
1616
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_EXPR_H
1717

18-
#include "google/cloud/version.h"
18+
#include "google/cloud/bigtable/version.h"
1919
#include <google/type/expr.pb.h>
2020

2121
namespace google {
2222
namespace cloud {
2323
namespace bigtable {
24-
inline namespace GOOGLE_CLOUD_CPP_NS {
24+
inline namespace BIGTABLE_CLIENT_NS {
2525
/**
2626
* Create a google::type::Expr.
2727
*
@@ -43,7 +43,7 @@ google::type::Expr Expression(std::string expression, std::string title = "",
4343

4444
std::ostream& operator<<(std::ostream& stream, google::type::Expr const&);
4545

46-
} // namespace GOOGLE_CLOUD_CPP_NS
46+
} // namespace BIGTABLE_CLIENT_NS
4747
} // namespace bigtable
4848
} // namespace cloud
4949
} // namespace google

google/cloud/bigtable/expr_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace google {
1919
namespace cloud {
2020
namespace bigtable {
21-
inline namespace GOOGLE_CLOUD_CPP_NS {
21+
inline namespace BIGTABLE_CLIENT_NS {
2222
namespace {
2323

2424
TEST(ExprTest, Trivial) {
@@ -65,7 +65,7 @@ TEST(ExprTest, Printing) {
6565
}
6666

6767
} // namespace
68-
} // namespace GOOGLE_CLOUD_CPP_NS
68+
} // namespace BIGTABLE_CLIENT_NS
6969
} // namespace bigtable
7070
} // namespace cloud
7171
} // namespace google

google/cloud/bigtable/iam_binding.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
namespace google {
2323
namespace cloud {
2424
namespace bigtable {
25-
inline namespace GOOGLE_CLOUD_CPP_NS {
25+
inline namespace BIGTABLE_CLIENT_NS {
2626
google::iam::v1::Binding IamBinding(
2727
std::string role, std::initializer_list<std::string> members) {
2828
return IamBinding(std::move(role), members.begin(), members.end());
@@ -73,7 +73,7 @@ std::ostream& operator<<(std::ostream& os,
7373
return os;
7474
}
7575

76-
} // namespace GOOGLE_CLOUD_CPP_NS
76+
} // namespace BIGTABLE_CLIENT_NS
7777
} // namespace bigtable
7878
} // namespace cloud
7979
} // namespace google

google/cloud/bigtable/iam_binding.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_IAM_BINDING_H
1616
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_IAM_BINDING_H
1717

18-
#include "google/cloud/version.h"
18+
#include "google/cloud/bigtable/version.h"
1919
#include <google/bigtable/admin/v2/bigtable_instance_admin.grpc.pb.h>
2020
#include <set>
2121

2222
namespace google {
2323
namespace cloud {
2424
namespace bigtable {
25-
inline namespace GOOGLE_CLOUD_CPP_NS {
25+
inline namespace BIGTABLE_CLIENT_NS {
2626
/**
2727
* Create a google::iam::v1::Binding.
2828
*
@@ -169,7 +169,7 @@ google::iam::v1::Binding IamBinding(std::string role, InputIt begin,
169169
std::move(condition));
170170
}
171171

172-
} // namespace GOOGLE_CLOUD_CPP_NS
172+
} // namespace BIGTABLE_CLIENT_NS
173173
} // namespace bigtable
174174
} // namespace cloud
175175
} // namespace google

google/cloud/bigtable/iam_binding_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
namespace google {
2222
namespace cloud {
2323
namespace bigtable {
24-
inline namespace GOOGLE_CLOUD_CPP_NS {
24+
inline namespace BIGTABLE_CLIENT_NS {
2525
namespace {
2626

2727
TEST(IamBinding, IterCtor) {
@@ -96,7 +96,7 @@ TEST(IamBinding, PrintingWithCondition) {
9696
}
9797

9898
} // namespace
99-
} // namespace GOOGLE_CLOUD_CPP_NS
99+
} // namespace BIGTABLE_CLIENT_NS
100100
} // namespace bigtable
101101
} // namespace cloud
102102
} // namespace google

google/cloud/bigtable/iam_policy.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace google {
2020
namespace cloud {
2121
namespace bigtable {
22-
inline namespace GOOGLE_CLOUD_CPP_NS {
22+
inline namespace BIGTABLE_CLIENT_NS {
2323
google::iam::v1::Policy IamPolicy(
2424
std::initializer_list<google::iam::v1::Binding> bindings, std::string etag,
2525
std::int32_t version) {
@@ -59,7 +59,7 @@ void RemoveBindingFromPolicy(
5959
});
6060
}
6161

62-
} // namespace GOOGLE_CLOUD_CPP_NS
62+
} // namespace BIGTABLE_CLIENT_NS
6363
} // namespace bigtable
6464
} // namespace cloud
6565
} // namespace google

google/cloud/bigtable/iam_policy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
namespace google {
2222
namespace cloud {
2323
namespace bigtable {
24-
inline namespace GOOGLE_CLOUD_CPP_NS {
24+
inline namespace BIGTABLE_CLIENT_NS {
2525
template <class InputIt>
2626
/**
2727
* Create a google::iam::v1::Policy.
@@ -137,7 +137,7 @@ void RemoveBindingFromPolicy(
137137
google::protobuf::RepeatedPtrField<google::iam::v1::Binding>::iterator
138138
to_remove);
139139

140-
} // namespace GOOGLE_CLOUD_CPP_NS
140+
} // namespace BIGTABLE_CLIENT_NS
141141
} // namespace bigtable
142142
} // namespace cloud
143143
} // namespace google

0 commit comments

Comments
 (0)