google-cloud-sql-v1beta4 0.6.0 → 0.7.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.
@@ -953,6 +953,86 @@ module Google
953
953
  end
954
954
  end
955
955
 
956
+ ##
957
+ # Baseline implementation for the start REST call
958
+ #
959
+ # @param request_pb [::Google::Cloud::Sql::V1beta4::SqlInstancesStartRequest]
960
+ # A request object representing the call parameters. Required.
961
+ # @param options [::Gapic::CallOptions]
962
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
963
+ #
964
+ # @yield [result, operation] Access the result along with the TransportOperation object
965
+ # @yieldparam result [::Google::Cloud::Sql::V1beta4::Operation]
966
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
967
+ #
968
+ # @return [::Google::Cloud::Sql::V1beta4::Operation]
969
+ # A result object deserialized from the server's reply
970
+ def start request_pb, options = nil
971
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
972
+
973
+ verb, uri, query_string_params, body = ServiceStub.transcode_start_request request_pb
974
+ query_string_params = if query_string_params.any?
975
+ query_string_params.to_h { |p| p.split "=", 2 }
976
+ else
977
+ {}
978
+ end
979
+
980
+ response = @client_stub.make_http_request(
981
+ verb,
982
+ uri: uri,
983
+ body: body || "",
984
+ params: query_string_params,
985
+ method_name: "start",
986
+ options: options
987
+ )
988
+ operation = ::Gapic::Rest::TransportOperation.new response
989
+ result = ::Google::Cloud::Sql::V1beta4::Operation.decode_json response.body, ignore_unknown_fields: true
990
+ catch :response do
991
+ yield result, operation if block_given?
992
+ result
993
+ end
994
+ end
995
+
996
+ ##
997
+ # Baseline implementation for the stop REST call
998
+ #
999
+ # @param request_pb [::Google::Cloud::Sql::V1beta4::SqlInstancesStopRequest]
1000
+ # A request object representing the call parameters. Required.
1001
+ # @param options [::Gapic::CallOptions]
1002
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1003
+ #
1004
+ # @yield [result, operation] Access the result along with the TransportOperation object
1005
+ # @yieldparam result [::Google::Cloud::Sql::V1beta4::Operation]
1006
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1007
+ #
1008
+ # @return [::Google::Cloud::Sql::V1beta4::Operation]
1009
+ # A result object deserialized from the server's reply
1010
+ def stop request_pb, options = nil
1011
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1012
+
1013
+ verb, uri, query_string_params, body = ServiceStub.transcode_stop_request request_pb
1014
+ query_string_params = if query_string_params.any?
1015
+ query_string_params.to_h { |p| p.split "=", 2 }
1016
+ else
1017
+ {}
1018
+ end
1019
+
1020
+ response = @client_stub.make_http_request(
1021
+ verb,
1022
+ uri: uri,
1023
+ body: body || "",
1024
+ params: query_string_params,
1025
+ method_name: "stop",
1026
+ options: options
1027
+ )
1028
+ operation = ::Gapic::Rest::TransportOperation.new response
1029
+ result = ::Google::Cloud::Sql::V1beta4::Operation.decode_json response.body, ignore_unknown_fields: true
1030
+ catch :response do
1031
+ yield result, operation if block_given?
1032
+ result
1033
+ end
1034
+ end
1035
+
956
1036
  ##
957
1037
  # Baseline implementation for the restore_backup REST call
958
1038
  #
@@ -1593,6 +1673,46 @@ module Google
1593
1673
  end
1594
1674
  end
1595
1675
 
1676
+ ##
1677
+ # Baseline implementation for the execute_sql_read_only REST call
1678
+ #
1679
+ # @param request_pb [::Google::Cloud::Sql::V1beta4::SqlInstancesExecuteSqlReadOnlyRequest]
1680
+ # A request object representing the call parameters. Required.
1681
+ # @param options [::Gapic::CallOptions]
1682
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1683
+ #
1684
+ # @yield [result, operation] Access the result along with the TransportOperation object
1685
+ # @yieldparam result [::Google::Cloud::Sql::V1beta4::SqlInstancesExecuteSqlReadOnlyResponse]
1686
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1687
+ #
1688
+ # @return [::Google::Cloud::Sql::V1beta4::SqlInstancesExecuteSqlReadOnlyResponse]
1689
+ # A result object deserialized from the server's reply
1690
+ def execute_sql_read_only request_pb, options = nil
1691
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1692
+
1693
+ verb, uri, query_string_params, body = ServiceStub.transcode_execute_sql_read_only_request request_pb
1694
+ query_string_params = if query_string_params.any?
1695
+ query_string_params.to_h { |p| p.split "=", 2 }
1696
+ else
1697
+ {}
1698
+ end
1699
+
1700
+ response = @client_stub.make_http_request(
1701
+ verb,
1702
+ uri: uri,
1703
+ body: body || "",
1704
+ params: query_string_params,
1705
+ method_name: "execute_sql_read_only",
1706
+ options: options
1707
+ )
1708
+ operation = ::Gapic::Rest::TransportOperation.new response
1709
+ result = ::Google::Cloud::Sql::V1beta4::SqlInstancesExecuteSqlReadOnlyResponse.decode_json response.body, ignore_unknown_fields: true
1710
+ catch :response do
1711
+ yield result, operation if block_given?
1712
+ result
1713
+ end
1714
+ end
1715
+
1596
1716
  ##
1597
1717
  # Baseline implementation for the execute_sql REST call
1598
1718
  #
@@ -1793,6 +1913,46 @@ module Google
1793
1913
  end
1794
1914
  end
1795
1915
 
1916
+ ##
1917
+ # Baseline implementation for the reconcile_networking REST call
1918
+ #
1919
+ # @param request_pb [::Google::Cloud::Sql::V1beta4::SqlInstancesReconcileNetworkingRequest]
1920
+ # A request object representing the call parameters. Required.
1921
+ # @param options [::Gapic::CallOptions]
1922
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1923
+ #
1924
+ # @yield [result, operation] Access the result along with the TransportOperation object
1925
+ # @yieldparam result [::Google::Cloud::Sql::V1beta4::Operation]
1926
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1927
+ #
1928
+ # @return [::Google::Cloud::Sql::V1beta4::Operation]
1929
+ # A result object deserialized from the server's reply
1930
+ def reconcile_networking request_pb, options = nil
1931
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1932
+
1933
+ verb, uri, query_string_params, body = ServiceStub.transcode_reconcile_networking_request request_pb
1934
+ query_string_params = if query_string_params.any?
1935
+ query_string_params.to_h { |p| p.split "=", 2 }
1936
+ else
1937
+ {}
1938
+ end
1939
+
1940
+ response = @client_stub.make_http_request(
1941
+ verb,
1942
+ uri: uri,
1943
+ body: body || "",
1944
+ params: query_string_params,
1945
+ method_name: "reconcile_networking",
1946
+ options: options
1947
+ )
1948
+ operation = ::Gapic::Rest::TransportOperation.new response
1949
+ result = ::Google::Cloud::Sql::V1beta4::Operation.decode_json response.body, ignore_unknown_fields: true
1950
+ catch :response do
1951
+ yield result, operation if block_given?
1952
+ result
1953
+ end
1954
+ end
1955
+
1796
1956
  ##
1797
1957
  # @private
1798
1958
  #
@@ -2284,6 +2444,50 @@ module Google
2284
2444
  transcoder.transcode request_pb
2285
2445
  end
2286
2446
 
2447
+ ##
2448
+ # @private
2449
+ #
2450
+ # GRPC transcoding helper method for the start REST call
2451
+ #
2452
+ # @param request_pb [::Google::Cloud::Sql::V1beta4::SqlInstancesStartRequest]
2453
+ # A request object representing the call parameters. Required.
2454
+ # @return [Array(String, [String, nil], Hash{String => String})]
2455
+ # Uri, Body, Query string parameters
2456
+ def self.transcode_start_request request_pb
2457
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2458
+ .with_bindings(
2459
+ uri_method: :post,
2460
+ uri_template: "/sql/v1beta4/projects/{project}/instances/{instance}:start",
2461
+ matches: [
2462
+ ["project", %r{^[^/]+/?$}, false],
2463
+ ["instance", %r{^[^/]+/?$}, false]
2464
+ ]
2465
+ )
2466
+ transcoder.transcode request_pb
2467
+ end
2468
+
2469
+ ##
2470
+ # @private
2471
+ #
2472
+ # GRPC transcoding helper method for the stop REST call
2473
+ #
2474
+ # @param request_pb [::Google::Cloud::Sql::V1beta4::SqlInstancesStopRequest]
2475
+ # A request object representing the call parameters. Required.
2476
+ # @return [Array(String, [String, nil], Hash{String => String})]
2477
+ # Uri, Body, Query string parameters
2478
+ def self.transcode_stop_request request_pb
2479
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2480
+ .with_bindings(
2481
+ uri_method: :post,
2482
+ uri_template: "/sql/v1beta4/projects/{project}/instances/{instance}:stop",
2483
+ matches: [
2484
+ ["project", %r{^[^/]+/?$}, false],
2485
+ ["instance", %r{^[^/]+/?$}, false]
2486
+ ]
2487
+ )
2488
+ transcoder.transcode request_pb
2489
+ end
2490
+
2287
2491
  ##
2288
2492
  # @private
2289
2493
  #
@@ -2648,6 +2852,29 @@ module Google
2648
2852
  transcoder.transcode request_pb
2649
2853
  end
2650
2854
 
2855
+ ##
2856
+ # @private
2857
+ #
2858
+ # GRPC transcoding helper method for the execute_sql_read_only REST call
2859
+ #
2860
+ # @param request_pb [::Google::Cloud::Sql::V1beta4::SqlInstancesExecuteSqlReadOnlyRequest]
2861
+ # A request object representing the call parameters. Required.
2862
+ # @return [Array(String, [String, nil], Hash{String => String})]
2863
+ # Uri, Body, Query string parameters
2864
+ def self.transcode_execute_sql_read_only_request request_pb
2865
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2866
+ .with_bindings(
2867
+ uri_method: :post,
2868
+ uri_template: "/sql/v1beta4/projects/{project}/instances/{instance}/executeSqlReadOnly",
2869
+ body: "body",
2870
+ matches: [
2871
+ ["project", %r{^[^/]+/?$}, false],
2872
+ ["instance", %r{^[^/]+/?$}, false]
2873
+ ]
2874
+ )
2875
+ transcoder.transcode request_pb
2876
+ end
2877
+
2651
2878
  ##
2652
2879
  # @private
2653
2880
  #
@@ -2760,6 +2987,29 @@ module Google
2760
2987
  )
2761
2988
  transcoder.transcode request_pb
2762
2989
  end
2990
+
2991
+ ##
2992
+ # @private
2993
+ #
2994
+ # GRPC transcoding helper method for the reconcile_networking REST call
2995
+ #
2996
+ # @param request_pb [::Google::Cloud::Sql::V1beta4::SqlInstancesReconcileNetworkingRequest]
2997
+ # A request object representing the call parameters. Required.
2998
+ # @return [Array(String, [String, nil], Hash{String => String})]
2999
+ # Uri, Body, Query string parameters
3000
+ def self.transcode_reconcile_networking_request request_pb
3001
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3002
+ .with_bindings(
3003
+ uri_method: :post,
3004
+ uri_template: "/sql/v1beta4/projects/{project}/instances/{instance}:reconcileNetworking",
3005
+ body: "*",
3006
+ matches: [
3007
+ ["project", %r{^[^/]+/?$}, false],
3008
+ ["instance", %r{^[^/]+/?$}, false]
3009
+ ]
3010
+ )
3011
+ transcoder.transcode request_pb
3012
+ end
2763
3013
  end
2764
3014
  end
2765
3015
  end
@@ -575,6 +575,300 @@ module Google
575
575
  raise ::Google::Cloud::Error.from_error(e)
576
576
  end
577
577
 
578
+ ##
579
+ # Upload and update customer managed certificate bundle for an existing
580
+ # Cloud SQL instance.
581
+ #
582
+ # @overload update_customer_managed_certificate(request, options = nil)
583
+ # Pass arguments to `update_customer_managed_certificate` via a request object, either of type
584
+ # {::Google::Cloud::Sql::V1beta4::UpdateCustomerManagedCertificateRequest} or an equivalent Hash.
585
+ #
586
+ # @param request [::Google::Cloud::Sql::V1beta4::UpdateCustomerManagedCertificateRequest, ::Hash]
587
+ # A request object representing the call parameters. Required. To specify no
588
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
589
+ # @param options [::Gapic::CallOptions, ::Hash]
590
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
591
+ #
592
+ # @overload update_customer_managed_certificate(instance: nil, project: nil, customer_managed_certificate_config: nil, update_mask: nil, allow_missing: nil, certificate_bundle: nil)
593
+ # Pass arguments to `update_customer_managed_certificate` via keyword arguments. Note that at
594
+ # least one keyword argument is required. To specify no parameters, or to keep all
595
+ # the default parameter values, pass an empty Hash as a request object (see above).
596
+ #
597
+ # @param instance [::String]
598
+ # Required. Cloud SQL instance ID. This does not include the project ID.
599
+ # @param project [::String]
600
+ # Required. Project ID of the project that contains the instance.
601
+ # @param customer_managed_certificate_config [::Google::Cloud::Sql::V1beta4::CustomerManagedCertificateConfig, ::Hash]
602
+ # Required. The customer managed certificate bundle SSL configuration to
603
+ # update.
604
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
605
+ # Optional. The list of fields to be updated.
606
+ # @param allow_missing [::Boolean]
607
+ # Optional. If set to true, and the customer managed certificate bundle
608
+ # configuration is not found, a new customer managed certificate bundle
609
+ # configuration will be created. In this situation, `update_mask` is ignored.
610
+ # @param certificate_bundle [::String]
611
+ # Required. Name tag of the customer managed certificate bundle to update. It
612
+ # must be alphanumeric and have a maximum length of 10 characters.
613
+ #
614
+ # @yield [response, operation] Access the result along with the RPC operation
615
+ # @yieldparam response [::Google::Cloud::Sql::V1beta4::Operation]
616
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
617
+ #
618
+ # @return [::Google::Cloud::Sql::V1beta4::Operation]
619
+ #
620
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
621
+ #
622
+ # @example Basic example
623
+ # require "google/cloud/sql/v1beta4"
624
+ #
625
+ # # Create a client object. The client can be reused for multiple calls.
626
+ # client = Google::Cloud::Sql::V1beta4::SqlSslCertsService::Client.new
627
+ #
628
+ # # Create a request. To set request fields, pass in keyword arguments.
629
+ # request = Google::Cloud::Sql::V1beta4::UpdateCustomerManagedCertificateRequest.new
630
+ #
631
+ # # Call the update_customer_managed_certificate method.
632
+ # result = client.update_customer_managed_certificate request
633
+ #
634
+ # # The returned object is of type Google::Cloud::Sql::V1beta4::Operation.
635
+ # p result
636
+ #
637
+ def update_customer_managed_certificate request, options = nil
638
+ raise ::ArgumentError, "request must be provided" if request.nil?
639
+
640
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1beta4::UpdateCustomerManagedCertificateRequest
641
+
642
+ # Converts hash and nil to an options object
643
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
644
+
645
+ # Customize the options with defaults
646
+ metadata = @config.rpcs.update_customer_managed_certificate.metadata.to_h
647
+
648
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
649
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
650
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
651
+ gapic_version: ::Google::Cloud::Sql::V1beta4::VERSION
652
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
653
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
654
+
655
+ header_params = {}
656
+ if request.project
657
+ header_params["project"] = request.project
658
+ end
659
+ if request.instance
660
+ header_params["instance"] = request.instance
661
+ end
662
+ if request.certificate_bundle
663
+ header_params["certificate_bundle"] = request.certificate_bundle
664
+ end
665
+
666
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
667
+ metadata[:"x-goog-request-params"] ||= request_params_header
668
+
669
+ options.apply_defaults timeout: @config.rpcs.update_customer_managed_certificate.timeout,
670
+ metadata: metadata,
671
+ retry_policy: @config.rpcs.update_customer_managed_certificate.retry_policy
672
+
673
+ options.apply_defaults timeout: @config.timeout,
674
+ metadata: @config.metadata,
675
+ retry_policy: @config.retry_policy
676
+
677
+ @sql_ssl_certs_service_stub.call_rpc :update_customer_managed_certificate, request, options: options do |response, operation|
678
+ yield response, operation if block_given?
679
+ end
680
+ rescue ::GRPC::BadStatus => e
681
+ raise ::Google::Cloud::Error.from_error(e)
682
+ end
683
+
684
+ ##
685
+ # Delete customer managed certificate bundle for an existing Cloud SQL
686
+ # instance.
687
+ #
688
+ # @overload delete_customer_managed_certificate(request, options = nil)
689
+ # Pass arguments to `delete_customer_managed_certificate` via a request object, either of type
690
+ # {::Google::Cloud::Sql::V1beta4::DeleteCustomerManagedCertificateRequest} or an equivalent Hash.
691
+ #
692
+ # @param request [::Google::Cloud::Sql::V1beta4::DeleteCustomerManagedCertificateRequest, ::Hash]
693
+ # A request object representing the call parameters. Required. To specify no
694
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
695
+ # @param options [::Gapic::CallOptions, ::Hash]
696
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
697
+ #
698
+ # @overload delete_customer_managed_certificate(instance: nil, project: nil, certificate_bundle: nil)
699
+ # Pass arguments to `delete_customer_managed_certificate` via keyword arguments. Note that at
700
+ # least one keyword argument is required. To specify no parameters, or to keep all
701
+ # the default parameter values, pass an empty Hash as a request object (see above).
702
+ #
703
+ # @param instance [::String]
704
+ # Required. Cloud SQL instance ID. This does not include the project ID.
705
+ # @param project [::String]
706
+ # Required. Project ID of the project that contains the instance.
707
+ # @param certificate_bundle [::String]
708
+ # Required. Name tag of the customer managed certificate bundle to delete. It
709
+ # must be alphanumeric and have a maximum length of 10 characters.
710
+ #
711
+ # @yield [response, operation] Access the result along with the RPC operation
712
+ # @yieldparam response [::Google::Cloud::Sql::V1beta4::Operation]
713
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
714
+ #
715
+ # @return [::Google::Cloud::Sql::V1beta4::Operation]
716
+ #
717
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
718
+ #
719
+ # @example Basic example
720
+ # require "google/cloud/sql/v1beta4"
721
+ #
722
+ # # Create a client object. The client can be reused for multiple calls.
723
+ # client = Google::Cloud::Sql::V1beta4::SqlSslCertsService::Client.new
724
+ #
725
+ # # Create a request. To set request fields, pass in keyword arguments.
726
+ # request = Google::Cloud::Sql::V1beta4::DeleteCustomerManagedCertificateRequest.new
727
+ #
728
+ # # Call the delete_customer_managed_certificate method.
729
+ # result = client.delete_customer_managed_certificate request
730
+ #
731
+ # # The returned object is of type Google::Cloud::Sql::V1beta4::Operation.
732
+ # p result
733
+ #
734
+ def delete_customer_managed_certificate request, options = nil
735
+ raise ::ArgumentError, "request must be provided" if request.nil?
736
+
737
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1beta4::DeleteCustomerManagedCertificateRequest
738
+
739
+ # Converts hash and nil to an options object
740
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
741
+
742
+ # Customize the options with defaults
743
+ metadata = @config.rpcs.delete_customer_managed_certificate.metadata.to_h
744
+
745
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
746
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
747
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
748
+ gapic_version: ::Google::Cloud::Sql::V1beta4::VERSION
749
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
750
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
751
+
752
+ header_params = {}
753
+ if request.project
754
+ header_params["project"] = request.project
755
+ end
756
+ if request.instance
757
+ header_params["instance"] = request.instance
758
+ end
759
+ if request.certificate_bundle
760
+ header_params["certificate_bundle"] = request.certificate_bundle
761
+ end
762
+
763
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
764
+ metadata[:"x-goog-request-params"] ||= request_params_header
765
+
766
+ options.apply_defaults timeout: @config.rpcs.delete_customer_managed_certificate.timeout,
767
+ metadata: metadata,
768
+ retry_policy: @config.rpcs.delete_customer_managed_certificate.retry_policy
769
+
770
+ options.apply_defaults timeout: @config.timeout,
771
+ metadata: @config.metadata,
772
+ retry_policy: @config.retry_policy
773
+
774
+ @sql_ssl_certs_service_stub.call_rpc :delete_customer_managed_certificate, request, options: options do |response, operation|
775
+ yield response, operation if block_given?
776
+ end
777
+ rescue ::GRPC::BadStatus => e
778
+ raise ::Google::Cloud::Error.from_error(e)
779
+ end
780
+
781
+ ##
782
+ # List all customer managed certificate bundles for an existing Cloud SQL
783
+ # instance.
784
+ #
785
+ # @overload list_customer_managed_certificates(request, options = nil)
786
+ # Pass arguments to `list_customer_managed_certificates` via a request object, either of type
787
+ # {::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesRequest} or an equivalent Hash.
788
+ #
789
+ # @param request [::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesRequest, ::Hash]
790
+ # A request object representing the call parameters. Required. To specify no
791
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
792
+ # @param options [::Gapic::CallOptions, ::Hash]
793
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
794
+ #
795
+ # @overload list_customer_managed_certificates(instance: nil, project: nil)
796
+ # Pass arguments to `list_customer_managed_certificates` via keyword arguments. Note that at
797
+ # least one keyword argument is required. To specify no parameters, or to keep all
798
+ # the default parameter values, pass an empty Hash as a request object (see above).
799
+ #
800
+ # @param instance [::String]
801
+ # Required. Cloud SQL instance ID. This does not include the project ID.
802
+ # @param project [::String]
803
+ # Required. Project ID of the project that contains the instance.
804
+ #
805
+ # @yield [response, operation] Access the result along with the RPC operation
806
+ # @yieldparam response [::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesResponse]
807
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
808
+ #
809
+ # @return [::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesResponse]
810
+ #
811
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
812
+ #
813
+ # @example Basic example
814
+ # require "google/cloud/sql/v1beta4"
815
+ #
816
+ # # Create a client object. The client can be reused for multiple calls.
817
+ # client = Google::Cloud::Sql::V1beta4::SqlSslCertsService::Client.new
818
+ #
819
+ # # Create a request. To set request fields, pass in keyword arguments.
820
+ # request = Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesRequest.new
821
+ #
822
+ # # Call the list_customer_managed_certificates method.
823
+ # result = client.list_customer_managed_certificates request
824
+ #
825
+ # # The returned object is of type Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesResponse.
826
+ # p result
827
+ #
828
+ def list_customer_managed_certificates request, options = nil
829
+ raise ::ArgumentError, "request must be provided" if request.nil?
830
+
831
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesRequest
832
+
833
+ # Converts hash and nil to an options object
834
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
835
+
836
+ # Customize the options with defaults
837
+ metadata = @config.rpcs.list_customer_managed_certificates.metadata.to_h
838
+
839
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
840
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
841
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
842
+ gapic_version: ::Google::Cloud::Sql::V1beta4::VERSION
843
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
844
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
845
+
846
+ header_params = {}
847
+ if request.project
848
+ header_params["project"] = request.project
849
+ end
850
+ if request.instance
851
+ header_params["instance"] = request.instance
852
+ end
853
+
854
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
855
+ metadata[:"x-goog-request-params"] ||= request_params_header
856
+
857
+ options.apply_defaults timeout: @config.rpcs.list_customer_managed_certificates.timeout,
858
+ metadata: metadata,
859
+ retry_policy: @config.rpcs.list_customer_managed_certificates.retry_policy
860
+
861
+ options.apply_defaults timeout: @config.timeout,
862
+ metadata: @config.metadata,
863
+ retry_policy: @config.retry_policy
864
+
865
+ @sql_ssl_certs_service_stub.call_rpc :list_customer_managed_certificates, request, options: options do |response, operation|
866
+ yield response, operation if block_given?
867
+ end
868
+ rescue ::GRPC::BadStatus => e
869
+ raise ::Google::Cloud::Error.from_error(e)
870
+ end
871
+
578
872
  ##
579
873
  # Configuration class for the SqlSslCertsService API.
580
874
  #
@@ -780,6 +1074,21 @@ module Google
780
1074
  # @return [::Gapic::Config::Method]
781
1075
  #
782
1076
  attr_reader :list
1077
+ ##
1078
+ # RPC-specific configuration for `update_customer_managed_certificate`
1079
+ # @return [::Gapic::Config::Method]
1080
+ #
1081
+ attr_reader :update_customer_managed_certificate
1082
+ ##
1083
+ # RPC-specific configuration for `delete_customer_managed_certificate`
1084
+ # @return [::Gapic::Config::Method]
1085
+ #
1086
+ attr_reader :delete_customer_managed_certificate
1087
+ ##
1088
+ # RPC-specific configuration for `list_customer_managed_certificates`
1089
+ # @return [::Gapic::Config::Method]
1090
+ #
1091
+ attr_reader :list_customer_managed_certificates
783
1092
 
784
1093
  # @private
785
1094
  def initialize parent_rpcs = nil
@@ -791,6 +1100,12 @@ module Google
791
1100
  @insert = ::Gapic::Config::Method.new insert_config
792
1101
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
793
1102
  @list = ::Gapic::Config::Method.new list_config
1103
+ update_customer_managed_certificate_config = parent_rpcs.update_customer_managed_certificate if parent_rpcs.respond_to? :update_customer_managed_certificate
1104
+ @update_customer_managed_certificate = ::Gapic::Config::Method.new update_customer_managed_certificate_config
1105
+ delete_customer_managed_certificate_config = parent_rpcs.delete_customer_managed_certificate if parent_rpcs.respond_to? :delete_customer_managed_certificate
1106
+ @delete_customer_managed_certificate = ::Gapic::Config::Method.new delete_customer_managed_certificate_config
1107
+ list_customer_managed_certificates_config = parent_rpcs.list_customer_managed_certificates if parent_rpcs.respond_to? :list_customer_managed_certificates
1108
+ @list_customer_managed_certificates = ::Gapic::Config::Method.new list_customer_managed_certificates_config
794
1109
 
795
1110
  yield self if block_given?
796
1111
  end