lib/google/cloud/run/v2/services/client.rb in google-cloud-run-v2-0.15.0 vs lib/google/cloud/run/v2/services/client.rb in google-cloud-run-v2-0.16.0
- old
+ new
@@ -30,10 +30,13 @@
#
# Cloud Run Service Control Plane API
#
class Client
# @private
+ API_VERSION = ""
+
+ # @private
DEFAULT_ENDPOINT_TEMPLATE = "run.$UNIVERSE_DOMAIN$"
include Paths
# @private
@@ -276,14 +279,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.create_service.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Run::V2::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
header_params = {}
if request.parent
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)/?$}.match request.parent
@@ -367,14 +371,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.get_service.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Run::V2::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
header_params = {}
if request.name
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?$}.match request.name
@@ -401,11 +406,11 @@
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
##
- # Lists Services.
+ # Lists Services. Results are sorted by creation time, descending.
#
# @overload list_services(request, options = nil)
# Pass arguments to `list_services` via a request object, either of type
# {::Google::Cloud::Run::V2::ListServicesRequest} or an equivalent Hash.
#
@@ -469,14 +474,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.list_services.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Run::V2::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
header_params = {}
if request.parent
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)/?$}.match request.parent
@@ -516,24 +522,26 @@
# A request object representing the call parameters. Required. To specify no
# parameters, or to keep all the default parameter values, pass an empty Hash.
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
- # @overload update_service(service: nil, validate_only: nil, allow_missing: nil)
+ # @overload update_service(update_mask: nil, service: nil, validate_only: nil, allow_missing: nil)
# Pass arguments to `update_service` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
#
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
+ # Optional. The list of fields to be updated.
# @param service [::Google::Cloud::Run::V2::Service, ::Hash]
# Required. The Service to be updated.
# @param validate_only [::Boolean]
# Indicates that the request should be validated and default values
# populated, without persisting the request or updating any resources.
# @param allow_missing [::Boolean]
- # If set to true, and if the Service does not exist, it will create a new
- # one. The caller must have 'run.services.create' permissions if this is set
- # to true and the Service does not exist.
+ # Optional. If set to true, and if the Service does not exist, it will create
+ # a new one. The caller must have 'run.services.create' permissions if this
+ # is set to true and the Service does not exist.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Gapic::Operation]
# @yieldparam operation [::GRPC::ActiveCall::Operation]
#
@@ -572,14 +580,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.update_service.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Run::V2::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
header_params = {}
if request.service&.name
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?$}.match request.service.name
@@ -678,14 +687,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.delete_service.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Run::V2::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
header_params = {}
if request.name
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?$}.match request.name
@@ -772,14 +782,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.get_iam_policy.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Run::V2::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
header_params = {}
if request.resource
header_params["resource"] = request.resource
@@ -870,14 +881,15 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.set_iam_policy.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Run::V2::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
header_params = {}
if request.resource
header_params["resource"] = request.resource
@@ -963,13 +975,14 @@
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
# Customize the options with defaults
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
- # Set x-goog-api-client and x-goog-user-project headers
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::Run::V2::VERSION
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
header_params = {}
if request.resource
header_params["resource"] = request.resource