lib/google/cloud/tasks/v2/cloud_tasks/client.rb in google-cloud-tasks-v2-0.3.0 vs lib/google/cloud/tasks/v2/cloud_tasks/client.rb in google-cloud-tasks-v2-0.4.0

- old
+ new

@@ -59,41 +59,41 @@ @configure ||= begin namespace = ["Google", "Cloud", "Tasks", "V2"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name - break parent_const.configure if parent_const&.respond_to? :configure + break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.list_queues.timeout = 10.0 default_config.rpcs.list_queues.retry_policy = { initial_delay: 0.1, - max_delay: 10.0, - multiplier: 1.3, - retry_codes: [4, 14] + max_delay: 10.0, + multiplier: 1.3, + retry_codes: [4, 14] } default_config.rpcs.get_queue.timeout = 10.0 default_config.rpcs.get_queue.retry_policy = { initial_delay: 0.1, - max_delay: 10.0, - multiplier: 1.3, - retry_codes: [4, 14] + max_delay: 10.0, + multiplier: 1.3, + retry_codes: [4, 14] } default_config.rpcs.create_queue.timeout = 10.0 default_config.rpcs.update_queue.timeout = 10.0 default_config.rpcs.delete_queue.timeout = 10.0 default_config.rpcs.delete_queue.retry_policy = { initial_delay: 0.1, - max_delay: 10.0, - multiplier: 1.3, - retry_codes: [4, 14] + max_delay: 10.0, + multiplier: 1.3, + retry_codes: [4, 14] } default_config.rpcs.purge_queue.timeout = 10.0 default_config.rpcs.pause_queue.timeout = 10.0 @@ -101,49 +101,49 @@ default_config.rpcs.resume_queue.timeout = 10.0 default_config.rpcs.get_iam_policy.timeout = 10.0 default_config.rpcs.get_iam_policy.retry_policy = { initial_delay: 0.1, - max_delay: 10.0, - multiplier: 1.3, - retry_codes: [4, 14] + max_delay: 10.0, + multiplier: 1.3, + retry_codes: [4, 14] } default_config.rpcs.set_iam_policy.timeout = 10.0 default_config.rpcs.test_iam_permissions.timeout = 10.0 default_config.rpcs.test_iam_permissions.retry_policy = { initial_delay: 0.1, - max_delay: 10.0, - multiplier: 1.3, - retry_codes: [4, 14] + max_delay: 10.0, + multiplier: 1.3, + retry_codes: [4, 14] } default_config.rpcs.list_tasks.timeout = 10.0 default_config.rpcs.list_tasks.retry_policy = { initial_delay: 0.1, - max_delay: 10.0, - multiplier: 1.3, - retry_codes: [4, 14] + max_delay: 10.0, + multiplier: 1.3, + retry_codes: [4, 14] } default_config.rpcs.get_task.timeout = 10.0 default_config.rpcs.get_task.retry_policy = { initial_delay: 0.1, - max_delay: 10.0, - multiplier: 1.3, - retry_codes: [4, 14] + max_delay: 10.0, + multiplier: 1.3, + retry_codes: [4, 14] } default_config.rpcs.create_task.timeout = 10.0 default_config.rpcs.delete_task.timeout = 10.0 default_config.rpcs.delete_task.retry_policy = { initial_delay: 0.1, - max_delay: 10.0, - multiplier: 1.3, - retry_codes: [4, 14] + max_delay: 10.0, + multiplier: 1.3, + retry_codes: [4, 14] } default_config.rpcs.run_task.timeout = 10.0 default_config @@ -210,11 +210,11 @@ # Use self-signed JWT if the scope and endpoint are unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.scope == Client.configure.scope && @config.endpoint == Client.configure.endpoint && !@config.endpoint.split(".").first.include?("-") - credentials ||= Credentials.default scope: @config.scope, + credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(String) || credentials.is_a?(Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @@ -1686,11 +1686,11 @@ allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil) + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil @@ -1707,11 +1707,11 @@ # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs) + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## @@ -1813,40 +1813,40 @@ # attr_reader :run_task # @private def initialize parent_rpcs = nil - list_queues_config = parent_rpcs&.list_queues if parent_rpcs&.respond_to? :list_queues + list_queues_config = parent_rpcs.list_queues if parent_rpcs.respond_to? :list_queues @list_queues = ::Gapic::Config::Method.new list_queues_config - get_queue_config = parent_rpcs&.get_queue if parent_rpcs&.respond_to? :get_queue + get_queue_config = parent_rpcs.get_queue if parent_rpcs.respond_to? :get_queue @get_queue = ::Gapic::Config::Method.new get_queue_config - create_queue_config = parent_rpcs&.create_queue if parent_rpcs&.respond_to? :create_queue + create_queue_config = parent_rpcs.create_queue if parent_rpcs.respond_to? :create_queue @create_queue = ::Gapic::Config::Method.new create_queue_config - update_queue_config = parent_rpcs&.update_queue if parent_rpcs&.respond_to? :update_queue + update_queue_config = parent_rpcs.update_queue if parent_rpcs.respond_to? :update_queue @update_queue = ::Gapic::Config::Method.new update_queue_config - delete_queue_config = parent_rpcs&.delete_queue if parent_rpcs&.respond_to? :delete_queue + delete_queue_config = parent_rpcs.delete_queue if parent_rpcs.respond_to? :delete_queue @delete_queue = ::Gapic::Config::Method.new delete_queue_config - purge_queue_config = parent_rpcs&.purge_queue if parent_rpcs&.respond_to? :purge_queue + purge_queue_config = parent_rpcs.purge_queue if parent_rpcs.respond_to? :purge_queue @purge_queue = ::Gapic::Config::Method.new purge_queue_config - pause_queue_config = parent_rpcs&.pause_queue if parent_rpcs&.respond_to? :pause_queue + pause_queue_config = parent_rpcs.pause_queue if parent_rpcs.respond_to? :pause_queue @pause_queue = ::Gapic::Config::Method.new pause_queue_config - resume_queue_config = parent_rpcs&.resume_queue if parent_rpcs&.respond_to? :resume_queue + resume_queue_config = parent_rpcs.resume_queue if parent_rpcs.respond_to? :resume_queue @resume_queue = ::Gapic::Config::Method.new resume_queue_config - get_iam_policy_config = parent_rpcs&.get_iam_policy if parent_rpcs&.respond_to? :get_iam_policy + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs&.set_iam_policy if parent_rpcs&.respond_to? :set_iam_policy + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs&.test_iam_permissions if parent_rpcs&.respond_to? :test_iam_permissions + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - list_tasks_config = parent_rpcs&.list_tasks if parent_rpcs&.respond_to? :list_tasks + list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks @list_tasks = ::Gapic::Config::Method.new list_tasks_config - get_task_config = parent_rpcs&.get_task if parent_rpcs&.respond_to? :get_task + get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task @get_task = ::Gapic::Config::Method.new get_task_config - create_task_config = parent_rpcs&.create_task if parent_rpcs&.respond_to? :create_task + create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task @create_task = ::Gapic::Config::Method.new create_task_config - delete_task_config = parent_rpcs&.delete_task if parent_rpcs&.respond_to? :delete_task + delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task @delete_task = ::Gapic::Config::Method.new delete_task_config - run_task_config = parent_rpcs&.run_task if parent_rpcs&.respond_to? :run_task + run_task_config = parent_rpcs.run_task if parent_rpcs.respond_to? :run_task @run_task = ::Gapic::Config::Method.new run_task_config yield self if block_given? end end