google-cloud-org_policy-v2 0.7.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,16 +30,28 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, credentials:
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
34
  # These require statements are intentionally placed here to initialize
35
35
  # the REST modules only when it's required.
36
36
  require "gapic/rest"
37
37
 
38
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
39
42
  numeric_enums: true,
40
43
  raise_faraday_errors: false
41
44
  end
42
45
 
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
43
55
  ##
44
56
  # Baseline implementation for the list_constraints REST call
45
57
  #
@@ -306,6 +318,196 @@ module Google
306
318
  result
307
319
  end
308
320
 
321
+ ##
322
+ # Baseline implementation for the create_custom_constraint REST call
323
+ #
324
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::CreateCustomConstraintRequest]
325
+ # A request object representing the call parameters. Required.
326
+ # @param options [::Gapic::CallOptions]
327
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
328
+ #
329
+ # @yield [result, operation] Access the result along with the TransportOperation object
330
+ # @yieldparam result [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
331
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
332
+ #
333
+ # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
334
+ # A result object deserialized from the server's reply
335
+ def create_custom_constraint request_pb, options = nil
336
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
337
+
338
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_custom_constraint_request request_pb
339
+ query_string_params = if query_string_params.any?
340
+ query_string_params.to_h { |p| p.split "=", 2 }
341
+ else
342
+ {}
343
+ end
344
+
345
+ response = @client_stub.make_http_request(
346
+ verb,
347
+ uri: uri,
348
+ body: body || "",
349
+ params: query_string_params,
350
+ options: options
351
+ )
352
+ operation = ::Gapic::Rest::TransportOperation.new response
353
+ result = ::Google::Cloud::OrgPolicy::V2::CustomConstraint.decode_json response.body, ignore_unknown_fields: true
354
+
355
+ yield result, operation if block_given?
356
+ result
357
+ end
358
+
359
+ ##
360
+ # Baseline implementation for the update_custom_constraint REST call
361
+ #
362
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::UpdateCustomConstraintRequest]
363
+ # A request object representing the call parameters. Required.
364
+ # @param options [::Gapic::CallOptions]
365
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
366
+ #
367
+ # @yield [result, operation] Access the result along with the TransportOperation object
368
+ # @yieldparam result [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
369
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
370
+ #
371
+ # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
372
+ # A result object deserialized from the server's reply
373
+ def update_custom_constraint request_pb, options = nil
374
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
375
+
376
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_custom_constraint_request request_pb
377
+ query_string_params = if query_string_params.any?
378
+ query_string_params.to_h { |p| p.split "=", 2 }
379
+ else
380
+ {}
381
+ end
382
+
383
+ response = @client_stub.make_http_request(
384
+ verb,
385
+ uri: uri,
386
+ body: body || "",
387
+ params: query_string_params,
388
+ options: options
389
+ )
390
+ operation = ::Gapic::Rest::TransportOperation.new response
391
+ result = ::Google::Cloud::OrgPolicy::V2::CustomConstraint.decode_json response.body, ignore_unknown_fields: true
392
+
393
+ yield result, operation if block_given?
394
+ result
395
+ end
396
+
397
+ ##
398
+ # Baseline implementation for the get_custom_constraint REST call
399
+ #
400
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::GetCustomConstraintRequest]
401
+ # A request object representing the call parameters. Required.
402
+ # @param options [::Gapic::CallOptions]
403
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
404
+ #
405
+ # @yield [result, operation] Access the result along with the TransportOperation object
406
+ # @yieldparam result [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
407
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
408
+ #
409
+ # @return [::Google::Cloud::OrgPolicy::V2::CustomConstraint]
410
+ # A result object deserialized from the server's reply
411
+ def get_custom_constraint request_pb, options = nil
412
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
413
+
414
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_custom_constraint_request request_pb
415
+ query_string_params = if query_string_params.any?
416
+ query_string_params.to_h { |p| p.split "=", 2 }
417
+ else
418
+ {}
419
+ end
420
+
421
+ response = @client_stub.make_http_request(
422
+ verb,
423
+ uri: uri,
424
+ body: body || "",
425
+ params: query_string_params,
426
+ options: options
427
+ )
428
+ operation = ::Gapic::Rest::TransportOperation.new response
429
+ result = ::Google::Cloud::OrgPolicy::V2::CustomConstraint.decode_json response.body, ignore_unknown_fields: true
430
+
431
+ yield result, operation if block_given?
432
+ result
433
+ end
434
+
435
+ ##
436
+ # Baseline implementation for the list_custom_constraints REST call
437
+ #
438
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsRequest]
439
+ # A request object representing the call parameters. Required.
440
+ # @param options [::Gapic::CallOptions]
441
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
442
+ #
443
+ # @yield [result, operation] Access the result along with the TransportOperation object
444
+ # @yieldparam result [::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsResponse]
445
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
446
+ #
447
+ # @return [::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsResponse]
448
+ # A result object deserialized from the server's reply
449
+ def list_custom_constraints request_pb, options = nil
450
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
451
+
452
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_custom_constraints_request request_pb
453
+ query_string_params = if query_string_params.any?
454
+ query_string_params.to_h { |p| p.split "=", 2 }
455
+ else
456
+ {}
457
+ end
458
+
459
+ response = @client_stub.make_http_request(
460
+ verb,
461
+ uri: uri,
462
+ body: body || "",
463
+ params: query_string_params,
464
+ options: options
465
+ )
466
+ operation = ::Gapic::Rest::TransportOperation.new response
467
+ result = ::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsResponse.decode_json response.body, ignore_unknown_fields: true
468
+
469
+ yield result, operation if block_given?
470
+ result
471
+ end
472
+
473
+ ##
474
+ # Baseline implementation for the delete_custom_constraint REST call
475
+ #
476
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::DeleteCustomConstraintRequest]
477
+ # A request object representing the call parameters. Required.
478
+ # @param options [::Gapic::CallOptions]
479
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
480
+ #
481
+ # @yield [result, operation] Access the result along with the TransportOperation object
482
+ # @yieldparam result [::Google::Protobuf::Empty]
483
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
484
+ #
485
+ # @return [::Google::Protobuf::Empty]
486
+ # A result object deserialized from the server's reply
487
+ def delete_custom_constraint request_pb, options = nil
488
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
489
+
490
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_custom_constraint_request request_pb
491
+ query_string_params = if query_string_params.any?
492
+ query_string_params.to_h { |p| p.split "=", 2 }
493
+ else
494
+ {}
495
+ end
496
+
497
+ response = @client_stub.make_http_request(
498
+ verb,
499
+ uri: uri,
500
+ body: body || "",
501
+ params: query_string_params,
502
+ options: options
503
+ )
504
+ operation = ::Gapic::Rest::TransportOperation.new response
505
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
506
+
507
+ yield result, operation if block_given?
508
+ result
509
+ end
510
+
309
511
  ##
310
512
  # @private
311
513
  #
@@ -556,6 +758,113 @@ module Google
556
758
  )
557
759
  transcoder.transcode request_pb
558
760
  end
761
+
762
+ ##
763
+ # @private
764
+ #
765
+ # GRPC transcoding helper method for the create_custom_constraint REST call
766
+ #
767
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::CreateCustomConstraintRequest]
768
+ # A request object representing the call parameters. Required.
769
+ # @return [Array(String, [String, nil], Hash{String => String})]
770
+ # Uri, Body, Query string parameters
771
+ def self.transcode_create_custom_constraint_request request_pb
772
+ transcoder = Gapic::Rest::GrpcTranscoder.new
773
+ .with_bindings(
774
+ uri_method: :post,
775
+ uri_template: "/v2/{parent}/customConstraints",
776
+ body: "custom_constraint",
777
+ matches: [
778
+ ["parent", %r{^organizations/[^/]+/?$}, false]
779
+ ]
780
+ )
781
+ transcoder.transcode request_pb
782
+ end
783
+
784
+ ##
785
+ # @private
786
+ #
787
+ # GRPC transcoding helper method for the update_custom_constraint REST call
788
+ #
789
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::UpdateCustomConstraintRequest]
790
+ # A request object representing the call parameters. Required.
791
+ # @return [Array(String, [String, nil], Hash{String => String})]
792
+ # Uri, Body, Query string parameters
793
+ def self.transcode_update_custom_constraint_request request_pb
794
+ transcoder = Gapic::Rest::GrpcTranscoder.new
795
+ .with_bindings(
796
+ uri_method: :patch,
797
+ uri_template: "/v2/{custom_constraint.name}",
798
+ body: "custom_constraint",
799
+ matches: [
800
+ ["custom_constraint.name", %r{^organizations/[^/]+/customConstraints/[^/]+/?$}, false]
801
+ ]
802
+ )
803
+ transcoder.transcode request_pb
804
+ end
805
+
806
+ ##
807
+ # @private
808
+ #
809
+ # GRPC transcoding helper method for the get_custom_constraint REST call
810
+ #
811
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::GetCustomConstraintRequest]
812
+ # A request object representing the call parameters. Required.
813
+ # @return [Array(String, [String, nil], Hash{String => String})]
814
+ # Uri, Body, Query string parameters
815
+ def self.transcode_get_custom_constraint_request request_pb
816
+ transcoder = Gapic::Rest::GrpcTranscoder.new
817
+ .with_bindings(
818
+ uri_method: :get,
819
+ uri_template: "/v2/{name}",
820
+ matches: [
821
+ ["name", %r{^organizations/[^/]+/customConstraints/[^/]+/?$}, false]
822
+ ]
823
+ )
824
+ transcoder.transcode request_pb
825
+ end
826
+
827
+ ##
828
+ # @private
829
+ #
830
+ # GRPC transcoding helper method for the list_custom_constraints REST call
831
+ #
832
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::ListCustomConstraintsRequest]
833
+ # A request object representing the call parameters. Required.
834
+ # @return [Array(String, [String, nil], Hash{String => String})]
835
+ # Uri, Body, Query string parameters
836
+ def self.transcode_list_custom_constraints_request request_pb
837
+ transcoder = Gapic::Rest::GrpcTranscoder.new
838
+ .with_bindings(
839
+ uri_method: :get,
840
+ uri_template: "/v2/{parent}/customConstraints",
841
+ matches: [
842
+ ["parent", %r{^organizations/[^/]+/?$}, false]
843
+ ]
844
+ )
845
+ transcoder.transcode request_pb
846
+ end
847
+
848
+ ##
849
+ # @private
850
+ #
851
+ # GRPC transcoding helper method for the delete_custom_constraint REST call
852
+ #
853
+ # @param request_pb [::Google::Cloud::OrgPolicy::V2::DeleteCustomConstraintRequest]
854
+ # A request object representing the call parameters. Required.
855
+ # @return [Array(String, [String, nil], Hash{String => String})]
856
+ # Uri, Body, Query string parameters
857
+ def self.transcode_delete_custom_constraint_request request_pb
858
+ transcoder = Gapic::Rest::GrpcTranscoder.new
859
+ .with_bindings(
860
+ uri_method: :delete,
861
+ uri_template: "/v2/{name}",
862
+ matches: [
863
+ ["name", %r{^organizations/[^/]+/customConstraints/[^/]+/?$}, false]
864
+ ]
865
+ )
866
+ transcoder.transcode request_pb
867
+ end
559
868
  end
560
869
  end
561
870
  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.7.0"
24
+ VERSION = "0.9.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