Debian Codegraph @

googleapis/cloud/orgpolicy/v1/orgpolicy.pb.go

raw
1 // Copyright 2019 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
16 // Code generated by protoc-gen-go. DO NOT EDIT.
17 // versions:
18 // protoc-gen-go v1.26.0
19 // protoc v3.12.2
20 // source: google/cloud/orgpolicy/v1/orgpolicy.proto
21
22 package orgpolicy
23
24 import (
25 reflect "reflect"
26 sync "sync"
27
28 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30 timestamppb "google.golang.org/protobuf/types/known/timestamppb"
31 )
32
33 const (
34 // Verify that this generated code is sufficiently up-to-date.
35 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
36 // Verify that runtime/protoimpl is sufficiently up-to-date.
37 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
38 )
39
40 // This enum can be used to set `Policies` that apply to all possible
41 // configuration values rather than specific values in `allowed_values` or
42 // `denied_values`.
43 //
44 // Settting this to `ALLOW` will mean this `Policy` allows all values.
45 // Similarly, setting it to `DENY` will mean no values are allowed. If
46 // set to either `ALLOW` or `DENY, `allowed_values` and `denied_values`
47 // must be unset. Setting this to `ALL_VALUES_UNSPECIFIED` allows for
48 // setting `allowed_values` and `denied_values`.
49 type Policy_ListPolicy_AllValues int32
50
51 const (
52 // Indicates that allowed_values or denied_values must be set.
53 Policy_ListPolicy_ALL_VALUES_UNSPECIFIED Policy_ListPolicy_AllValues = 0
54 // A policy with this set allows all values.
55 Policy_ListPolicy_ALLOW Policy_ListPolicy_AllValues = 1
56 // A policy with this set denies all values.
57 Policy_ListPolicy_DENY Policy_ListPolicy_AllValues = 2
58 )
59
60 // Enum value maps for Policy_ListPolicy_AllValues.
61 var (
62 Policy_ListPolicy_AllValues_name = map[int32]string{
63 0: "ALL_VALUES_UNSPECIFIED",
64 1: "ALLOW",
65 2: "DENY",
66 }
67 Policy_ListPolicy_AllValues_value = map[string]int32{
68 "ALL_VALUES_UNSPECIFIED": 0,
69 "ALLOW": 1,
70 "DENY": 2,
71 }
72 )
73
74 func (x Policy_ListPolicy_AllValues) Enum() *Policy_ListPolicy_AllValues {
75 p := new(Policy_ListPolicy_AllValues)
76 *p = x
77 return p
78 }
79
80 func (x Policy_ListPolicy_AllValues) String() string {
81 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
82 }
83
84 func (Policy_ListPolicy_AllValues) Descriptor() protoreflect.EnumDescriptor {
85 return file_google_cloud_orgpolicy_v1_orgpolicy_proto_enumTypes[0].Descriptor()
86 }
87
88 func (Policy_ListPolicy_AllValues) Type() protoreflect.EnumType {
89 return &file_google_cloud_orgpolicy_v1_orgpolicy_proto_enumTypes[0]
90 }
91
92 func (x Policy_ListPolicy_AllValues) Number() protoreflect.EnumNumber {
93 return protoreflect.EnumNumber(x)
94 }
95
96 // Deprecated: Use Policy_ListPolicy_AllValues.Descriptor instead.
97 func (Policy_ListPolicy_AllValues) EnumDescriptor() ([]byte, []int) {
98 return file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescGZIP(), []int{0, 0, 0}
99 }
100
101 // Defines a Cloud Organization `Policy` which is used to specify `Constraints`
102 // for configurations of Cloud Platform resources.
103 type Policy struct {
104 state protoimpl.MessageState
105 sizeCache protoimpl.SizeCache
106 unknownFields protoimpl.UnknownFields
107
108 // Version of the `Policy`. Default version is 0;
109 Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
110 // The name of the `Constraint` the `Policy` is configuring, for example,
111 // `constraints/serviceuser.services`.
112 //
113 // Immutable after creation.
114 Constraint string `protobuf:"bytes,2,opt,name=constraint,proto3" json:"constraint,omitempty"`
115 // An opaque tag indicating the current version of the `Policy`, used for
116 // concurrency control.
117 //
118 // When the `Policy` is returned from either a `GetPolicy` or a
119 // `ListOrgPolicy` request, this `etag` indicates the version of the current
120 // `Policy` to use when executing a read-modify-write loop.
121 //
122 // When the `Policy` is returned from a `GetEffectivePolicy` request, the
123 // `etag` will be unset.
124 //
125 // When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
126 // that was returned from a `GetOrgPolicy` request as part of a
127 // read-modify-write loop for concurrency control. Not setting the `etag`in a
128 // `SetOrgPolicy` request will result in an unconditional write of the
129 // `Policy`.
130 Etag []byte `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"`
131 // The time stamp the `Policy` was previously updated. This is set by the
132 // server, not specified by the caller, and represents the last time a call to
133 // `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
134 // be ignored.
135 UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
136 // The field to populate is based on the `constraint_type` value in the
137 // `Constraint`.
138 //
139 // `list_constraint` => `list_policy`
140 // `boolean_constraint` => `boolean_policy`
141 //
142 // A `restore_default` message may be used with any `Constraint` type.
143 //
144 // Providing a *_policy that is incompatible with the `constraint_type` will
145 // result in an `invalid_argument` error.
146 //
147 // Attempting to set a `Policy` with a `policy_type` not set will result in an
148 // `invalid_argument` error.
149 //
150 // Types that are assignable to PolicyType:
151 //
152 // *Policy_ListPolicy_
153 // *Policy_BooleanPolicy_
154 // *Policy_RestoreDefault_
155 PolicyType isPolicy_PolicyType `protobuf_oneof:"policy_type"`
156 }
157
158 func (x *Policy) Reset() {
159 *x = Policy{}
160 if protoimpl.UnsafeEnabled {
161 mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[0]
162 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
163 ms.StoreMessageInfo(mi)
164 }
165 }
166
167 func (x *Policy) String() string {
168 return protoimpl.X.MessageStringOf(x)
169 }
170
171 func (*Policy) ProtoMessage() {}
172
173 func (x *Policy) ProtoReflect() protoreflect.Message {
174 mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[0]
175 if protoimpl.UnsafeEnabled && x != nil {
176 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
177 if ms.LoadMessageInfo() == nil {
178 ms.StoreMessageInfo(mi)
179 }
180 return ms
181 }
182 return mi.MessageOf(x)
183 }
184
185 // Deprecated: Use Policy.ProtoReflect.Descriptor instead.
186 func (*Policy) Descriptor() ([]byte, []int) {
187 return file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescGZIP(), []int{0}
188 }
189
190 func (x *Policy) GetVersion() int32 {
191 if x != nil {
192 return x.Version
193 }
194 return 0
195 }
196
197 func (x *Policy) GetConstraint() string {
198 if x != nil {
199 return x.Constraint
200 }
201 return ""
202 }
203
204 func (x *Policy) GetEtag() []byte {
205 if x != nil {
206 return x.Etag
207 }
208 return nil
209 }
210
211 func (x *Policy) GetUpdateTime() *timestamppb.Timestamp {
212 if x != nil {
213 return x.UpdateTime
214 }
215 return nil
216 }
217
218 func (m *Policy) GetPolicyType() isPolicy_PolicyType {
219 if m != nil {
220 return m.PolicyType
221 }
222 return nil
223 }
224
225 func (x *Policy) GetListPolicy() *Policy_ListPolicy {
226 if x, ok := x.GetPolicyType().(*Policy_ListPolicy_); ok {
227 return x.ListPolicy
228 }
229 return nil
230 }
231
232 func (x *Policy) GetBooleanPolicy() *Policy_BooleanPolicy {
233 if x, ok := x.GetPolicyType().(*Policy_BooleanPolicy_); ok {
234 return x.BooleanPolicy
235 }
236 return nil
237 }
238
239 func (x *Policy) GetRestoreDefault() *Policy_RestoreDefault {
240 if x, ok := x.GetPolicyType().(*Policy_RestoreDefault_); ok {
241 return x.RestoreDefault
242 }
243 return nil
244 }
245
246 type isPolicy_PolicyType interface {
247 isPolicy_PolicyType()
248 }
249
250 type Policy_ListPolicy_ struct {
251 // List of values either allowed or disallowed.
252 ListPolicy *Policy_ListPolicy `protobuf:"bytes,5,opt,name=list_policy,json=listPolicy,proto3,oneof"`
253 }
254
255 type Policy_BooleanPolicy_ struct {
256 // For boolean `Constraints`, whether to enforce the `Constraint` or not.
257 BooleanPolicy *Policy_BooleanPolicy `protobuf:"bytes,6,opt,name=boolean_policy,json=booleanPolicy,proto3,oneof"`
258 }
259
260 type Policy_RestoreDefault_ struct {
261 // Restores the default behavior of the constraint; independent of
262 // `Constraint` type.
263 RestoreDefault *Policy_RestoreDefault `protobuf:"bytes,7,opt,name=restore_default,json=restoreDefault,proto3,oneof"`
264 }
265
266 func (*Policy_ListPolicy_) isPolicy_PolicyType() {}
267
268 func (*Policy_BooleanPolicy_) isPolicy_PolicyType() {}
269
270 func (*Policy_RestoreDefault_) isPolicy_PolicyType() {}
271
272 // Used in `policy_type` to specify how `list_policy` behaves at this
273 // resource.
274 //
275 // `ListPolicy` can define specific values and subtrees of Cloud Resource
276 // Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that
277 // are allowed or denied by setting the `allowed_values` and `denied_values`
278 // fields. This is achieved by using the `under:` and optional `is:` prefixes.
279 // The `under:` prefix is used to denote resource subtree values.
280 // The `is:` prefix is used to denote specific values, and is required only
281 // if the value contains a ":". Values prefixed with "is:" are treated the
282 // same as values with no prefix.
283 // Ancestry subtrees must be in one of the following formats:
284 // - "projects/<project-id>", e.g. "projects/tokyo-rain-123"
285 // - "folders/<folder-id>", e.g. "folders/1234"
286 // - "organizations/<organization-id>", e.g. "organizations/1234"
287 //
288 // The `supports_under` field of the associated `Constraint` defines whether
289 // ancestry prefixes can be used. You can set `allowed_values` and
290 // `denied_values` in the same `Policy` if `all_values` is
291 // `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used to allow or deny all
292 // values. If `all_values` is set to either `ALLOW` or `DENY`,
293 // `allowed_values` and `denied_values` must be unset.
294 type Policy_ListPolicy struct {
295 state protoimpl.MessageState
296 sizeCache protoimpl.SizeCache
297 unknownFields protoimpl.UnknownFields
298
299 // List of values allowed at this resource. Can only be set if `all_values`
300 // is set to `ALL_VALUES_UNSPECIFIED`.
301 AllowedValues []string `protobuf:"bytes,1,rep,name=allowed_values,json=allowedValues,proto3" json:"allowed_values,omitempty"`
302 // List of values denied at this resource. Can only be set if `all_values`
303 // is set to `ALL_VALUES_UNSPECIFIED`.
304 DeniedValues []string `protobuf:"bytes,2,rep,name=denied_values,json=deniedValues,proto3" json:"denied_values,omitempty"`
305 // The policy all_values state.
306 AllValues Policy_ListPolicy_AllValues `protobuf:"varint,3,opt,name=all_values,json=allValues,proto3,enum=google.cloud.orgpolicy.v1.Policy_ListPolicy_AllValues" json:"all_values,omitempty"`
307 // Optional. The Google Cloud Console will try to default to a configuration
308 // that matches the value specified in this `Policy`. If `suggested_value`
309 // is not set, it will inherit the value specified higher in the hierarchy,
310 // unless `inherit_from_parent` is `false`.
311 SuggestedValue string `protobuf:"bytes,4,opt,name=suggested_value,json=suggestedValue,proto3" json:"suggested_value,omitempty"`
312 // Determines the inheritance behavior for this `Policy`.
313 //
314 // By default, a `ListPolicy` set at a resource supercedes any `Policy` set
315 // anywhere up the resource hierarchy. However, if `inherit_from_parent` is
316 // set to `true`, then the values from the effective `Policy` of the parent
317 // resource are inherited, meaning the values set in this `Policy` are
318 // added to the values inherited up the hierarchy.
319 //
320 // Setting `Policy` hierarchies that inherit both allowed values and denied
321 // values isn't recommended in most circumstances to keep the configuration
322 // simple and understandable. However, it is possible to set a `Policy` with
323 // `allowed_values` set that inherits a `Policy` with `denied_values` set.
324 // In this case, the values that are allowed must be in `allowed_values` and
325 // not present in `denied_values`.
326 //
327 // For example, suppose you have a `Constraint`
328 // `constraints/serviceuser.services`, which has a `constraint_type` of
329 // `list_constraint`, and with `constraint_default` set to `ALLOW`.
330 // Suppose that at the Organization level, a `Policy` is applied that
331 // restricts the allowed API activations to {`E1`, `E2`}. Then, if a
332 // `Policy` is applied to a project below the Organization that has
333 // `inherit_from_parent` set to `false` and field all_values set to DENY,
334 // then an attempt to activate any API will be denied.
335 //
336 // The following examples demonstrate different possible layerings for
337 // `projects/bar` parented by `organizations/foo`:
338 //
339 // Example 1 (no inherited values):
340 //
341 // `organizations/foo` has a `Policy` with values:
342 // {allowed_values: "E1" allowed_values:"E2"}
343 // `projects/bar` has `inherit_from_parent` `false` and values:
344 // {allowed_values: "E3" allowed_values: "E4"}
345 //
346 // The accepted values at `organizations/foo` are `E1`, `E2`.
347 // The accepted values at `projects/bar` are `E3`, and `E4`.
348 //
349 // Example 2 (inherited values):
350 //
351 // `organizations/foo` has a `Policy` with values:
352 // {allowed_values: "E1" allowed_values:"E2"}
353 // `projects/bar` has a `Policy` with values:
354 // {value: "E3" value: "E4" inherit_from_parent: true}
355 //
356 // The accepted values at `organizations/foo` are `E1`, `E2`.
357 // The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
358 //
359 // Example 3 (inheriting both allowed and denied values):
360 //
361 // `organizations/foo` has a `Policy` with values:
362 // {allowed_values: "E1" allowed_values: "E2"}
363 // `projects/bar` has a `Policy` with:
364 // {denied_values: "E1"}
365 //
366 // The accepted values at `organizations/foo` are `E1`, `E2`.
367 // The value accepted at `projects/bar` is `E2`.
368 //
369 // Example 4 (RestoreDefault):
370 //
371 // `organizations/foo` has a `Policy` with values:
372 // {allowed_values: "E1" allowed_values:"E2"}
373 // `projects/bar` has a `Policy` with values:
374 // {RestoreDefault: {}}
375 //
376 // The accepted values at `organizations/foo` are `E1`, `E2`.
377 // The accepted values at `projects/bar` are either all or none depending on
378 // the value of `constraint_default` (if `ALLOW`, all; if
379 // `DENY`, none).
380 //
381 // Example 5 (no policy inherits parent policy):
382 //
383 // `organizations/foo` has no `Policy` set.
384 // `projects/bar` has no `Policy` set.
385 //
386 // The accepted values at both levels are either all or none depending on
387 // the value of `constraint_default` (if `ALLOW`, all; if
388 // `DENY`, none).
389 //
390 // Example 6 (ListConstraint allowing all):
391 //
392 // `organizations/foo` has a `Policy` with values:
393 // {allowed_values: "E1" allowed_values: "E2"}
394 // `projects/bar` has a `Policy` with:
395 // {all: ALLOW}
396 //
397 // The accepted values at `organizations/foo` are `E1`, E2`.
398 // Any value is accepted at `projects/bar`.
399 //
400 // Example 7 (ListConstraint allowing none):
401 //
402 // `organizations/foo` has a `Policy` with values:
403 // {allowed_values: "E1" allowed_values: "E2"}
404 // `projects/bar` has a `Policy` with:
405 // {all: DENY}
406 //
407 // The accepted values at `organizations/foo` are `E1`, E2`.
408 // No value is accepted at `projects/bar`.
409 //
410 // Example 10 (allowed and denied subtrees of Resource Manager hierarchy):
411 // Given the following resource hierarchy
412 //
413 // O1->{F1, F2}; F1->{P1}; F2->{P2, P3},
414 // `organizations/foo` has a `Policy` with values:
415 // {allowed_values: "under:organizations/O1"}
416 // `projects/bar` has a `Policy` with:
417 // {allowed_values: "under:projects/P3"}
418 // {denied_values: "under:folders/F2"}
419 //
420 // The accepted values at `organizations/foo` are `organizations/O1`,
421 //
422 // `folders/F1`, `folders/F2`, `projects/P1`, `projects/P2`,
423 // `projects/P3`.
424 //
425 // The accepted values at `projects/bar` are `organizations/O1`,
426 //
427 // `folders/F1`, `projects/P1`.
428 InheritFromParent bool `protobuf:"varint,5,opt,name=inherit_from_parent,json=inheritFromParent,proto3" json:"inherit_from_parent,omitempty"`
429 }
430
431 func (x *Policy_ListPolicy) Reset() {
432 *x = Policy_ListPolicy{}
433 if protoimpl.UnsafeEnabled {
434 mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[1]
435 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
436 ms.StoreMessageInfo(mi)
437 }
438 }
439
440 func (x *Policy_ListPolicy) String() string {
441 return protoimpl.X.MessageStringOf(x)
442 }
443
444 func (*Policy_ListPolicy) ProtoMessage() {}
445
446 func (x *Policy_ListPolicy) ProtoReflect() protoreflect.Message {
447 mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[1]
448 if protoimpl.UnsafeEnabled && x != nil {
449 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
450 if ms.LoadMessageInfo() == nil {
451 ms.StoreMessageInfo(mi)
452 }
453 return ms
454 }
455 return mi.MessageOf(x)
456 }
457
458 // Deprecated: Use Policy_ListPolicy.ProtoReflect.Descriptor instead.
459 func (*Policy_ListPolicy) Descriptor() ([]byte, []int) {
460 return file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescGZIP(), []int{0, 0}
461 }
462
463 func (x *Policy_ListPolicy) GetAllowedValues() []string {
464 if x != nil {
465 return x.AllowedValues
466 }
467 return nil
468 }
469
470 func (x *Policy_ListPolicy) GetDeniedValues() []string {
471 if x != nil {
472 return x.DeniedValues
473 }
474 return nil
475 }
476
477 func (x *Policy_ListPolicy) GetAllValues() Policy_ListPolicy_AllValues {
478 if x != nil {
479 return x.AllValues
480 }
481 return Policy_ListPolicy_ALL_VALUES_UNSPECIFIED
482 }
483
484 func (x *Policy_ListPolicy) GetSuggestedValue() string {
485 if x != nil {
486 return x.SuggestedValue
487 }
488 return ""
489 }
490
491 func (x *Policy_ListPolicy) GetInheritFromParent() bool {
492 if x != nil {
493 return x.InheritFromParent
494 }
495 return false
496 }
497
498 // Used in `policy_type` to specify how `boolean_policy` will behave at this
499 // resource.
500 type Policy_BooleanPolicy struct {
501 state protoimpl.MessageState
502 sizeCache protoimpl.SizeCache
503 unknownFields protoimpl.UnknownFields
504
505 // If `true`, then the `Policy` is enforced. If `false`, then any
506 // configuration is acceptable.
507 //
508 // Suppose you have a `Constraint`
509 // `constraints/compute.disableSerialPortAccess` with `constraint_default`
510 // set to `ALLOW`. A `Policy` for that `Constraint` exhibits the following
511 // behavior:
512 // - If the `Policy` at this resource has enforced set to `false`, serial
513 // port connection attempts will be allowed.
514 // - If the `Policy` at this resource has enforced set to `true`, serial
515 // port connection attempts will be refused.
516 // - If the `Policy` at this resource is `RestoreDefault`, serial port
517 // connection attempts will be allowed.
518 // - If no `Policy` is set at this resource or anywhere higher in the
519 // resource hierarchy, serial port connection attempts will be allowed.
520 // - If no `Policy` is set at this resource, but one exists higher in the
521 // resource hierarchy, the behavior is as if the`Policy` were set at
522 // this resource.
523 //
524 // The following examples demonstrate the different possible layerings:
525 //
526 // Example 1 (nearest `Constraint` wins):
527 //
528 // `organizations/foo` has a `Policy` with:
529 // {enforced: false}
530 // `projects/bar` has no `Policy` set.
531 //
532 // The constraint at `projects/bar` and `organizations/foo` will not be
533 // enforced.
534 //
535 // Example 2 (enforcement gets replaced):
536 //
537 // `organizations/foo` has a `Policy` with:
538 // {enforced: false}
539 // `projects/bar` has a `Policy` with:
540 // {enforced: true}
541 //
542 // The constraint at `organizations/foo` is not enforced.
543 // The constraint at `projects/bar` is enforced.
544 //
545 // Example 3 (RestoreDefault):
546 //
547 // `organizations/foo` has a `Policy` with:
548 // {enforced: true}
549 // `projects/bar` has a `Policy` with:
550 // {RestoreDefault: {}}
551 //
552 // The constraint at `organizations/foo` is enforced.
553 // The constraint at `projects/bar` is not enforced, because
554 // `constraint_default` for the `Constraint` is `ALLOW`.
555 Enforced bool `protobuf:"varint,1,opt,name=enforced,proto3" json:"enforced,omitempty"`
556 }
557
558 func (x *Policy_BooleanPolicy) Reset() {
559 *x = Policy_BooleanPolicy{}
560 if protoimpl.UnsafeEnabled {
561 mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[2]
562 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
563 ms.StoreMessageInfo(mi)
564 }
565 }
566
567 func (x *Policy_BooleanPolicy) String() string {
568 return protoimpl.X.MessageStringOf(x)
569 }
570
571 func (*Policy_BooleanPolicy) ProtoMessage() {}
572
573 func (x *Policy_BooleanPolicy) ProtoReflect() protoreflect.Message {
574 mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[2]
575 if protoimpl.UnsafeEnabled && x != nil {
576 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
577 if ms.LoadMessageInfo() == nil {
578 ms.StoreMessageInfo(mi)
579 }
580 return ms
581 }
582 return mi.MessageOf(x)
583 }
584
585 // Deprecated: Use Policy_BooleanPolicy.ProtoReflect.Descriptor instead.
586 func (*Policy_BooleanPolicy) Descriptor() ([]byte, []int) {
587 return file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescGZIP(), []int{0, 1}
588 }
589
590 func (x *Policy_BooleanPolicy) GetEnforced() bool {
591 if x != nil {
592 return x.Enforced
593 }
594 return false
595 }
596
597 // Ignores policies set above this resource and restores the
598 // `constraint_default` enforcement behavior of the specific `Constraint` at
599 // this resource.
600 //
601 // Suppose that `constraint_default` is set to `ALLOW` for the
602 // `Constraint` `constraints/serviceuser.services`. Suppose that organization
603 // foo.com sets a `Policy` at their Organization resource node that restricts
604 // the allowed service activations to deny all service activations. They
605 // could then set a `Policy` with the `policy_type` `restore_default` on
606 // several experimental projects, restoring the `constraint_default`
607 // enforcement of the `Constraint` for only those projects, allowing those
608 // projects to have all services activated.
609 type Policy_RestoreDefault struct {
610 state protoimpl.MessageState
611 sizeCache protoimpl.SizeCache
612 unknownFields protoimpl.UnknownFields
613 }
614
615 func (x *Policy_RestoreDefault) Reset() {
616 *x = Policy_RestoreDefault{}
617 if protoimpl.UnsafeEnabled {
618 mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[3]
619 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
620 ms.StoreMessageInfo(mi)
621 }
622 }
623
624 func (x *Policy_RestoreDefault) String() string {
625 return protoimpl.X.MessageStringOf(x)
626 }
627
628 func (*Policy_RestoreDefault) ProtoMessage() {}
629
630 func (x *Policy_RestoreDefault) ProtoReflect() protoreflect.Message {
631 mi := &file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[3]
632 if protoimpl.UnsafeEnabled && x != nil {
633 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
634 if ms.LoadMessageInfo() == nil {
635 ms.StoreMessageInfo(mi)
636 }
637 return ms
638 }
639 return mi.MessageOf(x)
640 }
641
642 // Deprecated: Use Policy_RestoreDefault.ProtoReflect.Descriptor instead.
643 func (*Policy_RestoreDefault) Descriptor() ([]byte, []int) {
644 return file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescGZIP(), []int{0, 2}
645 }
646
647 var File_google_cloud_orgpolicy_v1_orgpolicy_proto protoreflect.FileDescriptor
648
649 var file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDesc = []byte{
650 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f,
651 0x72, 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x70,
652 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x67, 0x6f, 0x6f,
653 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x72, 0x67, 0x70, 0x6f, 0x6c,
654 0x69, 0x63, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
655 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
656 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x06, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69,
657 0x63, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
658 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a,
659 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
660 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04,
661 0x65, 0x74, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67,
662 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
663 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
664 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
665 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4f, 0x0a,
666 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01,
667 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75,
668 0x64, 0x2e, 0x6f, 0x72, 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50,
669 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
670 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x58,
671 0x0a, 0x0e, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
672 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
673 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x72, 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e,
674 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61,
675 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x6f, 0x6f, 0x6c, 0x65,
676 0x61, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5b, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x74,
677 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28,
678 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64,
679 0x2e, 0x6f, 0x72, 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f,
680 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x66, 0x61,
681 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65,
682 0x66, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0xc6, 0x02, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f,
683 0x6c, 0x69, 0x63, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f,
684 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c,
685 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x64,
686 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
687 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73,
688 0x12, 0x55, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03,
689 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c,
690 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x72, 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x76, 0x31,
691 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69,
692 0x63, 0x79, 0x2e, 0x41, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x09, 0x61, 0x6c,
693 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x75, 0x67, 0x67, 0x65,
694 0x73, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
695 0x52, 0x0e, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65,
696 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d,
697 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69,
698 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74,
699 0x22, 0x3c, 0x0a, 0x09, 0x41, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1a, 0x0a,
700 0x16, 0x41, 0x4c, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50,
701 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c,
702 0x4f, 0x57, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x02, 0x1a, 0x2b,
703 0x0a, 0x0d, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
704 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
705 0x08, 0x52, 0x08, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x1a, 0x10, 0x0a, 0x0e, 0x52,
706 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x42, 0x0d, 0x0a,
707 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0xcc, 0x01, 0x0a,
708 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75,
709 0x64, 0x2e, 0x6f, 0x72, 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x0e,
710 0x4f, 0x72, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
711 0x5a, 0x42, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e,
712 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f,
713 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x72,
714 0x67, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x67, 0x70, 0x6f,
715 0x6c, 0x69, 0x63, 0x79, 0xaa, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c,
716 0x6f, 0x75, 0x64, 0x2e, 0x4f, 0x72, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x56, 0x31,
717 0xca, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c,
718 0x4f, 0x72, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x1c, 0x47,
719 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4f, 0x72,
720 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
721 0x74, 0x6f, 0x33,
722 }
723
724 var (
725 file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescOnce sync.Once
726 file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescData = file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDesc
727 )
728
729 func file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescGZIP() []byte {
730 file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescOnce.Do(func() {
731 file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescData)
732 })
733 return file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDescData
734 }
735
736 var file_google_cloud_orgpolicy_v1_orgpolicy_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
737 var file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
738 var file_google_cloud_orgpolicy_v1_orgpolicy_proto_goTypes = []interface{}{
739 (Policy_ListPolicy_AllValues)(0), // 0: google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues
740 (*Policy)(nil), // 1: google.cloud.orgpolicy.v1.Policy
741 (*Policy_ListPolicy)(nil), // 2: google.cloud.orgpolicy.v1.Policy.ListPolicy
742 (*Policy_BooleanPolicy)(nil), // 3: google.cloud.orgpolicy.v1.Policy.BooleanPolicy
743 (*Policy_RestoreDefault)(nil), // 4: google.cloud.orgpolicy.v1.Policy.RestoreDefault
744 (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
745 }
746 var file_google_cloud_orgpolicy_v1_orgpolicy_proto_depIdxs = []int32{
747 5, // 0: google.cloud.orgpolicy.v1.Policy.update_time:type_name -> google.protobuf.Timestamp
748 2, // 1: google.cloud.orgpolicy.v1.Policy.list_policy:type_name -> google.cloud.orgpolicy.v1.Policy.ListPolicy
749 3, // 2: google.cloud.orgpolicy.v1.Policy.boolean_policy:type_name -> google.cloud.orgpolicy.v1.Policy.BooleanPolicy
750 4, // 3: google.cloud.orgpolicy.v1.Policy.restore_default:type_name -> google.cloud.orgpolicy.v1.Policy.RestoreDefault
751 0, // 4: google.cloud.orgpolicy.v1.Policy.ListPolicy.all_values:type_name -> google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues
752 5, // [5:5] is the sub-list for method output_type
753 5, // [5:5] is the sub-list for method input_type
754 5, // [5:5] is the sub-list for extension type_name
755 5, // [5:5] is the sub-list for extension extendee
756 0, // [0:5] is the sub-list for field type_name
757 }
758
759 func init() { file_google_cloud_orgpolicy_v1_orgpolicy_proto_init() }
760 func file_google_cloud_orgpolicy_v1_orgpolicy_proto_init() {
761 if File_google_cloud_orgpolicy_v1_orgpolicy_proto != nil {
762 return
763 }
764 if !protoimpl.UnsafeEnabled {
765 file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
766 switch v := v.(*Policy); i {
767 case 0:
768 return &v.state
769 case 1:
770 return &v.sizeCache
771 case 2:
772 return &v.unknownFields
773 default:
774 return nil
775 }
776 }
777 file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
778 switch v := v.(*Policy_ListPolicy); i {
779 case 0:
780 return &v.state
781 case 1:
782 return &v.sizeCache
783 case 2:
784 return &v.unknownFields
785 default:
786 return nil
787 }
788 }
789 file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
790 switch v := v.(*Policy_BooleanPolicy); i {
791 case 0:
792 return &v.state
793 case 1:
794 return &v.sizeCache
795 case 2:
796 return &v.unknownFields
797 default:
798 return nil
799 }
800 }
801 file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
802 switch v := v.(*Policy_RestoreDefault); i {
803 case 0:
804 return &v.state
805 case 1:
806 return &v.sizeCache
807 case 2:
808 return &v.unknownFields
809 default:
810 return nil
811 }
812 }
813 }
814 file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes[0].OneofWrappers = []interface{}{
815 (*Policy_ListPolicy_)(nil),
816 (*Policy_BooleanPolicy_)(nil),
817 (*Policy_RestoreDefault_)(nil),
818 }
819 type x struct{}
820 out := protoimpl.TypeBuilder{
821 File: protoimpl.DescBuilder{
822 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
823 RawDescriptor: file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDesc,
824 NumEnums: 1,
825 NumMessages: 4,
826 NumExtensions: 0,
827 NumServices: 0,
828 },
829 GoTypes: file_google_cloud_orgpolicy_v1_orgpolicy_proto_goTypes,
830 DependencyIndexes: file_google_cloud_orgpolicy_v1_orgpolicy_proto_depIdxs,
831 EnumInfos: file_google_cloud_orgpolicy_v1_orgpolicy_proto_enumTypes,
832 MessageInfos: file_google_cloud_orgpolicy_v1_orgpolicy_proto_msgTypes,
833 }.Build()
834 File_google_cloud_orgpolicy_v1_orgpolicy_proto = out.File
835 file_google_cloud_orgpolicy_v1_orgpolicy_proto_rawDesc = nil
836 file_google_cloud_orgpolicy_v1_orgpolicy_proto_goTypes = nil
837 file_google_cloud_orgpolicy_v1_orgpolicy_proto_depIdxs = nil
838 }