iam_policy.pb.go 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. // Copyright 2022 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. // Code generated by protoc-gen-go. DO NOT EDIT.
  15. // versions:
  16. // protoc-gen-go v1.32.0
  17. // protoc v4.23.2
  18. // source: google/iam/v1/iam_policy.proto
  19. package iampb
  20. import (
  21. context "context"
  22. reflect "reflect"
  23. sync "sync"
  24. _ "google.golang.org/genproto/googleapis/api/annotations"
  25. grpc "google.golang.org/grpc"
  26. codes "google.golang.org/grpc/codes"
  27. status "google.golang.org/grpc/status"
  28. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  29. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  30. fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
  31. )
  32. const (
  33. // Verify that this generated code is sufficiently up-to-date.
  34. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  35. // Verify that runtime/protoimpl is sufficiently up-to-date.
  36. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  37. )
  38. // Request message for `SetIamPolicy` method.
  39. type SetIamPolicyRequest struct {
  40. state protoimpl.MessageState
  41. sizeCache protoimpl.SizeCache
  42. unknownFields protoimpl.UnknownFields
  43. // REQUIRED: The resource for which the policy is being specified.
  44. // See the operation documentation for the appropriate value for this field.
  45. Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
  46. // REQUIRED: The complete policy to be applied to the `resource`. The size of
  47. // the policy is limited to a few 10s of KB. An empty policy is a
  48. // valid policy but certain Cloud Platform services (such as Projects)
  49. // might reject them.
  50. Policy *Policy `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"`
  51. // OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
  52. // the fields in the mask will be modified. If no mask is provided, the
  53. // following default mask is used:
  54. //
  55. // `paths: "bindings, etag"`
  56. UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
  57. }
  58. func (x *SetIamPolicyRequest) Reset() {
  59. *x = SetIamPolicyRequest{}
  60. if protoimpl.UnsafeEnabled {
  61. mi := &file_google_iam_v1_iam_policy_proto_msgTypes[0]
  62. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  63. ms.StoreMessageInfo(mi)
  64. }
  65. }
  66. func (x *SetIamPolicyRequest) String() string {
  67. return protoimpl.X.MessageStringOf(x)
  68. }
  69. func (*SetIamPolicyRequest) ProtoMessage() {}
  70. func (x *SetIamPolicyRequest) ProtoReflect() protoreflect.Message {
  71. mi := &file_google_iam_v1_iam_policy_proto_msgTypes[0]
  72. if protoimpl.UnsafeEnabled && x != nil {
  73. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  74. if ms.LoadMessageInfo() == nil {
  75. ms.StoreMessageInfo(mi)
  76. }
  77. return ms
  78. }
  79. return mi.MessageOf(x)
  80. }
  81. // Deprecated: Use SetIamPolicyRequest.ProtoReflect.Descriptor instead.
  82. func (*SetIamPolicyRequest) Descriptor() ([]byte, []int) {
  83. return file_google_iam_v1_iam_policy_proto_rawDescGZIP(), []int{0}
  84. }
  85. func (x *SetIamPolicyRequest) GetResource() string {
  86. if x != nil {
  87. return x.Resource
  88. }
  89. return ""
  90. }
  91. func (x *SetIamPolicyRequest) GetPolicy() *Policy {
  92. if x != nil {
  93. return x.Policy
  94. }
  95. return nil
  96. }
  97. func (x *SetIamPolicyRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
  98. if x != nil {
  99. return x.UpdateMask
  100. }
  101. return nil
  102. }
  103. // Request message for `GetIamPolicy` method.
  104. type GetIamPolicyRequest struct {
  105. state protoimpl.MessageState
  106. sizeCache protoimpl.SizeCache
  107. unknownFields protoimpl.UnknownFields
  108. // REQUIRED: The resource for which the policy is being requested.
  109. // See the operation documentation for the appropriate value for this field.
  110. Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
  111. // OPTIONAL: A `GetPolicyOptions` object for specifying options to
  112. // `GetIamPolicy`.
  113. Options *GetPolicyOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
  114. }
  115. func (x *GetIamPolicyRequest) Reset() {
  116. *x = GetIamPolicyRequest{}
  117. if protoimpl.UnsafeEnabled {
  118. mi := &file_google_iam_v1_iam_policy_proto_msgTypes[1]
  119. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  120. ms.StoreMessageInfo(mi)
  121. }
  122. }
  123. func (x *GetIamPolicyRequest) String() string {
  124. return protoimpl.X.MessageStringOf(x)
  125. }
  126. func (*GetIamPolicyRequest) ProtoMessage() {}
  127. func (x *GetIamPolicyRequest) ProtoReflect() protoreflect.Message {
  128. mi := &file_google_iam_v1_iam_policy_proto_msgTypes[1]
  129. if protoimpl.UnsafeEnabled && x != nil {
  130. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  131. if ms.LoadMessageInfo() == nil {
  132. ms.StoreMessageInfo(mi)
  133. }
  134. return ms
  135. }
  136. return mi.MessageOf(x)
  137. }
  138. // Deprecated: Use GetIamPolicyRequest.ProtoReflect.Descriptor instead.
  139. func (*GetIamPolicyRequest) Descriptor() ([]byte, []int) {
  140. return file_google_iam_v1_iam_policy_proto_rawDescGZIP(), []int{1}
  141. }
  142. func (x *GetIamPolicyRequest) GetResource() string {
  143. if x != nil {
  144. return x.Resource
  145. }
  146. return ""
  147. }
  148. func (x *GetIamPolicyRequest) GetOptions() *GetPolicyOptions {
  149. if x != nil {
  150. return x.Options
  151. }
  152. return nil
  153. }
  154. // Request message for `TestIamPermissions` method.
  155. type TestIamPermissionsRequest struct {
  156. state protoimpl.MessageState
  157. sizeCache protoimpl.SizeCache
  158. unknownFields protoimpl.UnknownFields
  159. // REQUIRED: The resource for which the policy detail is being requested.
  160. // See the operation documentation for the appropriate value for this field.
  161. Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
  162. // The set of permissions to check for the `resource`. Permissions with
  163. // wildcards (such as '*' or 'storage.*') are not allowed. For more
  164. // information see
  165. // [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
  166. Permissions []string `protobuf:"bytes,2,rep,name=permissions,proto3" json:"permissions,omitempty"`
  167. }
  168. func (x *TestIamPermissionsRequest) Reset() {
  169. *x = TestIamPermissionsRequest{}
  170. if protoimpl.UnsafeEnabled {
  171. mi := &file_google_iam_v1_iam_policy_proto_msgTypes[2]
  172. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  173. ms.StoreMessageInfo(mi)
  174. }
  175. }
  176. func (x *TestIamPermissionsRequest) String() string {
  177. return protoimpl.X.MessageStringOf(x)
  178. }
  179. func (*TestIamPermissionsRequest) ProtoMessage() {}
  180. func (x *TestIamPermissionsRequest) ProtoReflect() protoreflect.Message {
  181. mi := &file_google_iam_v1_iam_policy_proto_msgTypes[2]
  182. if protoimpl.UnsafeEnabled && x != nil {
  183. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  184. if ms.LoadMessageInfo() == nil {
  185. ms.StoreMessageInfo(mi)
  186. }
  187. return ms
  188. }
  189. return mi.MessageOf(x)
  190. }
  191. // Deprecated: Use TestIamPermissionsRequest.ProtoReflect.Descriptor instead.
  192. func (*TestIamPermissionsRequest) Descriptor() ([]byte, []int) {
  193. return file_google_iam_v1_iam_policy_proto_rawDescGZIP(), []int{2}
  194. }
  195. func (x *TestIamPermissionsRequest) GetResource() string {
  196. if x != nil {
  197. return x.Resource
  198. }
  199. return ""
  200. }
  201. func (x *TestIamPermissionsRequest) GetPermissions() []string {
  202. if x != nil {
  203. return x.Permissions
  204. }
  205. return nil
  206. }
  207. // Response message for `TestIamPermissions` method.
  208. type TestIamPermissionsResponse struct {
  209. state protoimpl.MessageState
  210. sizeCache protoimpl.SizeCache
  211. unknownFields protoimpl.UnknownFields
  212. // A subset of `TestPermissionsRequest.permissions` that the caller is
  213. // allowed.
  214. Permissions []string `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"`
  215. }
  216. func (x *TestIamPermissionsResponse) Reset() {
  217. *x = TestIamPermissionsResponse{}
  218. if protoimpl.UnsafeEnabled {
  219. mi := &file_google_iam_v1_iam_policy_proto_msgTypes[3]
  220. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  221. ms.StoreMessageInfo(mi)
  222. }
  223. }
  224. func (x *TestIamPermissionsResponse) String() string {
  225. return protoimpl.X.MessageStringOf(x)
  226. }
  227. func (*TestIamPermissionsResponse) ProtoMessage() {}
  228. func (x *TestIamPermissionsResponse) ProtoReflect() protoreflect.Message {
  229. mi := &file_google_iam_v1_iam_policy_proto_msgTypes[3]
  230. if protoimpl.UnsafeEnabled && x != nil {
  231. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  232. if ms.LoadMessageInfo() == nil {
  233. ms.StoreMessageInfo(mi)
  234. }
  235. return ms
  236. }
  237. return mi.MessageOf(x)
  238. }
  239. // Deprecated: Use TestIamPermissionsResponse.ProtoReflect.Descriptor instead.
  240. func (*TestIamPermissionsResponse) Descriptor() ([]byte, []int) {
  241. return file_google_iam_v1_iam_policy_proto_rawDescGZIP(), []int{3}
  242. }
  243. func (x *TestIamPermissionsResponse) GetPermissions() []string {
  244. if x != nil {
  245. return x.Permissions
  246. }
  247. return nil
  248. }
  249. var File_google_iam_v1_iam_policy_proto protoreflect.FileDescriptor
  250. var file_google_iam_v1_iam_policy_proto_rawDesc = []byte{
  251. 0x0a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f,
  252. 0x69, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  253. 0x12, 0x0d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a,
  254. 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
  255. 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67,
  256. 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
  257. 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
  258. 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f,
  259. 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
  260. 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,
  261. 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76,
  262. 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
  263. 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x70,
  264. 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f,
  265. 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65,
  266. 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x01,
  267. 0x0a, 0x13, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65,
  268. 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
  269. 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x03, 0x0a,
  270. 0x01, 0x2a, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x06,
  271. 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67,
  272. 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c,
  273. 0x69, 0x63, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
  274. 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18,
  275. 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
  276. 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73,
  277. 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x77, 0x0a,
  278. 0x13, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71,
  279. 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
  280. 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x03, 0x0a, 0x01,
  281. 0x2a, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x6f,
  282. 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
  283. 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
  284. 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f,
  285. 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x69, 0x0a, 0x19, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61,
  286. 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
  287. 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
  288. 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x03, 0x0a, 0x01, 0x2a,
  289. 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x70, 0x65,
  290. 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42,
  291. 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
  292. 0x73, 0x22, 0x3e, 0x0a, 0x1a, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d,
  293. 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
  294. 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01,
  295. 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
  296. 0x73, 0x32, 0xb4, 0x03, 0x0a, 0x09, 0x49, 0x41, 0x4d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
  297. 0x74, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
  298. 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e,
  299. 0x53, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75,
  300. 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d,
  301. 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93,
  302. 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f,
  303. 0x75, 0x72, 0x63, 0x65, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50,
  304. 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x74, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50,
  305. 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69,
  306. 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69,
  307. 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
  308. 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
  309. 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31,
  310. 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x67,
  311. 0x65, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x9a, 0x01, 0x0a, 0x12,
  312. 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
  313. 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e,
  314. 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73,
  315. 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67,
  316. 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73,
  317. 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52,
  318. 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a,
  319. 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
  320. 0x65, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x74, 0x65, 0x73, 0x74, 0x49, 0x61, 0x6d, 0x50, 0x65, 0x72,
  321. 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x1e, 0xca, 0x41, 0x1b, 0x69, 0x61, 0x6d,
  322. 0x2d, 0x6d, 0x65, 0x74, 0x61, 0x2d, 0x61, 0x70, 0x69, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
  323. 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x42, 0x7f, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e,
  324. 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x49,
  325. 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
  326. 0x29, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f,
  327. 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x69,
  328. 0x61, 0x6d, 0x70, 0x62, 0x3b, 0x69, 0x61, 0x6d, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x13,
  329. 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x49, 0x61, 0x6d,
  330. 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f,
  331. 0x75, 0x64, 0x5c, 0x49, 0x61, 0x6d, 0x5c, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  332. 0x33,
  333. }
  334. var (
  335. file_google_iam_v1_iam_policy_proto_rawDescOnce sync.Once
  336. file_google_iam_v1_iam_policy_proto_rawDescData = file_google_iam_v1_iam_policy_proto_rawDesc
  337. )
  338. func file_google_iam_v1_iam_policy_proto_rawDescGZIP() []byte {
  339. file_google_iam_v1_iam_policy_proto_rawDescOnce.Do(func() {
  340. file_google_iam_v1_iam_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_iam_v1_iam_policy_proto_rawDescData)
  341. })
  342. return file_google_iam_v1_iam_policy_proto_rawDescData
  343. }
  344. var file_google_iam_v1_iam_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  345. var file_google_iam_v1_iam_policy_proto_goTypes = []interface{}{
  346. (*SetIamPolicyRequest)(nil), // 0: google.iam.v1.SetIamPolicyRequest
  347. (*GetIamPolicyRequest)(nil), // 1: google.iam.v1.GetIamPolicyRequest
  348. (*TestIamPermissionsRequest)(nil), // 2: google.iam.v1.TestIamPermissionsRequest
  349. (*TestIamPermissionsResponse)(nil), // 3: google.iam.v1.TestIamPermissionsResponse
  350. (*Policy)(nil), // 4: google.iam.v1.Policy
  351. (*fieldmaskpb.FieldMask)(nil), // 5: google.protobuf.FieldMask
  352. (*GetPolicyOptions)(nil), // 6: google.iam.v1.GetPolicyOptions
  353. }
  354. var file_google_iam_v1_iam_policy_proto_depIdxs = []int32{
  355. 4, // 0: google.iam.v1.SetIamPolicyRequest.policy:type_name -> google.iam.v1.Policy
  356. 5, // 1: google.iam.v1.SetIamPolicyRequest.update_mask:type_name -> google.protobuf.FieldMask
  357. 6, // 2: google.iam.v1.GetIamPolicyRequest.options:type_name -> google.iam.v1.GetPolicyOptions
  358. 0, // 3: google.iam.v1.IAMPolicy.SetIamPolicy:input_type -> google.iam.v1.SetIamPolicyRequest
  359. 1, // 4: google.iam.v1.IAMPolicy.GetIamPolicy:input_type -> google.iam.v1.GetIamPolicyRequest
  360. 2, // 5: google.iam.v1.IAMPolicy.TestIamPermissions:input_type -> google.iam.v1.TestIamPermissionsRequest
  361. 4, // 6: google.iam.v1.IAMPolicy.SetIamPolicy:output_type -> google.iam.v1.Policy
  362. 4, // 7: google.iam.v1.IAMPolicy.GetIamPolicy:output_type -> google.iam.v1.Policy
  363. 3, // 8: google.iam.v1.IAMPolicy.TestIamPermissions:output_type -> google.iam.v1.TestIamPermissionsResponse
  364. 6, // [6:9] is the sub-list for method output_type
  365. 3, // [3:6] is the sub-list for method input_type
  366. 3, // [3:3] is the sub-list for extension type_name
  367. 3, // [3:3] is the sub-list for extension extendee
  368. 0, // [0:3] is the sub-list for field type_name
  369. }
  370. func init() { file_google_iam_v1_iam_policy_proto_init() }
  371. func file_google_iam_v1_iam_policy_proto_init() {
  372. if File_google_iam_v1_iam_policy_proto != nil {
  373. return
  374. }
  375. file_google_iam_v1_options_proto_init()
  376. file_google_iam_v1_policy_proto_init()
  377. if !protoimpl.UnsafeEnabled {
  378. file_google_iam_v1_iam_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  379. switch v := v.(*SetIamPolicyRequest); i {
  380. case 0:
  381. return &v.state
  382. case 1:
  383. return &v.sizeCache
  384. case 2:
  385. return &v.unknownFields
  386. default:
  387. return nil
  388. }
  389. }
  390. file_google_iam_v1_iam_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  391. switch v := v.(*GetIamPolicyRequest); i {
  392. case 0:
  393. return &v.state
  394. case 1:
  395. return &v.sizeCache
  396. case 2:
  397. return &v.unknownFields
  398. default:
  399. return nil
  400. }
  401. }
  402. file_google_iam_v1_iam_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  403. switch v := v.(*TestIamPermissionsRequest); i {
  404. case 0:
  405. return &v.state
  406. case 1:
  407. return &v.sizeCache
  408. case 2:
  409. return &v.unknownFields
  410. default:
  411. return nil
  412. }
  413. }
  414. file_google_iam_v1_iam_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  415. switch v := v.(*TestIamPermissionsResponse); i {
  416. case 0:
  417. return &v.state
  418. case 1:
  419. return &v.sizeCache
  420. case 2:
  421. return &v.unknownFields
  422. default:
  423. return nil
  424. }
  425. }
  426. }
  427. type x struct{}
  428. out := protoimpl.TypeBuilder{
  429. File: protoimpl.DescBuilder{
  430. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  431. RawDescriptor: file_google_iam_v1_iam_policy_proto_rawDesc,
  432. NumEnums: 0,
  433. NumMessages: 4,
  434. NumExtensions: 0,
  435. NumServices: 1,
  436. },
  437. GoTypes: file_google_iam_v1_iam_policy_proto_goTypes,
  438. DependencyIndexes: file_google_iam_v1_iam_policy_proto_depIdxs,
  439. MessageInfos: file_google_iam_v1_iam_policy_proto_msgTypes,
  440. }.Build()
  441. File_google_iam_v1_iam_policy_proto = out.File
  442. file_google_iam_v1_iam_policy_proto_rawDesc = nil
  443. file_google_iam_v1_iam_policy_proto_goTypes = nil
  444. file_google_iam_v1_iam_policy_proto_depIdxs = nil
  445. }
  446. // Reference imports to suppress errors if they are not otherwise used.
  447. var _ context.Context
  448. var _ grpc.ClientConnInterface
  449. // This is a compile-time assertion to ensure that this generated file
  450. // is compatible with the grpc package it is being compiled against.
  451. const _ = grpc.SupportPackageIsVersion6
  452. // IAMPolicyClient is the client API for IAMPolicy service.
  453. //
  454. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  455. type IAMPolicyClient interface {
  456. // Sets the access control policy on the specified resource. Replaces any
  457. // existing policy.
  458. //
  459. // Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
  460. SetIamPolicy(ctx context.Context, in *SetIamPolicyRequest, opts ...grpc.CallOption) (*Policy, error)
  461. // Gets the access control policy for a resource.
  462. // Returns an empty policy if the resource exists and does not have a policy
  463. // set.
  464. GetIamPolicy(ctx context.Context, in *GetIamPolicyRequest, opts ...grpc.CallOption) (*Policy, error)
  465. // Returns permissions that a caller has on the specified resource.
  466. // If the resource does not exist, this will return an empty set of
  467. // permissions, not a `NOT_FOUND` error.
  468. //
  469. // Note: This operation is designed to be used for building permission-aware
  470. // UIs and command-line tools, not for authorization checking. This operation
  471. // may "fail open" without warning.
  472. TestIamPermissions(ctx context.Context, in *TestIamPermissionsRequest, opts ...grpc.CallOption) (*TestIamPermissionsResponse, error)
  473. }
  474. type iAMPolicyClient struct {
  475. cc grpc.ClientConnInterface
  476. }
  477. func NewIAMPolicyClient(cc grpc.ClientConnInterface) IAMPolicyClient {
  478. return &iAMPolicyClient{cc}
  479. }
  480. func (c *iAMPolicyClient) SetIamPolicy(ctx context.Context, in *SetIamPolicyRequest, opts ...grpc.CallOption) (*Policy, error) {
  481. out := new(Policy)
  482. err := c.cc.Invoke(ctx, "/google.iam.v1.IAMPolicy/SetIamPolicy", in, out, opts...)
  483. if err != nil {
  484. return nil, err
  485. }
  486. return out, nil
  487. }
  488. func (c *iAMPolicyClient) GetIamPolicy(ctx context.Context, in *GetIamPolicyRequest, opts ...grpc.CallOption) (*Policy, error) {
  489. out := new(Policy)
  490. err := c.cc.Invoke(ctx, "/google.iam.v1.IAMPolicy/GetIamPolicy", in, out, opts...)
  491. if err != nil {
  492. return nil, err
  493. }
  494. return out, nil
  495. }
  496. func (c *iAMPolicyClient) TestIamPermissions(ctx context.Context, in *TestIamPermissionsRequest, opts ...grpc.CallOption) (*TestIamPermissionsResponse, error) {
  497. out := new(TestIamPermissionsResponse)
  498. err := c.cc.Invoke(ctx, "/google.iam.v1.IAMPolicy/TestIamPermissions", in, out, opts...)
  499. if err != nil {
  500. return nil, err
  501. }
  502. return out, nil
  503. }
  504. // IAMPolicyServer is the server API for IAMPolicy service.
  505. type IAMPolicyServer interface {
  506. // Sets the access control policy on the specified resource. Replaces any
  507. // existing policy.
  508. //
  509. // Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
  510. SetIamPolicy(context.Context, *SetIamPolicyRequest) (*Policy, error)
  511. // Gets the access control policy for a resource.
  512. // Returns an empty policy if the resource exists and does not have a policy
  513. // set.
  514. GetIamPolicy(context.Context, *GetIamPolicyRequest) (*Policy, error)
  515. // Returns permissions that a caller has on the specified resource.
  516. // If the resource does not exist, this will return an empty set of
  517. // permissions, not a `NOT_FOUND` error.
  518. //
  519. // Note: This operation is designed to be used for building permission-aware
  520. // UIs and command-line tools, not for authorization checking. This operation
  521. // may "fail open" without warning.
  522. TestIamPermissions(context.Context, *TestIamPermissionsRequest) (*TestIamPermissionsResponse, error)
  523. }
  524. // UnimplementedIAMPolicyServer can be embedded to have forward compatible implementations.
  525. type UnimplementedIAMPolicyServer struct {
  526. }
  527. func (*UnimplementedIAMPolicyServer) SetIamPolicy(context.Context, *SetIamPolicyRequest) (*Policy, error) {
  528. return nil, status.Errorf(codes.Unimplemented, "method SetIamPolicy not implemented")
  529. }
  530. func (*UnimplementedIAMPolicyServer) GetIamPolicy(context.Context, *GetIamPolicyRequest) (*Policy, error) {
  531. return nil, status.Errorf(codes.Unimplemented, "method GetIamPolicy not implemented")
  532. }
  533. func (*UnimplementedIAMPolicyServer) TestIamPermissions(context.Context, *TestIamPermissionsRequest) (*TestIamPermissionsResponse, error) {
  534. return nil, status.Errorf(codes.Unimplemented, "method TestIamPermissions not implemented")
  535. }
  536. func RegisterIAMPolicyServer(s *grpc.Server, srv IAMPolicyServer) {
  537. s.RegisterService(&_IAMPolicy_serviceDesc, srv)
  538. }
  539. func _IAMPolicy_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  540. in := new(SetIamPolicyRequest)
  541. if err := dec(in); err != nil {
  542. return nil, err
  543. }
  544. if interceptor == nil {
  545. return srv.(IAMPolicyServer).SetIamPolicy(ctx, in)
  546. }
  547. info := &grpc.UnaryServerInfo{
  548. Server: srv,
  549. FullMethod: "/google.iam.v1.IAMPolicy/SetIamPolicy",
  550. }
  551. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  552. return srv.(IAMPolicyServer).SetIamPolicy(ctx, req.(*SetIamPolicyRequest))
  553. }
  554. return interceptor(ctx, in, info, handler)
  555. }
  556. func _IAMPolicy_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  557. in := new(GetIamPolicyRequest)
  558. if err := dec(in); err != nil {
  559. return nil, err
  560. }
  561. if interceptor == nil {
  562. return srv.(IAMPolicyServer).GetIamPolicy(ctx, in)
  563. }
  564. info := &grpc.UnaryServerInfo{
  565. Server: srv,
  566. FullMethod: "/google.iam.v1.IAMPolicy/GetIamPolicy",
  567. }
  568. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  569. return srv.(IAMPolicyServer).GetIamPolicy(ctx, req.(*GetIamPolicyRequest))
  570. }
  571. return interceptor(ctx, in, info, handler)
  572. }
  573. func _IAMPolicy_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  574. in := new(TestIamPermissionsRequest)
  575. if err := dec(in); err != nil {
  576. return nil, err
  577. }
  578. if interceptor == nil {
  579. return srv.(IAMPolicyServer).TestIamPermissions(ctx, in)
  580. }
  581. info := &grpc.UnaryServerInfo{
  582. Server: srv,
  583. FullMethod: "/google.iam.v1.IAMPolicy/TestIamPermissions",
  584. }
  585. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  586. return srv.(IAMPolicyServer).TestIamPermissions(ctx, req.(*TestIamPermissionsRequest))
  587. }
  588. return interceptor(ctx, in, info, handler)
  589. }
  590. var _IAMPolicy_serviceDesc = grpc.ServiceDesc{
  591. ServiceName: "google.iam.v1.IAMPolicy",
  592. HandlerType: (*IAMPolicyServer)(nil),
  593. Methods: []grpc.MethodDesc{
  594. {
  595. MethodName: "SetIamPolicy",
  596. Handler: _IAMPolicy_SetIamPolicy_Handler,
  597. },
  598. {
  599. MethodName: "GetIamPolicy",
  600. Handler: _IAMPolicy_GetIamPolicy_Handler,
  601. },
  602. {
  603. MethodName: "TestIamPermissions",
  604. Handler: _IAMPolicy_TestIamPermissions_Handler,
  605. },
  606. },
  607. Streams: []grpc.StreamDesc{},
  608. Metadata: "google/iam/v1/iam_policy.proto",
  609. }