lib/google/cloud/tasks/v2beta2/queue_pb.rb in google-cloud-tasks-v2beta2-0.8.0 vs lib/google/cloud/tasks/v2beta2/queue_pb.rb in google-cloud-tasks-v2beta2-0.9.0

- old
+ new

@@ -1,5 +1,6 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/tasks/v2beta2/queue.proto require 'google/protobuf' @@ -7,54 +8,37 @@ require 'google/api/resource_pb' require 'google/cloud/tasks/v2beta2/target_pb' require 'google/protobuf/duration_pb' require 'google/protobuf/timestamp_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/cloud/tasks/v2beta2/queue.proto", :syntax => :proto3) do - add_message "google.cloud.tasks.v2beta2.Queue" do - optional :name, :string, 1 - optional :rate_limits, :message, 5, "google.cloud.tasks.v2beta2.RateLimits" - optional :retry_config, :message, 6, "google.cloud.tasks.v2beta2.RetryConfig" - optional :state, :enum, 7, "google.cloud.tasks.v2beta2.Queue.State" - optional :purge_time, :message, 8, "google.protobuf.Timestamp" - optional :task_ttl, :message, 9, "google.protobuf.Duration" - optional :tombstone_ttl, :message, 10, "google.protobuf.Duration" - optional :stats, :message, 16, "google.cloud.tasks.v2beta2.QueueStats" - oneof :target_type do - optional :app_engine_http_target, :message, 3, "google.cloud.tasks.v2beta2.AppEngineHttpTarget" - optional :pull_target, :message, 4, "google.cloud.tasks.v2beta2.PullTarget" - end + +descriptor_data = "\n&google/cloud/tasks/v2beta2/queue.proto\x12\x1agoogle.cloud.tasks.v2beta2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/tasks/v2beta2/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xda\x05\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12Q\n\x16\x61pp_engine_http_target\x18\x03 \x01(\x0b\x32/.google.cloud.tasks.v2beta2.AppEngineHttpTargetH\x00\x12=\n\x0bpull_target\x18\x04 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.PullTargetH\x00\x12;\n\x0brate_limits\x18\x05 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.RateLimits\x12=\n\x0cretry_config\x18\x06 \x01(\x0b\x32\'.google.cloud.tasks.v2beta2.RetryConfig\x12\x36\n\x05state\x18\x07 \x01(\x0e\x32\'.google.cloud.tasks.v2beta2.Queue.State\x12.\n\npurge_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08task_ttl\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x30\n\rtombstone_ttl\x18\n \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x05stats\x18\x10 \x01(\x0b\x32&.google.cloud.tasks.v2beta2.QueueStatsB\x03\xe0\x41\x03\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03:\\\xea\x41Y\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x36projects/{project}/locations/{location}/queues/{queue}B\r\n\x0btarget_type\"k\n\nRateLimits\x12\'\n\x1fmax_tasks_dispatched_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12\x1c\n\x14max_concurrent_tasks\x18\x03 \x01(\x05\"\x81\x02\n\x0bRetryConfig\x12\x16\n\x0cmax_attempts\x18\x01 \x01(\x05H\x00\x12\x1c\n\x12unlimited_attempts\x18\x02 \x01(\x08H\x00\x12\x35\n\x12max_retry_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x06 \x01(\x05\x42\x0e\n\x0cnum_attempts\"\xe8\x01\n\nQueueStats\x12\x18\n\x0btasks_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x46\n\x1doldest_estimated_arrival_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\'\n\x1a\x65xecuted_last_minute_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12(\n\x1b\x63oncurrent_dispatches_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12%\n\x18\x65\x66\x66\x65\x63tive_execution_rate\x18\x05 \x01(\x01\x42\x03\xe0\x41\x03\x42s\n\x1e\x63om.google.cloud.tasks.v2beta2B\nQueueProtoP\x01ZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.tasks.v2beta2.AppEngineHttpTarget", "google/cloud/tasks/v2beta2/target.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end - add_enum "google.cloud.tasks.v2beta2.Queue.State" do - value :STATE_UNSPECIFIED, 0 - value :RUNNING, 1 - value :PAUSED, 2 - value :DISABLED, 3 - end - add_message "google.cloud.tasks.v2beta2.RateLimits" do - optional :max_tasks_dispatched_per_second, :double, 1 - optional :max_burst_size, :int32, 2 - optional :max_concurrent_tasks, :int32, 3 - end - add_message "google.cloud.tasks.v2beta2.RetryConfig" do - optional :max_retry_duration, :message, 3, "google.protobuf.Duration" - optional :min_backoff, :message, 4, "google.protobuf.Duration" - optional :max_backoff, :message, 5, "google.protobuf.Duration" - optional :max_doublings, :int32, 6 - oneof :num_attempts do - optional :max_attempts, :int32, 1 - optional :unlimited_attempts, :bool, 2 - end - end - add_message "google.cloud.tasks.v2beta2.QueueStats" do - optional :tasks_count, :int64, 1 - optional :oldest_estimated_arrival_time, :message, 2, "google.protobuf.Timestamp" - optional :executed_last_minute_count, :int64, 3 - optional :concurrent_dispatches_count, :int64, 4 - optional :effective_execution_rate, :double, 5 - end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Google module Cloud module Tasks