google-cloud-storage_batch_operations-v1 0.5.0 → 0.6.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/storage_batch_operations/v1/storage_batch_operations/client.rb +206 -1
- data/lib/google/cloud/storage_batch_operations/v1/storage_batch_operations/paths.rb +21 -0
- data/lib/google/cloud/storage_batch_operations/v1/storage_batch_operations/rest/client.rb +192 -1
- data/lib/google/cloud/storage_batch_operations/v1/storage_batch_operations/rest/service_stub.rb +122 -0
- data/lib/google/cloud/storage_batch_operations/v1/version.rb +1 -1
- data/lib/google/cloud/storagebatchoperations/v1/storage_batch_operations_pb.rb +4 -1
- data/lib/google/cloud/storagebatchoperations/v1/storage_batch_operations_services_pb.rb +4 -0
- data/lib/google/cloud/storagebatchoperations/v1/storage_batch_operations_types_pb.rb +6 -1
- data/proto_docs/google/cloud/storagebatchoperations/v1/storage_batch_operations.rb +53 -0
- data/proto_docs/google/cloud/storagebatchoperations/v1/storage_batch_operations_types.rb +159 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b7f50e2dc5c071d177cf7ba0fea00acba42022b54ab037622a779bf02c3156d8
|
|
4
|
+
data.tar.gz: 561a34cdb8608968b842d8b3e5e7bee78e999ccc123a91d54bf3455b6f18c5fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b4eafdca12773d664f3ca19726d27bd89e8a3b4cfa9e55b7576d1f6dfc5f2807647518b275fa3311ef6e635560aa36727c3477310f78a33c0bad9ced643891fe
|
|
7
|
+
data.tar.gz: e73eedf7db5cfefbf0e3ebd967d7b4f4a7157c8c7c459a688b948153a2b817a380e6931decfee89fe872f99c1f5f0d62370f90fa69b44fe3e5ca7129ff48bbc6
|
|
@@ -540,7 +540,7 @@ module Google
|
|
|
540
540
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
541
541
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
542
542
|
#
|
|
543
|
-
# @overload delete_job(name: nil, request_id: nil)
|
|
543
|
+
# @overload delete_job(name: nil, request_id: nil, force: nil)
|
|
544
544
|
# Pass arguments to `delete_job` via keyword arguments. Note that at
|
|
545
545
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
546
546
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -554,6 +554,11 @@ module Google
|
|
|
554
554
|
# `request_id` will be ignored for at least 60 minutes since the first
|
|
555
555
|
# request. The request ID must be a valid UUID with the exception that zero
|
|
556
556
|
# UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
557
|
+
# @param force [::Boolean]
|
|
558
|
+
# Optional. If set to true, any child bucket operations of the job will also
|
|
559
|
+
# be deleted. Highly recommended to be set to true by all clients. Users
|
|
560
|
+
# cannot mutate bucket operations directly, so only the jobs.delete
|
|
561
|
+
# permission is required to delete a job (and its child bucket operations).
|
|
557
562
|
#
|
|
558
563
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
559
564
|
# @yieldparam response [::Google::Protobuf::Empty]
|
|
@@ -711,6 +716,192 @@ module Google
|
|
|
711
716
|
raise ::Google::Cloud::Error.from_error(e)
|
|
712
717
|
end
|
|
713
718
|
|
|
719
|
+
##
|
|
720
|
+
# Lists BucketOperations in a given project and job.
|
|
721
|
+
#
|
|
722
|
+
# @overload list_bucket_operations(request, options = nil)
|
|
723
|
+
# Pass arguments to `list_bucket_operations` via a request object, either of type
|
|
724
|
+
# {::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest} or an equivalent Hash.
|
|
725
|
+
#
|
|
726
|
+
# @param request [::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest, ::Hash]
|
|
727
|
+
# A request object representing the call parameters. Required. To specify no
|
|
728
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
729
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
730
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
731
|
+
#
|
|
732
|
+
# @overload list_bucket_operations(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil)
|
|
733
|
+
# Pass arguments to `list_bucket_operations` via keyword arguments. Note that at
|
|
734
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
735
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
736
|
+
#
|
|
737
|
+
# @param parent [::String]
|
|
738
|
+
# Required. Format: projects/\\{project_id}/locations/global/jobs/\\{job_id}.
|
|
739
|
+
# @param filter [::String]
|
|
740
|
+
# Optional. Filters results as defined by https://google.aip.dev/160.
|
|
741
|
+
# @param page_size [::Integer]
|
|
742
|
+
# Optional. The list page size. Default page size is 100.
|
|
743
|
+
# @param page_token [::String]
|
|
744
|
+
# Optional. The list page token.
|
|
745
|
+
# @param order_by [::String]
|
|
746
|
+
# Optional. Field to sort by. Supported fields are name, create_time.
|
|
747
|
+
#
|
|
748
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
749
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::StorageBatchOperations::V1::BucketOperation>]
|
|
750
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
751
|
+
#
|
|
752
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::StorageBatchOperations::V1::BucketOperation>]
|
|
753
|
+
#
|
|
754
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
755
|
+
#
|
|
756
|
+
# @example Basic example
|
|
757
|
+
# require "google/cloud/storage_batch_operations/v1"
|
|
758
|
+
#
|
|
759
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
760
|
+
# client = Google::Cloud::StorageBatchOperations::V1::StorageBatchOperations::Client.new
|
|
761
|
+
#
|
|
762
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
763
|
+
# request = Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest.new
|
|
764
|
+
#
|
|
765
|
+
# # Call the list_bucket_operations method.
|
|
766
|
+
# result = client.list_bucket_operations request
|
|
767
|
+
#
|
|
768
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
769
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
770
|
+
# result.each do |item|
|
|
771
|
+
# # Each element is of type ::Google::Cloud::StorageBatchOperations::V1::BucketOperation.
|
|
772
|
+
# p item
|
|
773
|
+
# end
|
|
774
|
+
#
|
|
775
|
+
def list_bucket_operations request, options = nil
|
|
776
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
777
|
+
|
|
778
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest
|
|
779
|
+
|
|
780
|
+
# Converts hash and nil to an options object
|
|
781
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
782
|
+
|
|
783
|
+
# Customize the options with defaults
|
|
784
|
+
metadata = @config.rpcs.list_bucket_operations.metadata.to_h
|
|
785
|
+
|
|
786
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
787
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
788
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
789
|
+
gapic_version: ::Google::Cloud::StorageBatchOperations::V1::VERSION
|
|
790
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
791
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
792
|
+
|
|
793
|
+
header_params = {}
|
|
794
|
+
if request.parent
|
|
795
|
+
header_params["parent"] = request.parent
|
|
796
|
+
end
|
|
797
|
+
|
|
798
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
799
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
800
|
+
|
|
801
|
+
options.apply_defaults timeout: @config.rpcs.list_bucket_operations.timeout,
|
|
802
|
+
metadata: metadata,
|
|
803
|
+
retry_policy: @config.rpcs.list_bucket_operations.retry_policy
|
|
804
|
+
|
|
805
|
+
options.apply_defaults timeout: @config.timeout,
|
|
806
|
+
metadata: @config.metadata,
|
|
807
|
+
retry_policy: @config.retry_policy
|
|
808
|
+
|
|
809
|
+
@storage_batch_operations_stub.call_rpc :list_bucket_operations, request, options: options do |response, operation|
|
|
810
|
+
response = ::Gapic::PagedEnumerable.new @storage_batch_operations_stub, :list_bucket_operations, request, response, operation, options
|
|
811
|
+
yield response, operation if block_given?
|
|
812
|
+
throw :response, response
|
|
813
|
+
end
|
|
814
|
+
rescue ::GRPC::BadStatus => e
|
|
815
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
##
|
|
819
|
+
# Gets a BucketOperation.
|
|
820
|
+
#
|
|
821
|
+
# @overload get_bucket_operation(request, options = nil)
|
|
822
|
+
# Pass arguments to `get_bucket_operation` via a request object, either of type
|
|
823
|
+
# {::Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest} or an equivalent Hash.
|
|
824
|
+
#
|
|
825
|
+
# @param request [::Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest, ::Hash]
|
|
826
|
+
# A request object representing the call parameters. Required. To specify no
|
|
827
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
828
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
829
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
830
|
+
#
|
|
831
|
+
# @overload get_bucket_operation(name: nil)
|
|
832
|
+
# Pass arguments to `get_bucket_operation` via keyword arguments. Note that at
|
|
833
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
834
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
835
|
+
#
|
|
836
|
+
# @param name [::String]
|
|
837
|
+
# Required. `name` of the bucket operation to retrieve.
|
|
838
|
+
# Format:
|
|
839
|
+
# projects/\\{project_id}/locations/global/jobs/\\{job_id}/bucketOperations/\\{bucket_operation_id}.
|
|
840
|
+
#
|
|
841
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
842
|
+
# @yieldparam response [::Google::Cloud::StorageBatchOperations::V1::BucketOperation]
|
|
843
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
844
|
+
#
|
|
845
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::BucketOperation]
|
|
846
|
+
#
|
|
847
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
848
|
+
#
|
|
849
|
+
# @example Basic example
|
|
850
|
+
# require "google/cloud/storage_batch_operations/v1"
|
|
851
|
+
#
|
|
852
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
853
|
+
# client = Google::Cloud::StorageBatchOperations::V1::StorageBatchOperations::Client.new
|
|
854
|
+
#
|
|
855
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
856
|
+
# request = Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest.new
|
|
857
|
+
#
|
|
858
|
+
# # Call the get_bucket_operation method.
|
|
859
|
+
# result = client.get_bucket_operation request
|
|
860
|
+
#
|
|
861
|
+
# # The returned object is of type Google::Cloud::StorageBatchOperations::V1::BucketOperation.
|
|
862
|
+
# p result
|
|
863
|
+
#
|
|
864
|
+
def get_bucket_operation request, options = nil
|
|
865
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
866
|
+
|
|
867
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest
|
|
868
|
+
|
|
869
|
+
# Converts hash and nil to an options object
|
|
870
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
871
|
+
|
|
872
|
+
# Customize the options with defaults
|
|
873
|
+
metadata = @config.rpcs.get_bucket_operation.metadata.to_h
|
|
874
|
+
|
|
875
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
876
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
877
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
878
|
+
gapic_version: ::Google::Cloud::StorageBatchOperations::V1::VERSION
|
|
879
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
880
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
881
|
+
|
|
882
|
+
header_params = {}
|
|
883
|
+
if request.name
|
|
884
|
+
header_params["name"] = request.name
|
|
885
|
+
end
|
|
886
|
+
|
|
887
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
888
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
889
|
+
|
|
890
|
+
options.apply_defaults timeout: @config.rpcs.get_bucket_operation.timeout,
|
|
891
|
+
metadata: metadata,
|
|
892
|
+
retry_policy: @config.rpcs.get_bucket_operation.retry_policy
|
|
893
|
+
|
|
894
|
+
options.apply_defaults timeout: @config.timeout,
|
|
895
|
+
metadata: @config.metadata,
|
|
896
|
+
retry_policy: @config.retry_policy
|
|
897
|
+
|
|
898
|
+
@storage_batch_operations_stub.call_rpc :get_bucket_operation, request, options: options do |response, operation|
|
|
899
|
+
yield response, operation if block_given?
|
|
900
|
+
end
|
|
901
|
+
rescue ::GRPC::BadStatus => e
|
|
902
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
903
|
+
end
|
|
904
|
+
|
|
714
905
|
##
|
|
715
906
|
# Configuration class for the StorageBatchOperations API.
|
|
716
907
|
#
|
|
@@ -919,6 +1110,16 @@ module Google
|
|
|
919
1110
|
# @return [::Gapic::Config::Method]
|
|
920
1111
|
#
|
|
921
1112
|
attr_reader :cancel_job
|
|
1113
|
+
##
|
|
1114
|
+
# RPC-specific configuration for `list_bucket_operations`
|
|
1115
|
+
# @return [::Gapic::Config::Method]
|
|
1116
|
+
#
|
|
1117
|
+
attr_reader :list_bucket_operations
|
|
1118
|
+
##
|
|
1119
|
+
# RPC-specific configuration for `get_bucket_operation`
|
|
1120
|
+
# @return [::Gapic::Config::Method]
|
|
1121
|
+
#
|
|
1122
|
+
attr_reader :get_bucket_operation
|
|
922
1123
|
|
|
923
1124
|
# @private
|
|
924
1125
|
def initialize parent_rpcs = nil
|
|
@@ -932,6 +1133,10 @@ module Google
|
|
|
932
1133
|
@delete_job = ::Gapic::Config::Method.new delete_job_config
|
|
933
1134
|
cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job
|
|
934
1135
|
@cancel_job = ::Gapic::Config::Method.new cancel_job_config
|
|
1136
|
+
list_bucket_operations_config = parent_rpcs.list_bucket_operations if parent_rpcs.respond_to? :list_bucket_operations
|
|
1137
|
+
@list_bucket_operations = ::Gapic::Config::Method.new list_bucket_operations_config
|
|
1138
|
+
get_bucket_operation_config = parent_rpcs.get_bucket_operation if parent_rpcs.respond_to? :get_bucket_operation
|
|
1139
|
+
@get_bucket_operation = ::Gapic::Config::Method.new get_bucket_operation_config
|
|
935
1140
|
|
|
936
1141
|
yield self if block_given?
|
|
937
1142
|
end
|
|
@@ -24,6 +24,27 @@ module Google
|
|
|
24
24
|
module StorageBatchOperations
|
|
25
25
|
# Path helper methods for the StorageBatchOperations API.
|
|
26
26
|
module Paths
|
|
27
|
+
##
|
|
28
|
+
# Create a fully-qualified BucketOperation resource string.
|
|
29
|
+
#
|
|
30
|
+
# The resource will be in the following format:
|
|
31
|
+
#
|
|
32
|
+
# `projects/{project}/locations/{location}/jobs/{job}/bucketOperations/{bucket_operation}`
|
|
33
|
+
#
|
|
34
|
+
# @param project [String]
|
|
35
|
+
# @param location [String]
|
|
36
|
+
# @param job [String]
|
|
37
|
+
# @param bucket_operation [String]
|
|
38
|
+
#
|
|
39
|
+
# @return [::String]
|
|
40
|
+
def bucket_operation_path project:, location:, job:, bucket_operation:
|
|
41
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
42
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
43
|
+
raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/"
|
|
44
|
+
|
|
45
|
+
"projects/#{project}/locations/#{location}/jobs/#{job}/bucketOperations/#{bucket_operation}"
|
|
46
|
+
end
|
|
47
|
+
|
|
27
48
|
##
|
|
28
49
|
# Create a fully-qualified CryptoKey resource string.
|
|
29
50
|
#
|
|
@@ -513,7 +513,7 @@ module Google
|
|
|
513
513
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
514
514
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
515
515
|
#
|
|
516
|
-
# @overload delete_job(name: nil, request_id: nil)
|
|
516
|
+
# @overload delete_job(name: nil, request_id: nil, force: nil)
|
|
517
517
|
# Pass arguments to `delete_job` via keyword arguments. Note that at
|
|
518
518
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
519
519
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -527,6 +527,11 @@ module Google
|
|
|
527
527
|
# `request_id` will be ignored for at least 60 minutes since the first
|
|
528
528
|
# request. The request ID must be a valid UUID with the exception that zero
|
|
529
529
|
# UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
530
|
+
# @param force [::Boolean]
|
|
531
|
+
# Optional. If set to true, any child bucket operations of the job will also
|
|
532
|
+
# be deleted. Highly recommended to be set to true by all clients. Users
|
|
533
|
+
# cannot mutate bucket operations directly, so only the jobs.delete
|
|
534
|
+
# permission is required to delete a job (and its child bucket operations).
|
|
530
535
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
531
536
|
# @yieldparam result [::Google::Protobuf::Empty]
|
|
532
537
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -670,6 +675,178 @@ module Google
|
|
|
670
675
|
raise ::Google::Cloud::Error.from_error(e)
|
|
671
676
|
end
|
|
672
677
|
|
|
678
|
+
##
|
|
679
|
+
# Lists BucketOperations in a given project and job.
|
|
680
|
+
#
|
|
681
|
+
# @overload list_bucket_operations(request, options = nil)
|
|
682
|
+
# Pass arguments to `list_bucket_operations` via a request object, either of type
|
|
683
|
+
# {::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest} or an equivalent Hash.
|
|
684
|
+
#
|
|
685
|
+
# @param request [::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest, ::Hash]
|
|
686
|
+
# A request object representing the call parameters. Required. To specify no
|
|
687
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
688
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
689
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
690
|
+
#
|
|
691
|
+
# @overload list_bucket_operations(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil)
|
|
692
|
+
# Pass arguments to `list_bucket_operations` via keyword arguments. Note that at
|
|
693
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
694
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
695
|
+
#
|
|
696
|
+
# @param parent [::String]
|
|
697
|
+
# Required. Format: projects/\\{project_id}/locations/global/jobs/\\{job_id}.
|
|
698
|
+
# @param filter [::String]
|
|
699
|
+
# Optional. Filters results as defined by https://google.aip.dev/160.
|
|
700
|
+
# @param page_size [::Integer]
|
|
701
|
+
# Optional. The list page size. Default page size is 100.
|
|
702
|
+
# @param page_token [::String]
|
|
703
|
+
# Optional. The list page token.
|
|
704
|
+
# @param order_by [::String]
|
|
705
|
+
# Optional. Field to sort by. Supported fields are name, create_time.
|
|
706
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
707
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageBatchOperations::V1::BucketOperation>]
|
|
708
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
709
|
+
#
|
|
710
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::StorageBatchOperations::V1::BucketOperation>]
|
|
711
|
+
#
|
|
712
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
713
|
+
#
|
|
714
|
+
# @example Basic example
|
|
715
|
+
# require "google/cloud/storage_batch_operations/v1"
|
|
716
|
+
#
|
|
717
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
718
|
+
# client = Google::Cloud::StorageBatchOperations::V1::StorageBatchOperations::Rest::Client.new
|
|
719
|
+
#
|
|
720
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
721
|
+
# request = Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest.new
|
|
722
|
+
#
|
|
723
|
+
# # Call the list_bucket_operations method.
|
|
724
|
+
# result = client.list_bucket_operations request
|
|
725
|
+
#
|
|
726
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
727
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
728
|
+
# result.each do |item|
|
|
729
|
+
# # Each element is of type ::Google::Cloud::StorageBatchOperations::V1::BucketOperation.
|
|
730
|
+
# p item
|
|
731
|
+
# end
|
|
732
|
+
#
|
|
733
|
+
def list_bucket_operations request, options = nil
|
|
734
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
735
|
+
|
|
736
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest
|
|
737
|
+
|
|
738
|
+
# Converts hash and nil to an options object
|
|
739
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
740
|
+
|
|
741
|
+
# Customize the options with defaults
|
|
742
|
+
call_metadata = @config.rpcs.list_bucket_operations.metadata.to_h
|
|
743
|
+
|
|
744
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
745
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
746
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
747
|
+
gapic_version: ::Google::Cloud::StorageBatchOperations::V1::VERSION,
|
|
748
|
+
transports_version_send: [:rest]
|
|
749
|
+
|
|
750
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
751
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
752
|
+
|
|
753
|
+
options.apply_defaults timeout: @config.rpcs.list_bucket_operations.timeout,
|
|
754
|
+
metadata: call_metadata,
|
|
755
|
+
retry_policy: @config.rpcs.list_bucket_operations.retry_policy
|
|
756
|
+
|
|
757
|
+
options.apply_defaults timeout: @config.timeout,
|
|
758
|
+
metadata: @config.metadata,
|
|
759
|
+
retry_policy: @config.retry_policy
|
|
760
|
+
|
|
761
|
+
@storage_batch_operations_stub.list_bucket_operations request, options do |result, operation|
|
|
762
|
+
result = ::Gapic::Rest::PagedEnumerable.new @storage_batch_operations_stub, :list_bucket_operations, "bucket_operations", request, result, options
|
|
763
|
+
yield result, operation if block_given?
|
|
764
|
+
throw :response, result
|
|
765
|
+
end
|
|
766
|
+
rescue ::Gapic::Rest::Error => e
|
|
767
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
768
|
+
end
|
|
769
|
+
|
|
770
|
+
##
|
|
771
|
+
# Gets a BucketOperation.
|
|
772
|
+
#
|
|
773
|
+
# @overload get_bucket_operation(request, options = nil)
|
|
774
|
+
# Pass arguments to `get_bucket_operation` via a request object, either of type
|
|
775
|
+
# {::Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest} or an equivalent Hash.
|
|
776
|
+
#
|
|
777
|
+
# @param request [::Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest, ::Hash]
|
|
778
|
+
# A request object representing the call parameters. Required. To specify no
|
|
779
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
780
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
781
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
782
|
+
#
|
|
783
|
+
# @overload get_bucket_operation(name: nil)
|
|
784
|
+
# Pass arguments to `get_bucket_operation` via keyword arguments. Note that at
|
|
785
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
786
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
787
|
+
#
|
|
788
|
+
# @param name [::String]
|
|
789
|
+
# Required. `name` of the bucket operation to retrieve.
|
|
790
|
+
# Format:
|
|
791
|
+
# projects/\\{project_id}/locations/global/jobs/\\{job_id}/bucketOperations/\\{bucket_operation_id}.
|
|
792
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
793
|
+
# @yieldparam result [::Google::Cloud::StorageBatchOperations::V1::BucketOperation]
|
|
794
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
795
|
+
#
|
|
796
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::BucketOperation]
|
|
797
|
+
#
|
|
798
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
799
|
+
#
|
|
800
|
+
# @example Basic example
|
|
801
|
+
# require "google/cloud/storage_batch_operations/v1"
|
|
802
|
+
#
|
|
803
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
804
|
+
# client = Google::Cloud::StorageBatchOperations::V1::StorageBatchOperations::Rest::Client.new
|
|
805
|
+
#
|
|
806
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
807
|
+
# request = Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest.new
|
|
808
|
+
#
|
|
809
|
+
# # Call the get_bucket_operation method.
|
|
810
|
+
# result = client.get_bucket_operation request
|
|
811
|
+
#
|
|
812
|
+
# # The returned object is of type Google::Cloud::StorageBatchOperations::V1::BucketOperation.
|
|
813
|
+
# p result
|
|
814
|
+
#
|
|
815
|
+
def get_bucket_operation request, options = nil
|
|
816
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
817
|
+
|
|
818
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest
|
|
819
|
+
|
|
820
|
+
# Converts hash and nil to an options object
|
|
821
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
822
|
+
|
|
823
|
+
# Customize the options with defaults
|
|
824
|
+
call_metadata = @config.rpcs.get_bucket_operation.metadata.to_h
|
|
825
|
+
|
|
826
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
827
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
828
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
829
|
+
gapic_version: ::Google::Cloud::StorageBatchOperations::V1::VERSION,
|
|
830
|
+
transports_version_send: [:rest]
|
|
831
|
+
|
|
832
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
833
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
834
|
+
|
|
835
|
+
options.apply_defaults timeout: @config.rpcs.get_bucket_operation.timeout,
|
|
836
|
+
metadata: call_metadata,
|
|
837
|
+
retry_policy: @config.rpcs.get_bucket_operation.retry_policy
|
|
838
|
+
|
|
839
|
+
options.apply_defaults timeout: @config.timeout,
|
|
840
|
+
metadata: @config.metadata,
|
|
841
|
+
retry_policy: @config.retry_policy
|
|
842
|
+
|
|
843
|
+
@storage_batch_operations_stub.get_bucket_operation request, options do |result, operation|
|
|
844
|
+
yield result, operation if block_given?
|
|
845
|
+
end
|
|
846
|
+
rescue ::Gapic::Rest::Error => e
|
|
847
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
848
|
+
end
|
|
849
|
+
|
|
673
850
|
##
|
|
674
851
|
# Configuration class for the StorageBatchOperations REST API.
|
|
675
852
|
#
|
|
@@ -848,6 +1025,16 @@ module Google
|
|
|
848
1025
|
# @return [::Gapic::Config::Method]
|
|
849
1026
|
#
|
|
850
1027
|
attr_reader :cancel_job
|
|
1028
|
+
##
|
|
1029
|
+
# RPC-specific configuration for `list_bucket_operations`
|
|
1030
|
+
# @return [::Gapic::Config::Method]
|
|
1031
|
+
#
|
|
1032
|
+
attr_reader :list_bucket_operations
|
|
1033
|
+
##
|
|
1034
|
+
# RPC-specific configuration for `get_bucket_operation`
|
|
1035
|
+
# @return [::Gapic::Config::Method]
|
|
1036
|
+
#
|
|
1037
|
+
attr_reader :get_bucket_operation
|
|
851
1038
|
|
|
852
1039
|
# @private
|
|
853
1040
|
def initialize parent_rpcs = nil
|
|
@@ -861,6 +1048,10 @@ module Google
|
|
|
861
1048
|
@delete_job = ::Gapic::Config::Method.new delete_job_config
|
|
862
1049
|
cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job
|
|
863
1050
|
@cancel_job = ::Gapic::Config::Method.new cancel_job_config
|
|
1051
|
+
list_bucket_operations_config = parent_rpcs.list_bucket_operations if parent_rpcs.respond_to? :list_bucket_operations
|
|
1052
|
+
@list_bucket_operations = ::Gapic::Config::Method.new list_bucket_operations_config
|
|
1053
|
+
get_bucket_operation_config = parent_rpcs.get_bucket_operation if parent_rpcs.respond_to? :get_bucket_operation
|
|
1054
|
+
@get_bucket_operation = ::Gapic::Config::Method.new get_bucket_operation_config
|
|
864
1055
|
|
|
865
1056
|
yield self if block_given?
|
|
866
1057
|
end
|
data/lib/google/cloud/storage_batch_operations/v1/storage_batch_operations/rest/service_stub.rb
CHANGED
|
@@ -273,6 +273,86 @@ module Google
|
|
|
273
273
|
end
|
|
274
274
|
end
|
|
275
275
|
|
|
276
|
+
##
|
|
277
|
+
# Baseline implementation for the list_bucket_operations REST call
|
|
278
|
+
#
|
|
279
|
+
# @param request_pb [::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest]
|
|
280
|
+
# A request object representing the call parameters. Required.
|
|
281
|
+
# @param options [::Gapic::CallOptions]
|
|
282
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
283
|
+
#
|
|
284
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
285
|
+
# @yieldparam result [::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsResponse]
|
|
286
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
287
|
+
#
|
|
288
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsResponse]
|
|
289
|
+
# A result object deserialized from the server's reply
|
|
290
|
+
def list_bucket_operations request_pb, options = nil
|
|
291
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
292
|
+
|
|
293
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_bucket_operations_request request_pb
|
|
294
|
+
query_string_params = if query_string_params.any?
|
|
295
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
296
|
+
else
|
|
297
|
+
{}
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
response = @client_stub.make_http_request(
|
|
301
|
+
verb,
|
|
302
|
+
uri: uri,
|
|
303
|
+
body: body || "",
|
|
304
|
+
params: query_string_params,
|
|
305
|
+
method_name: "list_bucket_operations",
|
|
306
|
+
options: options
|
|
307
|
+
)
|
|
308
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
309
|
+
result = ::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
|
310
|
+
catch :response do
|
|
311
|
+
yield result, operation if block_given?
|
|
312
|
+
result
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
##
|
|
317
|
+
# Baseline implementation for the get_bucket_operation REST call
|
|
318
|
+
#
|
|
319
|
+
# @param request_pb [::Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest]
|
|
320
|
+
# A request object representing the call parameters. Required.
|
|
321
|
+
# @param options [::Gapic::CallOptions]
|
|
322
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
323
|
+
#
|
|
324
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
325
|
+
# @yieldparam result [::Google::Cloud::StorageBatchOperations::V1::BucketOperation]
|
|
326
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
327
|
+
#
|
|
328
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::BucketOperation]
|
|
329
|
+
# A result object deserialized from the server's reply
|
|
330
|
+
def get_bucket_operation request_pb, options = nil
|
|
331
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
332
|
+
|
|
333
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_bucket_operation_request request_pb
|
|
334
|
+
query_string_params = if query_string_params.any?
|
|
335
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
336
|
+
else
|
|
337
|
+
{}
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
response = @client_stub.make_http_request(
|
|
341
|
+
verb,
|
|
342
|
+
uri: uri,
|
|
343
|
+
body: body || "",
|
|
344
|
+
params: query_string_params,
|
|
345
|
+
method_name: "get_bucket_operation",
|
|
346
|
+
options: options
|
|
347
|
+
)
|
|
348
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
349
|
+
result = ::Google::Cloud::StorageBatchOperations::V1::BucketOperation.decode_json response.body, ignore_unknown_fields: true
|
|
350
|
+
catch :response do
|
|
351
|
+
yield result, operation if block_given?
|
|
352
|
+
result
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
|
|
276
356
|
##
|
|
277
357
|
# @private
|
|
278
358
|
#
|
|
@@ -379,6 +459,48 @@ module Google
|
|
|
379
459
|
)
|
|
380
460
|
transcoder.transcode request_pb
|
|
381
461
|
end
|
|
462
|
+
|
|
463
|
+
##
|
|
464
|
+
# @private
|
|
465
|
+
#
|
|
466
|
+
# GRPC transcoding helper method for the list_bucket_operations REST call
|
|
467
|
+
#
|
|
468
|
+
# @param request_pb [::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest]
|
|
469
|
+
# A request object representing the call parameters. Required.
|
|
470
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
471
|
+
# Uri, Body, Query string parameters
|
|
472
|
+
def self.transcode_list_bucket_operations_request request_pb
|
|
473
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
474
|
+
.with_bindings(
|
|
475
|
+
uri_method: :get,
|
|
476
|
+
uri_template: "/v1/{parent}/bucketOperations",
|
|
477
|
+
matches: [
|
|
478
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/?$}, false]
|
|
479
|
+
]
|
|
480
|
+
)
|
|
481
|
+
transcoder.transcode request_pb
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
##
|
|
485
|
+
# @private
|
|
486
|
+
#
|
|
487
|
+
# GRPC transcoding helper method for the get_bucket_operation REST call
|
|
488
|
+
#
|
|
489
|
+
# @param request_pb [::Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest]
|
|
490
|
+
# A request object representing the call parameters. Required.
|
|
491
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
492
|
+
# Uri, Body, Query string parameters
|
|
493
|
+
def self.transcode_get_bucket_operation_request request_pb
|
|
494
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
495
|
+
.with_bindings(
|
|
496
|
+
uri_method: :get,
|
|
497
|
+
uri_template: "/v1/{name}",
|
|
498
|
+
matches: [
|
|
499
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/bucketOperations/[^/]+/?$}, false]
|
|
500
|
+
]
|
|
501
|
+
)
|
|
502
|
+
transcoder.transcode request_pb
|
|
503
|
+
end
|
|
382
504
|
end
|
|
383
505
|
end
|
|
384
506
|
end
|
|
@@ -15,7 +15,7 @@ require 'google/protobuf/empty_pb'
|
|
|
15
15
|
require 'google/protobuf/timestamp_pb'
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
descriptor_data = "\nEgoogle/cloud/storagebatchoperations/v1/storage_batch_operations.proto\x12&google.cloud.storagebatchoperations.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1aKgoogle/cloud/storagebatchoperations/v1/storage_batch_operations_types.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0fListJobsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)storagebatchoperations.googleapis.com/Job\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"{\n\x10ListJobsResponse\x12\x39\n\x04jobs\x18\x01 \x03(\x0b\x32+.google.cloud.storagebatchoperations.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\rGetJobRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)storagebatchoperations.googleapis.com/Job\"\xca\x01\n\x10\x43reateJobRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)storagebatchoperations.googleapis.com/Job\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x03job\x18\x03 \x01(\x0b\x32+.google.cloud.storagebatchoperations.v1.JobB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"t\n\x10\x43\x61ncelJobRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)storagebatchoperations.googleapis.com/Job\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"
|
|
18
|
+
descriptor_data = "\nEgoogle/cloud/storagebatchoperations/v1/storage_batch_operations.proto\x12&google.cloud.storagebatchoperations.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1aKgoogle/cloud/storagebatchoperations/v1/storage_batch_operations_types.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x0fListJobsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)storagebatchoperations.googleapis.com/Job\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"{\n\x10ListJobsResponse\x12\x39\n\x04jobs\x18\x01 \x03(\x0b\x32+.google.cloud.storagebatchoperations.v1.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\rGetJobRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)storagebatchoperations.googleapis.com/Job\"\xca\x01\n\x10\x43reateJobRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)storagebatchoperations.googleapis.com/Job\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x03job\x18\x03 \x01(\x0b\x32+.google.cloud.storagebatchoperations.v1.JobB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"t\n\x10\x43\x61ncelJobRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)storagebatchoperations.googleapis.com/Job\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x88\x01\n\x10\x44\x65leteJobRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)storagebatchoperations.googleapis.com/Job\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x13\n\x11\x43\x61ncelJobResponse\"\xc9\x01\n\x1bListBucketOperationsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35storagebatchoperations.googleapis.com/BucketOperation\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa0\x01\n\x1cListBucketOperationsResponse\x12R\n\x11\x62ucket_operations\x18\x01 \x03(\x0b\x32\x37.google.cloud.storagebatchoperations.v1.BucketOperation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"h\n\x19GetBucketOperationRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5storagebatchoperations.googleapis.com/BucketOperation\"\x92\x02\n\x11OperationMetadata\x12\x16\n\toperation\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12=\n\x03job\x18\n \x01(\x0b\x32+.google.cloud.storagebatchoperations.v1.JobB\x03\xe0\x41\x03\x32\xd3\x0b\n\x16StorageBatchOperations\x12\xb8\x01\n\x08ListJobs\x12\x37.google.cloud.storagebatchoperations.v1.ListJobsRequest\x1a\x38.google.cloud.storagebatchoperations.v1.ListJobsResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/jobs\x12\xa5\x01\n\x06GetJob\x12\x35.google.cloud.storagebatchoperations.v1.GetJobRequest\x1a+.google.cloud.storagebatchoperations.v1.Job\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/jobs/*}\x12\xca\x01\n\tCreateJob\x12\x38.google.cloud.storagebatchoperations.v1.CreateJobRequest\x1a\x1d.google.longrunning.Operation\"d\xca\x41\x18\n\x03Job\x12\x11OperationMetadata\xda\x41\x11parent,job,job_id\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/jobs:\x03job\x12\x96\x01\n\tDeleteJob\x12\x38.google.cloud.storagebatchoperations.v1.DeleteJobRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/jobs/*}\x12\xc3\x01\n\tCancelJob\x12\x38.google.cloud.storagebatchoperations.v1.CancelJobRequest\x1a\x39.google.cloud.storagebatchoperations.v1.CancelJobResponse\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/locations/*/jobs/*}:cancel:\x01*\x12\xef\x01\n\x14ListBucketOperations\x12\x43.google.cloud.storagebatchoperations.v1.ListBucketOperationsRequest\x1a\x44.google.cloud.storagebatchoperations.v1.ListBucketOperationsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/jobs/*}/bucketOperations\x12\xdc\x01\n\x12GetBucketOperation\x12\x41.google.cloud.storagebatchoperations.v1.GetBucketOperationRequest\x1a\x37.google.cloud.storagebatchoperations.v1.BucketOperation\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/jobs/*/bucketOperations/*}\x1aY\xca\x41%storagebatchoperations.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xad\x02\n*com.google.cloud.storagebatchoperations.v1B\x1bStorageBatchOperationsProtoP\x01Zbcloud.google.com/go/storagebatchoperations/apiv1/storagebatchoperationspb;storagebatchoperationspb\xaa\x02&Google.Cloud.StorageBatchOperations.V1\xca\x02&Google\\Cloud\\StorageBatchOperations\\V1\xea\x02)Google::Cloud::StorageBatchOperations::V1b\x06proto3"
|
|
19
19
|
|
|
20
20
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
21
21
|
|
|
@@ -54,6 +54,9 @@ module Google
|
|
|
54
54
|
CancelJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.CancelJobRequest").msgclass
|
|
55
55
|
DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.DeleteJobRequest").msgclass
|
|
56
56
|
CancelJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.CancelJobResponse").msgclass
|
|
57
|
+
ListBucketOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.ListBucketOperationsRequest").msgclass
|
|
58
|
+
ListBucketOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.ListBucketOperationsResponse").msgclass
|
|
59
|
+
GetBucketOperationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.GetBucketOperationRequest").msgclass
|
|
57
60
|
OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.OperationMetadata").msgclass
|
|
58
61
|
end
|
|
59
62
|
end
|
|
@@ -46,6 +46,10 @@ module Google
|
|
|
46
46
|
rpc :DeleteJob, ::Google::Cloud::StorageBatchOperations::V1::DeleteJobRequest, ::Google::Protobuf::Empty
|
|
47
47
|
# Cancels a batch job.
|
|
48
48
|
rpc :CancelJob, ::Google::Cloud::StorageBatchOperations::V1::CancelJobRequest, ::Google::Cloud::StorageBatchOperations::V1::CancelJobResponse
|
|
49
|
+
# Lists BucketOperations in a given project and job.
|
|
50
|
+
rpc :ListBucketOperations, ::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsRequest, ::Google::Cloud::StorageBatchOperations::V1::ListBucketOperationsResponse
|
|
51
|
+
# Gets a BucketOperation.
|
|
52
|
+
rpc :GetBucketOperation, ::Google::Cloud::StorageBatchOperations::V1::GetBucketOperationRequest, ::Google::Cloud::StorageBatchOperations::V1::BucketOperation
|
|
49
53
|
end
|
|
50
54
|
|
|
51
55
|
Stub = Service.rpc_stub_class
|
|
@@ -10,7 +10,7 @@ require 'google/protobuf/timestamp_pb'
|
|
|
10
10
|
require 'google/rpc/code_pb'
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
descriptor_data = "\nKgoogle/cloud/storagebatchoperations/v1/storage_batch_operations_types.proto\x12&google.cloud.storagebatchoperations.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15google/rpc/code.proto\"\
|
|
13
|
+
descriptor_data = "\nKgoogle/cloud/storagebatchoperations/v1/storage_batch_operations_types.proto\x12&google.cloud.storagebatchoperations.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x15google/rpc/code.proto\"\xaa\n\n\x03Job\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12I\n\x0b\x62ucket_list\x18\x13 \x01(\x0b\x32\x32.google.cloud.storagebatchoperations.v1.BucketListH\x00\x12P\n\x0fput_object_hold\x18\x05 \x01(\x0b\x32\x35.google.cloud.storagebatchoperations.v1.PutObjectHoldH\x01\x12M\n\rdelete_object\x18\x06 \x01(\x0b\x32\x34.google.cloud.storagebatchoperations.v1.DeleteObjectH\x01\x12K\n\x0cput_metadata\x18\x08 \x01(\x0b\x32\x33.google.cloud.storagebatchoperations.v1.PutMetadataH\x01\x12O\n\x0erewrite_object\x18\x14 \x01(\x0b\x32\x35.google.cloud.storagebatchoperations.v1.RewriteObjectH\x01\x12i\n\x1cupdate_object_custom_context\x18\x17 \x01(\x0b\x32\x41.google.cloud.storagebatchoperations.v1.UpdateObjectCustomContextH\x01\x12R\n\x0elogging_config\x18\t \x01(\x0b\x32\x35.google.cloud.storagebatchoperations.v1.LoggingConfigB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rschedule_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x08\x63ounters\x18\r \x01(\x0b\x32\x30.google.cloud.storagebatchoperations.v1.CountersB\x03\xe0\x41\x03\x12R\n\x0f\x65rror_summaries\x18\x0e \x03(\x0b\x32\x34.google.cloud.storagebatchoperations.v1.ErrorSummaryB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x0f \x01(\x0e\x32\x31.google.cloud.storagebatchoperations.v1.Job.StateB\x03\xe0\x41\x03\x12\x14\n\x07\x64ry_run\x18\x16 \x01(\x08\x42\x03\xe0\x41\x01\x12 \n\x13is_multi_bucket_job\x18\x18 \x01(\x08\x42\x03\xe0\x41\x03\"`\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\n\n\x06QUEUED\x10\x05:m\xea\x41j\n)storagebatchoperations.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}*\x04jobs2\x03jobB\x08\n\x06sourceB\x10\n\x0etransformation\"\xcc\n\n\x0f\x42ucketOperation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x62ucket_name\x18\x02 \x01(\t\x12I\n\x0bprefix_list\x18\x03 \x01(\x0b\x32\x32.google.cloud.storagebatchoperations.v1.PrefixListH\x00\x12\x44\n\x08manifest\x18\x04 \x01(\x0b\x32\x30.google.cloud.storagebatchoperations.v1.ManifestH\x00\x12P\n\x0fput_object_hold\x18\x0b \x01(\x0b\x32\x35.google.cloud.storagebatchoperations.v1.PutObjectHoldH\x01\x12M\n\rdelete_object\x18\x0c \x01(\x0b\x32\x34.google.cloud.storagebatchoperations.v1.DeleteObjectH\x01\x12K\n\x0cput_metadata\x18\r \x01(\x0b\x32\x33.google.cloud.storagebatchoperations.v1.PutMetadataH\x01\x12O\n\x0erewrite_object\x18\x0e \x01(\x0b\x32\x35.google.cloud.storagebatchoperations.v1.RewriteObjectH\x01\x12i\n\x1cupdate_object_custom_context\x18\x0f \x01(\x0b\x32\x41.google.cloud.storagebatchoperations.v1.UpdateObjectCustomContextH\x01\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12G\n\x08\x63ounters\x18\x08 \x01(\x0b\x32\x30.google.cloud.storagebatchoperations.v1.CountersB\x03\xe0\x41\x03\x12R\n\x0f\x65rror_summaries\x18\t \x03(\x0b\x32\x34.google.cloud.storagebatchoperations.v1.ErrorSummaryB\x03\xe0\x41\x03\x12Q\n\x05state\x18\n \x01(\x0e\x32=.google.cloud.storagebatchoperations.v1.BucketOperation.StateB\x03\xe0\x41\x03\"`\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\x0c\n\x08\x43\x41NCELED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05:\xb6\x01\xea\x41\xb2\x01\n5storagebatchoperations.googleapis.com/BucketOperation\x12Vprojects/{project}/locations/{location}/jobs/{job}/bucketOperations/{bucket_operation}*\x10\x62ucketoperations2\x0f\x62ucketOperationB\x16\n\x14object_configurationB\x10\n\x0etransformation\"\xa6\x02\n\nBucketList\x12O\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x39.google.cloud.storagebatchoperations.v1.BucketList.BucketB\x03\xe0\x41\x02\x1a\xc6\x01\n\x06\x42ucket\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\x0bprefix_list\x18\x02 \x01(\x0b\x32\x32.google.cloud.storagebatchoperations.v1.PrefixListH\x00\x12\x44\n\x08manifest\x18\x03 \x01(\x0b\x32\x30.google.cloud.storagebatchoperations.v1.ManifestH\x00\x42\x16\n\x14object_configuration\"*\n\x08Manifest\x12\x1e\n\x11manifest_location\x18\x02 \x01(\tB\x03\xe0\x41\x02\"3\n\nPrefixList\x12%\n\x18included_object_prefixes\x18\x02 \x03(\tB\x03\xe0\x41\x01\"\x8e\x02\n\rPutObjectHold\x12]\n\x0etemporary_hold\x18\x01 \x01(\x0e\x32@.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatusB\x03\xe0\x41\x02\x12_\n\x10\x65vent_based_hold\x18\x02 \x01(\x0e\x32@.google.cloud.storagebatchoperations.v1.PutObjectHold.HoldStatusB\x03\xe0\x41\x02\"=\n\nHoldStatus\x12\x1b\n\x17HOLD_STATUS_UNSPECIFIED\x10\x00\x12\x07\n\x03SET\x10\x01\x12\t\n\x05UNSET\x10\x02\">\n\x0c\x44\x65leteObject\x12.\n!permanent_object_deletion_enabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\"\\\n\rRewriteObject\x12?\n\x07kms_key\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x00\x88\x01\x01\x42\n\n\x08_kms_key\"\x93\x02\n\x0fObjectRetention\x12#\n\x11retain_until_time\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12g\n\x0eretention_mode\x18\x02 \x01(\x0e\x32\x45.google.cloud.storagebatchoperations.v1.ObjectRetention.RetentionModeB\x03\xe0\x41\x02H\x01\x88\x01\x01\"I\n\rRetentionMode\x12\x1e\n\x1aRETENTION_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x0c\n\x08UNLOCKED\x10\x02\x42\x14\n\x12_retain_until_timeB\x11\n\x0f_retention_mode\"\xe1\x04\n\x0bPutMetadata\x12%\n\x13\x63ontent_disposition\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10\x63ontent_encoding\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\"\n\x10\x63ontent_language\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x1e\n\x0c\x63ontent_type\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1f\n\rcache_control\x18\x05 \x01(\tB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1d\n\x0b\x63ustom_time\x18\x06 \x01(\tB\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x65\n\x0f\x63ustom_metadata\x18\x07 \x03(\x0b\x32G.google.cloud.storagebatchoperations.v1.PutMetadata.CustomMetadataEntryB\x03\xe0\x41\x01\x12[\n\x10object_retention\x18\x08 \x01(\x0b\x32\x37.google.cloud.storagebatchoperations.v1.ObjectRetentionB\x03\xe0\x41\x01H\x06\x88\x01\x01\x1a\x35\n\x13\x43ustomMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x16\n\x14_content_dispositionB\x13\n\x11_content_encodingB\x13\n\x11_content_languageB\x0f\n\r_content_typeB\x10\n\x0e_cache_controlB\x0e\n\x0c_custom_timeB\x13\n\x11_object_retention\":\n\x1aObjectCustomContextPayload\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x87\x02\n\x14\x43ustomContextUpdates\x12_\n\x07updates\x18\x01 \x03(\x0b\x32I.google.cloud.storagebatchoperations.v1.CustomContextUpdates.UpdatesEntryB\x03\xe0\x41\x01\x12\x1a\n\rkeys_to_clear\x18\x02 \x03(\tB\x03\xe0\x41\x01\x1ar\n\x0cUpdatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Q\n\x05value\x18\x02 \x01(\x0b\x32\x42.google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload:\x02\x38\x01\"\x9a\x01\n\x19UpdateObjectCustomContext\x12^\n\x16\x63ustom_context_updates\x18\x01 \x01(\x0b\x32<.google.cloud.storagebatchoperations.v1.CustomContextUpdatesH\x00\x12\x13\n\tclear_all\x18\x02 \x01(\x08H\x00\x42\x08\n\x06\x61\x63tion\"\xaa\x01\n\x0c\x45rrorSummary\x12)\n\nerror_code\x18\x01 \x01(\x0e\x32\x10.google.rpc.CodeB\x03\xe0\x41\x02\x12\x18\n\x0b\x65rror_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12U\n\x11\x65rror_log_entries\x18\x03 \x03(\x0b\x32\x35.google.cloud.storagebatchoperations.v1.ErrorLogEntryB\x03\xe0\x41\x02\"J\n\rErrorLogEntry\x12\x1a\n\nobject_uri\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x03\x12\x1d\n\rerror_details\x18\x03 \x03(\tB\x06\xe0\x41\x01\xe0\x41\x03\"\xad\x01\n\x08\x43ounters\x12\x1f\n\x12total_object_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12#\n\x16succeeded_object_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13\x66\x61iled_object_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12#\n\x11total_bytes_found\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x14\n\x12_total_bytes_found\"\xf5\x02\n\rLoggingConfig\x12^\n\x0blog_actions\x18\x01 \x03(\x0e\x32\x44.google.cloud.storagebatchoperations.v1.LoggingConfig.LoggableActionB\x03\xe0\x41\x02\x12i\n\x11log_action_states\x18\x02 \x03(\x0e\x32I.google.cloud.storagebatchoperations.v1.LoggingConfig.LoggableActionStateB\x03\xe0\x41\x02\"@\n\x0eLoggableAction\x12\x1f\n\x1bLOGGABLE_ACTION_UNSPECIFIED\x10\x00\x12\r\n\tTRANSFORM\x10\x06\"W\n\x13LoggableActionState\x12%\n!LOGGABLE_ACTION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\xad\x03\n*com.google.cloud.storagebatchoperations.v1B StorageBatchOperationsTypesProtoP\x01Zbcloud.google.com/go/storagebatchoperations/apiv1/storagebatchoperationspb;storagebatchoperationspb\xaa\x02&Google.Cloud.StorageBatchOperations.V1\xca\x02&Google\\Cloud\\StorageBatchOperations\\V1\xea\x02)Google::Cloud::StorageBatchOperations::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}b\x06proto3"
|
|
14
14
|
|
|
15
15
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
16
16
|
|
|
@@ -43,6 +43,8 @@ module Google
|
|
|
43
43
|
module V1
|
|
44
44
|
Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.Job").msgclass
|
|
45
45
|
Job::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.Job.State").enummodule
|
|
46
|
+
BucketOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.BucketOperation").msgclass
|
|
47
|
+
BucketOperation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.BucketOperation.State").enummodule
|
|
46
48
|
BucketList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.BucketList").msgclass
|
|
47
49
|
BucketList::Bucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.BucketList.Bucket").msgclass
|
|
48
50
|
Manifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.Manifest").msgclass
|
|
@@ -54,6 +56,9 @@ module Google
|
|
|
54
56
|
ObjectRetention = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.ObjectRetention").msgclass
|
|
55
57
|
ObjectRetention::RetentionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.ObjectRetention.RetentionMode").enummodule
|
|
56
58
|
PutMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.PutMetadata").msgclass
|
|
59
|
+
ObjectCustomContextPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.ObjectCustomContextPayload").msgclass
|
|
60
|
+
CustomContextUpdates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.CustomContextUpdates").msgclass
|
|
61
|
+
UpdateObjectCustomContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.UpdateObjectCustomContext").msgclass
|
|
57
62
|
ErrorSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.ErrorSummary").msgclass
|
|
58
63
|
ErrorLogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.ErrorLogEntry").msgclass
|
|
59
64
|
Counters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.storagebatchoperations.v1.Counters").msgclass
|
|
@@ -121,6 +121,12 @@ module Google
|
|
|
121
121
|
# `request_id` will be ignored for at least 60 minutes since the first
|
|
122
122
|
# request. The request ID must be a valid UUID with the exception that zero
|
|
123
123
|
# UUID is not supported (00000000-0000-0000-0000-000000000000).
|
|
124
|
+
# @!attribute [rw] force
|
|
125
|
+
# @return [::Boolean]
|
|
126
|
+
# Optional. If set to true, any child bucket operations of the job will also
|
|
127
|
+
# be deleted. Highly recommended to be set to true by all clients. Users
|
|
128
|
+
# cannot mutate bucket operations directly, so only the jobs.delete
|
|
129
|
+
# permission is required to delete a job (and its child bucket operations).
|
|
124
130
|
class DeleteJobRequest
|
|
125
131
|
include ::Google::Protobuf::MessageExts
|
|
126
132
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -132,6 +138,53 @@ module Google
|
|
|
132
138
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
133
139
|
end
|
|
134
140
|
|
|
141
|
+
# Message for request to list BucketOperations
|
|
142
|
+
# @!attribute [rw] parent
|
|
143
|
+
# @return [::String]
|
|
144
|
+
# Required. Format: projects/\\{project_id}/locations/global/jobs/\\{job_id}.
|
|
145
|
+
# @!attribute [rw] filter
|
|
146
|
+
# @return [::String]
|
|
147
|
+
# Optional. Filters results as defined by https://google.aip.dev/160.
|
|
148
|
+
# @!attribute [rw] page_size
|
|
149
|
+
# @return [::Integer]
|
|
150
|
+
# Optional. The list page size. Default page size is 100.
|
|
151
|
+
# @!attribute [rw] page_token
|
|
152
|
+
# @return [::String]
|
|
153
|
+
# Optional. The list page token.
|
|
154
|
+
# @!attribute [rw] order_by
|
|
155
|
+
# @return [::String]
|
|
156
|
+
# Optional. Field to sort by. Supported fields are name, create_time.
|
|
157
|
+
class ListBucketOperationsRequest
|
|
158
|
+
include ::Google::Protobuf::MessageExts
|
|
159
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Message for response to listing BucketOperations
|
|
163
|
+
# @!attribute [rw] bucket_operations
|
|
164
|
+
# @return [::Array<::Google::Cloud::StorageBatchOperations::V1::BucketOperation>]
|
|
165
|
+
# A list of storage batch bucket operations.
|
|
166
|
+
# @!attribute [rw] next_page_token
|
|
167
|
+
# @return [::String]
|
|
168
|
+
# A token identifying a page of results.
|
|
169
|
+
# @!attribute [rw] unreachable
|
|
170
|
+
# @return [::Array<::String>]
|
|
171
|
+
# Locations that could not be reached.
|
|
172
|
+
class ListBucketOperationsResponse
|
|
173
|
+
include ::Google::Protobuf::MessageExts
|
|
174
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Message for getting a BucketOperation.
|
|
178
|
+
# @!attribute [rw] name
|
|
179
|
+
# @return [::String]
|
|
180
|
+
# Required. `name` of the bucket operation to retrieve.
|
|
181
|
+
# Format:
|
|
182
|
+
# projects/\\{project_id}/locations/global/jobs/\\{job_id}/bucketOperations/\\{bucket_operation_id}.
|
|
183
|
+
class GetBucketOperationRequest
|
|
184
|
+
include ::Google::Protobuf::MessageExts
|
|
185
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
186
|
+
end
|
|
187
|
+
|
|
135
188
|
# Represents the metadata of the long-running operation.
|
|
136
189
|
# @!attribute [r] operation
|
|
137
190
|
# @return [::String]
|
|
@@ -40,24 +40,29 @@ module Google
|
|
|
40
40
|
# @return [::Google::Cloud::StorageBatchOperations::V1::PutObjectHold]
|
|
41
41
|
# Changes object hold status.
|
|
42
42
|
#
|
|
43
|
-
# Note: The following fields are mutually exclusive: `put_object_hold`, `delete_object`, `put_metadata`, `rewrite_object`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
43
|
+
# Note: The following fields are mutually exclusive: `put_object_hold`, `delete_object`, `put_metadata`, `rewrite_object`, `update_object_custom_context`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
44
44
|
# @!attribute [rw] delete_object
|
|
45
45
|
# @return [::Google::Cloud::StorageBatchOperations::V1::DeleteObject]
|
|
46
46
|
# Delete objects.
|
|
47
47
|
#
|
|
48
|
-
# Note: The following fields are mutually exclusive: `delete_object`, `put_object_hold`, `put_metadata`, `rewrite_object`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
48
|
+
# Note: The following fields are mutually exclusive: `delete_object`, `put_object_hold`, `put_metadata`, `rewrite_object`, `update_object_custom_context`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
49
49
|
# @!attribute [rw] put_metadata
|
|
50
50
|
# @return [::Google::Cloud::StorageBatchOperations::V1::PutMetadata]
|
|
51
51
|
# Updates object metadata. Allows updating fixed-key and custom metadata
|
|
52
52
|
# and fixed-key metadata i.e. Cache-Control, Content-Disposition,
|
|
53
53
|
# Content-Encoding, Content-Language, Content-Type, Custom-Time.
|
|
54
54
|
#
|
|
55
|
-
# Note: The following fields are mutually exclusive: `put_metadata`, `put_object_hold`, `delete_object`, `rewrite_object`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
55
|
+
# Note: The following fields are mutually exclusive: `put_metadata`, `put_object_hold`, `delete_object`, `rewrite_object`, `update_object_custom_context`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
56
56
|
# @!attribute [rw] rewrite_object
|
|
57
57
|
# @return [::Google::Cloud::StorageBatchOperations::V1::RewriteObject]
|
|
58
58
|
# Rewrite the object and updates metadata like KMS key.
|
|
59
59
|
#
|
|
60
|
-
# Note: The following fields are mutually exclusive: `rewrite_object`, `put_object_hold`, `delete_object`, `put_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
60
|
+
# Note: The following fields are mutually exclusive: `rewrite_object`, `put_object_hold`, `delete_object`, `put_metadata`, `update_object_custom_context`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
61
|
+
# @!attribute [rw] update_object_custom_context
|
|
62
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::UpdateObjectCustomContext]
|
|
63
|
+
# Update object custom context.
|
|
64
|
+
#
|
|
65
|
+
# Note: The following fields are mutually exclusive: `update_object_custom_context`, `put_object_hold`, `delete_object`, `put_metadata`, `rewrite_object`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
61
66
|
# @!attribute [rw] logging_config
|
|
62
67
|
# @return [::Google::Cloud::StorageBatchOperations::V1::LoggingConfig]
|
|
63
68
|
# Optional. Logging configuration.
|
|
@@ -84,6 +89,10 @@ module Google
|
|
|
84
89
|
# Optional. If true, the job will run in dry run mode, returning the total
|
|
85
90
|
# object count and, if the object configuration is a prefix list, the bytes
|
|
86
91
|
# found from source. No transformations will be performed.
|
|
92
|
+
# @!attribute [r] is_multi_bucket_job
|
|
93
|
+
# @return [::Boolean]
|
|
94
|
+
# Output only. If true, this Job operates on multiple buckets. Multibucket
|
|
95
|
+
# jobs are subject to different quota limits than single-bucket jobs.
|
|
87
96
|
class Job
|
|
88
97
|
include ::Google::Protobuf::MessageExts
|
|
89
98
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -104,6 +113,99 @@ module Google
|
|
|
104
113
|
|
|
105
114
|
# Terminated due to an unrecoverable failure.
|
|
106
115
|
FAILED = 4
|
|
116
|
+
|
|
117
|
+
# Queued but not yet started.
|
|
118
|
+
QUEUED = 5
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# BucketOperation represents a bucket-level breakdown of a Job.
|
|
123
|
+
# @!attribute [rw] name
|
|
124
|
+
# @return [::String]
|
|
125
|
+
# Identifier. The resource name of the BucketOperation. This is defined by
|
|
126
|
+
# the service. Format:
|
|
127
|
+
# projects/\\{project}/locations/global/jobs/\\{job_id}/bucketOperations/\\{bucket_operation}.
|
|
128
|
+
# @!attribute [rw] bucket_name
|
|
129
|
+
# @return [::String]
|
|
130
|
+
# The bucket name of the objects to be transformed in the BucketOperation.
|
|
131
|
+
# @!attribute [rw] prefix_list
|
|
132
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::PrefixList]
|
|
133
|
+
# Specifies objects matching a prefix set.
|
|
134
|
+
#
|
|
135
|
+
# Note: The following fields are mutually exclusive: `prefix_list`, `manifest`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
136
|
+
# @!attribute [rw] manifest
|
|
137
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::Manifest]
|
|
138
|
+
# Specifies objects in a manifest file.
|
|
139
|
+
#
|
|
140
|
+
# Note: The following fields are mutually exclusive: `manifest`, `prefix_list`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
141
|
+
# @!attribute [rw] put_object_hold
|
|
142
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::PutObjectHold]
|
|
143
|
+
# Changes object hold status.
|
|
144
|
+
#
|
|
145
|
+
# Note: The following fields are mutually exclusive: `put_object_hold`, `delete_object`, `put_metadata`, `rewrite_object`, `update_object_custom_context`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
146
|
+
# @!attribute [rw] delete_object
|
|
147
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::DeleteObject]
|
|
148
|
+
# Delete objects.
|
|
149
|
+
#
|
|
150
|
+
# Note: The following fields are mutually exclusive: `delete_object`, `put_object_hold`, `put_metadata`, `rewrite_object`, `update_object_custom_context`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
151
|
+
# @!attribute [rw] put_metadata
|
|
152
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::PutMetadata]
|
|
153
|
+
# Updates object metadata. Allows updating fixed-key and custom metadata
|
|
154
|
+
# and fixed-key metadata i.e. Cache-Control, Content-Disposition,
|
|
155
|
+
# Content-Encoding, Content-Language, Content-Type, Custom-Time.
|
|
156
|
+
#
|
|
157
|
+
# Note: The following fields are mutually exclusive: `put_metadata`, `put_object_hold`, `delete_object`, `rewrite_object`, `update_object_custom_context`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
158
|
+
# @!attribute [rw] rewrite_object
|
|
159
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::RewriteObject]
|
|
160
|
+
# Rewrite the object and updates metadata like KMS key.
|
|
161
|
+
#
|
|
162
|
+
# Note: The following fields are mutually exclusive: `rewrite_object`, `put_object_hold`, `delete_object`, `put_metadata`, `update_object_custom_context`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
163
|
+
# @!attribute [rw] update_object_custom_context
|
|
164
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::UpdateObjectCustomContext]
|
|
165
|
+
# Update object custom context.
|
|
166
|
+
#
|
|
167
|
+
# Note: The following fields are mutually exclusive: `update_object_custom_context`, `put_object_hold`, `delete_object`, `put_metadata`, `rewrite_object`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
168
|
+
# @!attribute [r] create_time
|
|
169
|
+
# @return [::Google::Protobuf::Timestamp]
|
|
170
|
+
# Output only. The time that the BucketOperation was created.
|
|
171
|
+
# @!attribute [r] start_time
|
|
172
|
+
# @return [::Google::Protobuf::Timestamp]
|
|
173
|
+
# Output only. The time that the BucketOperation was started.
|
|
174
|
+
# @!attribute [r] complete_time
|
|
175
|
+
# @return [::Google::Protobuf::Timestamp]
|
|
176
|
+
# Output only. The time that the BucketOperation was completed.
|
|
177
|
+
# @!attribute [r] counters
|
|
178
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::Counters]
|
|
179
|
+
# Output only. Information about the progress of the bucket operation.
|
|
180
|
+
# @!attribute [r] error_summaries
|
|
181
|
+
# @return [::Array<::Google::Cloud::StorageBatchOperations::V1::ErrorSummary>]
|
|
182
|
+
# Output only. Summarizes errors encountered with sample error log entries.
|
|
183
|
+
# @!attribute [r] state
|
|
184
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::BucketOperation::State]
|
|
185
|
+
# Output only. State of the BucketOperation.
|
|
186
|
+
class BucketOperation
|
|
187
|
+
include ::Google::Protobuf::MessageExts
|
|
188
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
189
|
+
|
|
190
|
+
# Describes state of the BucketOperation.
|
|
191
|
+
module State
|
|
192
|
+
# Default value. This value is unused.
|
|
193
|
+
STATE_UNSPECIFIED = 0
|
|
194
|
+
|
|
195
|
+
# Created but not yet started.
|
|
196
|
+
QUEUED = 1
|
|
197
|
+
|
|
198
|
+
# In progress.
|
|
199
|
+
RUNNING = 2
|
|
200
|
+
|
|
201
|
+
# Completed successfully.
|
|
202
|
+
SUCCEEDED = 3
|
|
203
|
+
|
|
204
|
+
# Cancelled by the user.
|
|
205
|
+
CANCELED = 4
|
|
206
|
+
|
|
207
|
+
# Terminated due to an unrecoverable failure.
|
|
208
|
+
FAILED = 5
|
|
107
209
|
end
|
|
108
210
|
end
|
|
109
211
|
|
|
@@ -320,6 +422,59 @@ module Google
|
|
|
320
422
|
end
|
|
321
423
|
end
|
|
322
424
|
|
|
425
|
+
# Describes the payload of a user defined object custom context.
|
|
426
|
+
# @!attribute [rw] value
|
|
427
|
+
# @return [::String]
|
|
428
|
+
# The value of the object custom context.
|
|
429
|
+
# If set, `value` must NOT be an empty string since it is a required field in
|
|
430
|
+
# custom context. If unset, `value` will be ignored and no changes will be
|
|
431
|
+
# made to the `value` field of the custom context payload.
|
|
432
|
+
class ObjectCustomContextPayload
|
|
433
|
+
include ::Google::Protobuf::MessageExts
|
|
434
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
# Describes a collection of updates to apply to custom contexts identified
|
|
438
|
+
# by key.
|
|
439
|
+
# @!attribute [rw] updates
|
|
440
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::StorageBatchOperations::V1::ObjectCustomContextPayload}]
|
|
441
|
+
# Optional. Insert or update the existing custom contexts.
|
|
442
|
+
# @!attribute [rw] keys_to_clear
|
|
443
|
+
# @return [::Array<::String>]
|
|
444
|
+
# Optional. Custom contexts to clear by key.
|
|
445
|
+
# A key cannot be present in both `updates` and `keys_to_clear`.
|
|
446
|
+
class CustomContextUpdates
|
|
447
|
+
include ::Google::Protobuf::MessageExts
|
|
448
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
449
|
+
|
|
450
|
+
# @!attribute [rw] key
|
|
451
|
+
# @return [::String]
|
|
452
|
+
# @!attribute [rw] value
|
|
453
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::ObjectCustomContextPayload]
|
|
454
|
+
class UpdatesEntry
|
|
455
|
+
include ::Google::Protobuf::MessageExts
|
|
456
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
457
|
+
end
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# Describes options to update object custom contexts.
|
|
461
|
+
# @!attribute [rw] custom_context_updates
|
|
462
|
+
# @return [::Google::Cloud::StorageBatchOperations::V1::CustomContextUpdates]
|
|
463
|
+
# A collection of updates to apply to specific custom contexts.
|
|
464
|
+
# Use this to add, update or delete individual contexts by key.
|
|
465
|
+
#
|
|
466
|
+
# Note: The following fields are mutually exclusive: `custom_context_updates`, `clear_all`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
467
|
+
# @!attribute [rw] clear_all
|
|
468
|
+
# @return [::Boolean]
|
|
469
|
+
# If set, must be set to true and all existing object custom contexts will
|
|
470
|
+
# be deleted.
|
|
471
|
+
#
|
|
472
|
+
# Note: The following fields are mutually exclusive: `clear_all`, `custom_context_updates`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
473
|
+
class UpdateObjectCustomContext
|
|
474
|
+
include ::Google::Protobuf::MessageExts
|
|
475
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
476
|
+
end
|
|
477
|
+
|
|
323
478
|
# A summary of errors by error code, plus a count and sample error log
|
|
324
479
|
# entries.
|
|
325
480
|
# @!attribute [rw] error_code
|