google-cloud-iap-v1 0.1.3 → 0.4.0

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: 9a6656df74f7b9bccdd8e115ac206d2292f9709c6fb8e444d8b84ca26e36902a
4
- data.tar.gz: 3e989fadec67f15ec0459198dfbb09f76a524062d173b01662b0d7d140fea4cd
3
+ metadata.gz: 94b24a163c4899bea04018b754a8e7608ac9b76f46aa90fdf9abfe51236dcd09
4
+ data.tar.gz: 85bbb86cb755e71d6d7e38321e6ab99e76e5922e2b961c8e9785571f71202cbf
5
5
  SHA512:
6
- metadata.gz: c4083e4554f53381022e402a110227ef88ffd9f8156d698a4e00d2f816c70969e42a90207142412cf1060ad6198390388cc363c006667c939222a517c3654d19
7
- data.tar.gz: 54853cf887233548854e386ce707f68b10ea8b68eb997bb19dd304d9b6720dc74fee4877ec21ec1a6a1f584d4f44e333db8a5e757316c0d36fd72d44296a98df
6
+ metadata.gz: '08fe520b545db3cd930465afc754495b84991d568ba68c7956685a035a606b67ea462b956b7f2148fd0a7ad97634357563d3917199dd50890b3ef68ed69eb0c2'
7
+ data.tar.gz: f9f0006d122b9dc938596da66ae222cfef3cc1ecd1beab0b3e8e005b4564c586361b43ddfd3e83c7bae6b725dac8a83ae58596a9e64f9dfb8beb2f3f2607bfde
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Iam::V1::SetIamPolicyRequest.new # (request fields as keywor
37
37
  response = client.set_iam_policy request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-iap-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-iap-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/iap/)
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -30,6 +30,8 @@ module Google
30
30
  # APIs for Identity-Aware Proxy Admin configurations.
31
31
  #
32
32
  class Client
33
+ include Paths
34
+
33
35
  # @private
34
36
  attr_reader :identity_aware_proxy_admin_service_stub
35
37
 
@@ -160,7 +162,7 @@ module Google
160
162
  # @param options [::Gapic::CallOptions, ::Hash]
161
163
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
162
164
  #
163
- # @overload set_iam_policy(resource: nil, policy: nil)
165
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
164
166
  # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
165
167
  # least one keyword argument is required. To specify no parameters, or to keep all
166
168
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -173,6 +175,12 @@ module Google
173
175
  # the policy is limited to a few 10s of KB. An empty policy is a
174
176
  # valid policy but certain Cloud Platform services (such as Projects)
175
177
  # might reject them.
178
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
179
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
180
+ # the fields in the mask will be modified. If no mask is provided, the
181
+ # following default mask is used:
182
+ #
183
+ # `paths: "bindings, etag"`
176
184
  #
177
185
  # @yield [response, operation] Access the result along with the RPC operation
178
186
  # @yieldparam response [::Google::Iam::V1::Policy]
@@ -264,7 +272,7 @@ module Google
264
272
  # See the operation documentation for the appropriate value for this field.
265
273
  # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
266
274
  # OPTIONAL: A `GetPolicyOptions` object for specifying options to
267
- # `GetIamPolicy`. This field is only used by Cloud IAM.
275
+ # `GetIamPolicy`.
268
276
  #
269
277
  # @yield [response, operation] Access the result along with the RPC operation
270
278
  # @yieldparam response [::Google::Iam::V1::Policy]
@@ -603,6 +611,473 @@ module Google
603
611
  raise ::Google::Cloud::Error.from_error(e)
604
612
  end
605
613
 
614
+ ##
615
+ # Lists the existing TunnelDestGroups. To group across all locations, use a
616
+ # `-` as the location ID. For example:
617
+ # `/v1/projects/123/iap_tunnel/locations/-/destGroups`
618
+ #
619
+ # @overload list_tunnel_dest_groups(request, options = nil)
620
+ # Pass arguments to `list_tunnel_dest_groups` via a request object, either of type
621
+ # {::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest} or an equivalent Hash.
622
+ #
623
+ # @param request [::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest, ::Hash]
624
+ # A request object representing the call parameters. Required. To specify no
625
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
626
+ # @param options [::Gapic::CallOptions, ::Hash]
627
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
628
+ #
629
+ # @overload list_tunnel_dest_groups(parent: nil, page_size: nil, page_token: nil)
630
+ # Pass arguments to `list_tunnel_dest_groups` via keyword arguments. Note that at
631
+ # least one keyword argument is required. To specify no parameters, or to keep all
632
+ # the default parameter values, pass an empty Hash as a request object (see above).
633
+ #
634
+ # @param parent [::String]
635
+ # Required. Google Cloud Project ID and location.
636
+ # In the following format:
637
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}`.
638
+ # A `-` can be used for the location to group across all locations.
639
+ # @param page_size [::Integer]
640
+ # The maximum number of groups to return. The service might return fewer than
641
+ # this value.
642
+ # If unspecified, at most 100 groups are returned.
643
+ # The maximum value is 1000; values above 1000 are coerced to 1000.
644
+ # @param page_token [::String]
645
+ # A page token, received from a previous `ListTunnelDestGroups`
646
+ # call. Provide this to retrieve the subsequent page.
647
+ #
648
+ # When paginating, all other parameters provided to
649
+ # `ListTunnelDestGroups` must match the call that provided the page
650
+ # token.
651
+ #
652
+ # @yield [response, operation] Access the result along with the RPC operation
653
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::TunnelDestGroup>]
654
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
655
+ #
656
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Iap::V1::TunnelDestGroup>]
657
+ #
658
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
659
+ #
660
+ # @example Basic example
661
+ # require "google/cloud/iap/v1"
662
+ #
663
+ # # Create a client object. The client can be reused for multiple calls.
664
+ # client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
665
+ #
666
+ # # Create a request. To set request fields, pass in keyword arguments.
667
+ # request = Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest.new
668
+ #
669
+ # # Call the list_tunnel_dest_groups method.
670
+ # result = client.list_tunnel_dest_groups request
671
+ #
672
+ # # The returned object is of type Gapic::PagedEnumerable. You can
673
+ # # iterate over all elements by calling #each, and the enumerable
674
+ # # will lazily make API calls to fetch subsequent pages. Other
675
+ # # methods are also available for managing paging directly.
676
+ # result.each do |response|
677
+ # # Each element is of type ::Google::Cloud::Iap::V1::TunnelDestGroup.
678
+ # p response
679
+ # end
680
+ #
681
+ def list_tunnel_dest_groups request, options = nil
682
+ raise ::ArgumentError, "request must be provided" if request.nil?
683
+
684
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::ListTunnelDestGroupsRequest
685
+
686
+ # Converts hash and nil to an options object
687
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
688
+
689
+ # Customize the options with defaults
690
+ metadata = @config.rpcs.list_tunnel_dest_groups.metadata.to_h
691
+
692
+ # Set x-goog-api-client and x-goog-user-project headers
693
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
694
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
695
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION
696
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
697
+
698
+ header_params = {}
699
+ if request.parent
700
+ header_params["parent"] = request.parent
701
+ end
702
+
703
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
704
+ metadata[:"x-goog-request-params"] ||= request_params_header
705
+
706
+ options.apply_defaults timeout: @config.rpcs.list_tunnel_dest_groups.timeout,
707
+ metadata: metadata,
708
+ retry_policy: @config.rpcs.list_tunnel_dest_groups.retry_policy
709
+
710
+ options.apply_defaults timeout: @config.timeout,
711
+ metadata: @config.metadata,
712
+ retry_policy: @config.retry_policy
713
+
714
+ @identity_aware_proxy_admin_service_stub.call_rpc :list_tunnel_dest_groups, request, options: options do |response, operation|
715
+ response = ::Gapic::PagedEnumerable.new @identity_aware_proxy_admin_service_stub, :list_tunnel_dest_groups, request, response, operation, options
716
+ yield response, operation if block_given?
717
+ return response
718
+ end
719
+ rescue ::GRPC::BadStatus => e
720
+ raise ::Google::Cloud::Error.from_error(e)
721
+ end
722
+
723
+ ##
724
+ # Creates a new TunnelDestGroup.
725
+ #
726
+ # @overload create_tunnel_dest_group(request, options = nil)
727
+ # Pass arguments to `create_tunnel_dest_group` via a request object, either of type
728
+ # {::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest} or an equivalent Hash.
729
+ #
730
+ # @param request [::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest, ::Hash]
731
+ # A request object representing the call parameters. Required. To specify no
732
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
733
+ # @param options [::Gapic::CallOptions, ::Hash]
734
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
735
+ #
736
+ # @overload create_tunnel_dest_group(parent: nil, tunnel_dest_group: nil, tunnel_dest_group_id: nil)
737
+ # Pass arguments to `create_tunnel_dest_group` via keyword arguments. Note that at
738
+ # least one keyword argument is required. To specify no parameters, or to keep all
739
+ # the default parameter values, pass an empty Hash as a request object (see above).
740
+ #
741
+ # @param parent [::String]
742
+ # Required. Google Cloud Project ID and location.
743
+ # In the following format:
744
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}`.
745
+ # @param tunnel_dest_group [::Google::Cloud::Iap::V1::TunnelDestGroup, ::Hash]
746
+ # Required. The TunnelDestGroup to create.
747
+ # @param tunnel_dest_group_id [::String]
748
+ # Required. The ID to use for the TunnelDestGroup, which becomes the final component of
749
+ # the resource name.
750
+ #
751
+ # This value must be 4-63 characters, and valid characters
752
+ # are `[a-z][0-9]-`.
753
+ #
754
+ # @yield [response, operation] Access the result along with the RPC operation
755
+ # @yieldparam response [::Google::Cloud::Iap::V1::TunnelDestGroup]
756
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
757
+ #
758
+ # @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
759
+ #
760
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
761
+ #
762
+ # @example Basic example
763
+ # require "google/cloud/iap/v1"
764
+ #
765
+ # # Create a client object. The client can be reused for multiple calls.
766
+ # client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
767
+ #
768
+ # # Create a request. To set request fields, pass in keyword arguments.
769
+ # request = Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest.new
770
+ #
771
+ # # Call the create_tunnel_dest_group method.
772
+ # result = client.create_tunnel_dest_group request
773
+ #
774
+ # # The returned object is of type Google::Cloud::Iap::V1::TunnelDestGroup.
775
+ # p result
776
+ #
777
+ def create_tunnel_dest_group request, options = nil
778
+ raise ::ArgumentError, "request must be provided" if request.nil?
779
+
780
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::CreateTunnelDestGroupRequest
781
+
782
+ # Converts hash and nil to an options object
783
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
784
+
785
+ # Customize the options with defaults
786
+ metadata = @config.rpcs.create_tunnel_dest_group.metadata.to_h
787
+
788
+ # Set x-goog-api-client and x-goog-user-project headers
789
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
790
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
791
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION
792
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
793
+
794
+ header_params = {}
795
+ if request.parent
796
+ header_params["parent"] = request.parent
797
+ end
798
+
799
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
800
+ metadata[:"x-goog-request-params"] ||= request_params_header
801
+
802
+ options.apply_defaults timeout: @config.rpcs.create_tunnel_dest_group.timeout,
803
+ metadata: metadata,
804
+ retry_policy: @config.rpcs.create_tunnel_dest_group.retry_policy
805
+
806
+ options.apply_defaults timeout: @config.timeout,
807
+ metadata: @config.metadata,
808
+ retry_policy: @config.retry_policy
809
+
810
+ @identity_aware_proxy_admin_service_stub.call_rpc :create_tunnel_dest_group, request, options: options do |response, operation|
811
+ yield response, operation if block_given?
812
+ return response
813
+ end
814
+ rescue ::GRPC::BadStatus => e
815
+ raise ::Google::Cloud::Error.from_error(e)
816
+ end
817
+
818
+ ##
819
+ # Retrieves an existing TunnelDestGroup.
820
+ #
821
+ # @overload get_tunnel_dest_group(request, options = nil)
822
+ # Pass arguments to `get_tunnel_dest_group` via a request object, either of type
823
+ # {::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest} or an equivalent Hash.
824
+ #
825
+ # @param request [::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest, ::Hash]
826
+ # A request object representing the call parameters. Required. To specify no
827
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
828
+ # @param options [::Gapic::CallOptions, ::Hash]
829
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
830
+ #
831
+ # @overload get_tunnel_dest_group(name: nil)
832
+ # Pass arguments to `get_tunnel_dest_group` via keyword arguments. Note that at
833
+ # least one keyword argument is required. To specify no parameters, or to keep all
834
+ # the default parameter values, pass an empty Hash as a request object (see above).
835
+ #
836
+ # @param name [::String]
837
+ # Required. Name of the TunnelDestGroup to be fetched.
838
+ # In the following format:
839
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
840
+ #
841
+ # @yield [response, operation] Access the result along with the RPC operation
842
+ # @yieldparam response [::Google::Cloud::Iap::V1::TunnelDestGroup]
843
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
844
+ #
845
+ # @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
846
+ #
847
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
848
+ #
849
+ # @example Basic example
850
+ # require "google/cloud/iap/v1"
851
+ #
852
+ # # Create a client object. The client can be reused for multiple calls.
853
+ # client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
854
+ #
855
+ # # Create a request. To set request fields, pass in keyword arguments.
856
+ # request = Google::Cloud::Iap::V1::GetTunnelDestGroupRequest.new
857
+ #
858
+ # # Call the get_tunnel_dest_group method.
859
+ # result = client.get_tunnel_dest_group request
860
+ #
861
+ # # The returned object is of type Google::Cloud::Iap::V1::TunnelDestGroup.
862
+ # p result
863
+ #
864
+ def get_tunnel_dest_group request, options = nil
865
+ raise ::ArgumentError, "request must be provided" if request.nil?
866
+
867
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::GetTunnelDestGroupRequest
868
+
869
+ # Converts hash and nil to an options object
870
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
871
+
872
+ # Customize the options with defaults
873
+ metadata = @config.rpcs.get_tunnel_dest_group.metadata.to_h
874
+
875
+ # Set x-goog-api-client and x-goog-user-project headers
876
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
877
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
878
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION
879
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
880
+
881
+ header_params = {}
882
+ if request.name
883
+ header_params["name"] = request.name
884
+ end
885
+
886
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
887
+ metadata[:"x-goog-request-params"] ||= request_params_header
888
+
889
+ options.apply_defaults timeout: @config.rpcs.get_tunnel_dest_group.timeout,
890
+ metadata: metadata,
891
+ retry_policy: @config.rpcs.get_tunnel_dest_group.retry_policy
892
+
893
+ options.apply_defaults timeout: @config.timeout,
894
+ metadata: @config.metadata,
895
+ retry_policy: @config.retry_policy
896
+
897
+ @identity_aware_proxy_admin_service_stub.call_rpc :get_tunnel_dest_group, request, options: options do |response, operation|
898
+ yield response, operation if block_given?
899
+ return response
900
+ end
901
+ rescue ::GRPC::BadStatus => e
902
+ raise ::Google::Cloud::Error.from_error(e)
903
+ end
904
+
905
+ ##
906
+ # Deletes a TunnelDestGroup.
907
+ #
908
+ # @overload delete_tunnel_dest_group(request, options = nil)
909
+ # Pass arguments to `delete_tunnel_dest_group` via a request object, either of type
910
+ # {::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest} or an equivalent Hash.
911
+ #
912
+ # @param request [::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest, ::Hash]
913
+ # A request object representing the call parameters. Required. To specify no
914
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
915
+ # @param options [::Gapic::CallOptions, ::Hash]
916
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
917
+ #
918
+ # @overload delete_tunnel_dest_group(name: nil)
919
+ # Pass arguments to `delete_tunnel_dest_group` via keyword arguments. Note that at
920
+ # least one keyword argument is required. To specify no parameters, or to keep all
921
+ # the default parameter values, pass an empty Hash as a request object (see above).
922
+ #
923
+ # @param name [::String]
924
+ # Required. Name of the TunnelDestGroup to delete.
925
+ # In the following format:
926
+ # `projects/{project_number/id}/iap_tunnel/locations/{location}/destGroups/{dest_group}`.
927
+ #
928
+ # @yield [response, operation] Access the result along with the RPC operation
929
+ # @yieldparam response [::Google::Protobuf::Empty]
930
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
931
+ #
932
+ # @return [::Google::Protobuf::Empty]
933
+ #
934
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
935
+ #
936
+ # @example Basic example
937
+ # require "google/cloud/iap/v1"
938
+ #
939
+ # # Create a client object. The client can be reused for multiple calls.
940
+ # client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
941
+ #
942
+ # # Create a request. To set request fields, pass in keyword arguments.
943
+ # request = Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest.new
944
+ #
945
+ # # Call the delete_tunnel_dest_group method.
946
+ # result = client.delete_tunnel_dest_group request
947
+ #
948
+ # # The returned object is of type Google::Protobuf::Empty.
949
+ # p result
950
+ #
951
+ def delete_tunnel_dest_group request, options = nil
952
+ raise ::ArgumentError, "request must be provided" if request.nil?
953
+
954
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::DeleteTunnelDestGroupRequest
955
+
956
+ # Converts hash and nil to an options object
957
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
958
+
959
+ # Customize the options with defaults
960
+ metadata = @config.rpcs.delete_tunnel_dest_group.metadata.to_h
961
+
962
+ # Set x-goog-api-client and x-goog-user-project headers
963
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
964
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
965
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION
966
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
967
+
968
+ header_params = {}
969
+ if request.name
970
+ header_params["name"] = request.name
971
+ end
972
+
973
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
974
+ metadata[:"x-goog-request-params"] ||= request_params_header
975
+
976
+ options.apply_defaults timeout: @config.rpcs.delete_tunnel_dest_group.timeout,
977
+ metadata: metadata,
978
+ retry_policy: @config.rpcs.delete_tunnel_dest_group.retry_policy
979
+
980
+ options.apply_defaults timeout: @config.timeout,
981
+ metadata: @config.metadata,
982
+ retry_policy: @config.retry_policy
983
+
984
+ @identity_aware_proxy_admin_service_stub.call_rpc :delete_tunnel_dest_group, request, options: options do |response, operation|
985
+ yield response, operation if block_given?
986
+ return response
987
+ end
988
+ rescue ::GRPC::BadStatus => e
989
+ raise ::Google::Cloud::Error.from_error(e)
990
+ end
991
+
992
+ ##
993
+ # Updates a TunnelDestGroup.
994
+ #
995
+ # @overload update_tunnel_dest_group(request, options = nil)
996
+ # Pass arguments to `update_tunnel_dest_group` via a request object, either of type
997
+ # {::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest} or an equivalent Hash.
998
+ #
999
+ # @param request [::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest, ::Hash]
1000
+ # A request object representing the call parameters. Required. To specify no
1001
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1002
+ # @param options [::Gapic::CallOptions, ::Hash]
1003
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1004
+ #
1005
+ # @overload update_tunnel_dest_group(tunnel_dest_group: nil, update_mask: nil)
1006
+ # Pass arguments to `update_tunnel_dest_group` via keyword arguments. Note that at
1007
+ # least one keyword argument is required. To specify no parameters, or to keep all
1008
+ # the default parameter values, pass an empty Hash as a request object (see above).
1009
+ #
1010
+ # @param tunnel_dest_group [::Google::Cloud::Iap::V1::TunnelDestGroup, ::Hash]
1011
+ # Required. The new values for the TunnelDestGroup.
1012
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1013
+ # A field mask that specifies which IAP settings to update.
1014
+ # If omitted, then all of the settings are updated. See
1015
+ # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
1016
+ #
1017
+ # @yield [response, operation] Access the result along with the RPC operation
1018
+ # @yieldparam response [::Google::Cloud::Iap::V1::TunnelDestGroup]
1019
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1020
+ #
1021
+ # @return [::Google::Cloud::Iap::V1::TunnelDestGroup]
1022
+ #
1023
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1024
+ #
1025
+ # @example Basic example
1026
+ # require "google/cloud/iap/v1"
1027
+ #
1028
+ # # Create a client object. The client can be reused for multiple calls.
1029
+ # client = Google::Cloud::Iap::V1::IdentityAwareProxyAdminService::Client.new
1030
+ #
1031
+ # # Create a request. To set request fields, pass in keyword arguments.
1032
+ # request = Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest.new
1033
+ #
1034
+ # # Call the update_tunnel_dest_group method.
1035
+ # result = client.update_tunnel_dest_group request
1036
+ #
1037
+ # # The returned object is of type Google::Cloud::Iap::V1::TunnelDestGroup.
1038
+ # p result
1039
+ #
1040
+ def update_tunnel_dest_group request, options = nil
1041
+ raise ::ArgumentError, "request must be provided" if request.nil?
1042
+
1043
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Iap::V1::UpdateTunnelDestGroupRequest
1044
+
1045
+ # Converts hash and nil to an options object
1046
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1047
+
1048
+ # Customize the options with defaults
1049
+ metadata = @config.rpcs.update_tunnel_dest_group.metadata.to_h
1050
+
1051
+ # Set x-goog-api-client and x-goog-user-project headers
1052
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1053
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1054
+ gapic_version: ::Google::Cloud::Iap::V1::VERSION
1055
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1056
+
1057
+ header_params = {}
1058
+ if request.tunnel_dest_group&.name
1059
+ header_params["tunnel_dest_group.name"] = request.tunnel_dest_group.name
1060
+ end
1061
+
1062
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1063
+ metadata[:"x-goog-request-params"] ||= request_params_header
1064
+
1065
+ options.apply_defaults timeout: @config.rpcs.update_tunnel_dest_group.timeout,
1066
+ metadata: metadata,
1067
+ retry_policy: @config.rpcs.update_tunnel_dest_group.retry_policy
1068
+
1069
+ options.apply_defaults timeout: @config.timeout,
1070
+ metadata: @config.metadata,
1071
+ retry_policy: @config.retry_policy
1072
+
1073
+ @identity_aware_proxy_admin_service_stub.call_rpc :update_tunnel_dest_group, request, options: options do |response, operation|
1074
+ yield response, operation if block_given?
1075
+ return response
1076
+ end
1077
+ rescue ::GRPC::BadStatus => e
1078
+ raise ::Google::Cloud::Error.from_error(e)
1079
+ end
1080
+
606
1081
  ##
607
1082
  # Configuration class for the IdentityAwareProxyAdminService API.
608
1083
  #
@@ -763,6 +1238,31 @@ module Google
763
1238
  # @return [::Gapic::Config::Method]
764
1239
  #
765
1240
  attr_reader :update_iap_settings
1241
+ ##
1242
+ # RPC-specific configuration for `list_tunnel_dest_groups`
1243
+ # @return [::Gapic::Config::Method]
1244
+ #
1245
+ attr_reader :list_tunnel_dest_groups
1246
+ ##
1247
+ # RPC-specific configuration for `create_tunnel_dest_group`
1248
+ # @return [::Gapic::Config::Method]
1249
+ #
1250
+ attr_reader :create_tunnel_dest_group
1251
+ ##
1252
+ # RPC-specific configuration for `get_tunnel_dest_group`
1253
+ # @return [::Gapic::Config::Method]
1254
+ #
1255
+ attr_reader :get_tunnel_dest_group
1256
+ ##
1257
+ # RPC-specific configuration for `delete_tunnel_dest_group`
1258
+ # @return [::Gapic::Config::Method]
1259
+ #
1260
+ attr_reader :delete_tunnel_dest_group
1261
+ ##
1262
+ # RPC-specific configuration for `update_tunnel_dest_group`
1263
+ # @return [::Gapic::Config::Method]
1264
+ #
1265
+ attr_reader :update_tunnel_dest_group
766
1266
 
767
1267
  # @private
768
1268
  def initialize parent_rpcs = nil
@@ -776,6 +1276,16 @@ module Google
776
1276
  @get_iap_settings = ::Gapic::Config::Method.new get_iap_settings_config
777
1277
  update_iap_settings_config = parent_rpcs.update_iap_settings if parent_rpcs.respond_to? :update_iap_settings
778
1278
  @update_iap_settings = ::Gapic::Config::Method.new update_iap_settings_config
1279
+ list_tunnel_dest_groups_config = parent_rpcs.list_tunnel_dest_groups if parent_rpcs.respond_to? :list_tunnel_dest_groups
1280
+ @list_tunnel_dest_groups = ::Gapic::Config::Method.new list_tunnel_dest_groups_config
1281
+ create_tunnel_dest_group_config = parent_rpcs.create_tunnel_dest_group if parent_rpcs.respond_to? :create_tunnel_dest_group
1282
+ @create_tunnel_dest_group = ::Gapic::Config::Method.new create_tunnel_dest_group_config
1283
+ get_tunnel_dest_group_config = parent_rpcs.get_tunnel_dest_group if parent_rpcs.respond_to? :get_tunnel_dest_group
1284
+ @get_tunnel_dest_group = ::Gapic::Config::Method.new get_tunnel_dest_group_config
1285
+ delete_tunnel_dest_group_config = parent_rpcs.delete_tunnel_dest_group if parent_rpcs.respond_to? :delete_tunnel_dest_group
1286
+ @delete_tunnel_dest_group = ::Gapic::Config::Method.new delete_tunnel_dest_group_config
1287
+ update_tunnel_dest_group_config = parent_rpcs.update_tunnel_dest_group if parent_rpcs.respond_to? :update_tunnel_dest_group
1288
+ @update_tunnel_dest_group = ::Gapic::Config::Method.new update_tunnel_dest_group_config
779
1289
 
780
1290
  yield self if block_given?
781
1291
  end