google-cloud-org_policy-v2 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcc44d8fa933f44d058363936720b672f4df3aac1f8ce90eccc613ade2ef5694
4
- data.tar.gz: 70f7505e296689faeac5d0ff42fea5b0e30b2e151d255cf892452726ed18a349
3
+ metadata.gz: 40fed3c2b8408cac22deba3855e131f15e1158e350d48fe312c66fc3efa4f099
4
+ data.tar.gz: 5ac856234712df874aea7ca160f1d89e9311a3935109f91b385e07a950c117ff
5
5
  SHA512:
6
- metadata.gz: c7b97925338466725df3f3e5cf7a3ea17801e10725544f447758b18a7bc2131e454775f5c463ed5ee8310efb00e163a2ba4cfbe40d089ab79088ad6cb30249ca
7
- data.tar.gz: ccbbb1c8b5384e102fe47894f2e5c24d41261b5fe9625fd4327a590dc6af50ad0bb08e7946177f9141760f30ea6d5992011689ff284f8fb2235b4ceb6d0972bf
6
+ metadata.gz: 0cd5ff9455dc1542fd6ee6aaa0c7d530edfd2a0e639edd9ffd10d98df668492b5027d0b363557a8333d302eebaadb6ba6fb1fea045be19ea08790aa376ab9d4d
7
+ data.tar.gz: 6ee2cdcdcb57ca120f034200e4d77dc9f7ace5d30d162de6dba78af271b89d7626c2adf2d0347f2caf30e741caf97ae254b1e6578cc354e02133f021f1085e95
@@ -239,6 +239,27 @@ module Google
239
239
  #
240
240
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
241
241
  #
242
+ # @example Basic example
243
+ # require "google/cloud/org_policy/v2"
244
+ #
245
+ # # Create a client object. The client can be reused for multiple calls.
246
+ # client = Google::Cloud::OrgPolicy::V2::OrgPolicy::Client.new
247
+ #
248
+ # # Create a request. To set request fields, pass in keyword arguments.
249
+ # request = Google::Cloud::OrgPolicy::V2::ListConstraintsRequest.new
250
+ #
251
+ # # Call the list_constraints method.
252
+ # result = client.list_constraints request
253
+ #
254
+ # # The returned object is of type Gapic::PagedEnumerable. You can
255
+ # # iterate over all elements by calling #each, and the enumerable
256
+ # # will lazily make API calls to fetch subsequent pages. Other
257
+ # # methods are also available for managing paging directly.
258
+ # result.each do |response|
259
+ # # Each element is of type ::Google::Cloud::OrgPolicy::V2::Constraint.
260
+ # p response
261
+ # end
262
+ #
242
263
  def list_constraints request, options = nil
243
264
  raise ::ArgumentError, "request must be provided" if request.nil?
244
265
 
@@ -256,9 +277,11 @@ module Google
256
277
  gapic_version: ::Google::Cloud::OrgPolicy::V2::VERSION
257
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
258
279
 
259
- header_params = {
260
- "parent" => request.parent
261
- }
280
+ header_params = {}
281
+ if request.parent
282
+ header_params["parent"] = request.parent
283
+ end
284
+
262
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
263
286
  metadata[:"x-goog-request-params"] ||= request_params_header
264
287
 
@@ -321,6 +344,27 @@ module Google
321
344
  #
322
345
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
323
346
  #
347
+ # @example Basic example
348
+ # require "google/cloud/org_policy/v2"
349
+ #
350
+ # # Create a client object. The client can be reused for multiple calls.
351
+ # client = Google::Cloud::OrgPolicy::V2::OrgPolicy::Client.new
352
+ #
353
+ # # Create a request. To set request fields, pass in keyword arguments.
354
+ # request = Google::Cloud::OrgPolicy::V2::ListPoliciesRequest.new
355
+ #
356
+ # # Call the list_policies method.
357
+ # result = client.list_policies request
358
+ #
359
+ # # The returned object is of type Gapic::PagedEnumerable. You can
360
+ # # iterate over all elements by calling #each, and the enumerable
361
+ # # will lazily make API calls to fetch subsequent pages. Other
362
+ # # methods are also available for managing paging directly.
363
+ # result.each do |response|
364
+ # # Each element is of type ::Google::Cloud::OrgPolicy::V2::Policy.
365
+ # p response
366
+ # end
367
+ #
324
368
  def list_policies request, options = nil
325
369
  raise ::ArgumentError, "request must be provided" if request.nil?
326
370
 
@@ -338,9 +382,11 @@ module Google
338
382
  gapic_version: ::Google::Cloud::OrgPolicy::V2::VERSION
339
383
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
384
 
341
- header_params = {
342
- "parent" => request.parent
343
- }
385
+ header_params = {}
386
+ if request.parent
387
+ header_params["parent"] = request.parent
388
+ end
389
+
344
390
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
345
391
  metadata[:"x-goog-request-params"] ||= request_params_header
346
392
 
@@ -394,6 +440,21 @@ module Google
394
440
  #
395
441
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
396
442
  #
443
+ # @example Basic example
444
+ # require "google/cloud/org_policy/v2"
445
+ #
446
+ # # Create a client object. The client can be reused for multiple calls.
447
+ # client = Google::Cloud::OrgPolicy::V2::OrgPolicy::Client.new
448
+ #
449
+ # # Create a request. To set request fields, pass in keyword arguments.
450
+ # request = Google::Cloud::OrgPolicy::V2::GetPolicyRequest.new
451
+ #
452
+ # # Call the get_policy method.
453
+ # result = client.get_policy request
454
+ #
455
+ # # The returned object is of type Google::Cloud::OrgPolicy::V2::Policy.
456
+ # p result
457
+ #
397
458
  def get_policy request, options = nil
398
459
  raise ::ArgumentError, "request must be provided" if request.nil?
399
460
 
@@ -411,9 +472,11 @@ module Google
411
472
  gapic_version: ::Google::Cloud::OrgPolicy::V2::VERSION
412
473
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
413
474
 
414
- header_params = {
415
- "name" => request.name
416
- }
475
+ header_params = {}
476
+ if request.name
477
+ header_params["name"] = request.name
478
+ end
479
+
417
480
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
418
481
  metadata[:"x-goog-request-params"] ||= request_params_header
419
482
 
@@ -467,6 +530,21 @@ module Google
467
530
  #
468
531
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
469
532
  #
533
+ # @example Basic example
534
+ # require "google/cloud/org_policy/v2"
535
+ #
536
+ # # Create a client object. The client can be reused for multiple calls.
537
+ # client = Google::Cloud::OrgPolicy::V2::OrgPolicy::Client.new
538
+ #
539
+ # # Create a request. To set request fields, pass in keyword arguments.
540
+ # request = Google::Cloud::OrgPolicy::V2::GetEffectivePolicyRequest.new
541
+ #
542
+ # # Call the get_effective_policy method.
543
+ # result = client.get_effective_policy request
544
+ #
545
+ # # The returned object is of type Google::Cloud::OrgPolicy::V2::Policy.
546
+ # p result
547
+ #
470
548
  def get_effective_policy request, options = nil
471
549
  raise ::ArgumentError, "request must be provided" if request.nil?
472
550
 
@@ -484,9 +562,11 @@ module Google
484
562
  gapic_version: ::Google::Cloud::OrgPolicy::V2::VERSION
485
563
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
486
564
 
487
- header_params = {
488
- "name" => request.name
489
- }
565
+ header_params = {}
566
+ if request.name
567
+ header_params["name"] = request.name
568
+ end
569
+
490
570
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
491
571
  metadata[:"x-goog-request-params"] ||= request_params_header
492
572
 
@@ -547,6 +627,21 @@ module Google
547
627
  #
548
628
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
549
629
  #
630
+ # @example Basic example
631
+ # require "google/cloud/org_policy/v2"
632
+ #
633
+ # # Create a client object. The client can be reused for multiple calls.
634
+ # client = Google::Cloud::OrgPolicy::V2::OrgPolicy::Client.new
635
+ #
636
+ # # Create a request. To set request fields, pass in keyword arguments.
637
+ # request = Google::Cloud::OrgPolicy::V2::CreatePolicyRequest.new
638
+ #
639
+ # # Call the create_policy method.
640
+ # result = client.create_policy request
641
+ #
642
+ # # The returned object is of type Google::Cloud::OrgPolicy::V2::Policy.
643
+ # p result
644
+ #
550
645
  def create_policy request, options = nil
551
646
  raise ::ArgumentError, "request must be provided" if request.nil?
552
647
 
@@ -564,9 +659,11 @@ module Google
564
659
  gapic_version: ::Google::Cloud::OrgPolicy::V2::VERSION
565
660
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
566
661
 
567
- header_params = {
568
- "parent" => request.parent
569
- }
662
+ header_params = {}
663
+ if request.parent
664
+ header_params["parent"] = request.parent
665
+ end
666
+
570
667
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
571
668
  metadata[:"x-goog-request-params"] ||= request_params_header
572
669
 
@@ -623,6 +720,21 @@ module Google
623
720
  #
624
721
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
625
722
  #
723
+ # @example Basic example
724
+ # require "google/cloud/org_policy/v2"
725
+ #
726
+ # # Create a client object. The client can be reused for multiple calls.
727
+ # client = Google::Cloud::OrgPolicy::V2::OrgPolicy::Client.new
728
+ #
729
+ # # Create a request. To set request fields, pass in keyword arguments.
730
+ # request = Google::Cloud::OrgPolicy::V2::UpdatePolicyRequest.new
731
+ #
732
+ # # Call the update_policy method.
733
+ # result = client.update_policy request
734
+ #
735
+ # # The returned object is of type Google::Cloud::OrgPolicy::V2::Policy.
736
+ # p result
737
+ #
626
738
  def update_policy request, options = nil
627
739
  raise ::ArgumentError, "request must be provided" if request.nil?
628
740
 
@@ -640,9 +752,11 @@ module Google
640
752
  gapic_version: ::Google::Cloud::OrgPolicy::V2::VERSION
641
753
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
642
754
 
643
- header_params = {
644
- "policy.name" => request.policy.name
645
- }
755
+ header_params = {}
756
+ if request.policy&.name
757
+ header_params["policy.name"] = request.policy.name
758
+ end
759
+
646
760
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
647
761
  metadata[:"x-goog-request-params"] ||= request_params_header
648
762
 
@@ -695,6 +809,21 @@ module Google
695
809
  #
696
810
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
697
811
  #
812
+ # @example Basic example
813
+ # require "google/cloud/org_policy/v2"
814
+ #
815
+ # # Create a client object. The client can be reused for multiple calls.
816
+ # client = Google::Cloud::OrgPolicy::V2::OrgPolicy::Client.new
817
+ #
818
+ # # Create a request. To set request fields, pass in keyword arguments.
819
+ # request = Google::Cloud::OrgPolicy::V2::DeletePolicyRequest.new
820
+ #
821
+ # # Call the delete_policy method.
822
+ # result = client.delete_policy request
823
+ #
824
+ # # The returned object is of type Google::Protobuf::Empty.
825
+ # p result
826
+ #
698
827
  def delete_policy request, options = nil
699
828
  raise ::ArgumentError, "request must be provided" if request.nil?
700
829
 
@@ -712,9 +841,11 @@ module Google
712
841
  gapic_version: ::Google::Cloud::OrgPolicy::V2::VERSION
713
842
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
714
843
 
715
- header_params = {
716
- "name" => request.name
717
- }
844
+ header_params = {}
845
+ if request.name
846
+ header_params["name"] = request.name
847
+ end
848
+
718
849
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
719
850
  metadata[:"x-goog-request-params"] ||= request_params_header
720
851
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module OrgPolicy
23
23
  module V2
24
- VERSION = "0.2.3"
24
+ VERSION = "0.2.4"
25
25
  end
26
26
  end
27
27
  end
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/orgpolicy/v2/constraint.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/orgpolicy/v2/constraint.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.orgpolicy.v2.Constraint" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/orgpolicy/v2/orgpolicy.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -11,6 +9,8 @@ require 'google/cloud/orgpolicy/v2/constraint_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/timestamp_pb'
13
11
  require 'google/type/expr_pb'
12
+ require 'google/protobuf'
13
+
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_file("google/cloud/orgpolicy/v2/orgpolicy.proto", :syntax => :proto3) do
16
16
  add_message "google.cloud.orgpolicy.v2.Policy" do
@@ -46,7 +46,7 @@ module Google
46
46
  # particular resource and its child resources.
47
47
  class Service
48
48
 
49
- include GRPC::GenericService
49
+ include ::GRPC::GenericService
50
50
 
51
51
  self.marshal_class_method = :encode
52
52
  self.unmarshal_class_method = :decode
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-org_policy-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-11 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common