google-cloud-firestore-admin-v1 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +894 -0
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb +55 -0
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb +831 -0
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb +534 -0
- data/lib/google/cloud/firestore/admin/v1/version.rb +1 -1
- data/lib/google/firestore/admin/v1/backup_pb.rb +51 -0
- data/lib/google/firestore/admin/v1/firestore_admin_pb.rb +16 -1
- data/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +37 -0
- data/lib/google/firestore/admin/v1/operation_pb.rb +2 -1
- data/lib/google/firestore/admin/v1/schedule_pb.rb +54 -0
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/firestore/admin/v1/backup.rb +99 -0
- data/proto_docs/google/firestore/admin/v1/firestore_admin.rb +160 -0
- data/proto_docs/google/firestore/admin/v1/operation.rb +25 -0
- data/proto_docs/google/firestore/admin/v1/schedule.rb +88 -0
- data/proto_docs/google/type/dayofweek.rb +49 -0
- metadata +7 -2
@@ -594,6 +594,348 @@ module Google
|
|
594
594
|
result
|
595
595
|
end
|
596
596
|
|
597
|
+
##
|
598
|
+
# Baseline implementation for the get_backup REST call
|
599
|
+
#
|
600
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest]
|
601
|
+
# A request object representing the call parameters. Required.
|
602
|
+
# @param options [::Gapic::CallOptions]
|
603
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
604
|
+
#
|
605
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
606
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Backup]
|
607
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
608
|
+
#
|
609
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::Backup]
|
610
|
+
# A result object deserialized from the server's reply
|
611
|
+
def get_backup request_pb, options = nil
|
612
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
613
|
+
|
614
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb
|
615
|
+
query_string_params = if query_string_params.any?
|
616
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
617
|
+
else
|
618
|
+
{}
|
619
|
+
end
|
620
|
+
|
621
|
+
response = @client_stub.make_http_request(
|
622
|
+
verb,
|
623
|
+
uri: uri,
|
624
|
+
body: body || "",
|
625
|
+
params: query_string_params,
|
626
|
+
options: options
|
627
|
+
)
|
628
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
629
|
+
result = ::Google::Cloud::Firestore::Admin::V1::Backup.decode_json response.body, ignore_unknown_fields: true
|
630
|
+
|
631
|
+
yield result, operation if block_given?
|
632
|
+
result
|
633
|
+
end
|
634
|
+
|
635
|
+
##
|
636
|
+
# Baseline implementation for the list_backups REST call
|
637
|
+
#
|
638
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest]
|
639
|
+
# A request object representing the call parameters. Required.
|
640
|
+
# @param options [::Gapic::CallOptions]
|
641
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
642
|
+
#
|
643
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
644
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse]
|
645
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
646
|
+
#
|
647
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse]
|
648
|
+
# A result object deserialized from the server's reply
|
649
|
+
def list_backups request_pb, options = nil
|
650
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
651
|
+
|
652
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb
|
653
|
+
query_string_params = if query_string_params.any?
|
654
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
655
|
+
else
|
656
|
+
{}
|
657
|
+
end
|
658
|
+
|
659
|
+
response = @client_stub.make_http_request(
|
660
|
+
verb,
|
661
|
+
uri: uri,
|
662
|
+
body: body || "",
|
663
|
+
params: query_string_params,
|
664
|
+
options: options
|
665
|
+
)
|
666
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
667
|
+
result = ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true
|
668
|
+
|
669
|
+
yield result, operation if block_given?
|
670
|
+
result
|
671
|
+
end
|
672
|
+
|
673
|
+
##
|
674
|
+
# Baseline implementation for the delete_backup REST call
|
675
|
+
#
|
676
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest]
|
677
|
+
# A request object representing the call parameters. Required.
|
678
|
+
# @param options [::Gapic::CallOptions]
|
679
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
680
|
+
#
|
681
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
682
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
683
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
684
|
+
#
|
685
|
+
# @return [::Google::Protobuf::Empty]
|
686
|
+
# A result object deserialized from the server's reply
|
687
|
+
def delete_backup request_pb, options = nil
|
688
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
689
|
+
|
690
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb
|
691
|
+
query_string_params = if query_string_params.any?
|
692
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
693
|
+
else
|
694
|
+
{}
|
695
|
+
end
|
696
|
+
|
697
|
+
response = @client_stub.make_http_request(
|
698
|
+
verb,
|
699
|
+
uri: uri,
|
700
|
+
body: body || "",
|
701
|
+
params: query_string_params,
|
702
|
+
options: options
|
703
|
+
)
|
704
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
705
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
706
|
+
|
707
|
+
yield result, operation if block_given?
|
708
|
+
result
|
709
|
+
end
|
710
|
+
|
711
|
+
##
|
712
|
+
# Baseline implementation for the restore_database REST call
|
713
|
+
#
|
714
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest]
|
715
|
+
# A request object representing the call parameters. Required.
|
716
|
+
# @param options [::Gapic::CallOptions]
|
717
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
718
|
+
#
|
719
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
720
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
721
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
722
|
+
#
|
723
|
+
# @return [::Google::Longrunning::Operation]
|
724
|
+
# A result object deserialized from the server's reply
|
725
|
+
def restore_database request_pb, options = nil
|
726
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
727
|
+
|
728
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_restore_database_request request_pb
|
729
|
+
query_string_params = if query_string_params.any?
|
730
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
731
|
+
else
|
732
|
+
{}
|
733
|
+
end
|
734
|
+
|
735
|
+
response = @client_stub.make_http_request(
|
736
|
+
verb,
|
737
|
+
uri: uri,
|
738
|
+
body: body || "",
|
739
|
+
params: query_string_params,
|
740
|
+
options: options
|
741
|
+
)
|
742
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
743
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
744
|
+
|
745
|
+
yield result, operation if block_given?
|
746
|
+
result
|
747
|
+
end
|
748
|
+
|
749
|
+
##
|
750
|
+
# Baseline implementation for the create_backup_schedule REST call
|
751
|
+
#
|
752
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest]
|
753
|
+
# A request object representing the call parameters. Required.
|
754
|
+
# @param options [::Gapic::CallOptions]
|
755
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
756
|
+
#
|
757
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
758
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule]
|
759
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
760
|
+
#
|
761
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule]
|
762
|
+
# A result object deserialized from the server's reply
|
763
|
+
def create_backup_schedule request_pb, options = nil
|
764
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
765
|
+
|
766
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_schedule_request request_pb
|
767
|
+
query_string_params = if query_string_params.any?
|
768
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
769
|
+
else
|
770
|
+
{}
|
771
|
+
end
|
772
|
+
|
773
|
+
response = @client_stub.make_http_request(
|
774
|
+
verb,
|
775
|
+
uri: uri,
|
776
|
+
body: body || "",
|
777
|
+
params: query_string_params,
|
778
|
+
options: options
|
779
|
+
)
|
780
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
781
|
+
result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.decode_json response.body, ignore_unknown_fields: true
|
782
|
+
|
783
|
+
yield result, operation if block_given?
|
784
|
+
result
|
785
|
+
end
|
786
|
+
|
787
|
+
##
|
788
|
+
# Baseline implementation for the get_backup_schedule REST call
|
789
|
+
#
|
790
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest]
|
791
|
+
# A request object representing the call parameters. Required.
|
792
|
+
# @param options [::Gapic::CallOptions]
|
793
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
794
|
+
#
|
795
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
796
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule]
|
797
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
798
|
+
#
|
799
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule]
|
800
|
+
# A result object deserialized from the server's reply
|
801
|
+
def get_backup_schedule request_pb, options = nil
|
802
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
803
|
+
|
804
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_schedule_request request_pb
|
805
|
+
query_string_params = if query_string_params.any?
|
806
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
807
|
+
else
|
808
|
+
{}
|
809
|
+
end
|
810
|
+
|
811
|
+
response = @client_stub.make_http_request(
|
812
|
+
verb,
|
813
|
+
uri: uri,
|
814
|
+
body: body || "",
|
815
|
+
params: query_string_params,
|
816
|
+
options: options
|
817
|
+
)
|
818
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
819
|
+
result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.decode_json response.body, ignore_unknown_fields: true
|
820
|
+
|
821
|
+
yield result, operation if block_given?
|
822
|
+
result
|
823
|
+
end
|
824
|
+
|
825
|
+
##
|
826
|
+
# Baseline implementation for the list_backup_schedules REST call
|
827
|
+
#
|
828
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest]
|
829
|
+
# A request object representing the call parameters. Required.
|
830
|
+
# @param options [::Gapic::CallOptions]
|
831
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
832
|
+
#
|
833
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
834
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse]
|
835
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
836
|
+
#
|
837
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse]
|
838
|
+
# A result object deserialized from the server's reply
|
839
|
+
def list_backup_schedules request_pb, options = nil
|
840
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
841
|
+
|
842
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_schedules_request request_pb
|
843
|
+
query_string_params = if query_string_params.any?
|
844
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
845
|
+
else
|
846
|
+
{}
|
847
|
+
end
|
848
|
+
|
849
|
+
response = @client_stub.make_http_request(
|
850
|
+
verb,
|
851
|
+
uri: uri,
|
852
|
+
body: body || "",
|
853
|
+
params: query_string_params,
|
854
|
+
options: options
|
855
|
+
)
|
856
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
857
|
+
result = ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse.decode_json response.body, ignore_unknown_fields: true
|
858
|
+
|
859
|
+
yield result, operation if block_given?
|
860
|
+
result
|
861
|
+
end
|
862
|
+
|
863
|
+
##
|
864
|
+
# Baseline implementation for the update_backup_schedule REST call
|
865
|
+
#
|
866
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest]
|
867
|
+
# A request object representing the call parameters. Required.
|
868
|
+
# @param options [::Gapic::CallOptions]
|
869
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
870
|
+
#
|
871
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
872
|
+
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule]
|
873
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
874
|
+
#
|
875
|
+
# @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule]
|
876
|
+
# A result object deserialized from the server's reply
|
877
|
+
def update_backup_schedule request_pb, options = nil
|
878
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
879
|
+
|
880
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_schedule_request request_pb
|
881
|
+
query_string_params = if query_string_params.any?
|
882
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
883
|
+
else
|
884
|
+
{}
|
885
|
+
end
|
886
|
+
|
887
|
+
response = @client_stub.make_http_request(
|
888
|
+
verb,
|
889
|
+
uri: uri,
|
890
|
+
body: body || "",
|
891
|
+
params: query_string_params,
|
892
|
+
options: options
|
893
|
+
)
|
894
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
895
|
+
result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.decode_json response.body, ignore_unknown_fields: true
|
896
|
+
|
897
|
+
yield result, operation if block_given?
|
898
|
+
result
|
899
|
+
end
|
900
|
+
|
901
|
+
##
|
902
|
+
# Baseline implementation for the delete_backup_schedule REST call
|
903
|
+
#
|
904
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest]
|
905
|
+
# A request object representing the call parameters. Required.
|
906
|
+
# @param options [::Gapic::CallOptions]
|
907
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
908
|
+
#
|
909
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
910
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
911
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
912
|
+
#
|
913
|
+
# @return [::Google::Protobuf::Empty]
|
914
|
+
# A result object deserialized from the server's reply
|
915
|
+
def delete_backup_schedule request_pb, options = nil
|
916
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
917
|
+
|
918
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_schedule_request request_pb
|
919
|
+
query_string_params = if query_string_params.any?
|
920
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
921
|
+
else
|
922
|
+
{}
|
923
|
+
end
|
924
|
+
|
925
|
+
response = @client_stub.make_http_request(
|
926
|
+
verb,
|
927
|
+
uri: uri,
|
928
|
+
body: body || "",
|
929
|
+
params: query_string_params,
|
930
|
+
options: options
|
931
|
+
)
|
932
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
933
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
934
|
+
|
935
|
+
yield result, operation if block_given?
|
936
|
+
result
|
937
|
+
end
|
938
|
+
|
597
939
|
##
|
598
940
|
# @private
|
599
941
|
#
|
@@ -893,6 +1235,198 @@ module Google
|
|
893
1235
|
)
|
894
1236
|
transcoder.transcode request_pb
|
895
1237
|
end
|
1238
|
+
|
1239
|
+
##
|
1240
|
+
# @private
|
1241
|
+
#
|
1242
|
+
# GRPC transcoding helper method for the get_backup REST call
|
1243
|
+
#
|
1244
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest]
|
1245
|
+
# A request object representing the call parameters. Required.
|
1246
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1247
|
+
# Uri, Body, Query string parameters
|
1248
|
+
def self.transcode_get_backup_request request_pb
|
1249
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1250
|
+
.with_bindings(
|
1251
|
+
uri_method: :get,
|
1252
|
+
uri_template: "/v1/{name}",
|
1253
|
+
matches: [
|
1254
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false]
|
1255
|
+
]
|
1256
|
+
)
|
1257
|
+
transcoder.transcode request_pb
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
##
|
1261
|
+
# @private
|
1262
|
+
#
|
1263
|
+
# GRPC transcoding helper method for the list_backups REST call
|
1264
|
+
#
|
1265
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest]
|
1266
|
+
# A request object representing the call parameters. Required.
|
1267
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1268
|
+
# Uri, Body, Query string parameters
|
1269
|
+
def self.transcode_list_backups_request request_pb
|
1270
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1271
|
+
.with_bindings(
|
1272
|
+
uri_method: :get,
|
1273
|
+
uri_template: "/v1/{parent}/backups",
|
1274
|
+
matches: [
|
1275
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1276
|
+
]
|
1277
|
+
)
|
1278
|
+
transcoder.transcode request_pb
|
1279
|
+
end
|
1280
|
+
|
1281
|
+
##
|
1282
|
+
# @private
|
1283
|
+
#
|
1284
|
+
# GRPC transcoding helper method for the delete_backup REST call
|
1285
|
+
#
|
1286
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest]
|
1287
|
+
# A request object representing the call parameters. Required.
|
1288
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1289
|
+
# Uri, Body, Query string parameters
|
1290
|
+
def self.transcode_delete_backup_request request_pb
|
1291
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1292
|
+
.with_bindings(
|
1293
|
+
uri_method: :delete,
|
1294
|
+
uri_template: "/v1/{name}",
|
1295
|
+
matches: [
|
1296
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false]
|
1297
|
+
]
|
1298
|
+
)
|
1299
|
+
transcoder.transcode request_pb
|
1300
|
+
end
|
1301
|
+
|
1302
|
+
##
|
1303
|
+
# @private
|
1304
|
+
#
|
1305
|
+
# GRPC transcoding helper method for the restore_database REST call
|
1306
|
+
#
|
1307
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest]
|
1308
|
+
# A request object representing the call parameters. Required.
|
1309
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1310
|
+
# Uri, Body, Query string parameters
|
1311
|
+
def self.transcode_restore_database_request request_pb
|
1312
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1313
|
+
.with_bindings(
|
1314
|
+
uri_method: :post,
|
1315
|
+
uri_template: "/v1/{parent}/databases:restore",
|
1316
|
+
body: "*",
|
1317
|
+
matches: [
|
1318
|
+
["parent", %r{^projects/[^/]+/?$}, false]
|
1319
|
+
]
|
1320
|
+
)
|
1321
|
+
transcoder.transcode request_pb
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
##
|
1325
|
+
# @private
|
1326
|
+
#
|
1327
|
+
# GRPC transcoding helper method for the create_backup_schedule REST call
|
1328
|
+
#
|
1329
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest]
|
1330
|
+
# A request object representing the call parameters. Required.
|
1331
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1332
|
+
# Uri, Body, Query string parameters
|
1333
|
+
def self.transcode_create_backup_schedule_request request_pb
|
1334
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1335
|
+
.with_bindings(
|
1336
|
+
uri_method: :post,
|
1337
|
+
uri_template: "/v1/{parent}/backupSchedules",
|
1338
|
+
body: "backup_schedule",
|
1339
|
+
matches: [
|
1340
|
+
["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false]
|
1341
|
+
]
|
1342
|
+
)
|
1343
|
+
transcoder.transcode request_pb
|
1344
|
+
end
|
1345
|
+
|
1346
|
+
##
|
1347
|
+
# @private
|
1348
|
+
#
|
1349
|
+
# GRPC transcoding helper method for the get_backup_schedule REST call
|
1350
|
+
#
|
1351
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest]
|
1352
|
+
# A request object representing the call parameters. Required.
|
1353
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1354
|
+
# Uri, Body, Query string parameters
|
1355
|
+
def self.transcode_get_backup_schedule_request request_pb
|
1356
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1357
|
+
.with_bindings(
|
1358
|
+
uri_method: :get,
|
1359
|
+
uri_template: "/v1/{name}",
|
1360
|
+
matches: [
|
1361
|
+
["name", %r{^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false]
|
1362
|
+
]
|
1363
|
+
)
|
1364
|
+
transcoder.transcode request_pb
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
##
|
1368
|
+
# @private
|
1369
|
+
#
|
1370
|
+
# GRPC transcoding helper method for the list_backup_schedules REST call
|
1371
|
+
#
|
1372
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest]
|
1373
|
+
# A request object representing the call parameters. Required.
|
1374
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1375
|
+
# Uri, Body, Query string parameters
|
1376
|
+
def self.transcode_list_backup_schedules_request request_pb
|
1377
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1378
|
+
.with_bindings(
|
1379
|
+
uri_method: :get,
|
1380
|
+
uri_template: "/v1/{parent}/backupSchedules",
|
1381
|
+
matches: [
|
1382
|
+
["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false]
|
1383
|
+
]
|
1384
|
+
)
|
1385
|
+
transcoder.transcode request_pb
|
1386
|
+
end
|
1387
|
+
|
1388
|
+
##
|
1389
|
+
# @private
|
1390
|
+
#
|
1391
|
+
# GRPC transcoding helper method for the update_backup_schedule REST call
|
1392
|
+
#
|
1393
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest]
|
1394
|
+
# A request object representing the call parameters. Required.
|
1395
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1396
|
+
# Uri, Body, Query string parameters
|
1397
|
+
def self.transcode_update_backup_schedule_request request_pb
|
1398
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1399
|
+
.with_bindings(
|
1400
|
+
uri_method: :patch,
|
1401
|
+
uri_template: "/v1/{backup_schedule.name}",
|
1402
|
+
body: "backup_schedule",
|
1403
|
+
matches: [
|
1404
|
+
["backup_schedule.name", %r{^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false]
|
1405
|
+
]
|
1406
|
+
)
|
1407
|
+
transcoder.transcode request_pb
|
1408
|
+
end
|
1409
|
+
|
1410
|
+
##
|
1411
|
+
# @private
|
1412
|
+
#
|
1413
|
+
# GRPC transcoding helper method for the delete_backup_schedule REST call
|
1414
|
+
#
|
1415
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest]
|
1416
|
+
# A request object representing the call parameters. Required.
|
1417
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1418
|
+
# Uri, Body, Query string parameters
|
1419
|
+
def self.transcode_delete_backup_schedule_request request_pb
|
1420
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1421
|
+
.with_bindings(
|
1422
|
+
uri_method: :delete,
|
1423
|
+
uri_template: "/v1/{name}",
|
1424
|
+
matches: [
|
1425
|
+
["name", %r{^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false]
|
1426
|
+
]
|
1427
|
+
)
|
1428
|
+
transcoder.transcode request_pb
|
1429
|
+
end
|
896
1430
|
end
|
897
1431
|
end
|
898
1432
|
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/firestore/admin/v1/backup.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/field_behavior_pb'
|
8
|
+
require 'google/api/resource_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
10
|
+
|
11
|
+
|
12
|
+
descriptor_data = "\n&google/firestore/admin/v1/backup.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x04\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12;\n\x08\x64\x61tabase\x18\x02 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!firestore.googleapis.com/Database\x12\x19\n\x0c\x64\x61tabase_uid\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rsnapshot_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x05stats\x18\x06 \x01(\x0b\x32\'.google.firestore.admin.v1.Backup.StatsB\x03\xe0\x41\x03\x12;\n\x05state\x18\x08 \x01(\x0e\x32\'.google.firestore.admin.v1.Backup.StateB\x03\xe0\x41\x03\x1aW\n\x05Stats\x12\x17\n\nsize_bytes\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0e\x64ocument_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bindex_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x11\n\rNOT_AVAILABLE\x10\x03:^\xea\x41[\n\x1f\x66irestore.googleapis.com/Backup\x12\x38projects/{project}/locations/{location}/backups/{backup}B\xda\x01\n\x1d\x63om.google.firestore.admin.v1B\x0b\x42\x61\x63kupProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3"
|
13
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
22
|
+
parsed.clear_dependency
|
23
|
+
serialized = parsed.class.encode(parsed)
|
24
|
+
file = pool.add_serialized_file(serialized)
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
26
|
+
imports = [
|
27
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
28
|
+
]
|
29
|
+
imports.each do |type_name, expected_filename|
|
30
|
+
import_file = pool.lookup(type_name).file_descriptor
|
31
|
+
if import_file.name != expected_filename
|
32
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
36
|
+
warn "This will become an error in the next major version."
|
37
|
+
end
|
38
|
+
|
39
|
+
module Google
|
40
|
+
module Cloud
|
41
|
+
module Firestore
|
42
|
+
module Admin
|
43
|
+
module V1
|
44
|
+
Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Backup").msgclass
|
45
|
+
Backup::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Backup.Stats").msgclass
|
46
|
+
Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Backup.State").enummodule
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|