google-cloud-sql-v1beta4 0.5.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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -6
  3. data/lib/google/cloud/sql/v1beta4/cloud_sql_pb.rb +12 -1
  4. data/lib/google/cloud/sql/v1beta4/cloud_sql_resources_pb.rb +16 -1
  5. data/lib/google/cloud/sql/v1beta4/cloud_sql_services_pb.rb +27 -0
  6. data/lib/google/cloud/sql/v1beta4/cloud_sql_users_services_pb.rb +1 -0
  7. data/lib/google/cloud/sql/v1beta4/cloud_sql_workload_captures_pb.rb +2 -1
  8. data/lib/google/cloud/sql/v1beta4/sql_backup_runs_service/client.rb +2 -0
  9. data/lib/google/cloud/sql/v1beta4/sql_backup_runs_service/rest/client.rb +2 -0
  10. data/lib/google/cloud/sql/v1beta4/sql_backup_runs_service/rest.rb +2 -0
  11. data/lib/google/cloud/sql/v1beta4/sql_backup_runs_service.rb +2 -0
  12. data/lib/google/cloud/sql/v1beta4/sql_backups_service/client.rb +2 -0
  13. data/lib/google/cloud/sql/v1beta4/sql_backups_service/paths.rb +17 -0
  14. data/lib/google/cloud/sql/v1beta4/sql_backups_service/rest/client.rb +2 -0
  15. data/lib/google/cloud/sql/v1beta4/sql_backups_service/rest.rb +2 -0
  16. data/lib/google/cloud/sql/v1beta4/sql_backups_service.rb +2 -0
  17. data/lib/google/cloud/sql/v1beta4/sql_databases_service/client.rb +2 -0
  18. data/lib/google/cloud/sql/v1beta4/sql_databases_service/rest/client.rb +2 -0
  19. data/lib/google/cloud/sql/v1beta4/sql_databases_service/rest.rb +2 -0
  20. data/lib/google/cloud/sql/v1beta4/sql_databases_service.rb +2 -0
  21. data/lib/google/cloud/sql/v1beta4/sql_flags_service/client.rb +2 -0
  22. data/lib/google/cloud/sql/v1beta4/sql_flags_service/rest/client.rb +2 -0
  23. data/lib/google/cloud/sql/v1beta4/sql_flags_service/rest.rb +2 -0
  24. data/lib/google/cloud/sql/v1beta4/sql_flags_service.rb +2 -0
  25. data/lib/google/cloud/sql/v1beta4/sql_instances_service/client.rb +411 -0
  26. data/lib/google/cloud/sql/v1beta4/sql_instances_service/paths.rb +17 -0
  27. data/lib/google/cloud/sql/v1beta4/sql_instances_service/rest/client.rb +371 -0
  28. data/lib/google/cloud/sql/v1beta4/sql_instances_service/rest/service_stub.rb +250 -0
  29. data/lib/google/cloud/sql/v1beta4/sql_instances_service/rest.rb +2 -0
  30. data/lib/google/cloud/sql/v1beta4/sql_instances_service.rb +2 -0
  31. data/lib/google/cloud/sql/v1beta4/sql_operations_service/client.rb +2 -0
  32. data/lib/google/cloud/sql/v1beta4/sql_operations_service/rest/client.rb +2 -0
  33. data/lib/google/cloud/sql/v1beta4/sql_operations_service/rest.rb +2 -0
  34. data/lib/google/cloud/sql/v1beta4/sql_operations_service.rb +2 -0
  35. data/lib/google/cloud/sql/v1beta4/sql_ssl_certs_service/client.rb +317 -0
  36. data/lib/google/cloud/sql/v1beta4/sql_ssl_certs_service/rest/client.rb +281 -0
  37. data/lib/google/cloud/sql/v1beta4/sql_ssl_certs_service/rest/service_stub.rb +189 -0
  38. data/lib/google/cloud/sql/v1beta4/sql_ssl_certs_service/rest.rb +2 -0
  39. data/lib/google/cloud/sql/v1beta4/sql_ssl_certs_service.rb +2 -0
  40. data/lib/google/cloud/sql/v1beta4/sql_users_service/client.rb +2 -0
  41. data/lib/google/cloud/sql/v1beta4/sql_users_service/rest/client.rb +2 -0
  42. data/lib/google/cloud/sql/v1beta4/sql_users_service/rest.rb +2 -0
  43. data/lib/google/cloud/sql/v1beta4/sql_users_service.rb +2 -0
  44. data/lib/google/cloud/sql/v1beta4/version.rb +1 -1
  45. data/proto_docs/google/cloud/sql/v1beta4/cloud_sql.rb +227 -0
  46. data/proto_docs/google/cloud/sql/v1beta4/cloud_sql_resources.rb +325 -0
  47. data/proto_docs/google/cloud/sql/v1beta4/cloud_sql_workload_captures.rb +16 -0
  48. metadata +1 -1
@@ -28,6 +28,8 @@ module Google
28
28
  ##
29
29
  # Client for the SqlSslCertsService service.
30
30
  #
31
+ # Service to manage SSL certs for Cloud SQL instances.
32
+ #
31
33
  class Client
32
34
  # @private
33
35
  API_VERSION = ""
@@ -573,6 +575,300 @@ module Google
573
575
  raise ::Google::Cloud::Error.from_error(e)
574
576
  end
575
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
+
576
872
  ##
577
873
  # Configuration class for the SqlSslCertsService API.
578
874
  #
@@ -778,6 +1074,21 @@ module Google
778
1074
  # @return [::Gapic::Config::Method]
779
1075
  #
780
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
781
1092
 
782
1093
  # @private
783
1094
  def initialize parent_rpcs = nil
@@ -789,6 +1100,12 @@ module Google
789
1100
  @insert = ::Gapic::Config::Method.new insert_config
790
1101
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
791
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
792
1109
 
793
1110
  yield self if block_given?
794
1111
  end
@@ -30,6 +30,8 @@ module Google
30
30
  ##
31
31
  # REST client for the SqlSslCertsService service.
32
32
  #
33
+ # Service to manage SSL certs for Cloud SQL instances.
34
+ #
33
35
  class Client
34
36
  # @private
35
37
  API_VERSION = ""
@@ -520,6 +522,264 @@ module Google
520
522
  raise ::Google::Cloud::Error.from_error(e)
521
523
  end
522
524
 
525
+ ##
526
+ # Upload and update customer managed certificate bundle for an existing
527
+ # Cloud SQL instance.
528
+ #
529
+ # @overload update_customer_managed_certificate(request, options = nil)
530
+ # Pass arguments to `update_customer_managed_certificate` via a request object, either of type
531
+ # {::Google::Cloud::Sql::V1beta4::UpdateCustomerManagedCertificateRequest} or an equivalent Hash.
532
+ #
533
+ # @param request [::Google::Cloud::Sql::V1beta4::UpdateCustomerManagedCertificateRequest, ::Hash]
534
+ # A request object representing the call parameters. Required. To specify no
535
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
536
+ # @param options [::Gapic::CallOptions, ::Hash]
537
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
538
+ #
539
+ # @overload update_customer_managed_certificate(instance: nil, project: nil, customer_managed_certificate_config: nil, update_mask: nil, allow_missing: nil, certificate_bundle: nil)
540
+ # Pass arguments to `update_customer_managed_certificate` via keyword arguments. Note that at
541
+ # least one keyword argument is required. To specify no parameters, or to keep all
542
+ # the default parameter values, pass an empty Hash as a request object (see above).
543
+ #
544
+ # @param instance [::String]
545
+ # Required. Cloud SQL instance ID. This does not include the project ID.
546
+ # @param project [::String]
547
+ # Required. Project ID of the project that contains the instance.
548
+ # @param customer_managed_certificate_config [::Google::Cloud::Sql::V1beta4::CustomerManagedCertificateConfig, ::Hash]
549
+ # Required. The customer managed certificate bundle SSL configuration to
550
+ # update.
551
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
552
+ # Optional. The list of fields to be updated.
553
+ # @param allow_missing [::Boolean]
554
+ # Optional. If set to true, and the customer managed certificate bundle
555
+ # configuration is not found, a new customer managed certificate bundle
556
+ # configuration will be created. In this situation, `update_mask` is ignored.
557
+ # @param certificate_bundle [::String]
558
+ # Required. Name tag of the customer managed certificate bundle to update. It
559
+ # must be alphanumeric and have a maximum length of 10 characters.
560
+ # @yield [result, operation] Access the result along with the TransportOperation object
561
+ # @yieldparam result [::Google::Cloud::Sql::V1beta4::Operation]
562
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
563
+ #
564
+ # @return [::Google::Cloud::Sql::V1beta4::Operation]
565
+ #
566
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
567
+ #
568
+ # @example Basic example
569
+ # require "google/cloud/sql/v1beta4"
570
+ #
571
+ # # Create a client object. The client can be reused for multiple calls.
572
+ # client = Google::Cloud::Sql::V1beta4::SqlSslCertsService::Rest::Client.new
573
+ #
574
+ # # Create a request. To set request fields, pass in keyword arguments.
575
+ # request = Google::Cloud::Sql::V1beta4::UpdateCustomerManagedCertificateRequest.new
576
+ #
577
+ # # Call the update_customer_managed_certificate method.
578
+ # result = client.update_customer_managed_certificate request
579
+ #
580
+ # # The returned object is of type Google::Cloud::Sql::V1beta4::Operation.
581
+ # p result
582
+ #
583
+ def update_customer_managed_certificate request, options = nil
584
+ raise ::ArgumentError, "request must be provided" if request.nil?
585
+
586
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1beta4::UpdateCustomerManagedCertificateRequest
587
+
588
+ # Converts hash and nil to an options object
589
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
590
+
591
+ # Customize the options with defaults
592
+ call_metadata = @config.rpcs.update_customer_managed_certificate.metadata.to_h
593
+
594
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
595
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
596
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
597
+ gapic_version: ::Google::Cloud::Sql::V1beta4::VERSION,
598
+ transports_version_send: [:rest]
599
+
600
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
601
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
602
+
603
+ options.apply_defaults timeout: @config.rpcs.update_customer_managed_certificate.timeout,
604
+ metadata: call_metadata,
605
+ retry_policy: @config.rpcs.update_customer_managed_certificate.retry_policy
606
+
607
+ options.apply_defaults timeout: @config.timeout,
608
+ metadata: @config.metadata,
609
+ retry_policy: @config.retry_policy
610
+
611
+ @sql_ssl_certs_service_stub.update_customer_managed_certificate request, options do |result, operation|
612
+ yield result, operation if block_given?
613
+ end
614
+ rescue ::Gapic::Rest::Error => e
615
+ raise ::Google::Cloud::Error.from_error(e)
616
+ end
617
+
618
+ ##
619
+ # Delete customer managed certificate bundle for an existing Cloud SQL
620
+ # instance.
621
+ #
622
+ # @overload delete_customer_managed_certificate(request, options = nil)
623
+ # Pass arguments to `delete_customer_managed_certificate` via a request object, either of type
624
+ # {::Google::Cloud::Sql::V1beta4::DeleteCustomerManagedCertificateRequest} or an equivalent Hash.
625
+ #
626
+ # @param request [::Google::Cloud::Sql::V1beta4::DeleteCustomerManagedCertificateRequest, ::Hash]
627
+ # A request object representing the call parameters. Required. To specify no
628
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
629
+ # @param options [::Gapic::CallOptions, ::Hash]
630
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
631
+ #
632
+ # @overload delete_customer_managed_certificate(instance: nil, project: nil, certificate_bundle: nil)
633
+ # Pass arguments to `delete_customer_managed_certificate` via keyword arguments. Note that at
634
+ # least one keyword argument is required. To specify no parameters, or to keep all
635
+ # the default parameter values, pass an empty Hash as a request object (see above).
636
+ #
637
+ # @param instance [::String]
638
+ # Required. Cloud SQL instance ID. This does not include the project ID.
639
+ # @param project [::String]
640
+ # Required. Project ID of the project that contains the instance.
641
+ # @param certificate_bundle [::String]
642
+ # Required. Name tag of the customer managed certificate bundle to delete. It
643
+ # must be alphanumeric and have a maximum length of 10 characters.
644
+ # @yield [result, operation] Access the result along with the TransportOperation object
645
+ # @yieldparam result [::Google::Cloud::Sql::V1beta4::Operation]
646
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
647
+ #
648
+ # @return [::Google::Cloud::Sql::V1beta4::Operation]
649
+ #
650
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
651
+ #
652
+ # @example Basic example
653
+ # require "google/cloud/sql/v1beta4"
654
+ #
655
+ # # Create a client object. The client can be reused for multiple calls.
656
+ # client = Google::Cloud::Sql::V1beta4::SqlSslCertsService::Rest::Client.new
657
+ #
658
+ # # Create a request. To set request fields, pass in keyword arguments.
659
+ # request = Google::Cloud::Sql::V1beta4::DeleteCustomerManagedCertificateRequest.new
660
+ #
661
+ # # Call the delete_customer_managed_certificate method.
662
+ # result = client.delete_customer_managed_certificate request
663
+ #
664
+ # # The returned object is of type Google::Cloud::Sql::V1beta4::Operation.
665
+ # p result
666
+ #
667
+ def delete_customer_managed_certificate request, options = nil
668
+ raise ::ArgumentError, "request must be provided" if request.nil?
669
+
670
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1beta4::DeleteCustomerManagedCertificateRequest
671
+
672
+ # Converts hash and nil to an options object
673
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
674
+
675
+ # Customize the options with defaults
676
+ call_metadata = @config.rpcs.delete_customer_managed_certificate.metadata.to_h
677
+
678
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
679
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
680
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
681
+ gapic_version: ::Google::Cloud::Sql::V1beta4::VERSION,
682
+ transports_version_send: [:rest]
683
+
684
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
685
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
686
+
687
+ options.apply_defaults timeout: @config.rpcs.delete_customer_managed_certificate.timeout,
688
+ metadata: call_metadata,
689
+ retry_policy: @config.rpcs.delete_customer_managed_certificate.retry_policy
690
+
691
+ options.apply_defaults timeout: @config.timeout,
692
+ metadata: @config.metadata,
693
+ retry_policy: @config.retry_policy
694
+
695
+ @sql_ssl_certs_service_stub.delete_customer_managed_certificate request, options do |result, operation|
696
+ yield result, operation if block_given?
697
+ end
698
+ rescue ::Gapic::Rest::Error => e
699
+ raise ::Google::Cloud::Error.from_error(e)
700
+ end
701
+
702
+ ##
703
+ # List all customer managed certificate bundles for an existing Cloud SQL
704
+ # instance.
705
+ #
706
+ # @overload list_customer_managed_certificates(request, options = nil)
707
+ # Pass arguments to `list_customer_managed_certificates` via a request object, either of type
708
+ # {::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesRequest} or an equivalent Hash.
709
+ #
710
+ # @param request [::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesRequest, ::Hash]
711
+ # A request object representing the call parameters. Required. To specify no
712
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
713
+ # @param options [::Gapic::CallOptions, ::Hash]
714
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
715
+ #
716
+ # @overload list_customer_managed_certificates(instance: nil, project: nil)
717
+ # Pass arguments to `list_customer_managed_certificates` via keyword arguments. Note that at
718
+ # least one keyword argument is required. To specify no parameters, or to keep all
719
+ # the default parameter values, pass an empty Hash as a request object (see above).
720
+ #
721
+ # @param instance [::String]
722
+ # Required. Cloud SQL instance ID. This does not include the project ID.
723
+ # @param project [::String]
724
+ # Required. Project ID of the project that contains the instance.
725
+ # @yield [result, operation] Access the result along with the TransportOperation object
726
+ # @yieldparam result [::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesResponse]
727
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
728
+ #
729
+ # @return [::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesResponse]
730
+ #
731
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
732
+ #
733
+ # @example Basic example
734
+ # require "google/cloud/sql/v1beta4"
735
+ #
736
+ # # Create a client object. The client can be reused for multiple calls.
737
+ # client = Google::Cloud::Sql::V1beta4::SqlSslCertsService::Rest::Client.new
738
+ #
739
+ # # Create a request. To set request fields, pass in keyword arguments.
740
+ # request = Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesRequest.new
741
+ #
742
+ # # Call the list_customer_managed_certificates method.
743
+ # result = client.list_customer_managed_certificates request
744
+ #
745
+ # # The returned object is of type Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesResponse.
746
+ # p result
747
+ #
748
+ def list_customer_managed_certificates request, options = nil
749
+ raise ::ArgumentError, "request must be provided" if request.nil?
750
+
751
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1beta4::ListCustomerManagedCertificatesRequest
752
+
753
+ # Converts hash and nil to an options object
754
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
755
+
756
+ # Customize the options with defaults
757
+ call_metadata = @config.rpcs.list_customer_managed_certificates.metadata.to_h
758
+
759
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
760
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
761
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
762
+ gapic_version: ::Google::Cloud::Sql::V1beta4::VERSION,
763
+ transports_version_send: [:rest]
764
+
765
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
766
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
767
+
768
+ options.apply_defaults timeout: @config.rpcs.list_customer_managed_certificates.timeout,
769
+ metadata: call_metadata,
770
+ retry_policy: @config.rpcs.list_customer_managed_certificates.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.list_customer_managed_certificates request, options do |result, operation|
777
+ yield result, operation if block_given?
778
+ end
779
+ rescue ::Gapic::Rest::Error => e
780
+ raise ::Google::Cloud::Error.from_error(e)
781
+ end
782
+
523
783
  ##
524
784
  # Configuration class for the SqlSslCertsService REST API.
525
785
  #
@@ -688,6 +948,21 @@ module Google
688
948
  # @return [::Gapic::Config::Method]
689
949
  #
690
950
  attr_reader :list
951
+ ##
952
+ # RPC-specific configuration for `update_customer_managed_certificate`
953
+ # @return [::Gapic::Config::Method]
954
+ #
955
+ attr_reader :update_customer_managed_certificate
956
+ ##
957
+ # RPC-specific configuration for `delete_customer_managed_certificate`
958
+ # @return [::Gapic::Config::Method]
959
+ #
960
+ attr_reader :delete_customer_managed_certificate
961
+ ##
962
+ # RPC-specific configuration for `list_customer_managed_certificates`
963
+ # @return [::Gapic::Config::Method]
964
+ #
965
+ attr_reader :list_customer_managed_certificates
691
966
 
692
967
  # @private
693
968
  def initialize parent_rpcs = nil
@@ -699,6 +974,12 @@ module Google
699
974
  @insert = ::Gapic::Config::Method.new insert_config
700
975
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
701
976
  @list = ::Gapic::Config::Method.new list_config
977
+ update_customer_managed_certificate_config = parent_rpcs.update_customer_managed_certificate if parent_rpcs.respond_to? :update_customer_managed_certificate
978
+ @update_customer_managed_certificate = ::Gapic::Config::Method.new update_customer_managed_certificate_config
979
+ delete_customer_managed_certificate_config = parent_rpcs.delete_customer_managed_certificate if parent_rpcs.respond_to? :delete_customer_managed_certificate
980
+ @delete_customer_managed_certificate = ::Gapic::Config::Method.new delete_customer_managed_certificate_config
981
+ list_customer_managed_certificates_config = parent_rpcs.list_customer_managed_certificates if parent_rpcs.respond_to? :list_customer_managed_certificates
982
+ @list_customer_managed_certificates = ::Gapic::Config::Method.new list_customer_managed_certificates_config
702
983
 
703
984
  yield self if block_given?
704
985
  end