Skip to content

Commit 1de7dc1

Browse files
feat: Automated regeneration of workstations v1beta client (googleapis#27320)
Auto-created at 2026-07-12 11:19:35 +0000 using the toys pull request generator.
1 parent 5dbf868 commit 1de7dc1

6 files changed

Lines changed: 112 additions & 9 deletions

File tree

api_names_out.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438900,6 +438900,7 @@
438900438900
"/workstations:v1beta/OAuthToken/accessToken": access_token
438901438901
"/workstations:v1beta/OAuthToken/email": email
438902438902
"/workstations:v1beta/OAuthToken/expireTime": expire_time
438903+
"/workstations:v1beta/OAuthToken/expiresIn": expires_in
438903438904
"/workstations:v1beta/OAuthToken/scopes": scopes
438904438905
"/workstations:v1beta/Operation": operation
438905438906
"/workstations:v1beta/Operation/done": done
@@ -438967,6 +438968,9 @@
438967438968
"/workstations:v1beta/StopWorkstationRequest": stop_workstation_request
438968438969
"/workstations:v1beta/StopWorkstationRequest/etag": etag
438969438970
"/workstations:v1beta/StopWorkstationRequest/validateOnly": validate_only
438971+
"/workstations:v1beta/SuspendWorkstationRequest": suspend_workstation_request
438972+
"/workstations:v1beta/SuspendWorkstationRequest/etag": etag
438973+
"/workstations:v1beta/SuspendWorkstationRequest/validateOnly": validate_only
438970438974
"/workstations:v1beta/TestIamPermissionsRequest": test_iam_permissions_request
438971438975
"/workstations:v1beta/TestIamPermissionsRequest/permissions": permissions
438972438976
"/workstations:v1beta/TestIamPermissionsRequest/permissions/permission": permission
@@ -439056,6 +439060,7 @@
439056439060
"/workstations:v1beta/WorkstationConfig/grantWorkstationAdminRoleOnCreate": grant_workstation_admin_role_on_create
439057439061
"/workstations:v1beta/WorkstationConfig/host": host
439058439062
"/workstations:v1beta/WorkstationConfig/httpOptions": http_options
439063+
"/workstations:v1beta/WorkstationConfig/idleAction": idle_action
439059439064
"/workstations:v1beta/WorkstationConfig/idleTimeout": idle_timeout
439060439065
"/workstations:v1beta/WorkstationConfig/labels": labels
439061439066
"/workstations:v1beta/WorkstationConfig/labels/label": label
@@ -439189,6 +439194,8 @@
439189439194
"/workstations:v1beta/workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start/name": name
439190439195
"/workstations:v1beta/workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop": stop_workstation
439191439196
"/workstations:v1beta/workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop/name": name
439197+
"/workstations:v1beta/workstations.projects.locations.workstationClusters.workstationConfigs.workstations.suspend": suspend_workstation
439198+
"/workstations:v1beta/workstations.projects.locations.workstationClusters.workstationConfigs.workstations.suspend/name": name
439192439199
"/workstations:v1beta/workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions": test_workstation_iam_permissions
439193439200
? "/workstations:v1beta/workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions/resource"
439194439201
: resource

generated/google-apis-workstations_v1beta/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-workstations_v1beta
22

3+
### v0.52.0 (2026-07-12)
4+
5+
* Regenerated from discovery document revision 20260705
6+
37
### v0.51.0 (2026-06-21)
48

59
* Regenerated from discovery document revision 20260604

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

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,29 +1320,36 @@ def update!(**args)
13201320
end
13211321
end
13221322

1323-
# OAuth token.
1323+
# Represents an OAuth 2.0 access token and its associated metadata.
13241324
class OAuthToken
13251325
include Google::Apis::Core::Hashable
13261326

1327-
# Required. The OAuth token.
1327+
# Required. The OAuth 2.0 access token value.
13281328
# Corresponds to the JSON property `accessToken`
13291329
# @return [String]
13301330
attr_accessor :access_token
13311331

1332-
# Optional. The email address encapsulated in the OAuth token.
1332+
# Optional. The email address associated with the OAuth 2.0 access token.
13331333
# Corresponds to the JSON property `email`
13341334
# @return [String]
13351335
attr_accessor :email
13361336

13371337
# Optional. The time the OAuth access token will expire. This should be the time
13381338
# the access token was generated plus the expires_in offset returned from the
1339-
# Access Token Response.
1339+
# Access Token Response. Only one of `expire_time` or `expires_in` should be
1340+
# specified.
13401341
# Corresponds to the JSON property `expireTime`
13411342
# @return [String]
13421343
attr_accessor :expire_time
13431344

1344-
# Optional. The scopes encapsulated in the OAuth token. See https://developers.
1345-
# google.com/identity/protocols/oauth2/scopes for more information.
1345+
# Optional. The lifetime duration of the access token. Only one of `expire_time`
1346+
# or `expires_in` should be specified.
1347+
# Corresponds to the JSON property `expiresIn`
1348+
# @return [String]
1349+
attr_accessor :expires_in
1350+
1351+
# Optional. The scopes associated with the OAuth 2.0 access token. See https://
1352+
# developers.google.com/identity/protocols/oauth2/scopes for more information.
13461353
# Corresponds to the JSON property `scopes`
13471354
# @return [String]
13481355
attr_accessor :scopes
@@ -1356,6 +1363,7 @@ def update!(**args)
13561363
@access_token = args[:access_token] if args.key?(:access_token)
13571364
@email = args[:email] if args.key?(:email)
13581365
@expire_time = args[:expire_time] if args.key?(:expire_time)
1366+
@expires_in = args[:expires_in] if args.key?(:expires_in)
13591367
@scopes = args[:scopes] if args.key?(:scopes)
13601368
end
13611369
end
@@ -1696,7 +1704,7 @@ def update!(**args)
16961704
class PushCredentialsRequest
16971705
include Google::Apis::Core::Hashable
16981706

1699-
# OAuth token.
1707+
# Represents an OAuth 2.0 access token and its associated metadata.
17001708
# Corresponds to the JSON property `applicationDefaultCredentials`
17011709
# @return [Google::Apis::WorkstationsV1beta::OAuthToken]
17021710
attr_accessor :application_default_credentials
@@ -1945,6 +1953,34 @@ def update!(**args)
19451953
end
19461954
end
19471955

1956+
# Request message for SuspendWorkstation.
1957+
class SuspendWorkstationRequest
1958+
include Google::Apis::Core::Hashable
1959+
1960+
# Optional. If set, the request will be rejected if the latest version of the
1961+
# workstation on the server does not have this ETag.
1962+
# Corresponds to the JSON property `etag`
1963+
# @return [String]
1964+
attr_accessor :etag
1965+
1966+
# Optional. If set, validate the request and preview the result, but do not
1967+
# actually apply it.
1968+
# Corresponds to the JSON property `validateOnly`
1969+
# @return [Boolean]
1970+
attr_accessor :validate_only
1971+
alias_method :validate_only?, :validate_only
1972+
1973+
def initialize(**args)
1974+
update!(**args)
1975+
end
1976+
1977+
# Update properties of this object
1978+
def update!(**args)
1979+
@etag = args[:etag] if args.key?(:etag)
1980+
@validate_only = args[:validate_only] if args.key?(:validate_only)
1981+
end
1982+
end
1983+
19481984
# Request message for `TestIamPermissions` method.
19491985
class TestIamPermissionsRequest
19501986
include Google::Apis::Core::Hashable
@@ -2501,6 +2537,12 @@ class WorkstationConfig
25012537
# @return [Google::Apis::WorkstationsV1beta::HttpOptions]
25022538
attr_accessor :http_options
25032539

2540+
# Optional. The action to take when the workstation has been idle for the
2541+
# duration specified in idle_timeout. Defaults to STOP.
2542+
# Corresponds to the JSON property `idleAction`
2543+
# @return [String]
2544+
attr_accessor :idle_action
2545+
25042546
# Optional. Number of seconds to wait before automatically stopping a
25052547
# workstation after it last received user traffic. A value of `"0s"` indicates
25062548
# that Cloud Workstations VMs created with this configuration should never time
@@ -2627,6 +2669,7 @@ def update!(**args)
26272669
@grant_workstation_admin_role_on_create = args[:grant_workstation_admin_role_on_create] if args.key?(:grant_workstation_admin_role_on_create)
26282670
@host = args[:host] if args.key?(:host)
26292671
@http_options = args[:http_options] if args.key?(:http_options)
2672+
@idle_action = args[:idle_action] if args.key?(:idle_action)
26302673
@idle_timeout = args[:idle_timeout] if args.key?(:idle_timeout)
26312674
@labels = args[:labels] if args.key?(:labels)
26322675
@max_usable_workstations = args[:max_usable_workstations] if args.key?(:max_usable_workstations)

generated/google-apis-workstations_v1beta/lib/google/apis/workstations_v1beta/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 WorkstationsV1beta
1818
# Version of the google-apis-workstations_v1beta gem
19-
GEM_VERSION = "0.51.0"
19+
GEM_VERSION = "0.52.0"
2020

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

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

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
292292
include Google::Apis::Core::JsonObjectSupport
293293
end
294294

295+
class SuspendWorkstationRequest
296+
class Representation < Google::Apis::Core::JsonRepresentation; end
297+
298+
include Google::Apis::Core::JsonObjectSupport
299+
end
300+
295301
class TestIamPermissionsRequest
296302
class Representation < Google::Apis::Core::JsonRepresentation; end
297303

@@ -636,6 +642,7 @@ class Representation < Google::Apis::Core::JsonRepresentation
636642
property :access_token, as: 'accessToken'
637643
property :email, as: 'email'
638644
property :expire_time, as: 'expireTime'
645+
property :expires_in, as: 'expiresIn'
639646
property :scopes, as: 'scopes'
640647
end
641648
end
@@ -774,6 +781,14 @@ class Representation < Google::Apis::Core::JsonRepresentation
774781
end
775782
end
776783

784+
class SuspendWorkstationRequest
785+
# @private
786+
class Representation < Google::Apis::Core::JsonRepresentation
787+
property :etag, as: 'etag'
788+
property :validate_only, as: 'validateOnly'
789+
end
790+
end
791+
777792
class TestIamPermissionsRequest
778793
# @private
779794
class Representation < Google::Apis::Core::JsonRepresentation
@@ -889,6 +904,7 @@ class Representation < Google::Apis::Core::JsonRepresentation
889904

890905
property :http_options, as: 'httpOptions', class: Google::Apis::WorkstationsV1beta::HttpOptions, decorator: Google::Apis::WorkstationsV1beta::HttpOptions::Representation
891906

907+
property :idle_action, as: 'idleAction'
892908
property :idle_timeout, as: 'idleTimeout'
893909
hash :labels, as: 'labels'
894910
property :max_usable_workstations, as: 'maxUsableWorkstations'

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,39 @@ def stop_workstation(name, stop_workstation_request_object = nil, fields: nil, q
12071207
execute_or_queue_command(command, &block)
12081208
end
12091209

1210+
# Suspends a workstation to reduce costs.
1211+
# @param [String] name
1212+
# Required. Name of the workstation to suspend.
1213+
# @param [Google::Apis::WorkstationsV1beta::SuspendWorkstationRequest] suspend_workstation_request_object
1214+
# @param [String] fields
1215+
# Selector specifying which fields to include in a partial response.
1216+
# @param [String] quota_user
1217+
# Available to use for quota purposes for server-side applications. Can be any
1218+
# arbitrary string assigned to a user, but should not exceed 40 characters.
1219+
# @param [Google::Apis::RequestOptions] options
1220+
# Request-specific options
1221+
#
1222+
# @yield [result, err] Result & error if block supplied
1223+
# @yieldparam result [Google::Apis::WorkstationsV1beta::Operation] parsed result object
1224+
# @yieldparam err [StandardError] error object if request failed
1225+
#
1226+
# @return [Google::Apis::WorkstationsV1beta::Operation]
1227+
#
1228+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1229+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1230+
# @raise [Google::Apis::AuthorizationError] Authorization is required
1231+
def suspend_workstation(name, suspend_workstation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1232+
command = make_simple_command(:post, 'v1beta/{+name}:suspend', options)
1233+
command.request_representation = Google::Apis::WorkstationsV1beta::SuspendWorkstationRequest::Representation
1234+
command.request_object = suspend_workstation_request_object
1235+
command.response_representation = Google::Apis::WorkstationsV1beta::Operation::Representation
1236+
command.response_class = Google::Apis::WorkstationsV1beta::Operation
1237+
command.params['name'] = name unless name.nil?
1238+
command.query['fields'] = fields unless fields.nil?
1239+
command.query['quotaUser'] = quota_user unless quota_user.nil?
1240+
execute_or_queue_command(command, &block)
1241+
end
1242+
12101243
# Returns permissions that a caller has on the specified resource. If the
12111244
# resource does not exist, this will return an empty set of permissions, not a `
12121245
# NOT_FOUND` error. Note: This operation is designed to be used for building

0 commit comments

Comments
 (0)