1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package serviceconfig
22
23 import (
24 reflect "reflect"
25 sync "sync"
26
27 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
28 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
29 descriptorpb "google.golang.org/protobuf/types/descriptorpb"
30 )
31
32 const (
33
34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
35
36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
37 )
38
39
40
41
42
43
44
45
46
47 type FieldPolicy struct {
48 state protoimpl.MessageState
49 sizeCache protoimpl.SizeCache
50 unknownFields protoimpl.UnknownFields
51
52
53
54
55
56
57
58
59
60
61
62 Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
63
64
65
66
67 ResourcePermission string `protobuf:"bytes,2,opt,name=resource_permission,json=resourcePermission,proto3" json:"resource_permission,omitempty"`
68
69 ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
70 }
71
72 func (x *FieldPolicy) Reset() {
73 *x = FieldPolicy{}
74 if protoimpl.UnsafeEnabled {
75 mi := &file_google_api_policy_proto_msgTypes[0]
76 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
77 ms.StoreMessageInfo(mi)
78 }
79 }
80
81 func (x *FieldPolicy) String() string {
82 return protoimpl.X.MessageStringOf(x)
83 }
84
85 func (*FieldPolicy) ProtoMessage() {}
86
87 func (x *FieldPolicy) ProtoReflect() protoreflect.Message {
88 mi := &file_google_api_policy_proto_msgTypes[0]
89 if protoimpl.UnsafeEnabled && x != nil {
90 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
91 if ms.LoadMessageInfo() == nil {
92 ms.StoreMessageInfo(mi)
93 }
94 return ms
95 }
96 return mi.MessageOf(x)
97 }
98
99
100 func (*FieldPolicy) Descriptor() ([]byte, []int) {
101 return file_google_api_policy_proto_rawDescGZIP(), []int{0}
102 }
103
104 func (x *FieldPolicy) GetSelector() string {
105 if x != nil {
106 return x.Selector
107 }
108 return ""
109 }
110
111 func (x *FieldPolicy) GetResourcePermission() string {
112 if x != nil {
113 return x.ResourcePermission
114 }
115 return ""
116 }
117
118 func (x *FieldPolicy) GetResourceType() string {
119 if x != nil {
120 return x.ResourceType
121 }
122 return ""
123 }
124
125
126 type MethodPolicy struct {
127 state protoimpl.MessageState
128 sizeCache protoimpl.SizeCache
129 unknownFields protoimpl.UnknownFields
130
131
132
133
134
135
136
137
138
139 Selector string `protobuf:"bytes,9,opt,name=selector,proto3" json:"selector,omitempty"`
140
141 RequestPolicies []*FieldPolicy `protobuf:"bytes,2,rep,name=request_policies,json=requestPolicies,proto3" json:"request_policies,omitempty"`
142 }
143
144 func (x *MethodPolicy) Reset() {
145 *x = MethodPolicy{}
146 if protoimpl.UnsafeEnabled {
147 mi := &file_google_api_policy_proto_msgTypes[1]
148 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
149 ms.StoreMessageInfo(mi)
150 }
151 }
152
153 func (x *MethodPolicy) String() string {
154 return protoimpl.X.MessageStringOf(x)
155 }
156
157 func (*MethodPolicy) ProtoMessage() {}
158
159 func (x *MethodPolicy) ProtoReflect() protoreflect.Message {
160 mi := &file_google_api_policy_proto_msgTypes[1]
161 if protoimpl.UnsafeEnabled && x != nil {
162 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
163 if ms.LoadMessageInfo() == nil {
164 ms.StoreMessageInfo(mi)
165 }
166 return ms
167 }
168 return mi.MessageOf(x)
169 }
170
171
172 func (*MethodPolicy) Descriptor() ([]byte, []int) {
173 return file_google_api_policy_proto_rawDescGZIP(), []int{1}
174 }
175
176 func (x *MethodPolicy) GetSelector() string {
177 if x != nil {
178 return x.Selector
179 }
180 return ""
181 }
182
183 func (x *MethodPolicy) GetRequestPolicies() []*FieldPolicy {
184 if x != nil {
185 return x.RequestPolicies
186 }
187 return nil
188 }
189
190 var file_google_api_policy_proto_extTypes = []protoimpl.ExtensionInfo{
191 {
192 ExtendedType: (*descriptorpb.FieldOptions)(nil),
193 ExtensionType: (*FieldPolicy)(nil),
194 Field: 158361448,
195 Name: "google.api.field_policy",
196 Tag: "bytes,158361448,opt,name=field_policy",
197 Filename: "google/api/policy.proto",
198 },
199 {
200 ExtendedType: (*descriptorpb.MethodOptions)(nil),
201 ExtensionType: (*MethodPolicy)(nil),
202 Field: 161893301,
203 Name: "google.api.method_policy",
204 Tag: "bytes,161893301,opt,name=method_policy",
205 Filename: "google/api/policy.proto",
206 },
207 }
208
209
210 var (
211
212
213
214 E_FieldPolicy = &file_google_api_policy_proto_extTypes[0]
215 )
216
217
218 var (
219
220
221
222 E_MethodPolicy = &file_google_api_policy_proto_extTypes[1]
223 )
224
225 var File_google_api_policy_proto protoreflect.FileDescriptor
226
227 var file_google_api_policy_proto_rawDesc = []byte{
228 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6c,
229 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
230 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
231 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
232 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64,
233 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74,
234 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74,
235 0x6f, 0x72, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70,
236 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
237 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
238 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
239 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f,
240 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6e, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x68,
241 0x6f, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65,
242 0x63, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65,
243 0x63, 0x74, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
244 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
245 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c,
246 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
247 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x3a, 0x5c, 0x0a, 0x0c, 0x66, 0x69, 0x65, 0x6c,
248 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
249 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
250 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe8, 0xce, 0xc1, 0x4b, 0x20, 0x01, 0x28, 0x0b,
251 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69,
252 0x65, 0x6c, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64,
253 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x60, 0x0a, 0x0d, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
254 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
255 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
256 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb5, 0x97, 0x99, 0x4d, 0x20, 0x01, 0x28, 0x0b,
257 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65,
258 0x74, 0x68, 0x6f, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x6d, 0x65, 0x74, 0x68,
259 0x6f, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x70, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,
260 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0b, 0x50, 0x6f, 0x6c, 0x69,
261 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
262 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e,
263 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,
264 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66,
265 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
266 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
267 0x6f, 0x33,
268 }
269
270 var (
271 file_google_api_policy_proto_rawDescOnce sync.Once
272 file_google_api_policy_proto_rawDescData = file_google_api_policy_proto_rawDesc
273 )
274
275 func file_google_api_policy_proto_rawDescGZIP() []byte {
276 file_google_api_policy_proto_rawDescOnce.Do(func() {
277 file_google_api_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_policy_proto_rawDescData)
278 })
279 return file_google_api_policy_proto_rawDescData
280 }
281
282 var file_google_api_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
283 var file_google_api_policy_proto_goTypes = []interface{}{
284 (*FieldPolicy)(nil),
285 (*MethodPolicy)(nil),
286 (*descriptorpb.FieldOptions)(nil),
287 (*descriptorpb.MethodOptions)(nil),
288 }
289 var file_google_api_policy_proto_depIdxs = []int32{
290 0,
291 2,
292 3,
293 0,
294 1,
295 5,
296 5,
297 3,
298 1,
299 0,
300 }
301
302 func init() { file_google_api_policy_proto_init() }
303 func file_google_api_policy_proto_init() {
304 if File_google_api_policy_proto != nil {
305 return
306 }
307 if !protoimpl.UnsafeEnabled {
308 file_google_api_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
309 switch v := v.(*FieldPolicy); i {
310 case 0:
311 return &v.state
312 case 1:
313 return &v.sizeCache
314 case 2:
315 return &v.unknownFields
316 default:
317 return nil
318 }
319 }
320 file_google_api_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
321 switch v := v.(*MethodPolicy); i {
322 case 0:
323 return &v.state
324 case 1:
325 return &v.sizeCache
326 case 2:
327 return &v.unknownFields
328 default:
329 return nil
330 }
331 }
332 }
333 type x struct{}
334 out := protoimpl.TypeBuilder{
335 File: protoimpl.DescBuilder{
336 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
337 RawDescriptor: file_google_api_policy_proto_rawDesc,
338 NumEnums: 0,
339 NumMessages: 2,
340 NumExtensions: 2,
341 NumServices: 0,
342 },
343 GoTypes: file_google_api_policy_proto_goTypes,
344 DependencyIndexes: file_google_api_policy_proto_depIdxs,
345 MessageInfos: file_google_api_policy_proto_msgTypes,
346 ExtensionInfos: file_google_api_policy_proto_extTypes,
347 }.Build()
348 File_google_api_policy_proto = out.File
349 file_google_api_policy_proto_rawDesc = nil
350 file_google_api_policy_proto_goTypes = nil
351 file_google_api_policy_proto_depIdxs = nil
352 }
353
View as plain text