lib/google/cloud/tasks/v2/queue_pb.rb in google-cloud-tasks-v2-0.7.0 vs lib/google/cloud/tasks/v2/queue_pb.rb in google-cloud-tasks-v2-0.8.0

- old
+ new

@@ -1,47 +1,43 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/tasks/v2/queue.proto require 'google/protobuf' require 'google/api/resource_pb' require 'google/cloud/tasks/v2/target_pb' require 'google/protobuf/duration_pb' require 'google/protobuf/timestamp_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/cloud/tasks/v2/queue.proto", :syntax => :proto3) do - add_message "google.cloud.tasks.v2.Queue" do - optional :name, :string, 1 - optional :app_engine_routing_override, :message, 2, "google.cloud.tasks.v2.AppEngineRouting" - optional :rate_limits, :message, 3, "google.cloud.tasks.v2.RateLimits" - optional :retry_config, :message, 4, "google.cloud.tasks.v2.RetryConfig" - optional :state, :enum, 5, "google.cloud.tasks.v2.Queue.State" - optional :purge_time, :message, 6, "google.protobuf.Timestamp" - optional :stackdriver_logging_config, :message, 9, "google.cloud.tasks.v2.StackdriverLoggingConfig" + +descriptor_data = "\n!google/cloud/tasks/v2/queue.proto\x12\x15google.cloud.tasks.v2\x1a\x19google/api/resource.proto\x1a\"google/cloud/tasks/v2/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb2\x04\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12L\n\x1b\x61pp_engine_routing_override\x18\x02 \x01(\x0b\x32\'.google.cloud.tasks.v2.AppEngineRouting\x12\x36\n\x0brate_limits\x18\x03 \x01(\x0b\x32!.google.cloud.tasks.v2.RateLimits\x12\x38\n\x0cretry_config\x18\x04 \x01(\x0b\x32\".google.cloud.tasks.v2.RetryConfig\x12\x31\n\x05state\x18\x05 \x01(\x0e\x32\".google.cloud.tasks.v2.Queue.State\x12.\n\npurge_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12S\n\x1astackdriver_logging_config\x18\t \x01(\x0b\x32/.google.cloud.tasks.v2.StackdriverLoggingConfig\"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}\"j\n\nRateLimits\x12!\n\x19max_dispatches_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12!\n\x19max_concurrent_dispatches\x18\x03 \x01(\x05\"\xd1\x01\n\x0bRetryConfig\x12\x14\n\x0cmax_attempts\x18\x01 \x01(\x05\x12\x35\n\x12max_retry_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x05 \x01(\x05\"2\n\x18StackdriverLoggingConfig\x12\x16\n\x0esampling_ratio\x18\x01 \x01(\x01\x42i\n\x19\x63om.google.cloud.tasks.v2B\nQueueProtoP\x01Z>cloud.google.com/go/cloudtasks/apiv2/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.v2.AppEngineRouting", "google/cloud/tasks/v2/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.v2.Queue.State" do - value :STATE_UNSPECIFIED, 0 - value :RUNNING, 1 - value :PAUSED, 2 - value :DISABLED, 3 - end - add_message "google.cloud.tasks.v2.RateLimits" do - optional :max_dispatches_per_second, :double, 1 - optional :max_burst_size, :int32, 2 - optional :max_concurrent_dispatches, :int32, 3 - end - add_message "google.cloud.tasks.v2.RetryConfig" do - optional :max_attempts, :int32, 1 - optional :max_retry_duration, :message, 2, "google.protobuf.Duration" - optional :min_backoff, :message, 3, "google.protobuf.Duration" - optional :max_backoff, :message, 4, "google.protobuf.Duration" - optional :max_doublings, :int32, 5 - end - add_message "google.cloud.tasks.v2.StackdriverLoggingConfig" do - optional :sampling_ratio, :double, 1 - 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