Skip to content

Commit 0e7fc6f

Browse files
feat: Automated regeneration of drive v3 client (googleapis#20563)
Co-authored-by: Yoshi Automation Bot <[email protected]>
1 parent e74c601 commit 0e7fc6f

File tree

6 files changed

+183
-85
lines changed

6 files changed

+183
-85
lines changed

api_names_out.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213527,6 +213527,12 @@
213527213527
"/drive:v3/ReplyList/nextPageToken": next_page_token
213528213528
"/drive:v3/ReplyList/replies": replies
213529213529
"/drive:v3/ReplyList/replies/reply": reply
213530+
"/drive:v3/ResolveAccessProposalRequest": resolve_access_proposal_request
213531+
"/drive:v3/ResolveAccessProposalRequest/action": action
213532+
"/drive:v3/ResolveAccessProposalRequest/role": role
213533+
"/drive:v3/ResolveAccessProposalRequest/role/role": role
213534+
"/drive:v3/ResolveAccessProposalRequest/sendNotification": send_notification
213535+
"/drive:v3/ResolveAccessProposalRequest/view": view
213530213536
"/drive:v3/Revision": revision
213531213537
"/drive:v3/Revision/exportLinks": export_links
213532213538
"/drive:v3/Revision/exportLinks/export_link": export_link
@@ -213613,6 +213619,16 @@
213613213619
"/drive:v3/User/permissionId": permission_id
213614213620
"/drive:v3/User/photoLink": photo_link
213615213621
"/drive:v3/drive.about.get": get_about
213622+
"/drive:v3/drive.accessproposals.get": get_accessproposal
213623+
"/drive:v3/drive.accessproposals.get/fileId": file_id
213624+
"/drive:v3/drive.accessproposals.get/proposalId": proposal_id
213625+
"/drive:v3/drive.accessproposals.list": list_accessproposals
213626+
"/drive:v3/drive.accessproposals.list/fileId": file_id
213627+
"/drive:v3/drive.accessproposals.list/pageSize": page_size
213628+
"/drive:v3/drive.accessproposals.list/pageToken": page_token
213629+
"/drive:v3/drive.accessproposals.resolve": resolve_accessproposal_access_proposal
213630+
"/drive:v3/drive.accessproposals.resolve/fileId": file_id
213631+
"/drive:v3/drive.accessproposals.resolve/proposalId": proposal_id
213616213632
"/drive:v3/drive.apps.get": get_app
213617213633
"/drive:v3/drive.apps.get/appId": app_id
213618213634
"/drive:v3/drive.apps.list": list_apps

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

3+
### v0.60.0 (2024-11-17)
4+
5+
* Regenerated from discovery document revision 20241110
6+
37
### v0.59.0 (2024-10-20)
48

59
* Regenerated from discovery document revision 20241014

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3416,6 +3416,47 @@ def update!(**args)
34163416
end
34173417
end
34183418

3419+
# Request message for resolving an AccessProposal on a file.
3420+
class ResolveAccessProposalRequest
3421+
include Google::Apis::Core::Hashable
3422+
3423+
# Required. The action to take on the AccessProposal.
3424+
# Corresponds to the JSON property `action`
3425+
# @return [String]
3426+
attr_accessor :action
3427+
3428+
# Optional. The roles the approver has allowed, if any. Note: This field is
3429+
# required for the `ACCEPT` action.
3430+
# Corresponds to the JSON property `role`
3431+
# @return [Array<String>]
3432+
attr_accessor :role
3433+
3434+
# Optional. Whether to send an email to the requester when the AccessProposal is
3435+
# denied or accepted.
3436+
# Corresponds to the JSON property `sendNotification`
3437+
# @return [Boolean]
3438+
attr_accessor :send_notification
3439+
alias_method :send_notification?, :send_notification
3440+
3441+
# Optional. Indicates the view for this access proposal. This should only be set
3442+
# when the proposal belongs to a view. `published` is the only supported value.
3443+
# Corresponds to the JSON property `view`
3444+
# @return [String]
3445+
attr_accessor :view
3446+
3447+
def initialize(**args)
3448+
update!(**args)
3449+
end
3450+
3451+
# Update properties of this object
3452+
def update!(**args)
3453+
@action = args[:action] if args.key?(:action)
3454+
@role = args[:role] if args.key?(:role)
3455+
@send_notification = args[:send_notification] if args.key?(:send_notification)
3456+
@view = args[:view] if args.key?(:view)
3457+
end
3458+
end
3459+
34193460
# The metadata for a revision to a file. Some resource methods (such as `
34203461
# revisions.update`) require a `revisionId`. Use the `revisions.list` method to
34213462
# retrieve the ID for a revision.

generated/google-apis-drive_v3/lib/google/apis/drive_v3/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 DriveV3
1818
# Version of the google-apis-drive_v3 gem
19-
GEM_VERSION = "0.59.0"
19+
GEM_VERSION = "0.60.0"
2020

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

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

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
316316
include Google::Apis::Core::JsonObjectSupport
317317
end
318318

319+
class ResolveAccessProposalRequest
320+
class Representation < Google::Apis::Core::JsonRepresentation; end
321+
322+
include Google::Apis::Core::JsonObjectSupport
323+
end
324+
319325
class Revision
320326
class Representation < Google::Apis::Core::JsonRepresentation; end
321327

@@ -1126,6 +1132,16 @@ class Representation < Google::Apis::Core::JsonRepresentation
11261132
end
11271133
end
11281134

1135+
class ResolveAccessProposalRequest
1136+
# @private
1137+
class Representation < Google::Apis::Core::JsonRepresentation
1138+
property :action, as: 'action'
1139+
collection :role, as: 'role'
1140+
property :send_notification, as: 'sendNotification'
1141+
property :view, as: 'view'
1142+
end
1143+
end
1144+
11291145
class Revision
11301146
# @private
11311147
class Representation < Google::Apis::Core::JsonRepresentation

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

Lines changed: 104 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,110 @@ def get_about(fields: nil, quota_user: nil, options: nil, &block)
7878
execute_or_queue_command(command, &block)
7979
end
8080

81+
# Retrieves an AccessProposal by ID.
82+
# @param [String] file_id
83+
# Required. The id of the item the request is on.
84+
# @param [String] proposal_id
85+
# Required. The id of the access proposal to resolve.
86+
# @param [String] fields
87+
# Selector specifying which fields to include in a partial response.
88+
# @param [String] quota_user
89+
# Available to use for quota purposes for server-side applications. Can be any
90+
# arbitrary string assigned to a user, but should not exceed 40 characters.
91+
# @param [Google::Apis::RequestOptions] options
92+
# Request-specific options
93+
#
94+
# @yield [result, err] Result & error if block supplied
95+
# @yieldparam result [Google::Apis::DriveV3::AccessProposal] parsed result object
96+
# @yieldparam err [StandardError] error object if request failed
97+
#
98+
# @return [Google::Apis::DriveV3::AccessProposal]
99+
#
100+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
101+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
102+
# @raise [Google::Apis::AuthorizationError] Authorization is required
103+
def get_accessproposal(file_id, proposal_id, fields: nil, quota_user: nil, options: nil, &block)
104+
command = make_simple_command(:get, 'files/{fileId}/accessproposals/{proposalId}', options)
105+
command.response_representation = Google::Apis::DriveV3::AccessProposal::Representation
106+
command.response_class = Google::Apis::DriveV3::AccessProposal
107+
command.params['fileId'] = file_id unless file_id.nil?
108+
command.params['proposalId'] = proposal_id unless proposal_id.nil?
109+
command.query['fields'] = fields unless fields.nil?
110+
command.query['quotaUser'] = quota_user unless quota_user.nil?
111+
execute_or_queue_command(command, &block)
112+
end
113+
114+
# List the AccessProposals on a file. Note: Only approvers are able to list
115+
# AccessProposals on a file. If the user is not an approver, returns a 403.
116+
# @param [String] file_id
117+
# Required. The id of the item the request is on.
118+
# @param [Fixnum] page_size
119+
# Optional. The number of results per page
120+
# @param [String] page_token
121+
# Optional. The continuation token on the list of access requests.
122+
# @param [String] fields
123+
# Selector specifying which fields to include in a partial response.
124+
# @param [String] quota_user
125+
# Available to use for quota purposes for server-side applications. Can be any
126+
# arbitrary string assigned to a user, but should not exceed 40 characters.
127+
# @param [Google::Apis::RequestOptions] options
128+
# Request-specific options
129+
#
130+
# @yield [result, err] Result & error if block supplied
131+
# @yieldparam result [Google::Apis::DriveV3::ListAccessProposalsResponse] parsed result object
132+
# @yieldparam err [StandardError] error object if request failed
133+
#
134+
# @return [Google::Apis::DriveV3::ListAccessProposalsResponse]
135+
#
136+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
137+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
138+
# @raise [Google::Apis::AuthorizationError] Authorization is required
139+
def list_accessproposals(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
140+
command = make_simple_command(:get, 'files/{fileId}/accessproposals', options)
141+
command.response_representation = Google::Apis::DriveV3::ListAccessProposalsResponse::Representation
142+
command.response_class = Google::Apis::DriveV3::ListAccessProposalsResponse
143+
command.params['fileId'] = file_id unless file_id.nil?
144+
command.query['pageSize'] = page_size unless page_size.nil?
145+
command.query['pageToken'] = page_token unless page_token.nil?
146+
command.query['fields'] = fields unless fields.nil?
147+
command.query['quotaUser'] = quota_user unless quota_user.nil?
148+
execute_or_queue_command(command, &block)
149+
end
150+
151+
# Used to approve or deny an Access Proposal.
152+
# @param [String] file_id
153+
# Required. The id of the item the request is on.
154+
# @param [String] proposal_id
155+
# Required. The id of the access proposal to resolve.
156+
# @param [Google::Apis::DriveV3::ResolveAccessProposalRequest] resolve_access_proposal_request_object
157+
# @param [String] fields
158+
# Selector specifying which fields to include in a partial response.
159+
# @param [String] quota_user
160+
# Available to use for quota purposes for server-side applications. Can be any
161+
# arbitrary string assigned to a user, but should not exceed 40 characters.
162+
# @param [Google::Apis::RequestOptions] options
163+
# Request-specific options
164+
#
165+
# @yield [result, err] Result & error if block supplied
166+
# @yieldparam result [NilClass] No result returned for this method
167+
# @yieldparam err [StandardError] error object if request failed
168+
#
169+
# @return [void]
170+
#
171+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
172+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
173+
# @raise [Google::Apis::AuthorizationError] Authorization is required
174+
def resolve_accessproposal_access_proposal(file_id, proposal_id, resolve_access_proposal_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
175+
command = make_simple_command(:post, 'files/{fileId}/accessproposals/{proposalId}:resolve', options)
176+
command.request_representation = Google::Apis::DriveV3::ResolveAccessProposalRequest::Representation
177+
command.request_object = resolve_access_proposal_request_object
178+
command.params['fileId'] = file_id unless file_id.nil?
179+
command.params['proposalId'] = proposal_id unless proposal_id.nil?
180+
command.query['fields'] = fields unless fields.nil?
181+
command.query['quotaUser'] = quota_user unless quota_user.nil?
182+
execute_or_queue_command(command, &block)
183+
end
184+
81185
# Gets a specific app.
82186
# @param [String] app_id
83187
# The ID of the app.
@@ -1544,89 +1648,6 @@ def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, include_la
15441648
execute_or_queue_command(command, &block)
15451649
end
15461650

1547-
# List the AccessProposals on a file. Note: Only approvers are able to list
1548-
# AccessProposals on a file. If the user is not an approver, returns a 403.
1549-
# @param [String] file_id
1550-
# Required. The id of the item the request is on.
1551-
# @param [Fixnum] page_size
1552-
# Optional. The number of results per page
1553-
# @param [String] page_token
1554-
# Optional. The continuation token on the list of access requests.
1555-
# @param [String] fields
1556-
# Selector specifying which fields to include in a partial response.
1557-
# @param [String] quota_user
1558-
# Available to use for quota purposes for server-side applications. Can be any
1559-
# arbitrary string assigned to a user, but should not exceed 40 characters.
1560-
# @param [Google::Apis::RequestOptions] options
1561-
# Request-specific options
1562-
#
1563-
# @yield [result, err] Result & error if block supplied
1564-
# @yieldparam result [Google::Apis::DriveV3::ListAccessProposalsResponse] parsed result object
1565-
# @yieldparam err [StandardError] error object if request failed
1566-
#
1567-
# @return [Google::Apis::DriveV3::ListAccessProposalsResponse]
1568-
#
1569-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1570-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1571-
# @raise [Google::Apis::AuthorizationError] Authorization is required
1572-
def list_file_accessproposals(file_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1573-
command = make_simple_command(:get, 'files/{fileId}/accessproposals', options)
1574-
command.response_representation = Google::Apis::DriveV3::ListAccessProposalsResponse::Representation
1575-
command.response_class = Google::Apis::DriveV3::ListAccessProposalsResponse
1576-
command.params['fileId'] = file_id unless file_id.nil?
1577-
command.query['pageSize'] = page_size unless page_size.nil?
1578-
command.query['pageToken'] = page_token unless page_token.nil?
1579-
command.query['fields'] = fields unless fields.nil?
1580-
command.query['quotaUser'] = quota_user unless quota_user.nil?
1581-
execute_or_queue_command(command, &block)
1582-
end
1583-
1584-
# Used to approve or deny an Access Proposal.
1585-
# @param [String] file_id
1586-
# Required. The id of the item the request is on.
1587-
# @param [String] proposal_id
1588-
# Required. The id of the access proposal to resolve.
1589-
# @param [String] action
1590-
# Required. The action to take on the AccessProposal.
1591-
# @param [Array<String>, String] role
1592-
# Optional. The roles the approver has allowed, if any. Note: This field is
1593-
# required for the `ACCEPT` action.
1594-
# @param [Boolean] send_notification
1595-
# Optional. Whether to send an email to the requester when the AccessProposal is
1596-
# denied or accepted.
1597-
# @param [String] view
1598-
# Optional. Indicates the view for this access proposal. This should only be set
1599-
# when the proposal belongs to a view. `published` is the only supported value.
1600-
# @param [String] fields
1601-
# Selector specifying which fields to include in a partial response.
1602-
# @param [String] quota_user
1603-
# Available to use for quota purposes for server-side applications. Can be any
1604-
# arbitrary string assigned to a user, but should not exceed 40 characters.
1605-
# @param [Google::Apis::RequestOptions] options
1606-
# Request-specific options
1607-
#
1608-
# @yield [result, err] Result & error if block supplied
1609-
# @yieldparam result [NilClass] No result returned for this method
1610-
# @yieldparam err [StandardError] error object if request failed
1611-
#
1612-
# @return [void]
1613-
#
1614-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1615-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1616-
# @raise [Google::Apis::AuthorizationError] Authorization is required
1617-
def resolve_file_accessproposal(file_id, proposal_id, action: nil, role: nil, send_notification: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1618-
command = make_simple_command(:post, 'files/{fileId}/accessproposals/{proposalId}:resolve', options)
1619-
command.params['fileId'] = file_id unless file_id.nil?
1620-
command.params['proposalId'] = proposal_id unless proposal_id.nil?
1621-
command.query['action'] = action unless action.nil?
1622-
command.query['role'] = role unless role.nil?
1623-
command.query['sendNotification'] = send_notification unless send_notification.nil?
1624-
command.query['view'] = view unless view.nil?
1625-
command.query['fields'] = fields unless fields.nil?
1626-
command.query['quotaUser'] = quota_user unless quota_user.nil?
1627-
execute_or_queue_command(command, &block)
1628-
end
1629-
16301651
# Starts asynchronous cancellation on a long-running operation. The server makes
16311652
# a best effort to cancel the operation, but success is not guaranteed. If the
16321653
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.

0 commit comments

Comments
 (0)