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