policy.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/iam/v1/policy.proto
  3. package iam
  4. import (
  5. fmt "fmt"
  6. proto "github.com/golang/protobuf/proto"
  7. _ "google.golang.org/genproto/googleapis/api/annotations"
  8. math "math"
  9. )
  10. // Reference imports to suppress errors if they are not otherwise used.
  11. var _ = proto.Marshal
  12. var _ = fmt.Errorf
  13. var _ = math.Inf
  14. // This is a compile-time assertion to ensure that this generated file
  15. // is compatible with the proto package it is being compiled against.
  16. // A compilation error at this line likely means your copy of the
  17. // proto package needs to be updated.
  18. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  19. // The type of action performed on a Binding in a policy.
  20. type BindingDelta_Action int32
  21. const (
  22. // Unspecified.
  23. BindingDelta_ACTION_UNSPECIFIED BindingDelta_Action = 0
  24. // Addition of a Binding.
  25. BindingDelta_ADD BindingDelta_Action = 1
  26. // Removal of a Binding.
  27. BindingDelta_REMOVE BindingDelta_Action = 2
  28. )
  29. var BindingDelta_Action_name = map[int32]string{
  30. 0: "ACTION_UNSPECIFIED",
  31. 1: "ADD",
  32. 2: "REMOVE",
  33. }
  34. var BindingDelta_Action_value = map[string]int32{
  35. "ACTION_UNSPECIFIED": 0,
  36. "ADD": 1,
  37. "REMOVE": 2,
  38. }
  39. func (x BindingDelta_Action) String() string {
  40. return proto.EnumName(BindingDelta_Action_name, int32(x))
  41. }
  42. func (BindingDelta_Action) EnumDescriptor() ([]byte, []int) {
  43. return fileDescriptor_a3cd40b8a66b2a99, []int{3, 0}
  44. }
  45. // Defines an Identity and Access Management (IAM) policy. It is used to
  46. // specify access control policies for Cloud Platform resources.
  47. //
  48. //
  49. // A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
  50. // `members` to a `role`, where the members can be user accounts, Google groups,
  51. // Google domains, and service accounts. A `role` is a named list of permissions
  52. // defined by IAM.
  53. //
  54. // **Example**
  55. //
  56. // {
  57. // "bindings": [
  58. // {
  59. // "role": "roles/owner",
  60. // "members": [
  61. // "user:mike@example.com",
  62. // "group:admins@example.com",
  63. // "domain:google.com",
  64. // "serviceAccount:my-other-app@appspot.gserviceaccount.com",
  65. // ]
  66. // },
  67. // {
  68. // "role": "roles/viewer",
  69. // "members": ["user:sean@example.com"]
  70. // }
  71. // ]
  72. // }
  73. //
  74. // For a description of IAM and its features, see the
  75. // [IAM developer's guide](https://cloud.google.com/iam).
  76. type Policy struct {
  77. // Version of the `Policy`. The default version is 0.
  78. Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
  79. // Associates a list of `members` to a `role`.
  80. // Multiple `bindings` must not be specified for the same `role`.
  81. // `bindings` with no members will result in an error.
  82. Bindings []*Binding `protobuf:"bytes,4,rep,name=bindings,proto3" json:"bindings,omitempty"`
  83. // `etag` is used for optimistic concurrency control as a way to help
  84. // prevent simultaneous updates of a policy from overwriting each other.
  85. // It is strongly suggested that systems make use of the `etag` in the
  86. // read-modify-write cycle to perform policy updates in order to avoid race
  87. // conditions: An `etag` is returned in the response to `getIamPolicy`, and
  88. // systems are expected to put that etag in the request to `setIamPolicy` to
  89. // ensure that their change will be applied to the same version of the policy.
  90. //
  91. // If no `etag` is provided in the call to `setIamPolicy`, then the existing
  92. // policy is overwritten blindly.
  93. Etag []byte `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"`
  94. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  95. XXX_unrecognized []byte `json:"-"`
  96. XXX_sizecache int32 `json:"-"`
  97. }
  98. func (m *Policy) Reset() { *m = Policy{} }
  99. func (m *Policy) String() string { return proto.CompactTextString(m) }
  100. func (*Policy) ProtoMessage() {}
  101. func (*Policy) Descriptor() ([]byte, []int) {
  102. return fileDescriptor_a3cd40b8a66b2a99, []int{0}
  103. }
  104. func (m *Policy) XXX_Unmarshal(b []byte) error {
  105. return xxx_messageInfo_Policy.Unmarshal(m, b)
  106. }
  107. func (m *Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  108. return xxx_messageInfo_Policy.Marshal(b, m, deterministic)
  109. }
  110. func (m *Policy) XXX_Merge(src proto.Message) {
  111. xxx_messageInfo_Policy.Merge(m, src)
  112. }
  113. func (m *Policy) XXX_Size() int {
  114. return xxx_messageInfo_Policy.Size(m)
  115. }
  116. func (m *Policy) XXX_DiscardUnknown() {
  117. xxx_messageInfo_Policy.DiscardUnknown(m)
  118. }
  119. var xxx_messageInfo_Policy proto.InternalMessageInfo
  120. func (m *Policy) GetVersion() int32 {
  121. if m != nil {
  122. return m.Version
  123. }
  124. return 0
  125. }
  126. func (m *Policy) GetBindings() []*Binding {
  127. if m != nil {
  128. return m.Bindings
  129. }
  130. return nil
  131. }
  132. func (m *Policy) GetEtag() []byte {
  133. if m != nil {
  134. return m.Etag
  135. }
  136. return nil
  137. }
  138. // Associates `members` with a `role`.
  139. type Binding struct {
  140. // Role that is assigned to `members`.
  141. // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
  142. // Required
  143. Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
  144. // Specifies the identities requesting access for a Cloud Platform resource.
  145. // `members` can have the following values:
  146. //
  147. // * `allUsers`: A special identifier that represents anyone who is
  148. // on the internet; with or without a Google account.
  149. //
  150. // * `allAuthenticatedUsers`: A special identifier that represents anyone
  151. // who is authenticated with a Google account or a service account.
  152. //
  153. // * `user:{emailid}`: An email address that represents a specific Google
  154. // account. For example, `alice@gmail.com` or `joe@example.com`.
  155. //
  156. //
  157. // * `serviceAccount:{emailid}`: An email address that represents a service
  158. // account. For example, `my-other-app@appspot.gserviceaccount.com`.
  159. //
  160. // * `group:{emailid}`: An email address that represents a Google group.
  161. // For example, `admins@example.com`.
  162. //
  163. // * `domain:{domain}`: A Google Apps domain name that represents all the
  164. // users of that domain. For example, `google.com` or `example.com`.
  165. //
  166. //
  167. Members []string `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"`
  168. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  169. XXX_unrecognized []byte `json:"-"`
  170. XXX_sizecache int32 `json:"-"`
  171. }
  172. func (m *Binding) Reset() { *m = Binding{} }
  173. func (m *Binding) String() string { return proto.CompactTextString(m) }
  174. func (*Binding) ProtoMessage() {}
  175. func (*Binding) Descriptor() ([]byte, []int) {
  176. return fileDescriptor_a3cd40b8a66b2a99, []int{1}
  177. }
  178. func (m *Binding) XXX_Unmarshal(b []byte) error {
  179. return xxx_messageInfo_Binding.Unmarshal(m, b)
  180. }
  181. func (m *Binding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  182. return xxx_messageInfo_Binding.Marshal(b, m, deterministic)
  183. }
  184. func (m *Binding) XXX_Merge(src proto.Message) {
  185. xxx_messageInfo_Binding.Merge(m, src)
  186. }
  187. func (m *Binding) XXX_Size() int {
  188. return xxx_messageInfo_Binding.Size(m)
  189. }
  190. func (m *Binding) XXX_DiscardUnknown() {
  191. xxx_messageInfo_Binding.DiscardUnknown(m)
  192. }
  193. var xxx_messageInfo_Binding proto.InternalMessageInfo
  194. func (m *Binding) GetRole() string {
  195. if m != nil {
  196. return m.Role
  197. }
  198. return ""
  199. }
  200. func (m *Binding) GetMembers() []string {
  201. if m != nil {
  202. return m.Members
  203. }
  204. return nil
  205. }
  206. // The difference delta between two policies.
  207. type PolicyDelta struct {
  208. // The delta for Bindings between two policies.
  209. BindingDeltas []*BindingDelta `protobuf:"bytes,1,rep,name=binding_deltas,json=bindingDeltas,proto3" json:"binding_deltas,omitempty"`
  210. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  211. XXX_unrecognized []byte `json:"-"`
  212. XXX_sizecache int32 `json:"-"`
  213. }
  214. func (m *PolicyDelta) Reset() { *m = PolicyDelta{} }
  215. func (m *PolicyDelta) String() string { return proto.CompactTextString(m) }
  216. func (*PolicyDelta) ProtoMessage() {}
  217. func (*PolicyDelta) Descriptor() ([]byte, []int) {
  218. return fileDescriptor_a3cd40b8a66b2a99, []int{2}
  219. }
  220. func (m *PolicyDelta) XXX_Unmarshal(b []byte) error {
  221. return xxx_messageInfo_PolicyDelta.Unmarshal(m, b)
  222. }
  223. func (m *PolicyDelta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  224. return xxx_messageInfo_PolicyDelta.Marshal(b, m, deterministic)
  225. }
  226. func (m *PolicyDelta) XXX_Merge(src proto.Message) {
  227. xxx_messageInfo_PolicyDelta.Merge(m, src)
  228. }
  229. func (m *PolicyDelta) XXX_Size() int {
  230. return xxx_messageInfo_PolicyDelta.Size(m)
  231. }
  232. func (m *PolicyDelta) XXX_DiscardUnknown() {
  233. xxx_messageInfo_PolicyDelta.DiscardUnknown(m)
  234. }
  235. var xxx_messageInfo_PolicyDelta proto.InternalMessageInfo
  236. func (m *PolicyDelta) GetBindingDeltas() []*BindingDelta {
  237. if m != nil {
  238. return m.BindingDeltas
  239. }
  240. return nil
  241. }
  242. // One delta entry for Binding. Each individual change (only one member in each
  243. // entry) to a binding will be a separate entry.
  244. type BindingDelta struct {
  245. // The action that was performed on a Binding.
  246. // Required
  247. Action BindingDelta_Action `protobuf:"varint,1,opt,name=action,proto3,enum=google.iam.v1.BindingDelta_Action" json:"action,omitempty"`
  248. // Role that is assigned to `members`.
  249. // For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
  250. // Required
  251. Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
  252. // A single identity requesting access for a Cloud Platform resource.
  253. // Follows the same format of Binding.members.
  254. // Required
  255. Member string `protobuf:"bytes,3,opt,name=member,proto3" json:"member,omitempty"`
  256. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  257. XXX_unrecognized []byte `json:"-"`
  258. XXX_sizecache int32 `json:"-"`
  259. }
  260. func (m *BindingDelta) Reset() { *m = BindingDelta{} }
  261. func (m *BindingDelta) String() string { return proto.CompactTextString(m) }
  262. func (*BindingDelta) ProtoMessage() {}
  263. func (*BindingDelta) Descriptor() ([]byte, []int) {
  264. return fileDescriptor_a3cd40b8a66b2a99, []int{3}
  265. }
  266. func (m *BindingDelta) XXX_Unmarshal(b []byte) error {
  267. return xxx_messageInfo_BindingDelta.Unmarshal(m, b)
  268. }
  269. func (m *BindingDelta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  270. return xxx_messageInfo_BindingDelta.Marshal(b, m, deterministic)
  271. }
  272. func (m *BindingDelta) XXX_Merge(src proto.Message) {
  273. xxx_messageInfo_BindingDelta.Merge(m, src)
  274. }
  275. func (m *BindingDelta) XXX_Size() int {
  276. return xxx_messageInfo_BindingDelta.Size(m)
  277. }
  278. func (m *BindingDelta) XXX_DiscardUnknown() {
  279. xxx_messageInfo_BindingDelta.DiscardUnknown(m)
  280. }
  281. var xxx_messageInfo_BindingDelta proto.InternalMessageInfo
  282. func (m *BindingDelta) GetAction() BindingDelta_Action {
  283. if m != nil {
  284. return m.Action
  285. }
  286. return BindingDelta_ACTION_UNSPECIFIED
  287. }
  288. func (m *BindingDelta) GetRole() string {
  289. if m != nil {
  290. return m.Role
  291. }
  292. return ""
  293. }
  294. func (m *BindingDelta) GetMember() string {
  295. if m != nil {
  296. return m.Member
  297. }
  298. return ""
  299. }
  300. func init() {
  301. proto.RegisterEnum("google.iam.v1.BindingDelta_Action", BindingDelta_Action_name, BindingDelta_Action_value)
  302. proto.RegisterType((*Policy)(nil), "google.iam.v1.Policy")
  303. proto.RegisterType((*Binding)(nil), "google.iam.v1.Binding")
  304. proto.RegisterType((*PolicyDelta)(nil), "google.iam.v1.PolicyDelta")
  305. proto.RegisterType((*BindingDelta)(nil), "google.iam.v1.BindingDelta")
  306. }
  307. func init() { proto.RegisterFile("google/iam/v1/policy.proto", fileDescriptor_a3cd40b8a66b2a99) }
  308. var fileDescriptor_a3cd40b8a66b2a99 = []byte{
  309. // 403 bytes of a gzipped FileDescriptorProto
  310. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x4d, 0xab, 0x13, 0x31,
  311. 0x14, 0x35, 0xed, 0x73, 0x6a, 0xef, 0xfb, 0xa0, 0x46, 0x28, 0xc3, 0xd3, 0x45, 0x99, 0x55, 0x57,
  312. 0x19, 0x5b, 0x11, 0x41, 0x57, 0xfd, 0x18, 0x65, 0x16, 0xbe, 0x37, 0x46, 0xed, 0x42, 0x0a, 0x8f,
  313. 0x4c, 0x1b, 0x42, 0x64, 0x92, 0x0c, 0x33, 0x63, 0xc1, 0xb5, 0xff, 0x46, 0xf0, 0x8f, 0xf8, 0x8b,
  314. 0x5c, 0xca, 0x24, 0x99, 0x47, 0x0b, 0xe2, 0x2e, 0xe7, 0x9e, 0x73, 0x72, 0xcf, 0xcd, 0x0d, 0x5c,
  315. 0x0b, 0x63, 0x44, 0xc1, 0x63, 0xc9, 0x54, 0x7c, 0x98, 0xc5, 0xa5, 0x29, 0xe4, 0xee, 0x3b, 0x29,
  316. 0x2b, 0xd3, 0x18, 0x7c, 0xe9, 0x38, 0x22, 0x99, 0x22, 0x87, 0xd9, 0xf5, 0x33, 0x2f, 0x65, 0xa5,
  317. 0x8c, 0x99, 0xd6, 0xa6, 0x61, 0x8d, 0x34, 0xba, 0x76, 0xe2, 0xe8, 0x2b, 0x04, 0x99, 0x35, 0xe3,
  318. 0x10, 0x06, 0x07, 0x5e, 0xd5, 0xd2, 0xe8, 0x10, 0x4d, 0xd0, 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7f, 0xbb, 0x49, 0x46, 0xbd, 0xe5, 0x0f, 0x04, 0x8f,
  330. 0x77, 0x46, 0x9d, 0x86, 0x5a, 0xfa, 0x67, 0xc9, 0xda, 0x55, 0x66, 0xe8, 0xcb, 0x73, 0xcf, 0x0a,
  331. 0x53, 0x30, 0x2d, 0x88, 0xa9, 0x44, 0x2c, 0xb8, 0xb6, 0x8b, 0x8e, 0x1d, 0xc5, 0x4a, 0x59, 0xfb,
  332. 0x4f, 0xf3, 0x46, 0x32, 0xf5, 0x07, 0xa1, 0x9f, 0xbd, 0x27, 0xef, 0x9c, 0x6b, 0x55, 0x98, 0x6f,
  333. 0x7b, 0x92, 0x32, 0x45, 0x36, 0xb3, 0xdf, 0x5d, 0x75, 0x6b, 0xab, 0xdb, 0x94, 0xa9, 0xed, 0x66,
  334. 0x96, 0x07, 0xf6, 0xae, 0x17, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x18, 0xca, 0xaa, 0x7f,
  335. 0x02, 0x00, 0x00,
  336. }