Skip to content

Commit 5811931

Browse files
feat: Automated regeneration of cloudscheduler v1 client (#24789)
Auto-created at 2025-11-02 09:33:17 +0000 using the toys pull request generator.
1 parent 7c9908e commit 5811931

File tree

6 files changed

+167
-40
lines changed

6 files changed

+167
-40
lines changed

api_names_out.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79861,6 +79861,9 @@
7986179861
"/cloudscheduler:v1/AppEngineRouting/service": service
7986279862
"/cloudscheduler:v1/AppEngineRouting/version": version
7986379863
"/cloudscheduler:v1/CancelOperationRequest": cancel_operation_request
79864+
"/cloudscheduler:v1/CmekConfig": cmek_config
79865+
"/cloudscheduler:v1/CmekConfig/kmsKeyName": kms_key_name
79866+
"/cloudscheduler:v1/CmekConfig/name": name
7986479867
"/cloudscheduler:v1/Empty": empty
7986579868
"/cloudscheduler:v1/HttpTarget": http_target
7986679869
"/cloudscheduler:v1/HttpTarget/body": body
@@ -79970,6 +79973,8 @@
7997079973
"/cloudscheduler:v1/cloudscheduler.operations.list/pageToken": page_token
7997179974
"/cloudscheduler:v1/cloudscheduler.projects.locations.get": get_project_location
7997279975
"/cloudscheduler:v1/cloudscheduler.projects.locations.get/name": name
79976+
"/cloudscheduler:v1/cloudscheduler.projects.locations.getCmekConfig": get_project_location_cmek_config
79977+
"/cloudscheduler:v1/cloudscheduler.projects.locations.getCmekConfig/name": name
7997379978
"/cloudscheduler:v1/cloudscheduler.projects.locations.jobs.create": create_project_location_job
7997479979
"/cloudscheduler:v1/cloudscheduler.projects.locations.jobs.create/parent": parent
7997579980
"/cloudscheduler:v1/cloudscheduler.projects.locations.jobs.delete": delete_project_location_job
@@ -80007,6 +80012,9 @@
8000780012
"/cloudscheduler:v1/cloudscheduler.projects.locations.operations.list/pageSize": page_size
8000880013
"/cloudscheduler:v1/cloudscheduler.projects.locations.operations.list/pageToken": page_token
8000980014
"/cloudscheduler:v1/cloudscheduler.projects.locations.operations.list/returnPartialSuccess": return_partial_success
80015+
"/cloudscheduler:v1/cloudscheduler.projects.locations.updateCmekConfig": update_project_location_cmek_config
80016+
"/cloudscheduler:v1/cloudscheduler.projects.locations.updateCmekConfig/name": name
80017+
"/cloudscheduler:v1/cloudscheduler.projects.locations.updateCmekConfig/updateMask": update_mask
8001080018
"/cloudscheduler:v1/fields": fields
8001180019
"/cloudscheduler:v1/key": key
8001280020
"/cloudscheduler:v1/quotaUser": quota_user

generated/google-apis-cloudscheduler_v1/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release history for google-apis-cloudscheduler_v1
22

3+
### v0.42.0 (2025-11-02)
4+
5+
* Regenerated from discovery document revision 20251022
6+
37
### v0.41.0 (2025-10-05)
48

59
* Regenerated from discovery document revision 20250925

generated/google-apis-cloudscheduler_v1/lib/google/apis/cloudscheduler_v1/classes.rb

Lines changed: 61 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,36 @@ def update!(**args)
190190
end
191191
end
192192

193+
# Describes the project/location configuration of Cloud Scheduler Resources.
194+
class CmekConfig
195+
include Google::Apis::Core::Hashable
196+
197+
# Optional. Resource name of the Cloud KMS key, of the form `projects/PROJECT_ID/
198+
# locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID`, that will be
199+
# used to encrypt Jobs in the region. Setting this as blank will turn off CMEK
200+
# encryption.
201+
# Corresponds to the JSON property `kmsKeyName`
202+
# @return [String]
203+
attr_accessor :kms_key_name
204+
205+
# Identifier. The config resource name which includes the project and location
206+
# and must end in 'cmekConfig', in the format projects/PROJECT_ID/locations/
207+
# LOCATION_ID/cmekConfig`
208+
# Corresponds to the JSON property `name`
209+
# @return [String]
210+
attr_accessor :name
211+
212+
def initialize(**args)
213+
update!(**args)
214+
end
215+
216+
# Update properties of this object
217+
def update!(**args)
218+
@kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
219+
@name = args[:name] if args.key?(:name)
220+
end
221+
end
222+
193223
# A generic empty message that you can re-use to avoid defining duplicated empty
194224
# messages in your APIs. A typical example is to use it as the request or the
195225
# response type of an API method. For instance: service Foo ` rpc Bar(google.
@@ -344,12 +374,13 @@ class Job
344374
# The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/
345375
# JOB_ID`. * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
346376
# hyphens (-), colons (:), or periods (.). For more information, see [
347-
# Identifying projects](https://cloud.google.com/resource-manager/docs/creating-
348-
# managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID
349-
# for the job's location. The list of available locations can be obtained by
350-
# calling ListLocations. For more information, see https://cloud.google.com/
351-
# about/locations/. * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-
352-
# 9]), hyphens (-), or underscores (_). The maximum length is 500 characters.
377+
# Identifying projects](/resource-manager/docs/creating-managing-projects#
378+
# identifying_projects) * `LOCATION_ID` is the canonical ID for the job's
379+
# location. The list of available locations can be obtained by calling [
380+
# locations.list](/scheduler/docs/reference/rest/v1/projects.locations/list).
381+
# For more information, see [Cloud Scheduler locations](/scheduler/docs/
382+
# locations). * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
383+
# hyphens (-), or underscores (_). The maximum length is 500 characters.
353384
# Corresponds to the JSON property `name`
354385
# @return [String]
355386
attr_accessor :name
@@ -361,10 +392,10 @@ class Job
361392
attr_accessor :pubsub_target
362393

363394
# Settings that determine the retry behavior. For more information, see [Retry
364-
# jobs](https://cloud.google.com/scheduler/docs/configuring/retry-jobs). By
365-
# default, if a job does not complete successfully (meaning that an
366-
# acknowledgement is not received from the handler, then it will be retried with
367-
# exponential backoff according to the settings in RetryConfig.
395+
# jobs](/scheduler/docs/configuring/retry-jobs). By default, if a job does not
396+
# complete successfully (meaning that an acknowledgement is not received from
397+
# the handler, then it will be retried with exponential backoff according to the
398+
# settings in RetryConfig.
368399
# Corresponds to the JSON property `retryConfig`
369400
# @return [Google::Apis::CloudschedulerV1::RetryConfig]
370401
attr_accessor :retry_config
@@ -379,19 +410,19 @@ class Job
379410
# Required, except when used with UpdateJob. Describes the schedule on which the
380411
# job will be executed. The schedule can be either of the following types: * [
381412
# Crontab](https://en.wikipedia.org/wiki/Cron#Overview) * English-like [schedule]
382-
# (https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) As a
383-
# general rule, execution `n + 1` of a job will not begin until execution `n`
384-
# has finished. Cloud Scheduler will never allow two simultaneously outstanding
385-
# executions. For example, this implies that if the `n+1`th execution is
386-
# scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`
387-
# th execution will not start until `16:15`. A scheduled start time will be
388-
# delayed if the previous execution has not ended when its scheduled time occurs.
389-
# If retry_count > 0 and a job attempt fails, the job will be tried a total of
390-
# retry_count times, with exponential backoff, until the next scheduled start
391-
# time. If retry_count is 0, a job attempt will not be retried if it fails.
392-
# Instead the Cloud Scheduler system will wait for the next scheduled execution
393-
# time. Setting retry_count to 0 does not prevent failed jobs from running
394-
# according to schedule after the failure.
413+
# (/scheduler/docs/configuring/cron-job-schedules) As a general rule, execution `
414+
# n + 1` of a job will not begin until execution `n` has finished. Cloud
415+
# Scheduler will never allow two simultaneously outstanding executions. For
416+
# example, this implies that if the `n+1`th execution is scheduled to run at 16:
417+
# 00 but the `n`th execution takes until 16:15, the `n+1`th execution will not
418+
# start until `16:15`. A scheduled start time will be delayed if the previous
419+
# execution has not ended when its scheduled time occurs. If retry_count > 0 and
420+
# a job attempt fails, the job will be tried a total of retry_count times, with
421+
# exponential backoff, until the next scheduled start time. If retry_count is 0,
422+
# a job attempt will not be retried if it fails. Instead the Cloud Scheduler
423+
# system will wait for the next scheduled execution time. Setting retry_count to
424+
# 0 does not prevent failed jobs from running according to schedule after the
425+
# failure.
395426
# Corresponds to the JSON property `schedule`
396427
# @return [String]
397428
attr_accessor :schedule
@@ -905,10 +936,10 @@ def update!(**args)
905936
end
906937

907938
# Settings that determine the retry behavior. For more information, see [Retry
908-
# jobs](https://cloud.google.com/scheduler/docs/configuring/retry-jobs). By
909-
# default, if a job does not complete successfully (meaning that an
910-
# acknowledgement is not received from the handler, then it will be retried with
911-
# exponential backoff according to the settings in RetryConfig.
939+
# jobs](/scheduler/docs/configuring/retry-jobs). By default, if a job does not
940+
# complete successfully (meaning that an acknowledgement is not received from
941+
# the handler, then it will be retried with exponential backoff according to the
942+
# settings in RetryConfig.
912943
class RetryConfig
913944
include Google::Apis::Core::Hashable
914945

@@ -921,9 +952,9 @@ class RetryConfig
921952
# The time between retries will double `max_doublings` times. A job's retry
922953
# interval starts at min_backoff_duration, then doubles `max_doublings` times,
923954
# then increases linearly, and finally retries at intervals of
924-
# max_backoff_duration up to retry_count times. For examples, see [Retry jobs](
925-
# https://cloud.google.com/scheduler/docs/configuring/retry-jobs#max-doublings).
926-
# The default value of this field is 5.
955+
# max_backoff_duration up to retry_count times. For examples, see [Retry jobs](/
956+
# scheduler/docs/configuring/retry-jobs#max-doublings). The default value of
957+
# this field is 5.
927958
# Corresponds to the JSON property `maxDoublings`
928959
# @return [Fixnum]
929960
attr_accessor :max_doublings

generated/google-apis-cloudscheduler_v1/lib/google/apis/cloudscheduler_v1/gem_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module CloudschedulerV1
1818
# Version of the google-apis-cloudscheduler_v1 gem
19-
GEM_VERSION = "0.41.0"
19+
GEM_VERSION = "0.42.0"
2020

2121
# Version of the code generator used to generate this client
2222
GENERATOR_VERSION = "0.18.0"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20250925"
25+
REVISION = "20251022"
2626
end
2727
end
2828
end

generated/google-apis-cloudscheduler_v1/lib/google/apis/cloudscheduler_v1/representations.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
4040
include Google::Apis::Core::JsonObjectSupport
4141
end
4242

43+
class CmekConfig
44+
class Representation < Google::Apis::Core::JsonRepresentation; end
45+
46+
include Google::Apis::Core::JsonObjectSupport
47+
end
48+
4349
class Empty
4450
class Representation < Google::Apis::Core::JsonRepresentation; end
4551

@@ -176,6 +182,14 @@ class Representation < Google::Apis::Core::JsonRepresentation
176182
end
177183
end
178184

185+
class CmekConfig
186+
# @private
187+
class Representation < Google::Apis::Core::JsonRepresentation
188+
property :kms_key_name, as: 'kmsKeyName'
189+
property :name, as: 'name'
190+
end
191+
end
192+
179193
class Empty
180194
# @private
181195
class Representation < Google::Apis::Core::JsonRepresentation

generated/google-apis-cloudscheduler_v1/lib/google/apis/cloudscheduler_v1/service.rb

Lines changed: 78 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,43 @@ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &bloc
8181
execute_or_queue_command(command, &block)
8282
end
8383

84+
# Gets the Scheduler config in the project/region.
85+
# @param [String] name
86+
# Required. The config name. For example: projects/PROJECT_ID/locations/
87+
# LOCATION_ID/cmekConfig
88+
# @param [String] fields
89+
# Selector specifying which fields to include in a partial response.
90+
# @param [String] quota_user
91+
# Available to use for quota purposes for server-side applications. Can be any
92+
# arbitrary string assigned to a user, but should not exceed 40 characters.
93+
# @param [Google::Apis::RequestOptions] options
94+
# Request-specific options
95+
#
96+
# @yield [result, err] Result & error if block supplied
97+
# @yieldparam result [Google::Apis::CloudschedulerV1::CmekConfig] parsed result object
98+
# @yieldparam err [StandardError] error object if request failed
99+
#
100+
# @return [Google::Apis::CloudschedulerV1::CmekConfig]
101+
#
102+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
103+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
104+
# @raise [Google::Apis::AuthorizationError] Authorization is required
105+
def get_project_location_cmek_config(name, fields: nil, quota_user: nil, options: nil, &block)
106+
command = make_simple_command(:get, 'v1/{+name}', options)
107+
command.response_representation = Google::Apis::CloudschedulerV1::CmekConfig::Representation
108+
command.response_class = Google::Apis::CloudschedulerV1::CmekConfig
109+
command.params['name'] = name unless name.nil?
110+
command.query['fields'] = fields unless fields.nil?
111+
command.query['quotaUser'] = quota_user unless quota_user.nil?
112+
execute_or_queue_command(command, &block)
113+
end
114+
84115
# Lists information about the supported locations for this service.
85116
# @param [String] name
86117
# The resource that owns the locations collection, if applicable.
87118
# @param [Array<String>, String] extra_location_types
88-
# Optional. Unless explicitly documented otherwise, don't use this unsupported
89-
# field which is primarily intended for internal usage.
119+
# Optional. Do not use this field. It is unsupported and is ignored unless
120+
# explicitly documented otherwise. This is primarily for internal usage.
90121
# @param [String] filter
91122
# A filter to narrow down results to a preferred subset. The filtering language
92123
# accepts strings like `"displayName=tokyo"`, and is documented in more detail
@@ -128,6 +159,44 @@ def list_project_locations(name, extra_location_types: nil, filter: nil, page_si
128159
execute_or_queue_command(command, &block)
129160
end
130161

162+
# Initializes or Updates the a scheduler config.
163+
# @param [String] name
164+
# Identifier. The config resource name which includes the project and location
165+
# and must end in 'cmekConfig', in the format projects/PROJECT_ID/locations/
166+
# LOCATION_ID/cmekConfig`
167+
# @param [Google::Apis::CloudschedulerV1::CmekConfig] cmek_config_object
168+
# @param [String] update_mask
169+
# Optional. List of fields to be updated in this request.
170+
# @param [String] fields
171+
# Selector specifying which fields to include in a partial response.
172+
# @param [String] quota_user
173+
# Available to use for quota purposes for server-side applications. Can be any
174+
# arbitrary string assigned to a user, but should not exceed 40 characters.
175+
# @param [Google::Apis::RequestOptions] options
176+
# Request-specific options
177+
#
178+
# @yield [result, err] Result & error if block supplied
179+
# @yieldparam result [Google::Apis::CloudschedulerV1::Operation] parsed result object
180+
# @yieldparam err [StandardError] error object if request failed
181+
#
182+
# @return [Google::Apis::CloudschedulerV1::Operation]
183+
#
184+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
185+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
186+
# @raise [Google::Apis::AuthorizationError] Authorization is required
187+
def update_project_location_cmek_config(name, cmek_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
188+
command = make_simple_command(:patch, 'v1/{+name}', options)
189+
command.request_representation = Google::Apis::CloudschedulerV1::CmekConfig::Representation
190+
command.request_object = cmek_config_object
191+
command.response_representation = Google::Apis::CloudschedulerV1::Operation::Representation
192+
command.response_class = Google::Apis::CloudschedulerV1::Operation
193+
command.params['name'] = name unless name.nil?
194+
command.query['updateMask'] = update_mask unless update_mask.nil?
195+
command.query['fields'] = fields unless fields.nil?
196+
command.query['quotaUser'] = quota_user unless quota_user.nil?
197+
execute_or_queue_command(command, &block)
198+
end
199+
131200
# Creates a job.
132201
# @param [String] parent
133202
# Required. The location name. For example: `projects/PROJECT_ID/locations/
@@ -276,12 +345,13 @@ def list_project_location_jobs(parent, page_size: nil, page_token: nil, fields:
276345
# The job name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/jobs/
277346
# JOB_ID`. * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
278347
# hyphens (-), colons (:), or periods (.). For more information, see [
279-
# Identifying projects](https://cloud.google.com/resource-manager/docs/creating-
280-
# managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID
281-
# for the job's location. The list of available locations can be obtained by
282-
# calling ListLocations. For more information, see https://cloud.google.com/
283-
# about/locations/. * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-
284-
# 9]), hyphens (-), or underscores (_). The maximum length is 500 characters.
348+
# Identifying projects](/resource-manager/docs/creating-managing-projects#
349+
# identifying_projects) * `LOCATION_ID` is the canonical ID for the job's
350+
# location. The list of available locations can be obtained by calling [
351+
# locations.list](/scheduler/docs/reference/rest/v1/projects.locations/list).
352+
# For more information, see [Cloud Scheduler locations](/scheduler/docs/
353+
# locations). * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
354+
# hyphens (-), or underscores (_). The maximum length is 500 characters.
285355
# @param [Google::Apis::CloudschedulerV1::Job] job_object
286356
# @param [String] update_mask
287357
# A mask used to specify which fields of the job are being updated.

0 commit comments

Comments
 (0)