lib/google/cloud/pubsub/v1/schema_service/client.rb in google-cloud-pubsub-v1-0.3.0 vs lib/google/cloud/pubsub/v1/schema_service/client.rb in google-cloud-pubsub-v1-0.4.0

- old
+ new

@@ -25,10 +25,12 @@ module V1 module SchemaService ## # Client for the SchemaService service. # + # Service for doing schema-related operations. + # class Client include Paths # @private attr_reader :schema_service_stub @@ -56,11 +58,11 @@ @configure ||= begin namespace = ["Google", "Cloud", "PubSub", "V1"] 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 @@ -127,11 +129,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 @@ -679,11 +681,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 @@ -700,11 +702,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 ## @@ -756,20 +758,20 @@ # attr_reader :validate_message # @private def initialize parent_rpcs = nil - create_schema_config = parent_rpcs&.create_schema if parent_rpcs&.respond_to? :create_schema + create_schema_config = parent_rpcs.create_schema if parent_rpcs.respond_to? :create_schema @create_schema = ::Gapic::Config::Method.new create_schema_config - get_schema_config = parent_rpcs&.get_schema if parent_rpcs&.respond_to? :get_schema + get_schema_config = parent_rpcs.get_schema if parent_rpcs.respond_to? :get_schema @get_schema = ::Gapic::Config::Method.new get_schema_config - list_schemas_config = parent_rpcs&.list_schemas if parent_rpcs&.respond_to? :list_schemas + list_schemas_config = parent_rpcs.list_schemas if parent_rpcs.respond_to? :list_schemas @list_schemas = ::Gapic::Config::Method.new list_schemas_config - delete_schema_config = parent_rpcs&.delete_schema if parent_rpcs&.respond_to? :delete_schema + delete_schema_config = parent_rpcs.delete_schema if parent_rpcs.respond_to? :delete_schema @delete_schema = ::Gapic::Config::Method.new delete_schema_config - validate_schema_config = parent_rpcs&.validate_schema if parent_rpcs&.respond_to? :validate_schema + validate_schema_config = parent_rpcs.validate_schema if parent_rpcs.respond_to? :validate_schema @validate_schema = ::Gapic::Config::Method.new validate_schema_config - validate_message_config = parent_rpcs&.validate_message if parent_rpcs&.respond_to? :validate_message + validate_message_config = parent_rpcs.validate_message if parent_rpcs.respond_to? :validate_message @validate_message = ::Gapic::Config::Method.new validate_message_config yield self if block_given? end end