1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/iam/v1/iam_policy.proto
5 Package iam is a generated protocol buffer package.
7 It is generated from these files:
8 google/iam/v1/iam_policy.proto
9 google/iam/v1/policy.proto
11 It has these top-level messages:
14 TestIamPermissionsRequest
15 TestIamPermissionsResponse
23 import proto "github.com/golang/protobuf/proto"
26 import _ "google.golang.org/genproto/googleapis/api/annotations"
29 context "golang.org/x/net/context"
30 grpc "google.golang.org/grpc"
33 // Reference imports to suppress errors if they are not otherwise used.
38 // This is a compile-time assertion to ensure that this generated file
39 // is compatible with the proto package it is being compiled against.
40 // A compilation error at this line likely means your copy of the
41 // proto package needs to be updated.
42 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
44 // Request message for `SetIamPolicy` method.
45 type SetIamPolicyRequest struct {
46 // REQUIRED: The resource for which the policy is being specified.
47 // `resource` is usually specified as a path. For example, a Project
48 // resource is specified as `projects/{project}`.
49 Resource string `protobuf:"bytes,1,opt,name=resource" json:"resource,omitempty"`
50 // REQUIRED: The complete policy to be applied to the `resource`. The size of
51 // the policy is limited to a few 10s of KB. An empty policy is a
52 // valid policy but certain Cloud Platform services (such as Projects)
54 Policy *Policy `protobuf:"bytes,2,opt,name=policy" json:"policy,omitempty"`
57 func (m *SetIamPolicyRequest) Reset() { *m = SetIamPolicyRequest{} }
58 func (m *SetIamPolicyRequest) String() string { return proto.CompactTextString(m) }
59 func (*SetIamPolicyRequest) ProtoMessage() {}
60 func (*SetIamPolicyRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
62 func (m *SetIamPolicyRequest) GetResource() string {
69 func (m *SetIamPolicyRequest) GetPolicy() *Policy {
76 // Request message for `GetIamPolicy` method.
77 type GetIamPolicyRequest struct {
78 // REQUIRED: The resource for which the policy is being requested.
79 // `resource` is usually specified as a path. For example, a Project
80 // resource is specified as `projects/{project}`.
81 Resource string `protobuf:"bytes,1,opt,name=resource" json:"resource,omitempty"`
84 func (m *GetIamPolicyRequest) Reset() { *m = GetIamPolicyRequest{} }
85 func (m *GetIamPolicyRequest) String() string { return proto.CompactTextString(m) }
86 func (*GetIamPolicyRequest) ProtoMessage() {}
87 func (*GetIamPolicyRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
89 func (m *GetIamPolicyRequest) GetResource() string {
96 // Request message for `TestIamPermissions` method.
97 type TestIamPermissionsRequest struct {
98 // REQUIRED: The resource for which the policy detail is being requested.
99 // `resource` is usually specified as a path. For example, a Project
100 // resource is specified as `projects/{project}`.
101 Resource string `protobuf:"bytes,1,opt,name=resource" json:"resource,omitempty"`
102 // The set of permissions to check for the `resource`. Permissions with
103 // wildcards (such as '*' or 'storage.*') are not allowed. For more
105 // [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
106 Permissions []string `protobuf:"bytes,2,rep,name=permissions" json:"permissions,omitempty"`
109 func (m *TestIamPermissionsRequest) Reset() { *m = TestIamPermissionsRequest{} }
110 func (m *TestIamPermissionsRequest) String() string { return proto.CompactTextString(m) }
111 func (*TestIamPermissionsRequest) ProtoMessage() {}
112 func (*TestIamPermissionsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
114 func (m *TestIamPermissionsRequest) GetResource() string {
121 func (m *TestIamPermissionsRequest) GetPermissions() []string {
128 // Response message for `TestIamPermissions` method.
129 type TestIamPermissionsResponse struct {
130 // A subset of `TestPermissionsRequest.permissions` that the caller is
132 Permissions []string `protobuf:"bytes,1,rep,name=permissions" json:"permissions,omitempty"`
135 func (m *TestIamPermissionsResponse) Reset() { *m = TestIamPermissionsResponse{} }
136 func (m *TestIamPermissionsResponse) String() string { return proto.CompactTextString(m) }
137 func (*TestIamPermissionsResponse) ProtoMessage() {}
138 func (*TestIamPermissionsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
140 func (m *TestIamPermissionsResponse) GetPermissions() []string {
148 proto.RegisterType((*SetIamPolicyRequest)(nil), "google.iam.v1.SetIamPolicyRequest")
149 proto.RegisterType((*GetIamPolicyRequest)(nil), "google.iam.v1.GetIamPolicyRequest")
150 proto.RegisterType((*TestIamPermissionsRequest)(nil), "google.iam.v1.TestIamPermissionsRequest")
151 proto.RegisterType((*TestIamPermissionsResponse)(nil), "google.iam.v1.TestIamPermissionsResponse")
154 // Reference imports to suppress errors if they are not otherwise used.
155 var _ context.Context
156 var _ grpc.ClientConn
158 // This is a compile-time assertion to ensure that this generated file
159 // is compatible with the grpc package it is being compiled against.
160 const _ = grpc.SupportPackageIsVersion4
162 // Client API for IAMPolicy service
164 type IAMPolicyClient interface {
165 // Sets the access control policy on the specified resource. Replaces any
167 SetIamPolicy(ctx context.Context, in *SetIamPolicyRequest, opts ...grpc.CallOption) (*Policy, error)
168 // Gets the access control policy for a resource.
169 // Returns an empty policy if the resource exists and does not have a policy
171 GetIamPolicy(ctx context.Context, in *GetIamPolicyRequest, opts ...grpc.CallOption) (*Policy, error)
172 // Returns permissions that a caller has on the specified resource.
173 // If the resource does not exist, this will return an empty set of
174 // permissions, not a NOT_FOUND error.
175 TestIamPermissions(ctx context.Context, in *TestIamPermissionsRequest, opts ...grpc.CallOption) (*TestIamPermissionsResponse, error)
178 type iAMPolicyClient struct {
182 func NewIAMPolicyClient(cc *grpc.ClientConn) IAMPolicyClient {
183 return &iAMPolicyClient{cc}
186 func (c *iAMPolicyClient) SetIamPolicy(ctx context.Context, in *SetIamPolicyRequest, opts ...grpc.CallOption) (*Policy, error) {
188 err := grpc.Invoke(ctx, "/google.iam.v1.IAMPolicy/SetIamPolicy", in, out, c.cc, opts...)
195 func (c *iAMPolicyClient) GetIamPolicy(ctx context.Context, in *GetIamPolicyRequest, opts ...grpc.CallOption) (*Policy, error) {
197 err := grpc.Invoke(ctx, "/google.iam.v1.IAMPolicy/GetIamPolicy", in, out, c.cc, opts...)
204 func (c *iAMPolicyClient) TestIamPermissions(ctx context.Context, in *TestIamPermissionsRequest, opts ...grpc.CallOption) (*TestIamPermissionsResponse, error) {
205 out := new(TestIamPermissionsResponse)
206 err := grpc.Invoke(ctx, "/google.iam.v1.IAMPolicy/TestIamPermissions", in, out, c.cc, opts...)
213 // Server API for IAMPolicy service
215 type IAMPolicyServer interface {
216 // Sets the access control policy on the specified resource. Replaces any
218 SetIamPolicy(context.Context, *SetIamPolicyRequest) (*Policy, error)
219 // Gets the access control policy for a resource.
220 // Returns an empty policy if the resource exists and does not have a policy
222 GetIamPolicy(context.Context, *GetIamPolicyRequest) (*Policy, error)
223 // Returns permissions that a caller has on the specified resource.
224 // If the resource does not exist, this will return an empty set of
225 // permissions, not a NOT_FOUND error.
226 TestIamPermissions(context.Context, *TestIamPermissionsRequest) (*TestIamPermissionsResponse, error)
229 func RegisterIAMPolicyServer(s *grpc.Server, srv IAMPolicyServer) {
230 s.RegisterService(&_IAMPolicy_serviceDesc, srv)
233 func _IAMPolicy_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
234 in := new(SetIamPolicyRequest)
235 if err := dec(in); err != nil {
238 if interceptor == nil {
239 return srv.(IAMPolicyServer).SetIamPolicy(ctx, in)
241 info := &grpc.UnaryServerInfo{
243 FullMethod: "/google.iam.v1.IAMPolicy/SetIamPolicy",
245 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
246 return srv.(IAMPolicyServer).SetIamPolicy(ctx, req.(*SetIamPolicyRequest))
248 return interceptor(ctx, in, info, handler)
251 func _IAMPolicy_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
252 in := new(GetIamPolicyRequest)
253 if err := dec(in); err != nil {
256 if interceptor == nil {
257 return srv.(IAMPolicyServer).GetIamPolicy(ctx, in)
259 info := &grpc.UnaryServerInfo{
261 FullMethod: "/google.iam.v1.IAMPolicy/GetIamPolicy",
263 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
264 return srv.(IAMPolicyServer).GetIamPolicy(ctx, req.(*GetIamPolicyRequest))
266 return interceptor(ctx, in, info, handler)
269 func _IAMPolicy_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
270 in := new(TestIamPermissionsRequest)
271 if err := dec(in); err != nil {
274 if interceptor == nil {
275 return srv.(IAMPolicyServer).TestIamPermissions(ctx, in)
277 info := &grpc.UnaryServerInfo{
279 FullMethod: "/google.iam.v1.IAMPolicy/TestIamPermissions",
281 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
282 return srv.(IAMPolicyServer).TestIamPermissions(ctx, req.(*TestIamPermissionsRequest))
284 return interceptor(ctx, in, info, handler)
287 var _IAMPolicy_serviceDesc = grpc.ServiceDesc{
288 ServiceName: "google.iam.v1.IAMPolicy",
289 HandlerType: (*IAMPolicyServer)(nil),
290 Methods: []grpc.MethodDesc{
292 MethodName: "SetIamPolicy",
293 Handler: _IAMPolicy_SetIamPolicy_Handler,
296 MethodName: "GetIamPolicy",
297 Handler: _IAMPolicy_GetIamPolicy_Handler,
300 MethodName: "TestIamPermissions",
301 Handler: _IAMPolicy_TestIamPermissions_Handler,
304 Streams: []grpc.StreamDesc{},
305 Metadata: "google/iam/v1/iam_policy.proto",
308 func init() { proto.RegisterFile("google/iam/v1/iam_policy.proto", fileDescriptor0) }
310 var fileDescriptor0 = []byte{
311 // 396 bytes of a gzipped FileDescriptorProto
312 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcf, 0x4a, 0xe3, 0x40,
313 0x18, 0x67, 0x52, 0x28, 0xdb, 0xe9, 0xee, 0xc2, 0xa6, 0x2c, 0xd4, 0x20, 0x25, 0x8c, 0x1e, 0xd2,
314 0x80, 0x13, 0x53, 0x6f, 0x15, 0x05, 0xeb, 0x21, 0xf4, 0x20, 0x94, 0x2a, 0x82, 0x5e, 0x74, 0xac,
315 0x43, 0x18, 0x48, 0x32, 0x31, 0x33, 0x2d, 0x88, 0x78, 0xf1, 0x15, 0xf4, 0xe4, 0x23, 0xf8, 0x3a,
316 0xbe, 0x82, 0x0f, 0xe1, 0x51, 0x92, 0x89, 0x35, 0x6d, 0xaa, 0x54, 0xf0, 0x54, 0x3a, 0xf3, 0xfb,
317 0xf7, 0xfd, 0xbe, 0x0c, 0x6c, 0xf9, 0x9c, 0xfb, 0x01, 0x75, 0x18, 0x09, 0x9d, 0x89, 0x9b, 0xfe,
318 0x9c, 0xc5, 0x3c, 0x60, 0xa3, 0x6b, 0x1c, 0x27, 0x5c, 0x72, 0xfd, 0x8f, 0xba, 0xc7, 0x8c, 0x84,
319 0x78, 0xe2, 0x1a, 0xab, 0x39, 0x9c, 0xc4, 0xcc, 0x21, 0x51, 0xc4, 0x25, 0x91, 0x8c, 0x47, 0x42,
320 0x81, 0x0d, 0x63, 0x56, 0xac, 0x28, 0x84, 0xce, 0x61, 0xe3, 0x90, 0xca, 0x3e, 0x09, 0x07, 0xd9,
321 0xe9, 0x90, 0x5e, 0x8d, 0xa9, 0x90, 0xba, 0x01, 0x7f, 0x25, 0x54, 0xf0, 0x71, 0x32, 0xa2, 0x4d,
322 0x60, 0x02, 0xab, 0x36, 0x9c, 0xfe, 0xd7, 0x37, 0x60, 0x55, 0x49, 0x34, 0x35, 0x13, 0x58, 0xf5,
323 0xce, 0x7f, 0x3c, 0x13, 0x06, 0xe7, 0x4a, 0x39, 0x08, 0xb9, 0xb0, 0xe1, 0x7d, 0xcf, 0x01, 0x9d,
324 0xc0, 0x95, 0x23, 0x2a, 0x32, 0x0e, 0x4d, 0x42, 0x26, 0x44, 0x3a, 0xcc, 0x32, 0xd1, 0x4c, 0x58,
325 0x8f, 0x3f, 0x18, 0x4d, 0xcd, 0xac, 0x58, 0xb5, 0x61, 0xf1, 0x08, 0xed, 0x42, 0x63, 0x91, 0xb4,
326 0x88, 0x79, 0x24, 0x4a, 0x7c, 0x50, 0xe2, 0x77, 0x1e, 0x2a, 0xb0, 0xd6, 0xdf, 0x3b, 0x50, 0xb3,
327 0xe8, 0x12, 0xfe, 0x2e, 0xb6, 0xa7, 0xa3, 0xb9, 0x2a, 0x16, 0x54, 0x6b, 0x2c, 0xae, 0x0b, 0xb5,
328 0xef, 0x9e, 0x5f, 0xee, 0xb5, 0x35, 0xd4, 0x4a, 0x57, 0x74, 0xf3, 0x3e, 0xd1, 0x8e, 0x6d, 0xdf,
329 0x76, 0x45, 0x41, 0xa5, 0x0b, 0xec, 0xd4, 0xd5, 0xfb, 0xca, 0xd5, 0xfb, 0x11, 0x57, 0x7f, 0xce,
330 0xf5, 0x11, 0x40, 0xbd, 0x5c, 0x9d, 0x6e, 0xcd, 0x09, 0x7f, 0xba, 0x38, 0xa3, 0xbd, 0x04, 0x52,
331 0xed, 0x01, 0x39, 0x59, 0xac, 0x36, 0x5a, 0x2f, 0xc7, 0x92, 0x25, 0x56, 0x17, 0xd8, 0xbd, 0x18,
332 0xfe, 0x1b, 0xf1, 0x70, 0xd6, 0xa0, 0xf7, 0x77, 0x9a, 0x7f, 0x90, 0x7e, 0xeb, 0x03, 0x70, 0xba,
333 0x99, 0x03, 0x7c, 0x1e, 0x90, 0xc8, 0xc7, 0x3c, 0xf1, 0x1d, 0x9f, 0x46, 0xd9, 0x4b, 0x70, 0xd4,
334 0x15, 0x89, 0x99, 0xc8, 0x1f, 0xca, 0x36, 0x23, 0xe1, 0x2b, 0x00, 0x4f, 0x5a, 0xc3, 0x53, 0xac,
335 0xfd, 0x80, 0x8f, 0x2f, 0x71, 0x9f, 0x84, 0xf8, 0xd8, 0xbd, 0xa8, 0x66, 0xac, 0xad, 0xb7, 0x00,
336 0x00, 0x00, 0xff, 0xff, 0x6c, 0x3a, 0x2b, 0x4d, 0xaa, 0x03, 0x00, 0x00,