Debian Codegraph @

orgpolicy/apiv1/orgpolicypb/orgpolicy.pb.go

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