google-cloud-org_policy-v2 0.6.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -306,6 +306,196 @@ module Google
306
306
  result
307
307
  end
308
308
 
309
+ ##
310
+ # Baseline implementation for the create_custom_constraint REST call
311
+ #
312
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::CreateCustomConstraintRequest]
313
+ # A request object representing the call parameters. Required.
314
+ # @param options [::Gapic::CallOptions]
315
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
316
+ #
317
+ # @yield [result, operation] Access the result along with the TransportOperation object
318
+ # @yieldparam result [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
319
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
320
+ #
321
+ # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
322
+ # A result object deserialized from the server's reply
323
+ def create_custom_constraint request_pb, options = nil
324
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
325
+
326
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_custom_constraint_request request_pb
327
+ query_string_params = if query_string_params.any?
328
+ query_string_params.to_h { |p| p.split "=", 2 }
329
+ else
330
+ {}
331
+ end
332
+
333
+ response = @client_stub.make_http_request(
334
+ verb,
335
+ uri: uri,
336
+ body: body || "",
337
+ params: query_string_params,
338
+ options: options
339
+ )
340
+ operation = ::Gapic::Rest::TransportOperation.new response
341
+ result = ::Google::Cloud::OrgPolicy::V2::CustomConstraint.decode_json response.body, ignore_unknown_fields: true
342
+
343
+ yield result, operation if block_given?
344
+ result
345
+ end
346
+
347
+ ##
348
+ # Baseline implementation for the update_custom_constraint REST call
349
+ #
350
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::UpdateCustomConstraintRequest]
351
+ # A request object representing the call parameters. Required.
352
+ # @param options [::Gapic::CallOptions]
353
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
354
+ #
355
+ # @yield [result, operation] Access the result along with the TransportOperation object
356
+ # @yieldparam result [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
357
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
358
+ #
359
+ # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
360
+ # A result object deserialized from the server's reply
361
+ def update_custom_constraint request_pb, options = nil
362
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
363
+
364
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_custom_constraint_request request_pb
365
+ query_string_params = if query_string_params.any?
366
+ query_string_params.to_h { |p| p.split "=", 2 }
367
+ else
368
+ {}
369
+ end
370
+
371
+ response = @client_stub.make_http_request(
372
+ verb,
373
+ uri: uri,
374
+ body: body || "",
375
+ params: query_string_params,
376
+ options: options
377
+ )
378
+ operation = ::Gapic::Rest::TransportOperation.new response
379
+ result = ::Google::Cloud::OrgPolicy::V2::CustomConstraint.decode_json response.body, ignore_unknown_fields: true
380
+
381
+ yield result, operation if block_given?
382
+ result
383
+ end
384
+
385
+ ##
386
+ # Baseline implementation for the get_custom_constraint REST call
387
+ #
388
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::GetCustomConstraintRequest]
389
+ # A request object representing the call parameters. Required.
390
+ # @param options [::Gapic::CallOptions]
391
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
392
+ #
393
+ # @yield [result, operation] Access the result along with the TransportOperation object
394
+ # @yieldparam result [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
395
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
396
+ #
397
+ # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
398
+ # A result object deserialized from the server's reply
399
+ def get_custom_constraint request_pb, options = nil
400
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
401
+
402
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_custom_constraint_request request_pb
403
+ query_string_params = if query_string_params.any?
404
+ query_string_params.to_h { |p| p.split "=", 2 }
405
+ else
406
+ {}
407
+ end
408
+
409
+ response = @client_stub.make_http_request(
410
+ verb,
411
+ uri: uri,
412
+ body: body || "",
413
+ params: query_string_params,
414
+ options: options
415
+ )
416
+ operation = ::Gapic::Rest::TransportOperation.new response
417
+ result = ::Google::Cloud::OrgPolicy::V2::CustomConstraint.decode_json response.body, ignore_unknown_fields: true
418
+
419
+ yield result, operation if block_given?
420
+ result
421
+ end
422
+
423
+ ##
424
+ # Baseline implementation for the list_custom_constraints REST call
425
+ #
426
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsRequest]
427
+ # A request object representing the call parameters. Required.
428
+ # @param options [::Gapic::CallOptions]
429
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
430
+ #
431
+ # @yield [result, operation] Access the result along with the TransportOperation object
432
+ # @yieldparam result [::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsResponse]
433
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
434
+ #
435
+ # @return [::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsResponse]
436
+ # A result object deserialized from the server's reply
437
+ def list_custom_constraints request_pb, options = nil
438
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
439
+
440
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_constraints_request request_pb
441
+ query_string_params = if query_string_params.any?
442
+ query_string_params.to_h { |p| p.split "=", 2 }
443
+ else
444
+ {}
445
+ end
446
+
447
+ response = @client_stub.make_http_request(
448
+ verb,
449
+ uri: uri,
450
+ body: body || "",
451
+ params: query_string_params,
452
+ options: options
453
+ )
454
+ operation = ::Gapic::Rest::TransportOperation.new response
455
+ result = ::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsResponse.decode_json response.body, ignore_unknown_fields: true
456
+
457
+ yield result, operation if block_given?
458
+ result
459
+ end
460
+
461
+ ##
462
+ # Baseline implementation for the delete_custom_constraint REST call
463
+ #
464
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::DeleteCustomConstraintRequest]
465
+ # A request object representing the call parameters. Required.
466
+ # @param options [::Gapic::CallOptions]
467
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
468
+ #
469
+ # @yield [result, operation] Access the result along with the TransportOperation object
470
+ # @yieldparam result [::Google::Protobuf::Empty]
471
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
472
+ #
473
+ # @return [::Google::Protobuf::Empty]
474
+ # A result object deserialized from the server's reply
475
+ def delete_custom_constraint request_pb, options = nil
476
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
477
+
478
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_custom_constraint_request request_pb
479
+ query_string_params = if query_string_params.any?
480
+ query_string_params.to_h { |p| p.split "=", 2 }
481
+ else
482
+ {}
483
+ end
484
+
485
+ response = @client_stub.make_http_request(
486
+ verb,
487
+ uri: uri,
488
+ body: body || "",
489
+ params: query_string_params,
490
+ options: options
491
+ )
492
+ operation = ::Gapic::Rest::TransportOperation.new response
493
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
494
+
495
+ yield result, operation if block_given?
496
+ result
497
+ end
498
+
309
499
  ##
310
500
  # @private
311
501
  #
@@ -556,6 +746,113 @@ module Google
556
746
  )
557
747
  transcoder.transcode request_pb
558
748
  end
749
+
750
+ ##
751
+ # @private
752
+ #
753
+ # GRPC transcoding helper method for the create_custom_constraint REST call
754
+ #
755
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::CreateCustomConstraintRequest]
756
+ # A request object representing the call parameters. Required.
757
+ # @return [Array(String, [String, nil], Hash{String => String})]
758
+ # Uri, Body, Query string parameters
759
+ def self.transcode_create_custom_constraint_request request_pb
760
+ transcoder = Gapic::Rest::GrpcTranscoder.new
761
+ .with_bindings(
762
+ uri_method: :post,
763
+ uri_template: "/v2/{parent}/customConstraints",
764
+ body: "custom_constraint",
765
+ matches: [
766
+ ["parent", %r{^organizations/[^/]+/?$}, false]
767
+ ]
768
+ )
769
+ transcoder.transcode request_pb
770
+ end
771
+
772
+ ##
773
+ # @private
774
+ #
775
+ # GRPC transcoding helper method for the update_custom_constraint REST call
776
+ #
777
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::UpdateCustomConstraintRequest]
778
+ # A request object representing the call parameters. Required.
779
+ # @return [Array(String, [String, nil], Hash{String => String})]
780
+ # Uri, Body, Query string parameters
781
+ def self.transcode_update_custom_constraint_request request_pb
782
+ transcoder = Gapic::Rest::GrpcTranscoder.new
783
+ .with_bindings(
784
+ uri_method: :patch,
785
+ uri_template: "/v2/{custom_constraint.name}",
786
+ body: "custom_constraint",
787
+ matches: [
788
+ ["custom_constraint.name", %r{^organizations/[^/]+/customConstraints/[^/]+/?$}, false]
789
+ ]
790
+ )
791
+ transcoder.transcode request_pb
792
+ end
793
+
794
+ ##
795
+ # @private
796
+ #
797
+ # GRPC transcoding helper method for the get_custom_constraint REST call
798
+ #
799
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::GetCustomConstraintRequest]
800
+ # A request object representing the call parameters. Required.
801
+ # @return [Array(String, [String, nil], Hash{String => String})]
802
+ # Uri, Body, Query string parameters
803
+ def self.transcode_get_custom_constraint_request request_pb
804
+ transcoder = Gapic::Rest::GrpcTranscoder.new
805
+ .with_bindings(
806
+ uri_method: :get,
807
+ uri_template: "/v2/{name}",
808
+ matches: [
809
+ ["name", %r{^organizations/[^/]+/customConstraints/[^/]+/?$}, false]
810
+ ]
811
+ )
812
+ transcoder.transcode request_pb
813
+ end
814
+
815
+ ##
816
+ # @private
817
+ #
818
+ # GRPC transcoding helper method for the list_custom_constraints REST call
819
+ #
820
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsRequest]
821
+ # A request object representing the call parameters. Required.
822
+ # @return [Array(String, [String, nil], Hash{String => String})]
823
+ # Uri, Body, Query string parameters
824
+ def self.transcode_list_custom_constraints_request request_pb
825
+ transcoder = Gapic::Rest::GrpcTranscoder.new
826
+ .with_bindings(
827
+ uri_method: :get,
828
+ uri_template: "/v2/{parent}/customConstraints",
829
+ matches: [
830
+ ["parent", %r{^organizations/[^/]+/?$}, false]
831
+ ]
832
+ )
833
+ transcoder.transcode request_pb
834
+ end
835
+
836
+ ##
837
+ # @private
838
+ #
839
+ # GRPC transcoding helper method for the delete_custom_constraint REST call
840
+ #
841
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::DeleteCustomConstraintRequest]
842
+ # A request object representing the call parameters. Required.
843
+ # @return [Array(String, [String, nil], Hash{String => String})]
844
+ # Uri, Body, Query string parameters
845
+ def self.transcode_delete_custom_constraint_request request_pb
846
+ transcoder = Gapic::Rest::GrpcTranscoder.new
847
+ .with_bindings(
848
+ uri_method: :delete,
849
+ uri_template: "/v2/{name}",
850
+ matches: [
851
+ ["name", %r{^organizations/[^/]+/customConstraints/[^/]+/?$}, false]
852
+ ]
853
+ )
854
+ transcoder.transcode request_pb
855
+ end
559
856
  end
560
857
  end
561
858
  end
@@ -33,23 +33,23 @@ module Google
33
33
  ##
34
34
  # An interface for managing organization policies.
35
35
  #
36
- # The Cloud Org Policy service provides a simple mechanism for organizations to
37
- # restrict the allowed configurations across their entire Cloud Resource
38
- # hierarchy.
36
+ # The Organization Policy Service provides a simple mechanism for
37
+ # organizations to restrict the allowed configurations across their entire
38
+ # resource hierarchy.
39
39
  #
40
- # You can use a `policy` to configure restrictions in Cloud resources. For
41
- # example, you can enforce a `policy` that restricts which Google
42
- # Cloud Platform APIs can be activated in a certain part of your resource
43
- # hierarchy, or prevents serial port access to VM instances in a particular
44
- # folder.
40
+ # You can use a policy to configure restrictions on resources. For
41
+ # example, you can enforce a policy that restricts which Google
42
+ # Cloud APIs can be activated in a certain part of your resource
43
+ # hierarchy, or prevents serial port access to VM instances in a
44
+ # particular folder.
45
45
  #
46
- # `Policies` are inherited down through the resource hierarchy. A `policy`
46
+ # Policies are inherited down through the resource hierarchy. A policy
47
47
  # applied to a parent resource automatically applies to all its child resources
48
- # unless overridden with a `policy` lower in the hierarchy.
48
+ # unless overridden with a policy lower in the hierarchy.
49
49
  #
50
- # A `constraint` defines an aspect of a resource's configuration that can be
51
- # controlled by an organization's policy administrator. `Policies` are a
52
- # collection of `constraints` that defines their allowable configuration on a
50
+ # A constraint defines an aspect of a resource's configuration that can be
51
+ # controlled by an organization's policy administrator. Policies are a
52
+ # collection of constraints that defines their allowable configuration on a
53
53
  # particular resource and its child resources.
54
54
  #
55
55
  # To load this service and instantiate a REST client:
@@ -34,23 +34,23 @@ module Google
34
34
  ##
35
35
  # An interface for managing organization policies.
36
36
  #
37
- # The Cloud Org Policy service provides a simple mechanism for organizations to
38
- # restrict the allowed configurations across their entire Cloud Resource
39
- # hierarchy.
37
+ # The Organization Policy Service provides a simple mechanism for
38
+ # organizations to restrict the allowed configurations across their entire
39
+ # resource hierarchy.
40
40
  #
41
- # You can use a `policy` to configure restrictions in Cloud resources. For
42
- # example, you can enforce a `policy` that restricts which Google
43
- # Cloud Platform APIs can be activated in a certain part of your resource
44
- # hierarchy, or prevents serial port access to VM instances in a particular
45
- # folder.
41
+ # You can use a policy to configure restrictions on resources. For
42
+ # example, you can enforce a policy that restricts which Google
43
+ # Cloud APIs can be activated in a certain part of your resource
44
+ # hierarchy, or prevents serial port access to VM instances in a
45
+ # particular folder.
46
46
  #
47
- # `Policies` are inherited down through the resource hierarchy. A `policy`
47
+ # Policies are inherited down through the resource hierarchy. A policy
48
48
  # applied to a parent resource automatically applies to all its child resources
49
- # unless overridden with a `policy` lower in the hierarchy.
49
+ # unless overridden with a policy lower in the hierarchy.
50
50
  #
51
- # A `constraint` defines an aspect of a resource's configuration that can be
52
- # controlled by an organization's policy administrator. `Policies` are a
53
- # collection of `constraints` that defines their allowable configuration on a
51
+ # A constraint defines an aspect of a resource's configuration that can be
52
+ # controlled by an organization's policy administrator. Policies are a
53
+ # collection of constraints that defines their allowable configuration on a
54
54
  # particular resource and its child resources.
55
55
  #
56
56
  # @example Load this service and instantiate a gRPC client
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module OrgPolicy
23
23
  module V2
24
- VERSION = "0.6.0"
24
+ VERSION = "0.8.0"
25
25
  end
26
26
  end
27
27
  end
@@ -9,7 +9,7 @@ require 'google/api/resource_pb'
9
9
  require 'google/protobuf/timestamp_pb'
10
10
 
11
11
 
12
- descriptor_data = "\n*google/cloud/orgpolicy/v2/constraint.proto\x12\x19google.cloud.orgpolicy.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb7\x05\n\nConstraint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12S\n\x12\x63onstraint_default\x18\x04 \x01(\x0e\x32\x37.google.cloud.orgpolicy.v2.Constraint.ConstraintDefault\x12O\n\x0flist_constraint\x18\x05 \x01(\x0b\x32\x34.google.cloud.orgpolicy.v2.Constraint.ListConstraintH\x00\x12U\n\x12\x62oolean_constraint\x18\x06 \x01(\x0b\x32\x37.google.cloud.orgpolicy.v2.Constraint.BooleanConstraintH\x00\x1a=\n\x0eListConstraint\x12\x13\n\x0bsupports_in\x18\x01 \x01(\x08\x12\x16\n\x0esupports_under\x18\x02 \x01(\x08\x1a\x13\n\x11\x42ooleanConstraint\"L\n\x11\x43onstraintDefault\x12\"\n\x1e\x43ONSTRAINT_DEFAULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02:\xb8\x01\xea\x41\xb4\x01\n#orgpolicy.googleapis.com/Constraint\x12+projects/{project}/constraints/{constraint}\x12)folders/{folder}/constraints/{constraint}\x12\x35organizations/{organization}/constraints/{constraint}B\x11\n\x0f\x63onstraint_typeB\xc6\x01\n\x1d\x63om.google.cloud.orgpolicy.v2B\x0f\x43onstraintProtoP\x01Z;cloud.google.com/go/orgpolicy/apiv2/orgpolicypb;orgpolicypb\xaa\x02\x19Google.Cloud.OrgPolicy.V2\xca\x02\x19Google\\Cloud\\OrgPolicy\\V2\xea\x02\x1cGoogle::Cloud::OrgPolicy::V2b\x06proto3"
12
+ descriptor_data = "\n*google/cloud/orgpolicy/v2/constraint.proto\x12\x19google.cloud.orgpolicy.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd1\x05\n\nConstraint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12S\n\x12\x63onstraint_default\x18\x04 \x01(\x0e\x32\x37.google.cloud.orgpolicy.v2.Constraint.ConstraintDefault\x12O\n\x0flist_constraint\x18\x05 \x01(\x0b\x32\x34.google.cloud.orgpolicy.v2.Constraint.ListConstraintH\x00\x12U\n\x12\x62oolean_constraint\x18\x06 \x01(\x0b\x32\x37.google.cloud.orgpolicy.v2.Constraint.BooleanConstraintH\x00\x12\x18\n\x10supports_dry_run\x18\x07 \x01(\x08\x1a=\n\x0eListConstraint\x12\x13\n\x0bsupports_in\x18\x01 \x01(\x08\x12\x16\n\x0esupports_under\x18\x02 \x01(\x08\x1a\x13\n\x11\x42ooleanConstraint\"L\n\x11\x43onstraintDefault\x12\"\n\x1e\x43ONSTRAINT_DEFAULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02:\xb8\x01\xea\x41\xb4\x01\n#orgpolicy.googleapis.com/Constraint\x12+projects/{project}/constraints/{constraint}\x12)folders/{folder}/constraints/{constraint}\x12\x35organizations/{organization}/constraints/{constraint}B\x11\n\x0f\x63onstraint_type\"\xd4\x04\n\x10\x43ustomConstraint\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x1b\n\x0eresource_types\x18\x02 \x03(\tB\x03\xe0\x41\x05\x12L\n\x0cmethod_types\x18\x03 \x03(\x0e\x32\x36.google.cloud.orgpolicy.v2.CustomConstraint.MethodType\x12\x11\n\tcondition\x18\x04 \x01(\t\x12K\n\x0b\x61\x63tion_type\x18\x05 \x01(\x0e\x32\x36.google.cloud.orgpolicy.v2.CustomConstraint.ActionType\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"M\n\nMethodType\x12\x1b\n\x17METHOD_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\">\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02:r\xea\x41o\n)orgpolicy.googleapis.com/CustomConstraint\x12\x42organizations/{organization}/customConstraints/{custom_constraint}B\xc6\x01\n\x1d\x63om.google.cloud.orgpolicy.v2B\x0f\x43onstraintProtoP\x01Z;cloud.google.com/go/orgpolicy/apiv2/orgpolicypb;orgpolicypb\xaa\x02\x19Google.Cloud.OrgPolicy.V2\xca\x02\x19Google\\Cloud\\OrgPolicy\\V2\xea\x02\x1cGoogle::Cloud::OrgPolicy::V2b\x06proto3"
13
13
 
14
14
  pool = Google::Protobuf::DescriptorPool.generated_pool
15
15
 
@@ -24,6 +24,7 @@ rescue TypeError => e
24
24
  file = pool.add_serialized_file(serialized)
25
25
  warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
26
  imports = [
27
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
27
28
  ]
28
29
  imports.each do |type_name, expected_filename|
29
30
  import_file = pool.lookup(type_name).file_descriptor
@@ -43,6 +44,9 @@ module Google
43
44
  Constraint::ListConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.Constraint.ListConstraint").msgclass
44
45
  Constraint::BooleanConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.Constraint.BooleanConstraint").msgclass
45
46
  Constraint::ConstraintDefault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.Constraint.ConstraintDefault").enummodule
47
+ CustomConstraint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.CustomConstraint").msgclass
48
+ CustomConstraint::MethodType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.CustomConstraint.MethodType").enummodule
49
+ CustomConstraint::ActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.CustomConstraint.ActionType").enummodule
46
50
  end
47
51
  end
48
52
  end
@@ -15,7 +15,7 @@ require 'google/protobuf/timestamp_pb'
15
15
  require 'google/type/expr_pb'
16
16
 
17
17
 
18
- descriptor_data = "\n)google/cloud/orgpolicy/v2/orgpolicy.proto\x12\x19google.cloud.orgpolicy.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/orgpolicy/v2/constraint.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\xf6\x02\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x33\n\x04spec\x18\x02 \x01(\x0b\x32%.google.cloud.orgpolicy.v2.PolicySpec\x12\x45\n\talternate\x18\x03 \x01(\x0b\x32..google.cloud.orgpolicy.v2.AlternatePolicySpecB\x02\x18\x01\x12;\n\x0c\x64ry_run_spec\x18\x04 \x01(\x0b\x32%.google.cloud.orgpolicy.v2.PolicySpec:\x9f\x01\xea\x41\x9b\x01\n\x1forgpolicy.googleapis.com/Policy\x12$projects/{project}/policies/{policy}\x12\"folders/{folder}/policies/{policy}\x12.organizations/{organization}/policies/{policy}\"Z\n\x13\x41lternatePolicySpec\x12\x0e\n\x06launch\x18\x01 \x01(\t\x12\x33\n\x04spec\x18\x02 \x01(\x0b\x32%.google.cloud.orgpolicy.v2.PolicySpec\"\xc6\x03\n\nPolicySpec\x12\x0c\n\x04\x65tag\x18\x01 \x01(\t\x12\x34\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x05rules\x18\x03 \x03(\x0b\x32\x30.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule\x12\x1b\n\x13inherit_from_parent\x18\x04 \x01(\x08\x12\r\n\x05reset\x18\x05 \x01(\x08\x1a\x86\x02\n\nPolicyRule\x12O\n\x06values\x18\x01 \x01(\x0b\x32=.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValuesH\x00\x12\x13\n\tallow_all\x18\x02 \x01(\x08H\x00\x12\x12\n\x08\x64\x65ny_all\x18\x03 \x01(\x08H\x00\x12\x11\n\x07\x65nforce\x18\x04 \x01(\x08H\x00\x12$\n\tcondition\x18\x05 \x01(\x0b\x32\x11.google.type.Expr\x1a=\n\x0cStringValues\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x12\x15\n\rdenied_values\x18\x02 \x03(\tB\x06\n\x04kind\"|\n\x16ListConstraintsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#orgpolicy.googleapis.com/Constraint\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n\x17ListConstraintsResponse\x12:\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32%.google.cloud.orgpolicy.v2.Constraint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"u\n\x13ListPoliciesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1forgpolicy.googleapis.com/Policy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"d\n\x14ListPoliciesResponse\x12\x33\n\x08policies\x18\x01 \x03(\x0b\x32!.google.cloud.orgpolicy.v2.Policy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x10GetPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1forgpolicy.googleapis.com/Policy\"R\n\x19GetEffectivePolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1forgpolicy.googleapis.com/Policy\"\x86\x01\n\x13\x43reatePolicyRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1forgpolicy.googleapis.com/Policy\x12\x36\n\x06policy\x18\x03 \x01(\x0b\x32!.google.cloud.orgpolicy.v2.PolicyB\x03\xe0\x41\x02\"~\n\x13UpdatePolicyRequest\x12\x36\n\x06policy\x18\x01 \x01(\x0b\x32!.google.cloud.orgpolicy.v2.PolicyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"L\n\x13\x44\x65letePolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1forgpolicy.googleapis.com/Policy2\xbd\x0e\n\tOrgPolicy\x12\x81\x02\n\x0fListConstraints\x12\x31.google.cloud.orgpolicy.v2.ListConstraintsRequest\x1a\x32.google.cloud.orgpolicy.v2.ListConstraintsResponse\"\x86\x01\x82\xd3\xe4\x93\x02w\x12#/v2/{parent=projects/*}/constraintsZ$\x12\"/v2/{parent=folders/*}/constraintsZ*\x12(/v2/{parent=organizations/*}/constraints\xda\x41\x06parent\x12\xee\x01\n\x0cListPolicies\x12..google.cloud.orgpolicy.v2.ListPoliciesRequest\x1a/.google.cloud.orgpolicy.v2.ListPoliciesResponse\"}\x82\xd3\xe4\x93\x02n\x12 /v2/{parent=projects/*}/policiesZ!\x12\x1f/v2/{parent=folders/*}/policiesZ\'\x12%/v2/{parent=organizations/*}/policies\xda\x41\x06parent\x12\xd8\x01\n\tGetPolicy\x12+.google.cloud.orgpolicy.v2.GetPolicyRequest\x1a!.google.cloud.orgpolicy.v2.Policy\"{\x82\xd3\xe4\x93\x02n\x12 /v2/{name=projects/*/policies/*}Z!\x12\x1f/v2/{name=folders/*/policies/*}Z\'\x12%/v2/{name=organizations/*/policies/*}\xda\x41\x04name\x12\xa5\x02\n\x12GetEffectivePolicy\x12\x34.google.cloud.orgpolicy.v2.GetEffectivePolicyRequest\x1a!.google.cloud.orgpolicy.v2.Policy\"\xb5\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x33/v2/{name=projects/*/policies/*}:getEffectivePolicyZ4\x12\x32/v2/{name=folders/*/policies/*}:getEffectivePolicyZ:\x12\x38/v2/{name=organizations/*/policies/*}:getEffectivePolicy\xda\x41\x04name\x12\x81\x02\n\x0c\x43reatePolicy\x12..google.cloud.orgpolicy.v2.CreatePolicyRequest\x1a!.google.cloud.orgpolicy.v2.Policy\"\x9d\x01\x82\xd3\xe4\x93\x02\x86\x01\" /v2/{parent=projects/*}/policies:\x06policyZ)\"\x1f/v2/{parent=folders/*}/policies:\x06policyZ/\"%/v2/{parent=organizations/*}/policies:\x06policy\xda\x41\rparent,policy\x12\x8f\x02\n\x0cUpdatePolicy\x12..google.cloud.orgpolicy.v2.UpdatePolicyRequest\x1a!.google.cloud.orgpolicy.v2.Policy\"\xab\x01\x82\xd3\xe4\x93\x02\x9b\x01\x32\'/v2/{policy.name=projects/*/policies/*}:\x06policyZ02&/v2/{policy.name=folders/*/policies/*}:\x06policyZ62,/v2/{policy.name=organizations/*/policies/*}:\x06policy\xda\x41\x06policy\x12\xd3\x01\n\x0c\x44\x65letePolicy\x12..google.cloud.orgpolicy.v2.DeletePolicyRequest\x1a\x16.google.protobuf.Empty\"{\x82\xd3\xe4\x93\x02n* /v2/{name=projects/*/policies/*}Z!*\x1f/v2/{name=folders/*/policies/*}Z\'*%/v2/{name=organizations/*/policies/*}\xda\x41\x04name\x1aL\xca\x41\x18orgpolicy.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc5\x01\n\x1d\x63om.google.cloud.orgpolicy.v2B\x0eOrgPolicyProtoP\x01Z;cloud.google.com/go/orgpolicy/apiv2/orgpolicypb;orgpolicypb\xaa\x02\x19Google.Cloud.OrgPolicy.V2\xca\x02\x19Google\\Cloud\\OrgPolicy\\V2\xea\x02\x1cGoogle::Cloud::OrgPolicy::V2b\x06proto3"
18
+ descriptor_data = "\n)google/cloud/orgpolicy/v2/orgpolicy.proto\x12\x19google.cloud.orgpolicy.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/orgpolicy/v2/constraint.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/expr.proto\"\x89\x03\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x33\n\x04spec\x18\x02 \x01(\x0b\x32%.google.cloud.orgpolicy.v2.PolicySpec\x12\x45\n\talternate\x18\x03 \x01(\x0b\x32..google.cloud.orgpolicy.v2.AlternatePolicySpecB\x02\x18\x01\x12;\n\x0c\x64ry_run_spec\x18\x04 \x01(\x0b\x32%.google.cloud.orgpolicy.v2.PolicySpec\x12\x11\n\x04\x65tag\x18\x05 \x01(\tB\x03\xe0\x41\x01:\x9f\x01\xea\x41\x9b\x01\n\x1forgpolicy.googleapis.com/Policy\x12$projects/{project}/policies/{policy}\x12\"folders/{folder}/policies/{policy}\x12.organizations/{organization}/policies/{policy}\"Z\n\x13\x41lternatePolicySpec\x12\x0e\n\x06launch\x18\x01 \x01(\t\x12\x33\n\x04spec\x18\x02 \x01(\x0b\x32%.google.cloud.orgpolicy.v2.PolicySpec\"\xc6\x03\n\nPolicySpec\x12\x0c\n\x04\x65tag\x18\x01 \x01(\t\x12\x34\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x05rules\x18\x03 \x03(\x0b\x32\x30.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule\x12\x1b\n\x13inherit_from_parent\x18\x04 \x01(\x08\x12\r\n\x05reset\x18\x05 \x01(\x08\x1a\x86\x02\n\nPolicyRule\x12O\n\x06values\x18\x01 \x01(\x0b\x32=.google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValuesH\x00\x12\x13\n\tallow_all\x18\x02 \x01(\x08H\x00\x12\x12\n\x08\x64\x65ny_all\x18\x03 \x01(\x08H\x00\x12\x11\n\x07\x65nforce\x18\x04 \x01(\x08H\x00\x12$\n\tcondition\x18\x05 \x01(\x0b\x32\x11.google.type.Expr\x1a=\n\x0cStringValues\x12\x16\n\x0e\x61llowed_values\x18\x01 \x03(\t\x12\x15\n\rdenied_values\x18\x02 \x03(\tB\x06\n\x04kind\"|\n\x16ListConstraintsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#orgpolicy.googleapis.com/Constraint\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"n\n\x17ListConstraintsResponse\x12:\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32%.google.cloud.orgpolicy.v2.Constraint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"u\n\x13ListPoliciesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1forgpolicy.googleapis.com/Policy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"d\n\x14ListPoliciesResponse\x12\x33\n\x08policies\x18\x01 \x03(\x0b\x32!.google.cloud.orgpolicy.v2.Policy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"I\n\x10GetPolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1forgpolicy.googleapis.com/Policy\"R\n\x19GetEffectivePolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1forgpolicy.googleapis.com/Policy\"\x86\x01\n\x13\x43reatePolicyRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1forgpolicy.googleapis.com/Policy\x12\x36\n\x06policy\x18\x03 \x01(\x0b\x32!.google.cloud.orgpolicy.v2.PolicyB\x03\xe0\x41\x02\"~\n\x13UpdatePolicyRequest\x12\x36\n\x06policy\x18\x01 \x01(\x0b\x32!.google.cloud.orgpolicy.v2.PolicyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"_\n\x13\x44\x65letePolicyRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1forgpolicy.googleapis.com/Policy\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n\x1d\x43reateCustomConstraintRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)orgpolicy.googleapis.com/CustomConstraint\x12K\n\x11\x63ustom_constraint\x18\x02 \x01(\x0b\x32+.google.cloud.orgpolicy.v2.CustomConstraintB\x03\xe0\x41\x02\"]\n\x1aGetCustomConstraintRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)orgpolicy.googleapis.com/CustomConstraint\"\x88\x01\n\x1cListCustomConstraintsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)orgpolicy.googleapis.com/CustomConstraint\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x81\x01\n\x1dListCustomConstraintsResponse\x12G\n\x12\x63ustom_constraints\x18\x01 \x03(\x0b\x32+.google.cloud.orgpolicy.v2.CustomConstraint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x1dUpdateCustomConstraintRequest\x12K\n\x11\x63ustom_constraint\x18\x01 \x01(\x0b\x32+.google.cloud.orgpolicy.v2.CustomConstraintB\x03\xe0\x41\x02\"`\n\x1d\x44\x65leteCustomConstraintRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)orgpolicy.googleapis.com/CustomConstraint2\xcd\x16\n\tOrgPolicy\x12\x81\x02\n\x0fListConstraints\x12\x31.google.cloud.orgpolicy.v2.ListConstraintsRequest\x1a\x32.google.cloud.orgpolicy.v2.ListConstraintsResponse\"\x86\x01\x82\xd3\xe4\x93\x02w\x12#/v2/{parent=projects/*}/constraintsZ$\x12\"/v2/{parent=folders/*}/constraintsZ*\x12(/v2/{parent=organizations/*}/constraints\xda\x41\x06parent\x12\xee\x01\n\x0cListPolicies\x12..google.cloud.orgpolicy.v2.ListPoliciesRequest\x1a/.google.cloud.orgpolicy.v2.ListPoliciesResponse\"}\x82\xd3\xe4\x93\x02n\x12 /v2/{parent=projects/*}/policiesZ!\x12\x1f/v2/{parent=folders/*}/policiesZ\'\x12%/v2/{parent=organizations/*}/policies\xda\x41\x06parent\x12\xd8\x01\n\tGetPolicy\x12+.google.cloud.orgpolicy.v2.GetPolicyRequest\x1a!.google.cloud.orgpolicy.v2.Policy\"{\x82\xd3\xe4\x93\x02n\x12 /v2/{name=projects/*/policies/*}Z!\x12\x1f/v2/{name=folders/*/policies/*}Z\'\x12%/v2/{name=organizations/*/policies/*}\xda\x41\x04name\x12\xa5\x02\n\x12GetEffectivePolicy\x12\x34.google.cloud.orgpolicy.v2.GetEffectivePolicyRequest\x1a!.google.cloud.orgpolicy.v2.Policy\"\xb5\x01\x82\xd3\xe4\x93\x02\xa7\x01\x12\x33/v2/{name=projects/*/policies/*}:getEffectivePolicyZ4\x12\x32/v2/{name=folders/*/policies/*}:getEffectivePolicyZ:\x12\x38/v2/{name=organizations/*/policies/*}:getEffectivePolicy\xda\x41\x04name\x12\x81\x02\n\x0c\x43reatePolicy\x12..google.cloud.orgpolicy.v2.CreatePolicyRequest\x1a!.google.cloud.orgpolicy.v2.Policy\"\x9d\x01\x82\xd3\xe4\x93\x02\x86\x01\" /v2/{parent=projects/*}/policies:\x06policyZ)\"\x1f/v2/{parent=folders/*}/policies:\x06policyZ/\"%/v2/{parent=organizations/*}/policies:\x06policy\xda\x41\rparent,policy\x12\x8f\x02\n\x0cUpdatePolicy\x12..google.cloud.orgpolicy.v2.UpdatePolicyRequest\x1a!.google.cloud.orgpolicy.v2.Policy\"\xab\x01\x82\xd3\xe4\x93\x02\x9b\x01\x32\'/v2/{policy.name=projects/*/policies/*}:\x06policyZ02&/v2/{policy.name=folders/*/policies/*}:\x06policyZ62,/v2/{policy.name=organizations/*/policies/*}:\x06policy\xda\x41\x06policy\x12\xd3\x01\n\x0c\x44\x65letePolicy\x12..google.cloud.orgpolicy.v2.DeletePolicyRequest\x1a\x16.google.protobuf.Empty\"{\x82\xd3\xe4\x93\x02n* /v2/{name=projects/*/policies/*}Z!*\x1f/v2/{name=folders/*/policies/*}Z\'*%/v2/{name=organizations/*/policies/*}\xda\x41\x04name\x12\xe5\x01\n\x16\x43reateCustomConstraint\x12\x38.google.cloud.orgpolicy.v2.CreateCustomConstraintRequest\x1a+.google.cloud.orgpolicy.v2.CustomConstraint\"d\x82\xd3\xe4\x93\x02\x43\"./v2/{parent=organizations/*}/customConstraints:\x11\x63ustom_constraint\xda\x41\x18parent,custom_constraint\x12\xf0\x01\n\x16UpdateCustomConstraint\x12\x38.google.cloud.orgpolicy.v2.UpdateCustomConstraintRequest\x1a+.google.cloud.orgpolicy.v2.CustomConstraint\"o\x82\xd3\xe4\x93\x02U2@/v2/{custom_constraint.name=organizations/*/customConstraints/*}:\x11\x63ustom_constraint\xda\x41\x11\x63ustom_constraint\x12\xb8\x01\n\x13GetCustomConstraint\x12\x35.google.cloud.orgpolicy.v2.GetCustomConstraintRequest\x1a+.google.cloud.orgpolicy.v2.CustomConstraint\"=\x82\xd3\xe4\x93\x02\x30\x12./v2/{name=organizations/*/customConstraints/*}\xda\x41\x04name\x12\xcb\x01\n\x15ListCustomConstraints\x12\x37.google.cloud.orgpolicy.v2.ListCustomConstraintsRequest\x1a\x38.google.cloud.orgpolicy.v2.ListCustomConstraintsResponse\"?\x82\xd3\xe4\x93\x02\x30\x12./v2/{parent=organizations/*}/customConstraints\xda\x41\x06parent\x12\xa9\x01\n\x16\x44\x65leteCustomConstraint\x12\x38.google.cloud.orgpolicy.v2.DeleteCustomConstraintRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x02\x30*./v2/{name=organizations/*/customConstraints/*}\xda\x41\x04name\x1aL\xca\x41\x18orgpolicy.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc5\x01\n\x1d\x63om.google.cloud.orgpolicy.v2B\x0eOrgPolicyProtoP\x01Z;cloud.google.com/go/orgpolicy/apiv2/orgpolicypb;orgpolicypb\xaa\x02\x19Google.Cloud.OrgPolicy.V2\xca\x02\x19Google\\Cloud\\OrgPolicy\\V2\xea\x02\x1cGoogle::Cloud::OrgPolicy::V2b\x06proto3"
19
19
 
20
20
  pool = Google::Protobuf::DescriptorPool.generated_pool
21
21
 
@@ -63,6 +63,12 @@ module Google
63
63
  CreatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.CreatePolicyRequest").msgclass
64
64
  UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.UpdatePolicyRequest").msgclass
65
65
  DeletePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.DeletePolicyRequest").msgclass
66
+ CreateCustomConstraintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.CreateCustomConstraintRequest").msgclass
67
+ GetCustomConstraintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.GetCustomConstraintRequest").msgclass
68
+ ListCustomConstraintsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.ListCustomConstraintsRequest").msgclass
69
+ ListCustomConstraintsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.ListCustomConstraintsResponse").msgclass
70
+ UpdateCustomConstraintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.UpdateCustomConstraintRequest").msgclass
71
+ DeleteCustomConstraintRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v2.DeleteCustomConstraintRequest").msgclass
66
72
  end
67
73
  end
68
74
  end
@@ -26,23 +26,23 @@ module Google
26
26
  module OrgPolicy
27
27
  # An interface for managing organization policies.
28
28
  #
29
- # The Cloud Org Policy service provides a simple mechanism for organizations to
30
- # restrict the allowed configurations across their entire Cloud Resource
31
- # hierarchy.
29
+ # The Organization Policy Service provides a simple mechanism for
30
+ # organizations to restrict the allowed configurations across their entire
31
+ # resource hierarchy.
32
32
  #
33
- # You can use a `policy` to configure restrictions in Cloud resources. For
34
- # example, you can enforce a `policy` that restricts which Google
35
- # Cloud Platform APIs can be activated in a certain part of your resource
36
- # hierarchy, or prevents serial port access to VM instances in a particular
37
- # folder.
33
+ # You can use a policy to configure restrictions on resources. For
34
+ # example, you can enforce a policy that restricts which Google
35
+ # Cloud APIs can be activated in a certain part of your resource
36
+ # hierarchy, or prevents serial port access to VM instances in a
37
+ # particular folder.
38
38
  #
39
- # `Policies` are inherited down through the resource hierarchy. A `policy`
39
+ # Policies are inherited down through the resource hierarchy. A policy
40
40
  # applied to a parent resource automatically applies to all its child resources
41
- # unless overridden with a `policy` lower in the hierarchy.
41
+ # unless overridden with a policy lower in the hierarchy.
42
42
  #
43
- # A `constraint` defines an aspect of a resource's configuration that can be
44
- # controlled by an organization's policy administrator. `Policies` are a
45
- # collection of `constraints` that defines their allowable configuration on a
43
+ # A constraint defines an aspect of a resource's configuration that can be
44
+ # controlled by an organization's policy administrator. Policies are a
45
+ # collection of constraints that defines their allowable configuration on a
46
46
  # particular resource and its child resources.
47
47
  class Service
48
48
 
@@ -52,31 +52,31 @@ module Google
52
52
  self.unmarshal_class_method = :decode
53
53
  self.service_name = 'google.cloud.orgpolicy.v2.OrgPolicy'
54
54
 
55
- # Lists `Constraints` that could be applied on the specified resource.
55
+ # Lists constraints that could be applied on the specified resource.
56
56
  rpc :ListConstraints, ::Google::Cloud::OrgPolicy::V2::ListConstraintsRequest, ::Google::Cloud::OrgPolicy::V2::ListConstraintsResponse
57
- # Retrieves all of the `Policies` that exist on a particular resource.
57
+ # Retrieves all of the policies that exist on a particular resource.
58
58
  rpc :ListPolicies, ::Google::Cloud::OrgPolicy::V2::ListPoliciesRequest, ::Google::Cloud::OrgPolicy::V2::ListPoliciesResponse
59
- # Gets a `Policy` on a resource.
59
+ # Gets a policy on a resource.
60
60
  #
61
- # If no `Policy` is set on the resource, NOT_FOUND is returned. The
61
+ # If no policy is set on the resource, `NOT_FOUND` is returned. The
62
62
  # `etag` value can be used with `UpdatePolicy()` to update a
63
- # `Policy` during read-modify-write.
63
+ # policy during read-modify-write.
64
64
  rpc :GetPolicy, ::Google::Cloud::OrgPolicy::V2::GetPolicyRequest, ::Google::Cloud::OrgPolicy::V2::Policy
65
- # Gets the effective `Policy` on a resource. This is the result of merging
66
- # `Policies` in the resource hierarchy and evaluating conditions. The
67
- # returned `Policy` will not have an `etag` or `condition` set because it is
68
- # a computed `Policy` across multiple resources.
65
+ # Gets the effective policy on a resource. This is the result of merging
66
+ # policies in the resource hierarchy and evaluating conditions. The
67
+ # returned policy will not have an `etag` or `condition` set because it is
68
+ # an evaluated policy across multiple resources.
69
69
  # Subtrees of Resource Manager resource hierarchy with 'under:' prefix will
70
70
  # not be expanded.
71
71
  rpc :GetEffectivePolicy, ::Google::Cloud::OrgPolicy::V2::GetEffectivePolicyRequest, ::Google::Cloud::OrgPolicy::V2::Policy
72
- # Creates a Policy.
72
+ # Creates a policy.
73
73
  #
74
74
  # Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
75
75
  # constraint does not exist.
76
76
  # Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the
77
- # policy already exists on the given Cloud resource.
77
+ # policy already exists on the given Google Cloud resource.
78
78
  rpc :CreatePolicy, ::Google::Cloud::OrgPolicy::V2::CreatePolicyRequest, ::Google::Cloud::OrgPolicy::V2::Policy
79
- # Updates a Policy.
79
+ # Updates a policy.
80
80
  #
81
81
  # Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
82
82
  # constraint or the policy do not exist.
@@ -86,11 +86,39 @@ module Google
86
86
  # Note: the supplied policy will perform a full overwrite of all
87
87
  # fields.
88
88
  rpc :UpdatePolicy, ::Google::Cloud::OrgPolicy::V2::UpdatePolicyRequest, ::Google::Cloud::OrgPolicy::V2::Policy
89
- # Deletes a Policy.
89
+ # Deletes a policy.
90
90
  #
91
91
  # Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
92
- # constraint or Org Policy does not exist.
92
+ # constraint or organization policy does not exist.
93
93
  rpc :DeletePolicy, ::Google::Cloud::OrgPolicy::V2::DeletePolicyRequest, ::Google::Protobuf::Empty
94
+ # Creates a custom constraint.
95
+ #
96
+ # Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
97
+ # organization does not exist.
98
+ # Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the
99
+ # constraint already exists on the given organization.
100
+ rpc :CreateCustomConstraint, ::Google::Cloud::OrgPolicy::V2::CreateCustomConstraintRequest, ::Google::Cloud::OrgPolicy::V2::CustomConstraint
101
+ # Updates a custom constraint.
102
+ #
103
+ # Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
104
+ # constraint does not exist.
105
+ #
106
+ # Note: the supplied policy will perform a full overwrite of all
107
+ # fields.
108
+ rpc :UpdateCustomConstraint, ::Google::Cloud::OrgPolicy::V2::UpdateCustomConstraintRequest, ::Google::Cloud::OrgPolicy::V2::CustomConstraint
109
+ # Gets a custom constraint.
110
+ #
111
+ # Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
112
+ # custom constraint does not exist.
113
+ rpc :GetCustomConstraint, ::Google::Cloud::OrgPolicy::V2::GetCustomConstraintRequest, ::Google::Cloud::OrgPolicy::V2::CustomConstraint
114
+ # Retrieves all of the custom constraints that exist on a particular
115
+ # organization resource.
116
+ rpc :ListCustomConstraints, ::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsRequest, ::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsResponse
117
+ # Deletes a custom constraint.
118
+ #
119
+ # Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the
120
+ # constraint does not exist.
121
+ rpc :DeleteCustomConstraint, ::Google::Cloud::OrgPolicy::V2::DeleteCustomConstraintRequest, ::Google::Protobuf::Empty
94
122
  end
95
123
 
96
124
  Stub = Service.rpc_stub_class
@@ -304,6 +304,19 @@ module Google
304
304
  # seconds: 360 # 6 minutes
305
305
  # total_poll_timeout:
306
306
  # seconds: 54000 # 90 minutes
307
+ # @!attribute [rw] auto_populated_fields
308
+ # @return [::Array<::String>]
309
+ # List of top-level fields of the request message, that should be
310
+ # automatically populated by the client libraries based on their
311
+ # (google.api.field_info).format. Currently supported format: UUID4.
312
+ #
313
+ # Example of a YAML configuration:
314
+ #
315
+ # publishing:
316
+ # method_settings:
317
+ # - selector: google.example.v1.ExampleService.CreateExample
318
+ # auto_populated_fields:
319
+ # - request_id
307
320
  class MethodSettings
308
321
  include ::Google::Protobuf::MessageExts
309
322
  extend ::Google::Protobuf::MessageExts::ClassMethods