lib/google/cloud/container_analysis.rb in google-cloud-container_analysis-1.2.0 vs lib/google/cloud/container_analysis.rb in google-cloud-container_analysis-1.3.0

- old
+ new

@@ -27,32 +27,33 @@ require "google/cloud" unless defined? ::Google::Cloud.new require "google/cloud/config" # Set the default configuration ::Google::Cloud.configure.add_config! :container_analysis do |config| - config.add_field! :endpoint, "containeranalysis.googleapis.com", match: ::String + config.add_field! :endpoint, nil, match: ::String config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] config.add_field! :scope, nil, match: [::Array, ::String] config.add_field! :lib_name, nil, match: ::String config.add_field! :lib_version, nil, match: ::String config.add_field! :interceptors, nil, match: ::Array config.add_field! :timeout, nil, match: ::Numeric config.add_field! :metadata, nil, match: ::Hash config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String end module Google module Cloud module ContainerAnalysis ## # Create a new client object for ContainerAnalysis. # # By default, this returns an instance of - # [Google::Cloud::ContainerAnalysis::V1::ContainerAnalysis::Client](https://googleapis.dev/ruby/google-cloud-container_analysis-v1/latest/Google/Cloud/ContainerAnalysis/V1/ContainerAnalysis/Client.html) - # for version V1 of the API. - # However, you can specify specify a different API version by passing it in the + # [Google::Cloud::ContainerAnalysis::V1::ContainerAnalysis::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-container_analysis-v1/latest/Google-Cloud-ContainerAnalysis-V1-ContainerAnalysis-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the # `version` parameter. If the ContainerAnalysis service is # supported by that API version, and the corresponding gem is available, the # appropriate versioned client will be returned. # # ## About ContainerAnalysis @@ -71,21 +72,21 @@ # there would be one note for the vulnerability and an occurrence for each # image with the vulnerability referring to that note. # # @param version [::String, ::Symbol] The API version to connect to. Optional. # Defaults to `:v1`. - # @return [ContainerAnalysis::Client] A client object for the specified version. + # @return [::Object] A client object for the specified version. # def self.container_analysis version: :v1, &block require "google/cloud/container_analysis/#{version.to_s.downcase}" package_name = Google::Cloud::ContainerAnalysis .constants .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } .first - package_module = Google::Cloud::ContainerAnalysis.const_get package_name - package_module.const_get(:ContainerAnalysis).const_get(:Client).new(&block) + service_module = Google::Cloud::ContainerAnalysis.const_get(package_name).const_get(:ContainerAnalysis) + service_module.const_get(:Client).new(&block) end ## # Configure the google-cloud-container_analysis library. # @@ -101,10 +102,10 @@ # * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) - # An array of interceptors that are run before calls are executed. # * `timeout` (*type:* `Numeric`) - # Default timeout in seconds. # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional gRPC headers to be sent with the call. + # Additional headers to be sent with the call. # * `retry_policy` (*type:* `Hash`) - # The retry policy. The value is a hash with the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.