google-cloud-sql-v1 0.8.0 → 0.9.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::V1::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::V1::Operation]
966
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
967
+ #
968
+ # @return [::Google::Cloud::Sql::V1::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::V1::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::V1::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::V1::Operation]
1006
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1007
+ #
1008
+ # @return [::Google::Cloud::Sql::V1::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::V1::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::V1::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::V1::SqlInstancesExecuteSqlReadOnlyResponse]
1686
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1687
+ #
1688
+ # @return [::Google::Cloud::Sql::V1::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::V1::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::V1::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::V1::Operation]
1926
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1927
+ #
1928
+ # @return [::Google::Cloud::Sql::V1::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::V1::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::V1::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: "/v1/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::V1::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: "/v1/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::V1::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: "/v1/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::V1::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: "/v1/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,302 @@ 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 Cloud
580
+ # 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::V1::UpdateCustomerManagedCertificateRequest} or an equivalent Hash.
585
+ #
586
+ # @param request [::Google::Cloud::Sql::V1::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::V1::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 start with a letter, be alphanumeric, and have a maximum length of 10
613
+ # characters.
614
+ #
615
+ # @yield [response, operation] Access the result along with the RPC operation
616
+ # @yieldparam response [::Google::Cloud::Sql::V1::Operation]
617
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
618
+ #
619
+ # @return [::Google::Cloud::Sql::V1::Operation]
620
+ #
621
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
622
+ #
623
+ # @example Basic example
624
+ # require "google/cloud/sql/v1"
625
+ #
626
+ # # Create a client object. The client can be reused for multiple calls.
627
+ # client = Google::Cloud::Sql::V1::SqlSslCertsService::Client.new
628
+ #
629
+ # # Create a request. To set request fields, pass in keyword arguments.
630
+ # request = Google::Cloud::Sql::V1::UpdateCustomerManagedCertificateRequest.new
631
+ #
632
+ # # Call the update_customer_managed_certificate method.
633
+ # result = client.update_customer_managed_certificate request
634
+ #
635
+ # # The returned object is of type Google::Cloud::Sql::V1::Operation.
636
+ # p result
637
+ #
638
+ def update_customer_managed_certificate request, options = nil
639
+ raise ::ArgumentError, "request must be provided" if request.nil?
640
+
641
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::UpdateCustomerManagedCertificateRequest
642
+
643
+ # Converts hash and nil to an options object
644
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
645
+
646
+ # Customize the options with defaults
647
+ metadata = @config.rpcs.update_customer_managed_certificate.metadata.to_h
648
+
649
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
650
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
651
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
652
+ gapic_version: ::Google::Cloud::Sql::V1::VERSION
653
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
654
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
655
+
656
+ header_params = {}
657
+ if request.project
658
+ header_params["project"] = request.project
659
+ end
660
+ if request.instance
661
+ header_params["instance"] = request.instance
662
+ end
663
+ if request.certificate_bundle
664
+ header_params["certificate_bundle"] = request.certificate_bundle
665
+ end
666
+
667
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
668
+ metadata[:"x-goog-request-params"] ||= request_params_header
669
+
670
+ options.apply_defaults timeout: @config.rpcs.update_customer_managed_certificate.timeout,
671
+ metadata: metadata,
672
+ retry_policy: @config.rpcs.update_customer_managed_certificate.retry_policy
673
+
674
+ options.apply_defaults timeout: @config.timeout,
675
+ metadata: @config.metadata,
676
+ retry_policy: @config.retry_policy
677
+
678
+ @sql_ssl_certs_service_stub.call_rpc :update_customer_managed_certificate, request, options: options do |response, operation|
679
+ yield response, operation if block_given?
680
+ end
681
+ rescue ::GRPC::BadStatus => e
682
+ raise ::Google::Cloud::Error.from_error(e)
683
+ end
684
+
685
+ ##
686
+ # Delete customer managed certificate bundle for an existing Cloud SQL
687
+ # instance.
688
+ #
689
+ # @overload delete_customer_managed_certificate(request, options = nil)
690
+ # Pass arguments to `delete_customer_managed_certificate` via a request object, either of type
691
+ # {::Google::Cloud::Sql::V1::DeleteCustomerManagedCertificateRequest} or an equivalent Hash.
692
+ #
693
+ # @param request [::Google::Cloud::Sql::V1::DeleteCustomerManagedCertificateRequest, ::Hash]
694
+ # A request object representing the call parameters. Required. To specify no
695
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
696
+ # @param options [::Gapic::CallOptions, ::Hash]
697
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
698
+ #
699
+ # @overload delete_customer_managed_certificate(instance: nil, project: nil, certificate_bundle: nil)
700
+ # Pass arguments to `delete_customer_managed_certificate` via keyword arguments. Note that at
701
+ # least one keyword argument is required. To specify no parameters, or to keep all
702
+ # the default parameter values, pass an empty Hash as a request object (see above).
703
+ #
704
+ # @param instance [::String]
705
+ # Required. Cloud SQL instance ID. This does not include the project ID.
706
+ # @param project [::String]
707
+ # Required. Project ID of the project that contains the instance.
708
+ # @param certificate_bundle [::String]
709
+ # Required. Name tag of the customer managed certificate bundle to delete. It
710
+ # must start with a letter, be alphanumeric, and have a maximum length of 10
711
+ # characters.
712
+ #
713
+ # @yield [response, operation] Access the result along with the RPC operation
714
+ # @yieldparam response [::Google::Cloud::Sql::V1::Operation]
715
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
716
+ #
717
+ # @return [::Google::Cloud::Sql::V1::Operation]
718
+ #
719
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
720
+ #
721
+ # @example Basic example
722
+ # require "google/cloud/sql/v1"
723
+ #
724
+ # # Create a client object. The client can be reused for multiple calls.
725
+ # client = Google::Cloud::Sql::V1::SqlSslCertsService::Client.new
726
+ #
727
+ # # Create a request. To set request fields, pass in keyword arguments.
728
+ # request = Google::Cloud::Sql::V1::DeleteCustomerManagedCertificateRequest.new
729
+ #
730
+ # # Call the delete_customer_managed_certificate method.
731
+ # result = client.delete_customer_managed_certificate request
732
+ #
733
+ # # The returned object is of type Google::Cloud::Sql::V1::Operation.
734
+ # p result
735
+ #
736
+ def delete_customer_managed_certificate request, options = nil
737
+ raise ::ArgumentError, "request must be provided" if request.nil?
738
+
739
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::DeleteCustomerManagedCertificateRequest
740
+
741
+ # Converts hash and nil to an options object
742
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
743
+
744
+ # Customize the options with defaults
745
+ metadata = @config.rpcs.delete_customer_managed_certificate.metadata.to_h
746
+
747
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
748
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
749
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
750
+ gapic_version: ::Google::Cloud::Sql::V1::VERSION
751
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
752
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
753
+
754
+ header_params = {}
755
+ if request.project
756
+ header_params["project"] = request.project
757
+ end
758
+ if request.instance
759
+ header_params["instance"] = request.instance
760
+ end
761
+ if request.certificate_bundle
762
+ header_params["certificate_bundle"] = request.certificate_bundle
763
+ end
764
+
765
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
766
+ metadata[:"x-goog-request-params"] ||= request_params_header
767
+
768
+ options.apply_defaults timeout: @config.rpcs.delete_customer_managed_certificate.timeout,
769
+ metadata: metadata,
770
+ retry_policy: @config.rpcs.delete_customer_managed_certificate.retry_policy
771
+
772
+ options.apply_defaults timeout: @config.timeout,
773
+ metadata: @config.metadata,
774
+ retry_policy: @config.retry_policy
775
+
776
+ @sql_ssl_certs_service_stub.call_rpc :delete_customer_managed_certificate, request, options: options do |response, operation|
777
+ yield response, operation if block_given?
778
+ end
779
+ rescue ::GRPC::BadStatus => e
780
+ raise ::Google::Cloud::Error.from_error(e)
781
+ end
782
+
783
+ ##
784
+ # List all customer managed certificate bundles for an existing Cloud SQL
785
+ # instance.
786
+ #
787
+ # @overload list_customer_managed_certificates(request, options = nil)
788
+ # Pass arguments to `list_customer_managed_certificates` via a request object, either of type
789
+ # {::Google::Cloud::Sql::V1::ListCustomerManagedCertificatesRequest} or an equivalent Hash.
790
+ #
791
+ # @param request [::Google::Cloud::Sql::V1::ListCustomerManagedCertificatesRequest, ::Hash]
792
+ # A request object representing the call parameters. Required. To specify no
793
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
794
+ # @param options [::Gapic::CallOptions, ::Hash]
795
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
796
+ #
797
+ # @overload list_customer_managed_certificates(instance: nil, project: nil)
798
+ # Pass arguments to `list_customer_managed_certificates` via keyword arguments. Note that at
799
+ # least one keyword argument is required. To specify no parameters, or to keep all
800
+ # the default parameter values, pass an empty Hash as a request object (see above).
801
+ #
802
+ # @param instance [::String]
803
+ # Required. Cloud SQL instance ID. This does not include the project ID.
804
+ # @param project [::String]
805
+ # Required. Project ID of the project that contains the instance.
806
+ #
807
+ # @yield [response, operation] Access the result along with the RPC operation
808
+ # @yieldparam response [::Google::Cloud::Sql::V1::ListCustomerManagedCertificatesResponse]
809
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
810
+ #
811
+ # @return [::Google::Cloud::Sql::V1::ListCustomerManagedCertificatesResponse]
812
+ #
813
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
814
+ #
815
+ # @example Basic example
816
+ # require "google/cloud/sql/v1"
817
+ #
818
+ # # Create a client object. The client can be reused for multiple calls.
819
+ # client = Google::Cloud::Sql::V1::SqlSslCertsService::Client.new
820
+ #
821
+ # # Create a request. To set request fields, pass in keyword arguments.
822
+ # request = Google::Cloud::Sql::V1::ListCustomerManagedCertificatesRequest.new
823
+ #
824
+ # # Call the list_customer_managed_certificates method.
825
+ # result = client.list_customer_managed_certificates request
826
+ #
827
+ # # The returned object is of type Google::Cloud::Sql::V1::ListCustomerManagedCertificatesResponse.
828
+ # p result
829
+ #
830
+ def list_customer_managed_certificates request, options = nil
831
+ raise ::ArgumentError, "request must be provided" if request.nil?
832
+
833
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::ListCustomerManagedCertificatesRequest
834
+
835
+ # Converts hash and nil to an options object
836
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
837
+
838
+ # Customize the options with defaults
839
+ metadata = @config.rpcs.list_customer_managed_certificates.metadata.to_h
840
+
841
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
842
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
843
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
844
+ gapic_version: ::Google::Cloud::Sql::V1::VERSION
845
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
846
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
847
+
848
+ header_params = {}
849
+ if request.project
850
+ header_params["project"] = request.project
851
+ end
852
+ if request.instance
853
+ header_params["instance"] = request.instance
854
+ end
855
+
856
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
857
+ metadata[:"x-goog-request-params"] ||= request_params_header
858
+
859
+ options.apply_defaults timeout: @config.rpcs.list_customer_managed_certificates.timeout,
860
+ metadata: metadata,
861
+ retry_policy: @config.rpcs.list_customer_managed_certificates.retry_policy
862
+
863
+ options.apply_defaults timeout: @config.timeout,
864
+ metadata: @config.metadata,
865
+ retry_policy: @config.retry_policy
866
+
867
+ @sql_ssl_certs_service_stub.call_rpc :list_customer_managed_certificates, request, options: options do |response, operation|
868
+ yield response, operation if block_given?
869
+ end
870
+ rescue ::GRPC::BadStatus => e
871
+ raise ::Google::Cloud::Error.from_error(e)
872
+ end
873
+
578
874
  ##
579
875
  # Configuration class for the SqlSslCertsService API.
580
876
  #
@@ -780,6 +1076,21 @@ module Google
780
1076
  # @return [::Gapic::Config::Method]
781
1077
  #
782
1078
  attr_reader :list
1079
+ ##
1080
+ # RPC-specific configuration for `update_customer_managed_certificate`
1081
+ # @return [::Gapic::Config::Method]
1082
+ #
1083
+ attr_reader :update_customer_managed_certificate
1084
+ ##
1085
+ # RPC-specific configuration for `delete_customer_managed_certificate`
1086
+ # @return [::Gapic::Config::Method]
1087
+ #
1088
+ attr_reader :delete_customer_managed_certificate
1089
+ ##
1090
+ # RPC-specific configuration for `list_customer_managed_certificates`
1091
+ # @return [::Gapic::Config::Method]
1092
+ #
1093
+ attr_reader :list_customer_managed_certificates
783
1094
 
784
1095
  # @private
785
1096
  def initialize parent_rpcs = nil
@@ -791,6 +1102,12 @@ module Google
791
1102
  @insert = ::Gapic::Config::Method.new insert_config
792
1103
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
793
1104
  @list = ::Gapic::Config::Method.new list_config
1105
+ update_customer_managed_certificate_config = parent_rpcs.update_customer_managed_certificate if parent_rpcs.respond_to? :update_customer_managed_certificate
1106
+ @update_customer_managed_certificate = ::Gapic::Config::Method.new update_customer_managed_certificate_config
1107
+ delete_customer_managed_certificate_config = parent_rpcs.delete_customer_managed_certificate if parent_rpcs.respond_to? :delete_customer_managed_certificate
1108
+ @delete_customer_managed_certificate = ::Gapic::Config::Method.new delete_customer_managed_certificate_config
1109
+ list_customer_managed_certificates_config = parent_rpcs.list_customer_managed_certificates if parent_rpcs.respond_to? :list_customer_managed_certificates
1110
+ @list_customer_managed_certificates = ::Gapic::Config::Method.new list_customer_managed_certificates_config
794
1111
 
795
1112
  yield self if block_given?
796
1113
  end