...

Source file src/cloud.google.com/go/iam/apiv1/iampb/iam_policy.pb.go

Documentation: cloud.google.com/go/iam/apiv1/iampb

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

View as plain text