google-cloud-network_connectivity-v1 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ac92ae4ef750f55bf59064e547260013637436215a025cd6c81ae312dddf5c2
4
- data.tar.gz: 3b45f062373915459c040498b1cc48d766d6aa202ecf8839a68b86eea47e4b28
3
+ metadata.gz: 299080026970148be52ca6974bcff600ad9153e5224f18375f8e8733928ae6ea
4
+ data.tar.gz: b30703229dfb35927b1506fba75a9e771bf826f4fec02bde2c7e4653e1e299e6
5
5
  SHA512:
6
- metadata.gz: 3e465ee10de8cc3d0c7112337476daff2c5a3f119a124fdd27f9bddc3fb6e778c90edfb7660197c504cf492184422ef6f2d0dabef86900254f8a0031e9a48b52
7
- data.tar.gz: 9b52ef1b80fee0454a3dd51b0d07f069418e99db0fb6655c4cf14025892af46b51a753df5d52b4c9d136f1635f2b4033dc9dbad326649074d280fe74934c9159
6
+ metadata.gz: b9dd8ee12fc2a9f12a1e045a4ade51ff6f4d8029bc960353d0628d9def75a791c0b4ba713070d25b3099de2c64db840ad423cee2c4c97205c0bf480325a5d660
7
+ data.tar.gz: 4a4040411b4a12398fa72a0b90fe7d541f244f1131999dcb41a90d774d6af0517cd771eac2c743f8f1694f11335fb0ec807f5d8387d62634a46e7c4ee4346a2c
data/README.md CHANGED
@@ -84,12 +84,10 @@ To browse ready to use code samples check [Google Cloud Samples](https://cloud.g
84
84
 
85
85
  This library is supported on Ruby 3.2+.
86
86
 
87
- Google provides official support for Ruby versions that are actively supported
88
- by Ruby Core—that is, Ruby versions that are either in normal maintenance or
89
- in security maintenance, and not end of life. Older versions of Ruby _may_
90
- still work, but are unsupported and not recommended. See
91
- https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
92
- support schedule.
87
+ Google provides official support for Ruby versions as described in the
88
+ [Supported Ruby versions](https://docs.cloud.google.com/ruby/getting-started/supported-ruby-versions)
89
+ policy. Older versions of Ruby _may_ still work, but are unsupported and not
90
+ recommended.
93
91
 
94
92
  ## Which client should I use?
95
93
 
@@ -2655,6 +2655,537 @@ module Google
2655
2655
  raise ::Google::Cloud::Error.from_error(e)
2656
2656
  end
2657
2657
 
2658
+ ##
2659
+ # Create a GatewayAdvertisedRoute
2660
+ #
2661
+ # @overload create_gateway_advertised_route(request, options = nil)
2662
+ # Pass arguments to `create_gateway_advertised_route` via a request object, either of type
2663
+ # {::Google::Cloud::NetworkConnectivity::V1::CreateGatewayAdvertisedRouteRequest} or an equivalent Hash.
2664
+ #
2665
+ # @param request [::Google::Cloud::NetworkConnectivity::V1::CreateGatewayAdvertisedRouteRequest, ::Hash]
2666
+ # A request object representing the call parameters. Required. To specify no
2667
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2668
+ # @param options [::Gapic::CallOptions, ::Hash]
2669
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2670
+ #
2671
+ # @overload create_gateway_advertised_route(parent: nil, gateway_advertised_route_id: nil, gateway_advertised_route: nil, request_id: nil)
2672
+ # Pass arguments to `create_gateway_advertised_route` via keyword arguments. Note that at
2673
+ # least one keyword argument is required. To specify no parameters, or to keep all
2674
+ # the default parameter values, pass an empty Hash as a request object (see above).
2675
+ #
2676
+ # @param parent [::String]
2677
+ # Required. The parent resource.
2678
+ # @param gateway_advertised_route_id [::String]
2679
+ # Required. Unique id for the route to create.
2680
+ # @param gateway_advertised_route [::Google::Cloud::NetworkConnectivity::V1::GatewayAdvertisedRoute, ::Hash]
2681
+ # Required. Initial values for the new gateway advertised route.
2682
+ # @param request_id [::String]
2683
+ # Optional. A request ID to identify requests. Specify a unique request ID so
2684
+ # that if you must retry your request, the server knows to ignore the request
2685
+ # if it has already been completed. The server guarantees that a request
2686
+ # doesn't result in creation of duplicate commitments for at least 60
2687
+ # minutes.
2688
+ #
2689
+ # For example, consider a situation where you make an initial request and
2690
+ # the request times out. If you make the request again with the same request
2691
+ # ID, the server can check to see whether the original operation
2692
+ # was received. If it was, the server ignores the second request. This
2693
+ # behavior prevents clients from mistakenly creating duplicate commitments.
2694
+ #
2695
+ # The request ID must be a valid UUID, with the exception that zero UUID is
2696
+ # not supported (00000000-0000-0000-0000-000000000000).
2697
+ #
2698
+ # @yield [response, operation] Access the result along with the RPC operation
2699
+ # @yieldparam response [::Gapic::Operation]
2700
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2701
+ #
2702
+ # @return [::Gapic::Operation]
2703
+ #
2704
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2705
+ #
2706
+ # @example Basic example
2707
+ # require "google/cloud/network_connectivity/v1"
2708
+ #
2709
+ # # Create a client object. The client can be reused for multiple calls.
2710
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
2711
+ #
2712
+ # # Create a request. To set request fields, pass in keyword arguments.
2713
+ # request = Google::Cloud::NetworkConnectivity::V1::CreateGatewayAdvertisedRouteRequest.new
2714
+ #
2715
+ # # Call the create_gateway_advertised_route method.
2716
+ # result = client.create_gateway_advertised_route request
2717
+ #
2718
+ # # The returned object is of type Gapic::Operation. You can use it to
2719
+ # # check the status of an operation, cancel it, or wait for results.
2720
+ # # Here is how to wait for a response.
2721
+ # result.wait_until_done! timeout: 60
2722
+ # if result.response?
2723
+ # p result.response
2724
+ # else
2725
+ # puts "No response received."
2726
+ # end
2727
+ #
2728
+ def create_gateway_advertised_route request, options = nil
2729
+ raise ::ArgumentError, "request must be provided" if request.nil?
2730
+
2731
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::CreateGatewayAdvertisedRouteRequest
2732
+
2733
+ # Converts hash and nil to an options object
2734
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2735
+
2736
+ # Customize the options with defaults
2737
+ metadata = @config.rpcs.create_gateway_advertised_route.metadata.to_h
2738
+
2739
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2740
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2741
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2742
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
2743
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2744
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2745
+
2746
+ header_params = {}
2747
+ if request.parent
2748
+ header_params["parent"] = request.parent
2749
+ end
2750
+
2751
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2752
+ metadata[:"x-goog-request-params"] ||= request_params_header
2753
+
2754
+ options.apply_defaults timeout: @config.rpcs.create_gateway_advertised_route.timeout,
2755
+ metadata: metadata,
2756
+ retry_policy: @config.rpcs.create_gateway_advertised_route.retry_policy
2757
+
2758
+ options.apply_defaults timeout: @config.timeout,
2759
+ metadata: @config.metadata,
2760
+ retry_policy: @config.retry_policy
2761
+
2762
+ @hub_service_stub.call_rpc :create_gateway_advertised_route, request, options: options do |response, operation|
2763
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2764
+ yield response, operation if block_given?
2765
+ throw :response, response
2766
+ end
2767
+ rescue ::GRPC::BadStatus => e
2768
+ raise ::Google::Cloud::Error.from_error(e)
2769
+ end
2770
+
2771
+ ##
2772
+ # Get a GatewayAdvertisedRoute
2773
+ #
2774
+ # @overload get_gateway_advertised_route(request, options = nil)
2775
+ # Pass arguments to `get_gateway_advertised_route` via a request object, either of type
2776
+ # {::Google::Cloud::NetworkConnectivity::V1::GetGatewayAdvertisedRouteRequest} or an equivalent Hash.
2777
+ #
2778
+ # @param request [::Google::Cloud::NetworkConnectivity::V1::GetGatewayAdvertisedRouteRequest, ::Hash]
2779
+ # A request object representing the call parameters. Required. To specify no
2780
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2781
+ # @param options [::Gapic::CallOptions, ::Hash]
2782
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2783
+ #
2784
+ # @overload get_gateway_advertised_route(name: nil)
2785
+ # Pass arguments to `get_gateway_advertised_route` via keyword arguments. Note that at
2786
+ # least one keyword argument is required. To specify no parameters, or to keep all
2787
+ # the default parameter values, pass an empty Hash as a request object (see above).
2788
+ #
2789
+ # @param name [::String]
2790
+ # Required. The name of the gateway advertised route to get.
2791
+ #
2792
+ # @yield [response, operation] Access the result along with the RPC operation
2793
+ # @yieldparam response [::Google::Cloud::NetworkConnectivity::V1::GatewayAdvertisedRoute]
2794
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2795
+ #
2796
+ # @return [::Google::Cloud::NetworkConnectivity::V1::GatewayAdvertisedRoute]
2797
+ #
2798
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2799
+ #
2800
+ # @example Basic example
2801
+ # require "google/cloud/network_connectivity/v1"
2802
+ #
2803
+ # # Create a client object. The client can be reused for multiple calls.
2804
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
2805
+ #
2806
+ # # Create a request. To set request fields, pass in keyword arguments.
2807
+ # request = Google::Cloud::NetworkConnectivity::V1::GetGatewayAdvertisedRouteRequest.new
2808
+ #
2809
+ # # Call the get_gateway_advertised_route method.
2810
+ # result = client.get_gateway_advertised_route request
2811
+ #
2812
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1::GatewayAdvertisedRoute.
2813
+ # p result
2814
+ #
2815
+ def get_gateway_advertised_route request, options = nil
2816
+ raise ::ArgumentError, "request must be provided" if request.nil?
2817
+
2818
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::GetGatewayAdvertisedRouteRequest
2819
+
2820
+ # Converts hash and nil to an options object
2821
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2822
+
2823
+ # Customize the options with defaults
2824
+ metadata = @config.rpcs.get_gateway_advertised_route.metadata.to_h
2825
+
2826
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2827
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2828
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2829
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
2830
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2831
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2832
+
2833
+ header_params = {}
2834
+ if request.name
2835
+ header_params["name"] = request.name
2836
+ end
2837
+
2838
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2839
+ metadata[:"x-goog-request-params"] ||= request_params_header
2840
+
2841
+ options.apply_defaults timeout: @config.rpcs.get_gateway_advertised_route.timeout,
2842
+ metadata: metadata,
2843
+ retry_policy: @config.rpcs.get_gateway_advertised_route.retry_policy
2844
+
2845
+ options.apply_defaults timeout: @config.timeout,
2846
+ metadata: @config.metadata,
2847
+ retry_policy: @config.retry_policy
2848
+
2849
+ @hub_service_stub.call_rpc :get_gateway_advertised_route, request, options: options do |response, operation|
2850
+ yield response, operation if block_given?
2851
+ end
2852
+ rescue ::GRPC::BadStatus => e
2853
+ raise ::Google::Cloud::Error.from_error(e)
2854
+ end
2855
+
2856
+ ##
2857
+ # List GatewayAdvertisedRoutes
2858
+ #
2859
+ # @overload list_gateway_advertised_routes(request, options = nil)
2860
+ # Pass arguments to `list_gateway_advertised_routes` via a request object, either of type
2861
+ # {::Google::Cloud::NetworkConnectivity::V1::ListGatewayAdvertisedRoutesRequest} or an equivalent Hash.
2862
+ #
2863
+ # @param request [::Google::Cloud::NetworkConnectivity::V1::ListGatewayAdvertisedRoutesRequest, ::Hash]
2864
+ # A request object representing the call parameters. Required. To specify no
2865
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2866
+ # @param options [::Gapic::CallOptions, ::Hash]
2867
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2868
+ #
2869
+ # @overload list_gateway_advertised_routes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2870
+ # Pass arguments to `list_gateway_advertised_routes` via keyword arguments. Note that at
2871
+ # least one keyword argument is required. To specify no parameters, or to keep all
2872
+ # the default parameter values, pass an empty Hash as a request object (see above).
2873
+ #
2874
+ # @param parent [::String]
2875
+ # Required. The parent resource's name.
2876
+ # @param page_size [::Integer]
2877
+ # Optional. The maximum number of results per page that should be returned.
2878
+ # @param page_token [::String]
2879
+ # Optional. A page token, received from a previous
2880
+ # `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
2881
+ # page.
2882
+ #
2883
+ # When paginating, all other parameters provided to
2884
+ # `ListGatewayAdvertisedRoutes` must match the call that provided the page
2885
+ # token.
2886
+ # @param filter [::String]
2887
+ # An expression that filters the list of results.
2888
+ # @param order_by [::String]
2889
+ # Sort the results by a certain order.
2890
+ #
2891
+ # @yield [response, operation] Access the result along with the RPC operation
2892
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::GatewayAdvertisedRoute>]
2893
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2894
+ #
2895
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::NetworkConnectivity::V1::GatewayAdvertisedRoute>]
2896
+ #
2897
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2898
+ #
2899
+ # @example Basic example
2900
+ # require "google/cloud/network_connectivity/v1"
2901
+ #
2902
+ # # Create a client object. The client can be reused for multiple calls.
2903
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
2904
+ #
2905
+ # # Create a request. To set request fields, pass in keyword arguments.
2906
+ # request = Google::Cloud::NetworkConnectivity::V1::ListGatewayAdvertisedRoutesRequest.new
2907
+ #
2908
+ # # Call the list_gateway_advertised_routes method.
2909
+ # result = client.list_gateway_advertised_routes request
2910
+ #
2911
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2912
+ # # over elements, and API calls will be issued to fetch pages as needed.
2913
+ # result.each do |item|
2914
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1::GatewayAdvertisedRoute.
2915
+ # p item
2916
+ # end
2917
+ #
2918
+ def list_gateway_advertised_routes request, options = nil
2919
+ raise ::ArgumentError, "request must be provided" if request.nil?
2920
+
2921
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::ListGatewayAdvertisedRoutesRequest
2922
+
2923
+ # Converts hash and nil to an options object
2924
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2925
+
2926
+ # Customize the options with defaults
2927
+ metadata = @config.rpcs.list_gateway_advertised_routes.metadata.to_h
2928
+
2929
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2930
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2931
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2932
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
2933
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2934
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2935
+
2936
+ header_params = {}
2937
+ if request.parent
2938
+ header_params["parent"] = request.parent
2939
+ end
2940
+
2941
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2942
+ metadata[:"x-goog-request-params"] ||= request_params_header
2943
+
2944
+ options.apply_defaults timeout: @config.rpcs.list_gateway_advertised_routes.timeout,
2945
+ metadata: metadata,
2946
+ retry_policy: @config.rpcs.list_gateway_advertised_routes.retry_policy
2947
+
2948
+ options.apply_defaults timeout: @config.timeout,
2949
+ metadata: @config.metadata,
2950
+ retry_policy: @config.retry_policy
2951
+
2952
+ @hub_service_stub.call_rpc :list_gateway_advertised_routes, request, options: options do |response, operation|
2953
+ response = ::Gapic::PagedEnumerable.new @hub_service_stub, :list_gateway_advertised_routes, request, response, operation, options
2954
+ yield response, operation if block_given?
2955
+ throw :response, response
2956
+ end
2957
+ rescue ::GRPC::BadStatus => e
2958
+ raise ::Google::Cloud::Error.from_error(e)
2959
+ end
2960
+
2961
+ ##
2962
+ # Update a GatewayAdvertisedRoute
2963
+ #
2964
+ # @overload update_gateway_advertised_route(request, options = nil)
2965
+ # Pass arguments to `update_gateway_advertised_route` via a request object, either of type
2966
+ # {::Google::Cloud::NetworkConnectivity::V1::UpdateGatewayAdvertisedRouteRequest} or an equivalent Hash.
2967
+ #
2968
+ # @param request [::Google::Cloud::NetworkConnectivity::V1::UpdateGatewayAdvertisedRouteRequest, ::Hash]
2969
+ # A request object representing the call parameters. Required. To specify no
2970
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2971
+ # @param options [::Gapic::CallOptions, ::Hash]
2972
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2973
+ #
2974
+ # @overload update_gateway_advertised_route(update_mask: nil, gateway_advertised_route: nil, request_id: nil)
2975
+ # Pass arguments to `update_gateway_advertised_route` via keyword arguments. Note that at
2976
+ # least one keyword argument is required. To specify no parameters, or to keep all
2977
+ # the default parameter values, pass an empty Hash as a request object (see above).
2978
+ #
2979
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2980
+ # Optional. In the case of an update to an existing group, field mask is used
2981
+ # to specify the fields to be overwritten. The fields specified in the
2982
+ # update_mask are relative to the resource, not the full request. A field is
2983
+ # overwritten if it is in the mask. If the user does not provide a mask, then
2984
+ # all fields are overwritten.
2985
+ # @param gateway_advertised_route [::Google::Cloud::NetworkConnectivity::V1::GatewayAdvertisedRoute, ::Hash]
2986
+ # Required. The gateway advertised route to update.
2987
+ #
2988
+ # The gateway advertised route's `name` field is used to identify the gateway
2989
+ # advertised route to update. Format:
2990
+ # `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
2991
+ # @param request_id [::String]
2992
+ # Optional. A request ID to identify requests. Specify a unique request ID so
2993
+ # that if you must retry your request, the server knows to ignore the request
2994
+ # if it has already been completed. The server guarantees that a request
2995
+ # doesn't result in creation of duplicate commitments for at least 60
2996
+ # minutes.
2997
+ #
2998
+ # For example, consider a situation where you make an initial request and
2999
+ # the request times out. If you make the request again with the same request
3000
+ # ID, the server can check to see whether the original operation
3001
+ # was received. If it was, the server ignores the second request. This
3002
+ # behavior prevents clients from mistakenly creating duplicate commitments.
3003
+ #
3004
+ # The request ID must be a valid UUID, with the exception that zero UUID is
3005
+ # not supported (00000000-0000-0000-0000-000000000000).
3006
+ #
3007
+ # @yield [response, operation] Access the result along with the RPC operation
3008
+ # @yieldparam response [::Gapic::Operation]
3009
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3010
+ #
3011
+ # @return [::Gapic::Operation]
3012
+ #
3013
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3014
+ #
3015
+ # @example Basic example
3016
+ # require "google/cloud/network_connectivity/v1"
3017
+ #
3018
+ # # Create a client object. The client can be reused for multiple calls.
3019
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
3020
+ #
3021
+ # # Create a request. To set request fields, pass in keyword arguments.
3022
+ # request = Google::Cloud::NetworkConnectivity::V1::UpdateGatewayAdvertisedRouteRequest.new
3023
+ #
3024
+ # # Call the update_gateway_advertised_route method.
3025
+ # result = client.update_gateway_advertised_route request
3026
+ #
3027
+ # # The returned object is of type Gapic::Operation. You can use it to
3028
+ # # check the status of an operation, cancel it, or wait for results.
3029
+ # # Here is how to wait for a response.
3030
+ # result.wait_until_done! timeout: 60
3031
+ # if result.response?
3032
+ # p result.response
3033
+ # else
3034
+ # puts "No response received."
3035
+ # end
3036
+ #
3037
+ def update_gateway_advertised_route request, options = nil
3038
+ raise ::ArgumentError, "request must be provided" if request.nil?
3039
+
3040
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::UpdateGatewayAdvertisedRouteRequest
3041
+
3042
+ # Converts hash and nil to an options object
3043
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3044
+
3045
+ # Customize the options with defaults
3046
+ metadata = @config.rpcs.update_gateway_advertised_route.metadata.to_h
3047
+
3048
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3049
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3050
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3051
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
3052
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3053
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3054
+
3055
+ header_params = {}
3056
+ if request.gateway_advertised_route&.name
3057
+ header_params["gateway_advertised_route.name"] = request.gateway_advertised_route.name
3058
+ end
3059
+
3060
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3061
+ metadata[:"x-goog-request-params"] ||= request_params_header
3062
+
3063
+ options.apply_defaults timeout: @config.rpcs.update_gateway_advertised_route.timeout,
3064
+ metadata: metadata,
3065
+ retry_policy: @config.rpcs.update_gateway_advertised_route.retry_policy
3066
+
3067
+ options.apply_defaults timeout: @config.timeout,
3068
+ metadata: @config.metadata,
3069
+ retry_policy: @config.retry_policy
3070
+
3071
+ @hub_service_stub.call_rpc :update_gateway_advertised_route, request, options: options do |response, operation|
3072
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3073
+ yield response, operation if block_given?
3074
+ throw :response, response
3075
+ end
3076
+ rescue ::GRPC::BadStatus => e
3077
+ raise ::Google::Cloud::Error.from_error(e)
3078
+ end
3079
+
3080
+ ##
3081
+ # Delete a GatewayAdvertisedRoute
3082
+ #
3083
+ # @overload delete_gateway_advertised_route(request, options = nil)
3084
+ # Pass arguments to `delete_gateway_advertised_route` via a request object, either of type
3085
+ # {::Google::Cloud::NetworkConnectivity::V1::DeleteGatewayAdvertisedRouteRequest} or an equivalent Hash.
3086
+ #
3087
+ # @param request [::Google::Cloud::NetworkConnectivity::V1::DeleteGatewayAdvertisedRouteRequest, ::Hash]
3088
+ # A request object representing the call parameters. Required. To specify no
3089
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3090
+ # @param options [::Gapic::CallOptions, ::Hash]
3091
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3092
+ #
3093
+ # @overload delete_gateway_advertised_route(name: nil, request_id: nil)
3094
+ # Pass arguments to `delete_gateway_advertised_route` via keyword arguments. Note that at
3095
+ # least one keyword argument is required. To specify no parameters, or to keep all
3096
+ # the default parameter values, pass an empty Hash as a request object (see above).
3097
+ #
3098
+ # @param name [::String]
3099
+ # Required. The name of the gateway advertised route to delete.
3100
+ # @param request_id [::String]
3101
+ # Optional. A request ID to identify requests. Specify a unique request ID so
3102
+ # that if you must retry your request, the server knows to ignore the request
3103
+ # if it has already been completed. The server guarantees that a request
3104
+ # doesn't result in creation of duplicate commitments for at least 60
3105
+ # minutes.
3106
+ #
3107
+ # For example, consider a situation where you make an initial request and
3108
+ # the request times out. If you make the request again with the same request
3109
+ # ID, the server can check to see whether the original operation
3110
+ # was received. If it was, the server ignores the second request. This
3111
+ # behavior prevents clients from mistakenly creating duplicate commitments.
3112
+ #
3113
+ # The request ID must be a valid UUID, with the exception that zero UUID is
3114
+ # not supported (00000000-0000-0000-0000-000000000000).
3115
+ #
3116
+ # @yield [response, operation] Access the result along with the RPC operation
3117
+ # @yieldparam response [::Gapic::Operation]
3118
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3119
+ #
3120
+ # @return [::Gapic::Operation]
3121
+ #
3122
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3123
+ #
3124
+ # @example Basic example
3125
+ # require "google/cloud/network_connectivity/v1"
3126
+ #
3127
+ # # Create a client object. The client can be reused for multiple calls.
3128
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
3129
+ #
3130
+ # # Create a request. To set request fields, pass in keyword arguments.
3131
+ # request = Google::Cloud::NetworkConnectivity::V1::DeleteGatewayAdvertisedRouteRequest.new
3132
+ #
3133
+ # # Call the delete_gateway_advertised_route method.
3134
+ # result = client.delete_gateway_advertised_route request
3135
+ #
3136
+ # # The returned object is of type Gapic::Operation. You can use it to
3137
+ # # check the status of an operation, cancel it, or wait for results.
3138
+ # # Here is how to wait for a response.
3139
+ # result.wait_until_done! timeout: 60
3140
+ # if result.response?
3141
+ # p result.response
3142
+ # else
3143
+ # puts "No response received."
3144
+ # end
3145
+ #
3146
+ def delete_gateway_advertised_route request, options = nil
3147
+ raise ::ArgumentError, "request must be provided" if request.nil?
3148
+
3149
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkConnectivity::V1::DeleteGatewayAdvertisedRouteRequest
3150
+
3151
+ # Converts hash and nil to an options object
3152
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3153
+
3154
+ # Customize the options with defaults
3155
+ metadata = @config.rpcs.delete_gateway_advertised_route.metadata.to_h
3156
+
3157
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3158
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3159
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3160
+ gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
3161
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3162
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3163
+
3164
+ header_params = {}
3165
+ if request.name
3166
+ header_params["name"] = request.name
3167
+ end
3168
+
3169
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3170
+ metadata[:"x-goog-request-params"] ||= request_params_header
3171
+
3172
+ options.apply_defaults timeout: @config.rpcs.delete_gateway_advertised_route.timeout,
3173
+ metadata: metadata,
3174
+ retry_policy: @config.rpcs.delete_gateway_advertised_route.retry_policy
3175
+
3176
+ options.apply_defaults timeout: @config.timeout,
3177
+ metadata: @config.metadata,
3178
+ retry_policy: @config.retry_policy
3179
+
3180
+ @hub_service_stub.call_rpc :delete_gateway_advertised_route, request, options: options do |response, operation|
3181
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3182
+ yield response, operation if block_given?
3183
+ throw :response, response
3184
+ end
3185
+ rescue ::GRPC::BadStatus => e
3186
+ raise ::Google::Cloud::Error.from_error(e)
3187
+ end
3188
+
2658
3189
  ##
2659
3190
  # Configuration class for the HubService API.
2660
3191
  #
@@ -2955,6 +3486,31 @@ module Google
2955
3486
  # @return [::Gapic::Config::Method]
2956
3487
  #
2957
3488
  attr_reader :update_group
3489
+ ##
3490
+ # RPC-specific configuration for `create_gateway_advertised_route`
3491
+ # @return [::Gapic::Config::Method]
3492
+ #
3493
+ attr_reader :create_gateway_advertised_route
3494
+ ##
3495
+ # RPC-specific configuration for `get_gateway_advertised_route`
3496
+ # @return [::Gapic::Config::Method]
3497
+ #
3498
+ attr_reader :get_gateway_advertised_route
3499
+ ##
3500
+ # RPC-specific configuration for `list_gateway_advertised_routes`
3501
+ # @return [::Gapic::Config::Method]
3502
+ #
3503
+ attr_reader :list_gateway_advertised_routes
3504
+ ##
3505
+ # RPC-specific configuration for `update_gateway_advertised_route`
3506
+ # @return [::Gapic::Config::Method]
3507
+ #
3508
+ attr_reader :update_gateway_advertised_route
3509
+ ##
3510
+ # RPC-specific configuration for `delete_gateway_advertised_route`
3511
+ # @return [::Gapic::Config::Method]
3512
+ #
3513
+ attr_reader :delete_gateway_advertised_route
2958
3514
 
2959
3515
  # @private
2960
3516
  def initialize parent_rpcs = nil
@@ -3004,6 +3560,16 @@ module Google
3004
3560
  @list_groups = ::Gapic::Config::Method.new list_groups_config
3005
3561
  update_group_config = parent_rpcs.update_group if parent_rpcs.respond_to? :update_group
3006
3562
  @update_group = ::Gapic::Config::Method.new update_group_config
3563
+ create_gateway_advertised_route_config = parent_rpcs.create_gateway_advertised_route if parent_rpcs.respond_to? :create_gateway_advertised_route
3564
+ @create_gateway_advertised_route = ::Gapic::Config::Method.new create_gateway_advertised_route_config
3565
+ get_gateway_advertised_route_config = parent_rpcs.get_gateway_advertised_route if parent_rpcs.respond_to? :get_gateway_advertised_route
3566
+ @get_gateway_advertised_route = ::Gapic::Config::Method.new get_gateway_advertised_route_config
3567
+ list_gateway_advertised_routes_config = parent_rpcs.list_gateway_advertised_routes if parent_rpcs.respond_to? :list_gateway_advertised_routes
3568
+ @list_gateway_advertised_routes = ::Gapic::Config::Method.new list_gateway_advertised_routes_config
3569
+ update_gateway_advertised_route_config = parent_rpcs.update_gateway_advertised_route if parent_rpcs.respond_to? :update_gateway_advertised_route
3570
+ @update_gateway_advertised_route = ::Gapic::Config::Method.new update_gateway_advertised_route_config
3571
+ delete_gateway_advertised_route_config = parent_rpcs.delete_gateway_advertised_route if parent_rpcs.respond_to? :delete_gateway_advertised_route
3572
+ @delete_gateway_advertised_route = ::Gapic::Config::Method.new delete_gateway_advertised_route_config
3007
3573
 
3008
3574
  yield self if block_given?
3009
3575
  end