google-apis-drive_v3 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 853a577026fedc1b9ecb5d8b677b7953875c41fb07462308d40669dddaaa4c86
4
+ data.tar.gz: 2218dcb4cb151603c6f4d2906d13fff4e550937878a55fa4b86f3141198ee535
5
+ SHA512:
6
+ metadata.gz: 945621a40f0b440a8b0ac210ff49e5693fa5649ae005b7dac513227d6d40c7ace628aeb17c4dbf1c0667a36b8bc8bdadf71cd478a335c338561ac316cf93c605
7
+ data.tar.gz: caa3c35c2e88e5f4afa408d9a7bc2e07f590fb900f4fe10da6347ff1cbf7fa3f9505ae71061d5654361c8635d782e986e268c1ae97514197940de79529e4eccb
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-drive_v3
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/drive_v3/*.rb
9
+ lib/google/apis/drive_v3.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-drive_v3
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201130
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V3 of the Drive API
2
+
3
+ This is a simple client library for version V3 of the Drive API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/drive.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-drive_v3', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-drive_v3
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/drive_v3"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::DriveV3::DriveService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Drive service in particular.)
67
+
68
+ For reference information on specific calls in the Drive API, see the {Google::Apis::DriveV3::DriveService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-drive_v3`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://developers.google.com/drive/) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/drive_v3"
@@ -0,0 +1,58 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/drive_v3/service.rb'
16
+ require 'google/apis/drive_v3/classes.rb'
17
+ require 'google/apis/drive_v3/representations.rb'
18
+ require 'google/apis/drive_v3/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Drive API
23
+ #
24
+ # Manages files in Drive including uploading, downloading, searching, detecting
25
+ # changes, and updating sharing permissions.
26
+ #
27
+ # @see https://developers.google.com/drive/
28
+ module DriveV3
29
+ # Version of the Drive API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V3'
32
+
33
+ # See, edit, create, and delete all of your Google Drive files
34
+ AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
35
+
36
+ # View and manage its own configuration data in your Google Drive
37
+ AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata'
38
+
39
+ # View and manage Google Drive files and folders that you have opened or created with this app
40
+ AUTH_DRIVE_FILE = 'https://www.googleapis.com/auth/drive.file'
41
+
42
+ # View and manage metadata of files in your Google Drive
43
+ AUTH_DRIVE_METADATA = 'https://www.googleapis.com/auth/drive.metadata'
44
+
45
+ # View metadata for files in your Google Drive
46
+ AUTH_DRIVE_METADATA_READONLY = 'https://www.googleapis.com/auth/drive.metadata.readonly'
47
+
48
+ # View the photos, videos and albums in your Google Photos
49
+ AUTH_DRIVE_PHOTOS_READONLY = 'https://www.googleapis.com/auth/drive.photos.readonly'
50
+
51
+ # See and download all your Google Drive files
52
+ AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly'
53
+
54
+ # Modify your Google Apps Script scripts' behavior
55
+ AUTH_DRIVE_SCRIPTS = 'https://www.googleapis.com/auth/drive.scripts'
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,3038 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module DriveV3
24
+
25
+ # Information about the user, the user's Drive, and system capabilities.
26
+ class About
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Whether the user has installed the requesting app.
30
+ # Corresponds to the JSON property `appInstalled`
31
+ # @return [Boolean]
32
+ attr_accessor :app_installed
33
+ alias_method :app_installed?, :app_installed
34
+
35
+ # Whether the user can create shared drives.
36
+ # Corresponds to the JSON property `canCreateDrives`
37
+ # @return [Boolean]
38
+ attr_accessor :can_create_drives
39
+ alias_method :can_create_drives?, :can_create_drives
40
+
41
+ # Deprecated - use canCreateDrives instead.
42
+ # Corresponds to the JSON property `canCreateTeamDrives`
43
+ # @return [Boolean]
44
+ attr_accessor :can_create_team_drives
45
+ alias_method :can_create_team_drives?, :can_create_team_drives
46
+
47
+ # A list of themes that are supported for shared drives.
48
+ # Corresponds to the JSON property `driveThemes`
49
+ # @return [Array<Google::Apis::DriveV3::About::DriveTheme>]
50
+ attr_accessor :drive_themes
51
+
52
+ # A map of source MIME type to possible targets for all supported exports.
53
+ # Corresponds to the JSON property `exportFormats`
54
+ # @return [Hash<String,Array<String>>]
55
+ attr_accessor :export_formats
56
+
57
+ # The currently supported folder colors as RGB hex strings.
58
+ # Corresponds to the JSON property `folderColorPalette`
59
+ # @return [Array<String>]
60
+ attr_accessor :folder_color_palette
61
+
62
+ # A map of source MIME type to possible targets for all supported imports.
63
+ # Corresponds to the JSON property `importFormats`
64
+ # @return [Hash<String,Array<String>>]
65
+ attr_accessor :import_formats
66
+
67
+ # Identifies what kind of resource this is. Value: the fixed string "drive#about"
68
+ # .
69
+ # Corresponds to the JSON property `kind`
70
+ # @return [String]
71
+ attr_accessor :kind
72
+
73
+ # A map of maximum import sizes by MIME type, in bytes.
74
+ # Corresponds to the JSON property `maxImportSizes`
75
+ # @return [Hash<String,Fixnum>]
76
+ attr_accessor :max_import_sizes
77
+
78
+ # The maximum upload size in bytes.
79
+ # Corresponds to the JSON property `maxUploadSize`
80
+ # @return [Fixnum]
81
+ attr_accessor :max_upload_size
82
+
83
+ # The user's storage quota limits and usage. All fields are measured in bytes.
84
+ # Corresponds to the JSON property `storageQuota`
85
+ # @return [Google::Apis::DriveV3::About::StorageQuota]
86
+ attr_accessor :storage_quota
87
+
88
+ # Deprecated - use driveThemes instead.
89
+ # Corresponds to the JSON property `teamDriveThemes`
90
+ # @return [Array<Google::Apis::DriveV3::About::TeamDriveTheme>]
91
+ attr_accessor :team_drive_themes
92
+
93
+ # Information about a Drive user.
94
+ # Corresponds to the JSON property `user`
95
+ # @return [Google::Apis::DriveV3::User]
96
+ attr_accessor :user
97
+
98
+ def initialize(**args)
99
+ update!(**args)
100
+ end
101
+
102
+ # Update properties of this object
103
+ def update!(**args)
104
+ @app_installed = args[:app_installed] if args.key?(:app_installed)
105
+ @can_create_drives = args[:can_create_drives] if args.key?(:can_create_drives)
106
+ @can_create_team_drives = args[:can_create_team_drives] if args.key?(:can_create_team_drives)
107
+ @drive_themes = args[:drive_themes] if args.key?(:drive_themes)
108
+ @export_formats = args[:export_formats] if args.key?(:export_formats)
109
+ @folder_color_palette = args[:folder_color_palette] if args.key?(:folder_color_palette)
110
+ @import_formats = args[:import_formats] if args.key?(:import_formats)
111
+ @kind = args[:kind] if args.key?(:kind)
112
+ @max_import_sizes = args[:max_import_sizes] if args.key?(:max_import_sizes)
113
+ @max_upload_size = args[:max_upload_size] if args.key?(:max_upload_size)
114
+ @storage_quota = args[:storage_quota] if args.key?(:storage_quota)
115
+ @team_drive_themes = args[:team_drive_themes] if args.key?(:team_drive_themes)
116
+ @user = args[:user] if args.key?(:user)
117
+ end
118
+
119
+ #
120
+ class DriveTheme
121
+ include Google::Apis::Core::Hashable
122
+
123
+ # A link to this theme's background image.
124
+ # Corresponds to the JSON property `backgroundImageLink`
125
+ # @return [String]
126
+ attr_accessor :background_image_link
127
+
128
+ # The color of this theme as an RGB hex string.
129
+ # Corresponds to the JSON property `colorRgb`
130
+ # @return [String]
131
+ attr_accessor :color_rgb
132
+
133
+ # The ID of the theme.
134
+ # Corresponds to the JSON property `id`
135
+ # @return [String]
136
+ attr_accessor :id
137
+
138
+ def initialize(**args)
139
+ update!(**args)
140
+ end
141
+
142
+ # Update properties of this object
143
+ def update!(**args)
144
+ @background_image_link = args[:background_image_link] if args.key?(:background_image_link)
145
+ @color_rgb = args[:color_rgb] if args.key?(:color_rgb)
146
+ @id = args[:id] if args.key?(:id)
147
+ end
148
+ end
149
+
150
+ # The user's storage quota limits and usage. All fields are measured in bytes.
151
+ class StorageQuota
152
+ include Google::Apis::Core::Hashable
153
+
154
+ # The usage limit, if applicable. This will not be present if the user has
155
+ # unlimited storage.
156
+ # Corresponds to the JSON property `limit`
157
+ # @return [Fixnum]
158
+ attr_accessor :limit
159
+
160
+ # The total usage across all services.
161
+ # Corresponds to the JSON property `usage`
162
+ # @return [Fixnum]
163
+ attr_accessor :usage
164
+
165
+ # The usage by all files in Google Drive.
166
+ # Corresponds to the JSON property `usageInDrive`
167
+ # @return [Fixnum]
168
+ attr_accessor :usage_in_drive
169
+
170
+ # The usage by trashed files in Google Drive.
171
+ # Corresponds to the JSON property `usageInDriveTrash`
172
+ # @return [Fixnum]
173
+ attr_accessor :usage_in_drive_trash
174
+
175
+ def initialize(**args)
176
+ update!(**args)
177
+ end
178
+
179
+ # Update properties of this object
180
+ def update!(**args)
181
+ @limit = args[:limit] if args.key?(:limit)
182
+ @usage = args[:usage] if args.key?(:usage)
183
+ @usage_in_drive = args[:usage_in_drive] if args.key?(:usage_in_drive)
184
+ @usage_in_drive_trash = args[:usage_in_drive_trash] if args.key?(:usage_in_drive_trash)
185
+ end
186
+ end
187
+
188
+ #
189
+ class TeamDriveTheme
190
+ include Google::Apis::Core::Hashable
191
+
192
+ # Deprecated - use driveThemes/backgroundImageLink instead.
193
+ # Corresponds to the JSON property `backgroundImageLink`
194
+ # @return [String]
195
+ attr_accessor :background_image_link
196
+
197
+ # Deprecated - use driveThemes/colorRgb instead.
198
+ # Corresponds to the JSON property `colorRgb`
199
+ # @return [String]
200
+ attr_accessor :color_rgb
201
+
202
+ # Deprecated - use driveThemes/id instead.
203
+ # Corresponds to the JSON property `id`
204
+ # @return [String]
205
+ attr_accessor :id
206
+
207
+ def initialize(**args)
208
+ update!(**args)
209
+ end
210
+
211
+ # Update properties of this object
212
+ def update!(**args)
213
+ @background_image_link = args[:background_image_link] if args.key?(:background_image_link)
214
+ @color_rgb = args[:color_rgb] if args.key?(:color_rgb)
215
+ @id = args[:id] if args.key?(:id)
216
+ end
217
+ end
218
+ end
219
+
220
+ # A change to a file or shared drive.
221
+ class Change
222
+ include Google::Apis::Core::Hashable
223
+
224
+ # The type of the change. Possible values are file and drive.
225
+ # Corresponds to the JSON property `changeType`
226
+ # @return [String]
227
+ attr_accessor :change_type
228
+
229
+ # Representation of a shared drive.
230
+ # Corresponds to the JSON property `drive`
231
+ # @return [Google::Apis::DriveV3::Drive]
232
+ attr_accessor :drive
233
+
234
+ # The ID of the shared drive associated with this change.
235
+ # Corresponds to the JSON property `driveId`
236
+ # @return [String]
237
+ attr_accessor :drive_id
238
+
239
+ # The metadata for a file.
240
+ # Corresponds to the JSON property `file`
241
+ # @return [Google::Apis::DriveV3::File]
242
+ attr_accessor :file
243
+
244
+ # The ID of the file which has changed.
245
+ # Corresponds to the JSON property `fileId`
246
+ # @return [String]
247
+ attr_accessor :file_id
248
+
249
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
250
+ # change".
251
+ # Corresponds to the JSON property `kind`
252
+ # @return [String]
253
+ attr_accessor :kind
254
+
255
+ # Whether the file or shared drive has been removed from this list of changes,
256
+ # for example by deletion or loss of access.
257
+ # Corresponds to the JSON property `removed`
258
+ # @return [Boolean]
259
+ attr_accessor :removed
260
+ alias_method :removed?, :removed
261
+
262
+ # Deprecated: use the drive collection instead.
263
+ # Corresponds to the JSON property `teamDrive`
264
+ # @return [Google::Apis::DriveV3::TeamDrive]
265
+ attr_accessor :team_drive
266
+
267
+ # Deprecated - use driveId instead.
268
+ # Corresponds to the JSON property `teamDriveId`
269
+ # @return [String]
270
+ attr_accessor :team_drive_id
271
+
272
+ # The time of this change (RFC 3339 date-time).
273
+ # Corresponds to the JSON property `time`
274
+ # @return [DateTime]
275
+ attr_accessor :time
276
+
277
+ # Deprecated - use changeType instead.
278
+ # Corresponds to the JSON property `type`
279
+ # @return [String]
280
+ attr_accessor :type
281
+
282
+ def initialize(**args)
283
+ update!(**args)
284
+ end
285
+
286
+ # Update properties of this object
287
+ def update!(**args)
288
+ @change_type = args[:change_type] if args.key?(:change_type)
289
+ @drive = args[:drive] if args.key?(:drive)
290
+ @drive_id = args[:drive_id] if args.key?(:drive_id)
291
+ @file = args[:file] if args.key?(:file)
292
+ @file_id = args[:file_id] if args.key?(:file_id)
293
+ @kind = args[:kind] if args.key?(:kind)
294
+ @removed = args[:removed] if args.key?(:removed)
295
+ @team_drive = args[:team_drive] if args.key?(:team_drive)
296
+ @team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id)
297
+ @time = args[:time] if args.key?(:time)
298
+ @type = args[:type] if args.key?(:type)
299
+ end
300
+ end
301
+
302
+ # A list of changes for a user.
303
+ class ChangeList
304
+ include Google::Apis::Core::Hashable
305
+
306
+ # The list of changes. If nextPageToken is populated, then this list may be
307
+ # incomplete and an additional page of results should be fetched.
308
+ # Corresponds to the JSON property `changes`
309
+ # @return [Array<Google::Apis::DriveV3::Change>]
310
+ attr_accessor :changes
311
+
312
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
313
+ # changeList".
314
+ # Corresponds to the JSON property `kind`
315
+ # @return [String]
316
+ attr_accessor :kind
317
+
318
+ # The starting page token for future changes. This will be present only if the
319
+ # end of the current changes list has been reached.
320
+ # Corresponds to the JSON property `newStartPageToken`
321
+ # @return [String]
322
+ attr_accessor :new_start_page_token
323
+
324
+ # The page token for the next page of changes. This will be absent if the end of
325
+ # the changes list has been reached. If the token is rejected for any reason, it
326
+ # should be discarded, and pagination should be restarted from the first page of
327
+ # results.
328
+ # Corresponds to the JSON property `nextPageToken`
329
+ # @return [String]
330
+ attr_accessor :next_page_token
331
+
332
+ def initialize(**args)
333
+ update!(**args)
334
+ end
335
+
336
+ # Update properties of this object
337
+ def update!(**args)
338
+ @changes = args[:changes] if args.key?(:changes)
339
+ @kind = args[:kind] if args.key?(:kind)
340
+ @new_start_page_token = args[:new_start_page_token] if args.key?(:new_start_page_token)
341
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
342
+ end
343
+ end
344
+
345
+ # An notification channel used to watch for resource changes.
346
+ class Channel
347
+ include Google::Apis::Core::Hashable
348
+
349
+ # The address where notifications are delivered for this channel.
350
+ # Corresponds to the JSON property `address`
351
+ # @return [String]
352
+ attr_accessor :address
353
+
354
+ # Date and time of notification channel expiration, expressed as a Unix
355
+ # timestamp, in milliseconds. Optional.
356
+ # Corresponds to the JSON property `expiration`
357
+ # @return [Fixnum]
358
+ attr_accessor :expiration
359
+
360
+ # A UUID or similar unique string that identifies this channel.
361
+ # Corresponds to the JSON property `id`
362
+ # @return [String]
363
+ attr_accessor :id
364
+
365
+ # Identifies this as a notification channel used to watch for changes to a
366
+ # resource, which is "api#channel".
367
+ # Corresponds to the JSON property `kind`
368
+ # @return [String]
369
+ attr_accessor :kind
370
+
371
+ # Additional parameters controlling delivery channel behavior. Optional.
372
+ # Corresponds to the JSON property `params`
373
+ # @return [Hash<String,String>]
374
+ attr_accessor :params
375
+
376
+ # A Boolean value to indicate whether payload is wanted. Optional.
377
+ # Corresponds to the JSON property `payload`
378
+ # @return [Boolean]
379
+ attr_accessor :payload
380
+ alias_method :payload?, :payload
381
+
382
+ # An opaque ID that identifies the resource being watched on this channel.
383
+ # Stable across different API versions.
384
+ # Corresponds to the JSON property `resourceId`
385
+ # @return [String]
386
+ attr_accessor :resource_id
387
+
388
+ # A version-specific identifier for the watched resource.
389
+ # Corresponds to the JSON property `resourceUri`
390
+ # @return [String]
391
+ attr_accessor :resource_uri
392
+
393
+ # An arbitrary string delivered to the target address with each notification
394
+ # delivered over this channel. Optional.
395
+ # Corresponds to the JSON property `token`
396
+ # @return [String]
397
+ attr_accessor :token
398
+
399
+ # The type of delivery mechanism used for this channel.
400
+ # Corresponds to the JSON property `type`
401
+ # @return [String]
402
+ attr_accessor :type
403
+
404
+ def initialize(**args)
405
+ update!(**args)
406
+ end
407
+
408
+ # Update properties of this object
409
+ def update!(**args)
410
+ @address = args[:address] if args.key?(:address)
411
+ @expiration = args[:expiration] if args.key?(:expiration)
412
+ @id = args[:id] if args.key?(:id)
413
+ @kind = args[:kind] if args.key?(:kind)
414
+ @params = args[:params] if args.key?(:params)
415
+ @payload = args[:payload] if args.key?(:payload)
416
+ @resource_id = args[:resource_id] if args.key?(:resource_id)
417
+ @resource_uri = args[:resource_uri] if args.key?(:resource_uri)
418
+ @token = args[:token] if args.key?(:token)
419
+ @type = args[:type] if args.key?(:type)
420
+ end
421
+ end
422
+
423
+ # A comment on a file.
424
+ class Comment
425
+ include Google::Apis::Core::Hashable
426
+
427
+ # A region of the document represented as a JSON string. See anchor
428
+ # documentation for details on how to define and interpret anchor properties.
429
+ # Corresponds to the JSON property `anchor`
430
+ # @return [String]
431
+ attr_accessor :anchor
432
+
433
+ # Information about a Drive user.
434
+ # Corresponds to the JSON property `author`
435
+ # @return [Google::Apis::DriveV3::User]
436
+ attr_accessor :author
437
+
438
+ # The plain text content of the comment. This field is used for setting the
439
+ # content, while htmlContent should be displayed.
440
+ # Corresponds to the JSON property `content`
441
+ # @return [String]
442
+ attr_accessor :content
443
+
444
+ # The time at which the comment was created (RFC 3339 date-time).
445
+ # Corresponds to the JSON property `createdTime`
446
+ # @return [DateTime]
447
+ attr_accessor :created_time
448
+
449
+ # Whether the comment has been deleted. A deleted comment has no content.
450
+ # Corresponds to the JSON property `deleted`
451
+ # @return [Boolean]
452
+ attr_accessor :deleted
453
+ alias_method :deleted?, :deleted
454
+
455
+ # The content of the comment with HTML formatting.
456
+ # Corresponds to the JSON property `htmlContent`
457
+ # @return [String]
458
+ attr_accessor :html_content
459
+
460
+ # The ID of the comment.
461
+ # Corresponds to the JSON property `id`
462
+ # @return [String]
463
+ attr_accessor :id
464
+
465
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
466
+ # comment".
467
+ # Corresponds to the JSON property `kind`
468
+ # @return [String]
469
+ attr_accessor :kind
470
+
471
+ # The last time the comment or any of its replies was modified (RFC 3339 date-
472
+ # time).
473
+ # Corresponds to the JSON property `modifiedTime`
474
+ # @return [DateTime]
475
+ attr_accessor :modified_time
476
+
477
+ # The file content to which the comment refers, typically within the anchor
478
+ # region. For a text file, for example, this would be the text at the location
479
+ # of the comment.
480
+ # Corresponds to the JSON property `quotedFileContent`
481
+ # @return [Google::Apis::DriveV3::Comment::QuotedFileContent]
482
+ attr_accessor :quoted_file_content
483
+
484
+ # The full list of replies to the comment in chronological order.
485
+ # Corresponds to the JSON property `replies`
486
+ # @return [Array<Google::Apis::DriveV3::Reply>]
487
+ attr_accessor :replies
488
+
489
+ # Whether the comment has been resolved by one of its replies.
490
+ # Corresponds to the JSON property `resolved`
491
+ # @return [Boolean]
492
+ attr_accessor :resolved
493
+ alias_method :resolved?, :resolved
494
+
495
+ def initialize(**args)
496
+ update!(**args)
497
+ end
498
+
499
+ # Update properties of this object
500
+ def update!(**args)
501
+ @anchor = args[:anchor] if args.key?(:anchor)
502
+ @author = args[:author] if args.key?(:author)
503
+ @content = args[:content] if args.key?(:content)
504
+ @created_time = args[:created_time] if args.key?(:created_time)
505
+ @deleted = args[:deleted] if args.key?(:deleted)
506
+ @html_content = args[:html_content] if args.key?(:html_content)
507
+ @id = args[:id] if args.key?(:id)
508
+ @kind = args[:kind] if args.key?(:kind)
509
+ @modified_time = args[:modified_time] if args.key?(:modified_time)
510
+ @quoted_file_content = args[:quoted_file_content] if args.key?(:quoted_file_content)
511
+ @replies = args[:replies] if args.key?(:replies)
512
+ @resolved = args[:resolved] if args.key?(:resolved)
513
+ end
514
+
515
+ # The file content to which the comment refers, typically within the anchor
516
+ # region. For a text file, for example, this would be the text at the location
517
+ # of the comment.
518
+ class QuotedFileContent
519
+ include Google::Apis::Core::Hashable
520
+
521
+ # The MIME type of the quoted content.
522
+ # Corresponds to the JSON property `mimeType`
523
+ # @return [String]
524
+ attr_accessor :mime_type
525
+
526
+ # The quoted content itself. This is interpreted as plain text if set through
527
+ # the API.
528
+ # Corresponds to the JSON property `value`
529
+ # @return [String]
530
+ attr_accessor :value
531
+
532
+ def initialize(**args)
533
+ update!(**args)
534
+ end
535
+
536
+ # Update properties of this object
537
+ def update!(**args)
538
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
539
+ @value = args[:value] if args.key?(:value)
540
+ end
541
+ end
542
+ end
543
+
544
+ # A list of comments on a file.
545
+ class CommentList
546
+ include Google::Apis::Core::Hashable
547
+
548
+ # The list of comments. If nextPageToken is populated, then this list may be
549
+ # incomplete and an additional page of results should be fetched.
550
+ # Corresponds to the JSON property `comments`
551
+ # @return [Array<Google::Apis::DriveV3::Comment>]
552
+ attr_accessor :comments
553
+
554
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
555
+ # commentList".
556
+ # Corresponds to the JSON property `kind`
557
+ # @return [String]
558
+ attr_accessor :kind
559
+
560
+ # The page token for the next page of comments. This will be absent if the end
561
+ # of the comments list has been reached. If the token is rejected for any reason,
562
+ # it should be discarded, and pagination should be restarted from the first
563
+ # page of results.
564
+ # Corresponds to the JSON property `nextPageToken`
565
+ # @return [String]
566
+ attr_accessor :next_page_token
567
+
568
+ def initialize(**args)
569
+ update!(**args)
570
+ end
571
+
572
+ # Update properties of this object
573
+ def update!(**args)
574
+ @comments = args[:comments] if args.key?(:comments)
575
+ @kind = args[:kind] if args.key?(:kind)
576
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
577
+ end
578
+ end
579
+
580
+ # A restriction for accessing the content of the file.
581
+ class ContentRestriction
582
+ include Google::Apis::Core::Hashable
583
+
584
+ # Whether the content of the file is read-only. If a file is read-only, a new
585
+ # revision of the file may not be added, comments may not be added or modified,
586
+ # and the title of the file may not be modified.
587
+ # Corresponds to the JSON property `readOnly`
588
+ # @return [Boolean]
589
+ attr_accessor :read_only
590
+ alias_method :read_only?, :read_only
591
+
592
+ # Reason for why the content of the file is restricted. This is only mutable on
593
+ # requests that also set readOnly=true.
594
+ # Corresponds to the JSON property `reason`
595
+ # @return [String]
596
+ attr_accessor :reason
597
+
598
+ # Information about a Drive user.
599
+ # Corresponds to the JSON property `restrictingUser`
600
+ # @return [Google::Apis::DriveV3::User]
601
+ attr_accessor :restricting_user
602
+
603
+ # The time at which the content restriction was set (formatted RFC 3339
604
+ # timestamp). Only populated if readOnly is true.
605
+ # Corresponds to the JSON property `restrictionTime`
606
+ # @return [DateTime]
607
+ attr_accessor :restriction_time
608
+
609
+ # The type of the content restriction. Currently the only possible value is
610
+ # globalContentRestriction.
611
+ # Corresponds to the JSON property `type`
612
+ # @return [String]
613
+ attr_accessor :type
614
+
615
+ def initialize(**args)
616
+ update!(**args)
617
+ end
618
+
619
+ # Update properties of this object
620
+ def update!(**args)
621
+ @read_only = args[:read_only] if args.key?(:read_only)
622
+ @reason = args[:reason] if args.key?(:reason)
623
+ @restricting_user = args[:restricting_user] if args.key?(:restricting_user)
624
+ @restriction_time = args[:restriction_time] if args.key?(:restriction_time)
625
+ @type = args[:type] if args.key?(:type)
626
+ end
627
+ end
628
+
629
+ # Representation of a shared drive.
630
+ class Drive
631
+ include Google::Apis::Core::Hashable
632
+
633
+ # An image file and cropping parameters from which a background image for this
634
+ # shared drive is set. This is a write only field; it can only be set on drive.
635
+ # drives.update requests that don't set themeId. When specified, all fields of
636
+ # the backgroundImageFile must be set.
637
+ # Corresponds to the JSON property `backgroundImageFile`
638
+ # @return [Google::Apis::DriveV3::Drive::BackgroundImageFile]
639
+ attr_accessor :background_image_file
640
+
641
+ # A short-lived link to this shared drive's background image.
642
+ # Corresponds to the JSON property `backgroundImageLink`
643
+ # @return [String]
644
+ attr_accessor :background_image_link
645
+
646
+ # Capabilities the current user has on this shared drive.
647
+ # Corresponds to the JSON property `capabilities`
648
+ # @return [Google::Apis::DriveV3::Drive::Capabilities]
649
+ attr_accessor :capabilities
650
+
651
+ # The color of this shared drive as an RGB hex string. It can only be set on a
652
+ # drive.drives.update request that does not set themeId.
653
+ # Corresponds to the JSON property `colorRgb`
654
+ # @return [String]
655
+ attr_accessor :color_rgb
656
+
657
+ # The time at which the shared drive was created (RFC 3339 date-time).
658
+ # Corresponds to the JSON property `createdTime`
659
+ # @return [DateTime]
660
+ attr_accessor :created_time
661
+
662
+ # Whether the shared drive is hidden from default view.
663
+ # Corresponds to the JSON property `hidden`
664
+ # @return [Boolean]
665
+ attr_accessor :hidden
666
+ alias_method :hidden?, :hidden
667
+
668
+ # The ID of this shared drive which is also the ID of the top level folder of
669
+ # this shared drive.
670
+ # Corresponds to the JSON property `id`
671
+ # @return [String]
672
+ attr_accessor :id
673
+
674
+ # Identifies what kind of resource this is. Value: the fixed string "drive#drive"
675
+ # .
676
+ # Corresponds to the JSON property `kind`
677
+ # @return [String]
678
+ attr_accessor :kind
679
+
680
+ # The name of this shared drive.
681
+ # Corresponds to the JSON property `name`
682
+ # @return [String]
683
+ attr_accessor :name
684
+
685
+ # A set of restrictions that apply to this shared drive or items inside this
686
+ # shared drive.
687
+ # Corresponds to the JSON property `restrictions`
688
+ # @return [Google::Apis::DriveV3::Drive::Restrictions]
689
+ attr_accessor :restrictions
690
+
691
+ # The ID of the theme from which the background image and color will be set. The
692
+ # set of possible driveThemes can be retrieved from a drive.about.get response.
693
+ # When not specified on a drive.drives.create request, a random theme is chosen
694
+ # from which the background image and color are set. This is a write-only field;
695
+ # it can only be set on requests that don't set colorRgb or backgroundImageFile.
696
+ # Corresponds to the JSON property `themeId`
697
+ # @return [String]
698
+ attr_accessor :theme_id
699
+
700
+ def initialize(**args)
701
+ update!(**args)
702
+ end
703
+
704
+ # Update properties of this object
705
+ def update!(**args)
706
+ @background_image_file = args[:background_image_file] if args.key?(:background_image_file)
707
+ @background_image_link = args[:background_image_link] if args.key?(:background_image_link)
708
+ @capabilities = args[:capabilities] if args.key?(:capabilities)
709
+ @color_rgb = args[:color_rgb] if args.key?(:color_rgb)
710
+ @created_time = args[:created_time] if args.key?(:created_time)
711
+ @hidden = args[:hidden] if args.key?(:hidden)
712
+ @id = args[:id] if args.key?(:id)
713
+ @kind = args[:kind] if args.key?(:kind)
714
+ @name = args[:name] if args.key?(:name)
715
+ @restrictions = args[:restrictions] if args.key?(:restrictions)
716
+ @theme_id = args[:theme_id] if args.key?(:theme_id)
717
+ end
718
+
719
+ # An image file and cropping parameters from which a background image for this
720
+ # shared drive is set. This is a write only field; it can only be set on drive.
721
+ # drives.update requests that don't set themeId. When specified, all fields of
722
+ # the backgroundImageFile must be set.
723
+ class BackgroundImageFile
724
+ include Google::Apis::Core::Hashable
725
+
726
+ # The ID of an image file in Google Drive to use for the background image.
727
+ # Corresponds to the JSON property `id`
728
+ # @return [String]
729
+ attr_accessor :id
730
+
731
+ # The width of the cropped image in the closed range of 0 to 1. This value
732
+ # represents the width of the cropped image divided by the width of the entire
733
+ # image. The height is computed by applying a width to height aspect ratio of 80
734
+ # to 9. The resulting image must be at least 1280 pixels wide and 144 pixels
735
+ # high.
736
+ # Corresponds to the JSON property `width`
737
+ # @return [Float]
738
+ attr_accessor :width
739
+
740
+ # The X coordinate of the upper left corner of the cropping area in the
741
+ # background image. This is a value in the closed range of 0 to 1. This value
742
+ # represents the horizontal distance from the left side of the entire image to
743
+ # the left side of the cropping area divided by the width of the entire image.
744
+ # Corresponds to the JSON property `xCoordinate`
745
+ # @return [Float]
746
+ attr_accessor :x_coordinate
747
+
748
+ # The Y coordinate of the upper left corner of the cropping area in the
749
+ # background image. This is a value in the closed range of 0 to 1. This value
750
+ # represents the vertical distance from the top side of the entire image to the
751
+ # top side of the cropping area divided by the height of the entire image.
752
+ # Corresponds to the JSON property `yCoordinate`
753
+ # @return [Float]
754
+ attr_accessor :y_coordinate
755
+
756
+ def initialize(**args)
757
+ update!(**args)
758
+ end
759
+
760
+ # Update properties of this object
761
+ def update!(**args)
762
+ @id = args[:id] if args.key?(:id)
763
+ @width = args[:width] if args.key?(:width)
764
+ @x_coordinate = args[:x_coordinate] if args.key?(:x_coordinate)
765
+ @y_coordinate = args[:y_coordinate] if args.key?(:y_coordinate)
766
+ end
767
+ end
768
+
769
+ # Capabilities the current user has on this shared drive.
770
+ class Capabilities
771
+ include Google::Apis::Core::Hashable
772
+
773
+ # Whether the current user can add children to folders in this shared drive.
774
+ # Corresponds to the JSON property `canAddChildren`
775
+ # @return [Boolean]
776
+ attr_accessor :can_add_children
777
+ alias_method :can_add_children?, :can_add_children
778
+
779
+ # Whether the current user can change the copyRequiresWriterPermission
780
+ # restriction of this shared drive.
781
+ # Corresponds to the JSON property `canChangeCopyRequiresWriterPermissionRestriction`
782
+ # @return [Boolean]
783
+ attr_accessor :can_change_copy_requires_writer_permission_restriction
784
+ alias_method :can_change_copy_requires_writer_permission_restriction?, :can_change_copy_requires_writer_permission_restriction
785
+
786
+ # Whether the current user can change the domainUsersOnly restriction of this
787
+ # shared drive.
788
+ # Corresponds to the JSON property `canChangeDomainUsersOnlyRestriction`
789
+ # @return [Boolean]
790
+ attr_accessor :can_change_domain_users_only_restriction
791
+ alias_method :can_change_domain_users_only_restriction?, :can_change_domain_users_only_restriction
792
+
793
+ # Whether the current user can change the background of this shared drive.
794
+ # Corresponds to the JSON property `canChangeDriveBackground`
795
+ # @return [Boolean]
796
+ attr_accessor :can_change_drive_background
797
+ alias_method :can_change_drive_background?, :can_change_drive_background
798
+
799
+ # Whether the current user can change the driveMembersOnly restriction of this
800
+ # shared drive.
801
+ # Corresponds to the JSON property `canChangeDriveMembersOnlyRestriction`
802
+ # @return [Boolean]
803
+ attr_accessor :can_change_drive_members_only_restriction
804
+ alias_method :can_change_drive_members_only_restriction?, :can_change_drive_members_only_restriction
805
+
806
+ # Whether the current user can comment on files in this shared drive.
807
+ # Corresponds to the JSON property `canComment`
808
+ # @return [Boolean]
809
+ attr_accessor :can_comment
810
+ alias_method :can_comment?, :can_comment
811
+
812
+ # Whether the current user can copy files in this shared drive.
813
+ # Corresponds to the JSON property `canCopy`
814
+ # @return [Boolean]
815
+ attr_accessor :can_copy
816
+ alias_method :can_copy?, :can_copy
817
+
818
+ # Whether the current user can delete children from folders in this shared drive.
819
+ # Corresponds to the JSON property `canDeleteChildren`
820
+ # @return [Boolean]
821
+ attr_accessor :can_delete_children
822
+ alias_method :can_delete_children?, :can_delete_children
823
+
824
+ # Whether the current user can delete this shared drive. Attempting to delete
825
+ # the shared drive may still fail if there are untrashed items inside the shared
826
+ # drive.
827
+ # Corresponds to the JSON property `canDeleteDrive`
828
+ # @return [Boolean]
829
+ attr_accessor :can_delete_drive
830
+ alias_method :can_delete_drive?, :can_delete_drive
831
+
832
+ # Whether the current user can download files in this shared drive.
833
+ # Corresponds to the JSON property `canDownload`
834
+ # @return [Boolean]
835
+ attr_accessor :can_download
836
+ alias_method :can_download?, :can_download
837
+
838
+ # Whether the current user can edit files in this shared drive
839
+ # Corresponds to the JSON property `canEdit`
840
+ # @return [Boolean]
841
+ attr_accessor :can_edit
842
+ alias_method :can_edit?, :can_edit
843
+
844
+ # Whether the current user can list the children of folders in this shared drive.
845
+ # Corresponds to the JSON property `canListChildren`
846
+ # @return [Boolean]
847
+ attr_accessor :can_list_children
848
+ alias_method :can_list_children?, :can_list_children
849
+
850
+ # Whether the current user can add members to this shared drive or remove them
851
+ # or change their role.
852
+ # Corresponds to the JSON property `canManageMembers`
853
+ # @return [Boolean]
854
+ attr_accessor :can_manage_members
855
+ alias_method :can_manage_members?, :can_manage_members
856
+
857
+ # Whether the current user can read the revisions resource of files in this
858
+ # shared drive.
859
+ # Corresponds to the JSON property `canReadRevisions`
860
+ # @return [Boolean]
861
+ attr_accessor :can_read_revisions
862
+ alias_method :can_read_revisions?, :can_read_revisions
863
+
864
+ # Whether the current user can rename files or folders in this shared drive.
865
+ # Corresponds to the JSON property `canRename`
866
+ # @return [Boolean]
867
+ attr_accessor :can_rename
868
+ alias_method :can_rename?, :can_rename
869
+
870
+ # Whether the current user can rename this shared drive.
871
+ # Corresponds to the JSON property `canRenameDrive`
872
+ # @return [Boolean]
873
+ attr_accessor :can_rename_drive
874
+ alias_method :can_rename_drive?, :can_rename_drive
875
+
876
+ # Whether the current user can share files or folders in this shared drive.
877
+ # Corresponds to the JSON property `canShare`
878
+ # @return [Boolean]
879
+ attr_accessor :can_share
880
+ alias_method :can_share?, :can_share
881
+
882
+ # Whether the current user can trash children from folders in this shared drive.
883
+ # Corresponds to the JSON property `canTrashChildren`
884
+ # @return [Boolean]
885
+ attr_accessor :can_trash_children
886
+ alias_method :can_trash_children?, :can_trash_children
887
+
888
+ def initialize(**args)
889
+ update!(**args)
890
+ end
891
+
892
+ # Update properties of this object
893
+ def update!(**args)
894
+ @can_add_children = args[:can_add_children] if args.key?(:can_add_children)
895
+ @can_change_copy_requires_writer_permission_restriction = args[:can_change_copy_requires_writer_permission_restriction] if args.key?(:can_change_copy_requires_writer_permission_restriction)
896
+ @can_change_domain_users_only_restriction = args[:can_change_domain_users_only_restriction] if args.key?(:can_change_domain_users_only_restriction)
897
+ @can_change_drive_background = args[:can_change_drive_background] if args.key?(:can_change_drive_background)
898
+ @can_change_drive_members_only_restriction = args[:can_change_drive_members_only_restriction] if args.key?(:can_change_drive_members_only_restriction)
899
+ @can_comment = args[:can_comment] if args.key?(:can_comment)
900
+ @can_copy = args[:can_copy] if args.key?(:can_copy)
901
+ @can_delete_children = args[:can_delete_children] if args.key?(:can_delete_children)
902
+ @can_delete_drive = args[:can_delete_drive] if args.key?(:can_delete_drive)
903
+ @can_download = args[:can_download] if args.key?(:can_download)
904
+ @can_edit = args[:can_edit] if args.key?(:can_edit)
905
+ @can_list_children = args[:can_list_children] if args.key?(:can_list_children)
906
+ @can_manage_members = args[:can_manage_members] if args.key?(:can_manage_members)
907
+ @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
908
+ @can_rename = args[:can_rename] if args.key?(:can_rename)
909
+ @can_rename_drive = args[:can_rename_drive] if args.key?(:can_rename_drive)
910
+ @can_share = args[:can_share] if args.key?(:can_share)
911
+ @can_trash_children = args[:can_trash_children] if args.key?(:can_trash_children)
912
+ end
913
+ end
914
+
915
+ # A set of restrictions that apply to this shared drive or items inside this
916
+ # shared drive.
917
+ class Restrictions
918
+ include Google::Apis::Core::Hashable
919
+
920
+ # Whether administrative privileges on this shared drive are required to modify
921
+ # restrictions.
922
+ # Corresponds to the JSON property `adminManagedRestrictions`
923
+ # @return [Boolean]
924
+ attr_accessor :admin_managed_restrictions
925
+ alias_method :admin_managed_restrictions?, :admin_managed_restrictions
926
+
927
+ # Whether the options to copy, print, or download files inside this shared drive,
928
+ # should be disabled for readers and commenters. When this restriction is set
929
+ # to true, it will override the similarly named field to true for any file
930
+ # inside this shared drive.
931
+ # Corresponds to the JSON property `copyRequiresWriterPermission`
932
+ # @return [Boolean]
933
+ attr_accessor :copy_requires_writer_permission
934
+ alias_method :copy_requires_writer_permission?, :copy_requires_writer_permission
935
+
936
+ # Whether access to this shared drive and items inside this shared drive is
937
+ # restricted to users of the domain to which this shared drive belongs. This
938
+ # restriction may be overridden by other sharing policies controlled outside of
939
+ # this shared drive.
940
+ # Corresponds to the JSON property `domainUsersOnly`
941
+ # @return [Boolean]
942
+ attr_accessor :domain_users_only
943
+ alias_method :domain_users_only?, :domain_users_only
944
+
945
+ # Whether access to items inside this shared drive is restricted to its members.
946
+ # Corresponds to the JSON property `driveMembersOnly`
947
+ # @return [Boolean]
948
+ attr_accessor :drive_members_only
949
+ alias_method :drive_members_only?, :drive_members_only
950
+
951
+ def initialize(**args)
952
+ update!(**args)
953
+ end
954
+
955
+ # Update properties of this object
956
+ def update!(**args)
957
+ @admin_managed_restrictions = args[:admin_managed_restrictions] if args.key?(:admin_managed_restrictions)
958
+ @copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
959
+ @domain_users_only = args[:domain_users_only] if args.key?(:domain_users_only)
960
+ @drive_members_only = args[:drive_members_only] if args.key?(:drive_members_only)
961
+ end
962
+ end
963
+ end
964
+
965
+ # A list of shared drives.
966
+ class DriveList
967
+ include Google::Apis::Core::Hashable
968
+
969
+ # The list of shared drives. If nextPageToken is populated, then this list may
970
+ # be incomplete and an additional page of results should be fetched.
971
+ # Corresponds to the JSON property `drives`
972
+ # @return [Array<Google::Apis::DriveV3::Drive>]
973
+ attr_accessor :drives
974
+
975
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
976
+ # driveList".
977
+ # Corresponds to the JSON property `kind`
978
+ # @return [String]
979
+ attr_accessor :kind
980
+
981
+ # The page token for the next page of shared drives. This will be absent if the
982
+ # end of the list has been reached. If the token is rejected for any reason, it
983
+ # should be discarded, and pagination should be restarted from the first page of
984
+ # results.
985
+ # Corresponds to the JSON property `nextPageToken`
986
+ # @return [String]
987
+ attr_accessor :next_page_token
988
+
989
+ def initialize(**args)
990
+ update!(**args)
991
+ end
992
+
993
+ # Update properties of this object
994
+ def update!(**args)
995
+ @drives = args[:drives] if args.key?(:drives)
996
+ @kind = args[:kind] if args.key?(:kind)
997
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
998
+ end
999
+ end
1000
+
1001
+ # The metadata for a file.
1002
+ class File
1003
+ include Google::Apis::Core::Hashable
1004
+
1005
+ # A collection of arbitrary key-value pairs which are private to the requesting
1006
+ # app.
1007
+ # Entries with null values are cleared in update and copy requests. These
1008
+ # properties can only be retrieved using an authenticated request. An
1009
+ # authenticated request uses an access token obtained with a OAuth 2 client ID.
1010
+ # You cannot use an API key to retrieve private properties.
1011
+ # Corresponds to the JSON property `appProperties`
1012
+ # @return [Hash<String,String>]
1013
+ attr_accessor :app_properties
1014
+
1015
+ # Capabilities the current user has on this file. Each capability corresponds to
1016
+ # a fine-grained action that a user may take.
1017
+ # Corresponds to the JSON property `capabilities`
1018
+ # @return [Google::Apis::DriveV3::File::Capabilities]
1019
+ attr_accessor :capabilities
1020
+
1021
+ # Additional information about the content of the file. These fields are never
1022
+ # populated in responses.
1023
+ # Corresponds to the JSON property `contentHints`
1024
+ # @return [Google::Apis::DriveV3::File::ContentHints]
1025
+ attr_accessor :content_hints
1026
+
1027
+ # Restrictions for accessing the content of the file. Only populated if such a
1028
+ # restriction exists.
1029
+ # Corresponds to the JSON property `contentRestrictions`
1030
+ # @return [Array<Google::Apis::DriveV3::ContentRestriction>]
1031
+ attr_accessor :content_restrictions
1032
+
1033
+ # Whether the options to copy, print, or download this file, should be disabled
1034
+ # for readers and commenters.
1035
+ # Corresponds to the JSON property `copyRequiresWriterPermission`
1036
+ # @return [Boolean]
1037
+ attr_accessor :copy_requires_writer_permission
1038
+ alias_method :copy_requires_writer_permission?, :copy_requires_writer_permission
1039
+
1040
+ # The time at which the file was created (RFC 3339 date-time).
1041
+ # Corresponds to the JSON property `createdTime`
1042
+ # @return [DateTime]
1043
+ attr_accessor :created_time
1044
+
1045
+ # A short description of the file.
1046
+ # Corresponds to the JSON property `description`
1047
+ # @return [String]
1048
+ attr_accessor :description
1049
+
1050
+ # ID of the shared drive the file resides in. Only populated for items in shared
1051
+ # drives.
1052
+ # Corresponds to the JSON property `driveId`
1053
+ # @return [String]
1054
+ attr_accessor :drive_id
1055
+
1056
+ # Whether the file has been explicitly trashed, as opposed to recursively
1057
+ # trashed from a parent folder.
1058
+ # Corresponds to the JSON property `explicitlyTrashed`
1059
+ # @return [Boolean]
1060
+ attr_accessor :explicitly_trashed
1061
+ alias_method :explicitly_trashed?, :explicitly_trashed
1062
+
1063
+ # Links for exporting Docs Editors files to specific formats.
1064
+ # Corresponds to the JSON property `exportLinks`
1065
+ # @return [Hash<String,String>]
1066
+ attr_accessor :export_links
1067
+
1068
+ # The final component of fullFileExtension. This is only available for files
1069
+ # with binary content in Google Drive.
1070
+ # Corresponds to the JSON property `fileExtension`
1071
+ # @return [String]
1072
+ attr_accessor :file_extension
1073
+
1074
+ # The color for a folder as an RGB hex string. The supported colors are
1075
+ # published in the folderColorPalette field of the About resource.
1076
+ # If an unsupported color is specified, the closest color in the palette will be
1077
+ # used instead.
1078
+ # Corresponds to the JSON property `folderColorRgb`
1079
+ # @return [String]
1080
+ attr_accessor :folder_color_rgb
1081
+
1082
+ # The full file extension extracted from the name field. May contain multiple
1083
+ # concatenated extensions, such as "tar.gz". This is only available for files
1084
+ # with binary content in Google Drive.
1085
+ # This is automatically updated when the name field changes, however it is not
1086
+ # cleared if the new name does not contain a valid extension.
1087
+ # Corresponds to the JSON property `fullFileExtension`
1088
+ # @return [String]
1089
+ attr_accessor :full_file_extension
1090
+
1091
+ # Whether there are permissions directly on this file. This field is only
1092
+ # populated for items in shared drives.
1093
+ # Corresponds to the JSON property `hasAugmentedPermissions`
1094
+ # @return [Boolean]
1095
+ attr_accessor :has_augmented_permissions
1096
+ alias_method :has_augmented_permissions?, :has_augmented_permissions
1097
+
1098
+ # Whether this file has a thumbnail. This does not indicate whether the
1099
+ # requesting app has access to the thumbnail. To check access, look for the
1100
+ # presence of the thumbnailLink field.
1101
+ # Corresponds to the JSON property `hasThumbnail`
1102
+ # @return [Boolean]
1103
+ attr_accessor :has_thumbnail
1104
+ alias_method :has_thumbnail?, :has_thumbnail
1105
+
1106
+ # The ID of the file's head revision. This is currently only available for files
1107
+ # with binary content in Google Drive.
1108
+ # Corresponds to the JSON property `headRevisionId`
1109
+ # @return [String]
1110
+ attr_accessor :head_revision_id
1111
+
1112
+ # A static, unauthenticated link to the file's icon.
1113
+ # Corresponds to the JSON property `iconLink`
1114
+ # @return [String]
1115
+ attr_accessor :icon_link
1116
+
1117
+ # The ID of the file.
1118
+ # Corresponds to the JSON property `id`
1119
+ # @return [String]
1120
+ attr_accessor :id
1121
+
1122
+ # Additional metadata about image media, if available.
1123
+ # Corresponds to the JSON property `imageMediaMetadata`
1124
+ # @return [Google::Apis::DriveV3::File::ImageMediaMetadata]
1125
+ attr_accessor :image_media_metadata
1126
+
1127
+ # Whether the file was created or opened by the requesting app.
1128
+ # Corresponds to the JSON property `isAppAuthorized`
1129
+ # @return [Boolean]
1130
+ attr_accessor :is_app_authorized
1131
+ alias_method :is_app_authorized?, :is_app_authorized
1132
+
1133
+ # Identifies what kind of resource this is. Value: the fixed string "drive#file".
1134
+ # Corresponds to the JSON property `kind`
1135
+ # @return [String]
1136
+ attr_accessor :kind
1137
+
1138
+ # Information about a Drive user.
1139
+ # Corresponds to the JSON property `lastModifyingUser`
1140
+ # @return [Google::Apis::DriveV3::User]
1141
+ attr_accessor :last_modifying_user
1142
+
1143
+ # The MD5 checksum for the content of the file. This is only applicable to files
1144
+ # with binary content in Google Drive.
1145
+ # Corresponds to the JSON property `md5Checksum`
1146
+ # @return [String]
1147
+ attr_accessor :md5_checksum
1148
+
1149
+ # The MIME type of the file.
1150
+ # Google Drive will attempt to automatically detect an appropriate value from
1151
+ # uploaded content if no value is provided. The value cannot be changed unless a
1152
+ # new revision is uploaded.
1153
+ # If a file is created with a Google Doc MIME type, the uploaded content will be
1154
+ # imported if possible. The supported import formats are published in the About
1155
+ # resource.
1156
+ # Corresponds to the JSON property `mimeType`
1157
+ # @return [String]
1158
+ attr_accessor :mime_type
1159
+
1160
+ # Whether the file has been modified by this user.
1161
+ # Corresponds to the JSON property `modifiedByMe`
1162
+ # @return [Boolean]
1163
+ attr_accessor :modified_by_me
1164
+ alias_method :modified_by_me?, :modified_by_me
1165
+
1166
+ # The last time the file was modified by the user (RFC 3339 date-time).
1167
+ # Corresponds to the JSON property `modifiedByMeTime`
1168
+ # @return [DateTime]
1169
+ attr_accessor :modified_by_me_time
1170
+
1171
+ # The last time the file was modified by anyone (RFC 3339 date-time).
1172
+ # Note that setting modifiedTime will also update modifiedByMeTime for the user.
1173
+ # Corresponds to the JSON property `modifiedTime`
1174
+ # @return [DateTime]
1175
+ attr_accessor :modified_time
1176
+
1177
+ # The name of the file. This is not necessarily unique within a folder. Note
1178
+ # that for immutable items such as the top level folders of shared drives, My
1179
+ # Drive root folder, and Application Data folder the name is constant.
1180
+ # Corresponds to the JSON property `name`
1181
+ # @return [String]
1182
+ attr_accessor :name
1183
+
1184
+ # The original filename of the uploaded content if available, or else the
1185
+ # original value of the name field. This is only available for files with binary
1186
+ # content in Google Drive.
1187
+ # Corresponds to the JSON property `originalFilename`
1188
+ # @return [String]
1189
+ attr_accessor :original_filename
1190
+
1191
+ # Whether the user owns the file. Not populated for items in shared drives.
1192
+ # Corresponds to the JSON property `ownedByMe`
1193
+ # @return [Boolean]
1194
+ attr_accessor :owned_by_me
1195
+ alias_method :owned_by_me?, :owned_by_me
1196
+
1197
+ # The owners of the file. Currently, only certain legacy files may have more
1198
+ # than one owner. Not populated for items in shared drives.
1199
+ # Corresponds to the JSON property `owners`
1200
+ # @return [Array<Google::Apis::DriveV3::User>]
1201
+ attr_accessor :owners
1202
+
1203
+ # The IDs of the parent folders which contain the file.
1204
+ # If not specified as part of a create request, the file will be placed directly
1205
+ # in the user's My Drive folder. If not specified as part of a copy request, the
1206
+ # file will inherit any discoverable parents of the source file. Update requests
1207
+ # must use the addParents and removeParents parameters to modify the parents
1208
+ # list.
1209
+ # Corresponds to the JSON property `parents`
1210
+ # @return [Array<String>]
1211
+ attr_accessor :parents
1212
+
1213
+ # List of permission IDs for users with access to this file.
1214
+ # Corresponds to the JSON property `permissionIds`
1215
+ # @return [Array<String>]
1216
+ attr_accessor :permission_ids
1217
+
1218
+ # The full list of permissions for the file. This is only available if the
1219
+ # requesting user can share the file. Not populated for items in shared drives.
1220
+ # Corresponds to the JSON property `permissions`
1221
+ # @return [Array<Google::Apis::DriveV3::Permission>]
1222
+ attr_accessor :permissions
1223
+
1224
+ # A collection of arbitrary key-value pairs which are visible to all apps.
1225
+ # Entries with null values are cleared in update and copy requests.
1226
+ # Corresponds to the JSON property `properties`
1227
+ # @return [Hash<String,String>]
1228
+ attr_accessor :properties
1229
+
1230
+ # The number of storage quota bytes used by the file. This includes the head
1231
+ # revision as well as previous revisions with keepForever enabled.
1232
+ # Corresponds to the JSON property `quotaBytesUsed`
1233
+ # @return [Fixnum]
1234
+ attr_accessor :quota_bytes_used
1235
+
1236
+ # Whether the file has been shared. Not populated for items in shared drives.
1237
+ # Corresponds to the JSON property `shared`
1238
+ # @return [Boolean]
1239
+ attr_accessor :shared
1240
+ alias_method :shared?, :shared
1241
+
1242
+ # The time at which the file was shared with the user, if applicable (RFC 3339
1243
+ # date-time).
1244
+ # Corresponds to the JSON property `sharedWithMeTime`
1245
+ # @return [DateTime]
1246
+ attr_accessor :shared_with_me_time
1247
+
1248
+ # Information about a Drive user.
1249
+ # Corresponds to the JSON property `sharingUser`
1250
+ # @return [Google::Apis::DriveV3::User]
1251
+ attr_accessor :sharing_user
1252
+
1253
+ # Shortcut file details. Only populated for shortcut files, which have the
1254
+ # mimeType field set to application/vnd.google-apps.shortcut.
1255
+ # Corresponds to the JSON property `shortcutDetails`
1256
+ # @return [Google::Apis::DriveV3::File::ShortcutDetails]
1257
+ attr_accessor :shortcut_details
1258
+
1259
+ # The size of the file's content in bytes. This is applicable to binary files in
1260
+ # Google Drive and Google Docs files.
1261
+ # Corresponds to the JSON property `size`
1262
+ # @return [Fixnum]
1263
+ attr_accessor :size
1264
+
1265
+ # The list of spaces which contain the file. The currently supported values are '
1266
+ # drive', 'appDataFolder' and 'photos'.
1267
+ # Corresponds to the JSON property `spaces`
1268
+ # @return [Array<String>]
1269
+ attr_accessor :spaces
1270
+
1271
+ # Whether the user has starred the file.
1272
+ # Corresponds to the JSON property `starred`
1273
+ # @return [Boolean]
1274
+ attr_accessor :starred
1275
+ alias_method :starred?, :starred
1276
+
1277
+ # Deprecated - use driveId instead.
1278
+ # Corresponds to the JSON property `teamDriveId`
1279
+ # @return [String]
1280
+ attr_accessor :team_drive_id
1281
+
1282
+ # A short-lived link to the file's thumbnail, if available. Typically lasts on
1283
+ # the order of hours. Only populated when the requesting app can access the file'
1284
+ # s content. If the file isn't shared publicly, the URL returned in Files.
1285
+ # thumbnailLink must be fetched using a credentialed request.
1286
+ # Corresponds to the JSON property `thumbnailLink`
1287
+ # @return [String]
1288
+ attr_accessor :thumbnail_link
1289
+
1290
+ # The thumbnail version for use in thumbnail cache invalidation.
1291
+ # Corresponds to the JSON property `thumbnailVersion`
1292
+ # @return [Fixnum]
1293
+ attr_accessor :thumbnail_version
1294
+
1295
+ # Whether the file has been trashed, either explicitly or from a trashed parent
1296
+ # folder. Only the owner may trash a file. The trashed item is excluded from all
1297
+ # files.list responses returned for any user who does not own the file. However,
1298
+ # all users with access to the file can see the trashed item metadata in an API
1299
+ # response. All users with access can copy, download, export, and share the file.
1300
+ # Corresponds to the JSON property `trashed`
1301
+ # @return [Boolean]
1302
+ attr_accessor :trashed
1303
+ alias_method :trashed?, :trashed
1304
+
1305
+ # The time that the item was trashed (RFC 3339 date-time). Only populated for
1306
+ # items in shared drives.
1307
+ # Corresponds to the JSON property `trashedTime`
1308
+ # @return [DateTime]
1309
+ attr_accessor :trashed_time
1310
+
1311
+ # Information about a Drive user.
1312
+ # Corresponds to the JSON property `trashingUser`
1313
+ # @return [Google::Apis::DriveV3::User]
1314
+ attr_accessor :trashing_user
1315
+
1316
+ # A monotonically increasing version number for the file. This reflects every
1317
+ # change made to the file on the server, even those not visible to the user.
1318
+ # Corresponds to the JSON property `version`
1319
+ # @return [Fixnum]
1320
+ attr_accessor :version
1321
+
1322
+ # Additional metadata about video media. This may not be available immediately
1323
+ # upon upload.
1324
+ # Corresponds to the JSON property `videoMediaMetadata`
1325
+ # @return [Google::Apis::DriveV3::File::VideoMediaMetadata]
1326
+ attr_accessor :video_media_metadata
1327
+
1328
+ # Whether the file has been viewed by this user.
1329
+ # Corresponds to the JSON property `viewedByMe`
1330
+ # @return [Boolean]
1331
+ attr_accessor :viewed_by_me
1332
+ alias_method :viewed_by_me?, :viewed_by_me
1333
+
1334
+ # The last time the file was viewed by the user (RFC 3339 date-time).
1335
+ # Corresponds to the JSON property `viewedByMeTime`
1336
+ # @return [DateTime]
1337
+ attr_accessor :viewed_by_me_time
1338
+
1339
+ # Deprecated - use copyRequiresWriterPermission instead.
1340
+ # Corresponds to the JSON property `viewersCanCopyContent`
1341
+ # @return [Boolean]
1342
+ attr_accessor :viewers_can_copy_content
1343
+ alias_method :viewers_can_copy_content?, :viewers_can_copy_content
1344
+
1345
+ # A link for downloading the content of the file in a browser. This is only
1346
+ # available for files with binary content in Google Drive.
1347
+ # Corresponds to the JSON property `webContentLink`
1348
+ # @return [String]
1349
+ attr_accessor :web_content_link
1350
+
1351
+ # A link for opening the file in a relevant Google editor or viewer in a browser.
1352
+ # Corresponds to the JSON property `webViewLink`
1353
+ # @return [String]
1354
+ attr_accessor :web_view_link
1355
+
1356
+ # Whether users with only writer permission can modify the file's permissions.
1357
+ # Not populated for items in shared drives.
1358
+ # Corresponds to the JSON property `writersCanShare`
1359
+ # @return [Boolean]
1360
+ attr_accessor :writers_can_share
1361
+ alias_method :writers_can_share?, :writers_can_share
1362
+
1363
+ def initialize(**args)
1364
+ update!(**args)
1365
+ end
1366
+
1367
+ # Update properties of this object
1368
+ def update!(**args)
1369
+ @app_properties = args[:app_properties] if args.key?(:app_properties)
1370
+ @capabilities = args[:capabilities] if args.key?(:capabilities)
1371
+ @content_hints = args[:content_hints] if args.key?(:content_hints)
1372
+ @content_restrictions = args[:content_restrictions] if args.key?(:content_restrictions)
1373
+ @copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
1374
+ @created_time = args[:created_time] if args.key?(:created_time)
1375
+ @description = args[:description] if args.key?(:description)
1376
+ @drive_id = args[:drive_id] if args.key?(:drive_id)
1377
+ @explicitly_trashed = args[:explicitly_trashed] if args.key?(:explicitly_trashed)
1378
+ @export_links = args[:export_links] if args.key?(:export_links)
1379
+ @file_extension = args[:file_extension] if args.key?(:file_extension)
1380
+ @folder_color_rgb = args[:folder_color_rgb] if args.key?(:folder_color_rgb)
1381
+ @full_file_extension = args[:full_file_extension] if args.key?(:full_file_extension)
1382
+ @has_augmented_permissions = args[:has_augmented_permissions] if args.key?(:has_augmented_permissions)
1383
+ @has_thumbnail = args[:has_thumbnail] if args.key?(:has_thumbnail)
1384
+ @head_revision_id = args[:head_revision_id] if args.key?(:head_revision_id)
1385
+ @icon_link = args[:icon_link] if args.key?(:icon_link)
1386
+ @id = args[:id] if args.key?(:id)
1387
+ @image_media_metadata = args[:image_media_metadata] if args.key?(:image_media_metadata)
1388
+ @is_app_authorized = args[:is_app_authorized] if args.key?(:is_app_authorized)
1389
+ @kind = args[:kind] if args.key?(:kind)
1390
+ @last_modifying_user = args[:last_modifying_user] if args.key?(:last_modifying_user)
1391
+ @md5_checksum = args[:md5_checksum] if args.key?(:md5_checksum)
1392
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
1393
+ @modified_by_me = args[:modified_by_me] if args.key?(:modified_by_me)
1394
+ @modified_by_me_time = args[:modified_by_me_time] if args.key?(:modified_by_me_time)
1395
+ @modified_time = args[:modified_time] if args.key?(:modified_time)
1396
+ @name = args[:name] if args.key?(:name)
1397
+ @original_filename = args[:original_filename] if args.key?(:original_filename)
1398
+ @owned_by_me = args[:owned_by_me] if args.key?(:owned_by_me)
1399
+ @owners = args[:owners] if args.key?(:owners)
1400
+ @parents = args[:parents] if args.key?(:parents)
1401
+ @permission_ids = args[:permission_ids] if args.key?(:permission_ids)
1402
+ @permissions = args[:permissions] if args.key?(:permissions)
1403
+ @properties = args[:properties] if args.key?(:properties)
1404
+ @quota_bytes_used = args[:quota_bytes_used] if args.key?(:quota_bytes_used)
1405
+ @shared = args[:shared] if args.key?(:shared)
1406
+ @shared_with_me_time = args[:shared_with_me_time] if args.key?(:shared_with_me_time)
1407
+ @sharing_user = args[:sharing_user] if args.key?(:sharing_user)
1408
+ @shortcut_details = args[:shortcut_details] if args.key?(:shortcut_details)
1409
+ @size = args[:size] if args.key?(:size)
1410
+ @spaces = args[:spaces] if args.key?(:spaces)
1411
+ @starred = args[:starred] if args.key?(:starred)
1412
+ @team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id)
1413
+ @thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link)
1414
+ @thumbnail_version = args[:thumbnail_version] if args.key?(:thumbnail_version)
1415
+ @trashed = args[:trashed] if args.key?(:trashed)
1416
+ @trashed_time = args[:trashed_time] if args.key?(:trashed_time)
1417
+ @trashing_user = args[:trashing_user] if args.key?(:trashing_user)
1418
+ @version = args[:version] if args.key?(:version)
1419
+ @video_media_metadata = args[:video_media_metadata] if args.key?(:video_media_metadata)
1420
+ @viewed_by_me = args[:viewed_by_me] if args.key?(:viewed_by_me)
1421
+ @viewed_by_me_time = args[:viewed_by_me_time] if args.key?(:viewed_by_me_time)
1422
+ @viewers_can_copy_content = args[:viewers_can_copy_content] if args.key?(:viewers_can_copy_content)
1423
+ @web_content_link = args[:web_content_link] if args.key?(:web_content_link)
1424
+ @web_view_link = args[:web_view_link] if args.key?(:web_view_link)
1425
+ @writers_can_share = args[:writers_can_share] if args.key?(:writers_can_share)
1426
+ end
1427
+
1428
+ # Capabilities the current user has on this file. Each capability corresponds to
1429
+ # a fine-grained action that a user may take.
1430
+ class Capabilities
1431
+ include Google::Apis::Core::Hashable
1432
+
1433
+ # Whether the current user can add children to this folder. This is always false
1434
+ # when the item is not a folder.
1435
+ # Corresponds to the JSON property `canAddChildren`
1436
+ # @return [Boolean]
1437
+ attr_accessor :can_add_children
1438
+ alias_method :can_add_children?, :can_add_children
1439
+
1440
+ # Whether the current user can add a folder from another drive (different shared
1441
+ # drive or My Drive) to this folder. This is false when the item is not a folder.
1442
+ # Only populated for items in shared drives.
1443
+ # Corresponds to the JSON property `canAddFolderFromAnotherDrive`
1444
+ # @return [Boolean]
1445
+ attr_accessor :can_add_folder_from_another_drive
1446
+ alias_method :can_add_folder_from_another_drive?, :can_add_folder_from_another_drive
1447
+
1448
+ # Whether the current user can add a parent for the item without removing an
1449
+ # existing parent in the same request. Not populated for shared drive files.
1450
+ # Corresponds to the JSON property `canAddMyDriveParent`
1451
+ # @return [Boolean]
1452
+ attr_accessor :can_add_my_drive_parent
1453
+ alias_method :can_add_my_drive_parent?, :can_add_my_drive_parent
1454
+
1455
+ # Whether the current user can change the copyRequiresWriterPermission
1456
+ # restriction of this file.
1457
+ # Corresponds to the JSON property `canChangeCopyRequiresWriterPermission`
1458
+ # @return [Boolean]
1459
+ attr_accessor :can_change_copy_requires_writer_permission
1460
+ alias_method :can_change_copy_requires_writer_permission?, :can_change_copy_requires_writer_permission
1461
+
1462
+ # Deprecated
1463
+ # Corresponds to the JSON property `canChangeViewersCanCopyContent`
1464
+ # @return [Boolean]
1465
+ attr_accessor :can_change_viewers_can_copy_content
1466
+ alias_method :can_change_viewers_can_copy_content?, :can_change_viewers_can_copy_content
1467
+
1468
+ # Whether the current user can comment on this file.
1469
+ # Corresponds to the JSON property `canComment`
1470
+ # @return [Boolean]
1471
+ attr_accessor :can_comment
1472
+ alias_method :can_comment?, :can_comment
1473
+
1474
+ # Whether the current user can copy this file. For an item in a shared drive,
1475
+ # whether the current user can copy non-folder descendants of this item, or this
1476
+ # item itself if it is not a folder.
1477
+ # Corresponds to the JSON property `canCopy`
1478
+ # @return [Boolean]
1479
+ attr_accessor :can_copy
1480
+ alias_method :can_copy?, :can_copy
1481
+
1482
+ # Whether the current user can delete this file.
1483
+ # Corresponds to the JSON property `canDelete`
1484
+ # @return [Boolean]
1485
+ attr_accessor :can_delete
1486
+ alias_method :can_delete?, :can_delete
1487
+
1488
+ # Whether the current user can delete children of this folder. This is false
1489
+ # when the item is not a folder. Only populated for items in shared drives.
1490
+ # Corresponds to the JSON property `canDeleteChildren`
1491
+ # @return [Boolean]
1492
+ attr_accessor :can_delete_children
1493
+ alias_method :can_delete_children?, :can_delete_children
1494
+
1495
+ # Whether the current user can download this file.
1496
+ # Corresponds to the JSON property `canDownload`
1497
+ # @return [Boolean]
1498
+ attr_accessor :can_download
1499
+ alias_method :can_download?, :can_download
1500
+
1501
+ # Whether the current user can edit this file. Other factors may limit the type
1502
+ # of changes a user can make to a file. For example, see
1503
+ # canChangeCopyRequiresWriterPermission or canModifyContent.
1504
+ # Corresponds to the JSON property `canEdit`
1505
+ # @return [Boolean]
1506
+ attr_accessor :can_edit
1507
+ alias_method :can_edit?, :can_edit
1508
+
1509
+ # Whether the current user can list the children of this folder. This is always
1510
+ # false when the item is not a folder.
1511
+ # Corresponds to the JSON property `canListChildren`
1512
+ # @return [Boolean]
1513
+ attr_accessor :can_list_children
1514
+ alias_method :can_list_children?, :can_list_children
1515
+
1516
+ # Whether the current user can modify the content of this file.
1517
+ # Corresponds to the JSON property `canModifyContent`
1518
+ # @return [Boolean]
1519
+ attr_accessor :can_modify_content
1520
+ alias_method :can_modify_content?, :can_modify_content
1521
+
1522
+ # Whether the current user can modify restrictions on content of this file.
1523
+ # Corresponds to the JSON property `canModifyContentRestriction`
1524
+ # @return [Boolean]
1525
+ attr_accessor :can_modify_content_restriction
1526
+ alias_method :can_modify_content_restriction?, :can_modify_content_restriction
1527
+
1528
+ # Whether the current user can move children of this folder outside of the
1529
+ # shared drive. This is false when the item is not a folder. Only populated for
1530
+ # items in shared drives.
1531
+ # Corresponds to the JSON property `canMoveChildrenOutOfDrive`
1532
+ # @return [Boolean]
1533
+ attr_accessor :can_move_children_out_of_drive
1534
+ alias_method :can_move_children_out_of_drive?, :can_move_children_out_of_drive
1535
+
1536
+ # Deprecated - use canMoveChildrenOutOfDrive instead.
1537
+ # Corresponds to the JSON property `canMoveChildrenOutOfTeamDrive`
1538
+ # @return [Boolean]
1539
+ attr_accessor :can_move_children_out_of_team_drive
1540
+ alias_method :can_move_children_out_of_team_drive?, :can_move_children_out_of_team_drive
1541
+
1542
+ # Whether the current user can move children of this folder within this drive.
1543
+ # This is false when the item is not a folder. Note that a request to move the
1544
+ # child may still fail depending on the current user's access to the child and
1545
+ # to the destination folder.
1546
+ # Corresponds to the JSON property `canMoveChildrenWithinDrive`
1547
+ # @return [Boolean]
1548
+ attr_accessor :can_move_children_within_drive
1549
+ alias_method :can_move_children_within_drive?, :can_move_children_within_drive
1550
+
1551
+ # Deprecated - use canMoveChildrenWithinDrive instead.
1552
+ # Corresponds to the JSON property `canMoveChildrenWithinTeamDrive`
1553
+ # @return [Boolean]
1554
+ attr_accessor :can_move_children_within_team_drive
1555
+ alias_method :can_move_children_within_team_drive?, :can_move_children_within_team_drive
1556
+
1557
+ # Deprecated - use canMoveItemOutOfDrive instead.
1558
+ # Corresponds to the JSON property `canMoveItemIntoTeamDrive`
1559
+ # @return [Boolean]
1560
+ attr_accessor :can_move_item_into_team_drive
1561
+ alias_method :can_move_item_into_team_drive?, :can_move_item_into_team_drive
1562
+
1563
+ # Whether the current user can move this item outside of this drive by changing
1564
+ # its parent. Note that a request to change the parent of the item may still
1565
+ # fail depending on the new parent that is being added.
1566
+ # Corresponds to the JSON property `canMoveItemOutOfDrive`
1567
+ # @return [Boolean]
1568
+ attr_accessor :can_move_item_out_of_drive
1569
+ alias_method :can_move_item_out_of_drive?, :can_move_item_out_of_drive
1570
+
1571
+ # Deprecated - use canMoveItemOutOfDrive instead.
1572
+ # Corresponds to the JSON property `canMoveItemOutOfTeamDrive`
1573
+ # @return [Boolean]
1574
+ attr_accessor :can_move_item_out_of_team_drive
1575
+ alias_method :can_move_item_out_of_team_drive?, :can_move_item_out_of_team_drive
1576
+
1577
+ # Whether the current user can move this item within this drive. Note that a
1578
+ # request to change the parent of the item may still fail depending on the new
1579
+ # parent that is being added and the parent that is being removed.
1580
+ # Corresponds to the JSON property `canMoveItemWithinDrive`
1581
+ # @return [Boolean]
1582
+ attr_accessor :can_move_item_within_drive
1583
+ alias_method :can_move_item_within_drive?, :can_move_item_within_drive
1584
+
1585
+ # Deprecated - use canMoveItemWithinDrive instead.
1586
+ # Corresponds to the JSON property `canMoveItemWithinTeamDrive`
1587
+ # @return [Boolean]
1588
+ attr_accessor :can_move_item_within_team_drive
1589
+ alias_method :can_move_item_within_team_drive?, :can_move_item_within_team_drive
1590
+
1591
+ # Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
1592
+ # Corresponds to the JSON property `canMoveTeamDriveItem`
1593
+ # @return [Boolean]
1594
+ attr_accessor :can_move_team_drive_item
1595
+ alias_method :can_move_team_drive_item?, :can_move_team_drive_item
1596
+
1597
+ # Whether the current user can read the shared drive to which this file belongs.
1598
+ # Only populated for items in shared drives.
1599
+ # Corresponds to the JSON property `canReadDrive`
1600
+ # @return [Boolean]
1601
+ attr_accessor :can_read_drive
1602
+ alias_method :can_read_drive?, :can_read_drive
1603
+
1604
+ # Whether the current user can read the revisions resource of this file. For a
1605
+ # shared drive item, whether revisions of non-folder descendants of this item,
1606
+ # or this item itself if it is not a folder, can be read.
1607
+ # Corresponds to the JSON property `canReadRevisions`
1608
+ # @return [Boolean]
1609
+ attr_accessor :can_read_revisions
1610
+ alias_method :can_read_revisions?, :can_read_revisions
1611
+
1612
+ # Deprecated - use canReadDrive instead.
1613
+ # Corresponds to the JSON property `canReadTeamDrive`
1614
+ # @return [Boolean]
1615
+ attr_accessor :can_read_team_drive
1616
+ alias_method :can_read_team_drive?, :can_read_team_drive
1617
+
1618
+ # Whether the current user can remove children from this folder. This is always
1619
+ # false when the item is not a folder. For a folder in a shared drive, use
1620
+ # canDeleteChildren or canTrashChildren instead.
1621
+ # Corresponds to the JSON property `canRemoveChildren`
1622
+ # @return [Boolean]
1623
+ attr_accessor :can_remove_children
1624
+ alias_method :can_remove_children?, :can_remove_children
1625
+
1626
+ # Whether the current user can remove a parent from the item without adding
1627
+ # another parent in the same request. Not populated for shared drive files.
1628
+ # Corresponds to the JSON property `canRemoveMyDriveParent`
1629
+ # @return [Boolean]
1630
+ attr_accessor :can_remove_my_drive_parent
1631
+ alias_method :can_remove_my_drive_parent?, :can_remove_my_drive_parent
1632
+
1633
+ # Whether the current user can rename this file.
1634
+ # Corresponds to the JSON property `canRename`
1635
+ # @return [Boolean]
1636
+ attr_accessor :can_rename
1637
+ alias_method :can_rename?, :can_rename
1638
+
1639
+ # Whether the current user can modify the sharing settings for this file.
1640
+ # Corresponds to the JSON property `canShare`
1641
+ # @return [Boolean]
1642
+ attr_accessor :can_share
1643
+ alias_method :can_share?, :can_share
1644
+
1645
+ # Whether the current user can move this file to trash.
1646
+ # Corresponds to the JSON property `canTrash`
1647
+ # @return [Boolean]
1648
+ attr_accessor :can_trash
1649
+ alias_method :can_trash?, :can_trash
1650
+
1651
+ # Whether the current user can trash children of this folder. This is false when
1652
+ # the item is not a folder. Only populated for items in shared drives.
1653
+ # Corresponds to the JSON property `canTrashChildren`
1654
+ # @return [Boolean]
1655
+ attr_accessor :can_trash_children
1656
+ alias_method :can_trash_children?, :can_trash_children
1657
+
1658
+ # Whether the current user can restore this file from trash.
1659
+ # Corresponds to the JSON property `canUntrash`
1660
+ # @return [Boolean]
1661
+ attr_accessor :can_untrash
1662
+ alias_method :can_untrash?, :can_untrash
1663
+
1664
+ def initialize(**args)
1665
+ update!(**args)
1666
+ end
1667
+
1668
+ # Update properties of this object
1669
+ def update!(**args)
1670
+ @can_add_children = args[:can_add_children] if args.key?(:can_add_children)
1671
+ @can_add_folder_from_another_drive = args[:can_add_folder_from_another_drive] if args.key?(:can_add_folder_from_another_drive)
1672
+ @can_add_my_drive_parent = args[:can_add_my_drive_parent] if args.key?(:can_add_my_drive_parent)
1673
+ @can_change_copy_requires_writer_permission = args[:can_change_copy_requires_writer_permission] if args.key?(:can_change_copy_requires_writer_permission)
1674
+ @can_change_viewers_can_copy_content = args[:can_change_viewers_can_copy_content] if args.key?(:can_change_viewers_can_copy_content)
1675
+ @can_comment = args[:can_comment] if args.key?(:can_comment)
1676
+ @can_copy = args[:can_copy] if args.key?(:can_copy)
1677
+ @can_delete = args[:can_delete] if args.key?(:can_delete)
1678
+ @can_delete_children = args[:can_delete_children] if args.key?(:can_delete_children)
1679
+ @can_download = args[:can_download] if args.key?(:can_download)
1680
+ @can_edit = args[:can_edit] if args.key?(:can_edit)
1681
+ @can_list_children = args[:can_list_children] if args.key?(:can_list_children)
1682
+ @can_modify_content = args[:can_modify_content] if args.key?(:can_modify_content)
1683
+ @can_modify_content_restriction = args[:can_modify_content_restriction] if args.key?(:can_modify_content_restriction)
1684
+ @can_move_children_out_of_drive = args[:can_move_children_out_of_drive] if args.key?(:can_move_children_out_of_drive)
1685
+ @can_move_children_out_of_team_drive = args[:can_move_children_out_of_team_drive] if args.key?(:can_move_children_out_of_team_drive)
1686
+ @can_move_children_within_drive = args[:can_move_children_within_drive] if args.key?(:can_move_children_within_drive)
1687
+ @can_move_children_within_team_drive = args[:can_move_children_within_team_drive] if args.key?(:can_move_children_within_team_drive)
1688
+ @can_move_item_into_team_drive = args[:can_move_item_into_team_drive] if args.key?(:can_move_item_into_team_drive)
1689
+ @can_move_item_out_of_drive = args[:can_move_item_out_of_drive] if args.key?(:can_move_item_out_of_drive)
1690
+ @can_move_item_out_of_team_drive = args[:can_move_item_out_of_team_drive] if args.key?(:can_move_item_out_of_team_drive)
1691
+ @can_move_item_within_drive = args[:can_move_item_within_drive] if args.key?(:can_move_item_within_drive)
1692
+ @can_move_item_within_team_drive = args[:can_move_item_within_team_drive] if args.key?(:can_move_item_within_team_drive)
1693
+ @can_move_team_drive_item = args[:can_move_team_drive_item] if args.key?(:can_move_team_drive_item)
1694
+ @can_read_drive = args[:can_read_drive] if args.key?(:can_read_drive)
1695
+ @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
1696
+ @can_read_team_drive = args[:can_read_team_drive] if args.key?(:can_read_team_drive)
1697
+ @can_remove_children = args[:can_remove_children] if args.key?(:can_remove_children)
1698
+ @can_remove_my_drive_parent = args[:can_remove_my_drive_parent] if args.key?(:can_remove_my_drive_parent)
1699
+ @can_rename = args[:can_rename] if args.key?(:can_rename)
1700
+ @can_share = args[:can_share] if args.key?(:can_share)
1701
+ @can_trash = args[:can_trash] if args.key?(:can_trash)
1702
+ @can_trash_children = args[:can_trash_children] if args.key?(:can_trash_children)
1703
+ @can_untrash = args[:can_untrash] if args.key?(:can_untrash)
1704
+ end
1705
+ end
1706
+
1707
+ # Additional information about the content of the file. These fields are never
1708
+ # populated in responses.
1709
+ class ContentHints
1710
+ include Google::Apis::Core::Hashable
1711
+
1712
+ # Text to be indexed for the file to improve fullText queries. This is limited
1713
+ # to 128KB in length and may contain HTML elements.
1714
+ # Corresponds to the JSON property `indexableText`
1715
+ # @return [String]
1716
+ attr_accessor :indexable_text
1717
+
1718
+ # A thumbnail for the file. This will only be used if Google Drive cannot
1719
+ # generate a standard thumbnail.
1720
+ # Corresponds to the JSON property `thumbnail`
1721
+ # @return [Google::Apis::DriveV3::File::ContentHints::Thumbnail]
1722
+ attr_accessor :thumbnail
1723
+
1724
+ def initialize(**args)
1725
+ update!(**args)
1726
+ end
1727
+
1728
+ # Update properties of this object
1729
+ def update!(**args)
1730
+ @indexable_text = args[:indexable_text] if args.key?(:indexable_text)
1731
+ @thumbnail = args[:thumbnail] if args.key?(:thumbnail)
1732
+ end
1733
+
1734
+ # A thumbnail for the file. This will only be used if Google Drive cannot
1735
+ # generate a standard thumbnail.
1736
+ class Thumbnail
1737
+ include Google::Apis::Core::Hashable
1738
+
1739
+ # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
1740
+ # Corresponds to the JSON property `image`
1741
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1742
+ # @return [String]
1743
+ attr_accessor :image
1744
+
1745
+ # The MIME type of the thumbnail.
1746
+ # Corresponds to the JSON property `mimeType`
1747
+ # @return [String]
1748
+ attr_accessor :mime_type
1749
+
1750
+ def initialize(**args)
1751
+ update!(**args)
1752
+ end
1753
+
1754
+ # Update properties of this object
1755
+ def update!(**args)
1756
+ @image = args[:image] if args.key?(:image)
1757
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
1758
+ end
1759
+ end
1760
+ end
1761
+
1762
+ # Additional metadata about image media, if available.
1763
+ class ImageMediaMetadata
1764
+ include Google::Apis::Core::Hashable
1765
+
1766
+ # The aperture used to create the photo (f-number).
1767
+ # Corresponds to the JSON property `aperture`
1768
+ # @return [Float]
1769
+ attr_accessor :aperture
1770
+
1771
+ # The make of the camera used to create the photo.
1772
+ # Corresponds to the JSON property `cameraMake`
1773
+ # @return [String]
1774
+ attr_accessor :camera_make
1775
+
1776
+ # The model of the camera used to create the photo.
1777
+ # Corresponds to the JSON property `cameraModel`
1778
+ # @return [String]
1779
+ attr_accessor :camera_model
1780
+
1781
+ # The color space of the photo.
1782
+ # Corresponds to the JSON property `colorSpace`
1783
+ # @return [String]
1784
+ attr_accessor :color_space
1785
+
1786
+ # The exposure bias of the photo (APEX value).
1787
+ # Corresponds to the JSON property `exposureBias`
1788
+ # @return [Float]
1789
+ attr_accessor :exposure_bias
1790
+
1791
+ # The exposure mode used to create the photo.
1792
+ # Corresponds to the JSON property `exposureMode`
1793
+ # @return [String]
1794
+ attr_accessor :exposure_mode
1795
+
1796
+ # The length of the exposure, in seconds.
1797
+ # Corresponds to the JSON property `exposureTime`
1798
+ # @return [Float]
1799
+ attr_accessor :exposure_time
1800
+
1801
+ # Whether a flash was used to create the photo.
1802
+ # Corresponds to the JSON property `flashUsed`
1803
+ # @return [Boolean]
1804
+ attr_accessor :flash_used
1805
+ alias_method :flash_used?, :flash_used
1806
+
1807
+ # The focal length used to create the photo, in millimeters.
1808
+ # Corresponds to the JSON property `focalLength`
1809
+ # @return [Float]
1810
+ attr_accessor :focal_length
1811
+
1812
+ # The height of the image in pixels.
1813
+ # Corresponds to the JSON property `height`
1814
+ # @return [Fixnum]
1815
+ attr_accessor :height
1816
+
1817
+ # The ISO speed used to create the photo.
1818
+ # Corresponds to the JSON property `isoSpeed`
1819
+ # @return [Fixnum]
1820
+ attr_accessor :iso_speed
1821
+
1822
+ # The lens used to create the photo.
1823
+ # Corresponds to the JSON property `lens`
1824
+ # @return [String]
1825
+ attr_accessor :lens
1826
+
1827
+ # Geographic location information stored in the image.
1828
+ # Corresponds to the JSON property `location`
1829
+ # @return [Google::Apis::DriveV3::File::ImageMediaMetadata::Location]
1830
+ attr_accessor :location
1831
+
1832
+ # The smallest f-number of the lens at the focal length used to create the photo
1833
+ # (APEX value).
1834
+ # Corresponds to the JSON property `maxApertureValue`
1835
+ # @return [Float]
1836
+ attr_accessor :max_aperture_value
1837
+
1838
+ # The metering mode used to create the photo.
1839
+ # Corresponds to the JSON property `meteringMode`
1840
+ # @return [String]
1841
+ attr_accessor :metering_mode
1842
+
1843
+ # The number of clockwise 90 degree rotations applied from the image's original
1844
+ # orientation.
1845
+ # Corresponds to the JSON property `rotation`
1846
+ # @return [Fixnum]
1847
+ attr_accessor :rotation
1848
+
1849
+ # The type of sensor used to create the photo.
1850
+ # Corresponds to the JSON property `sensor`
1851
+ # @return [String]
1852
+ attr_accessor :sensor
1853
+
1854
+ # The distance to the subject of the photo, in meters.
1855
+ # Corresponds to the JSON property `subjectDistance`
1856
+ # @return [Fixnum]
1857
+ attr_accessor :subject_distance
1858
+
1859
+ # The date and time the photo was taken (EXIF DateTime).
1860
+ # Corresponds to the JSON property `time`
1861
+ # @return [String]
1862
+ attr_accessor :time
1863
+
1864
+ # The white balance mode used to create the photo.
1865
+ # Corresponds to the JSON property `whiteBalance`
1866
+ # @return [String]
1867
+ attr_accessor :white_balance
1868
+
1869
+ # The width of the image in pixels.
1870
+ # Corresponds to the JSON property `width`
1871
+ # @return [Fixnum]
1872
+ attr_accessor :width
1873
+
1874
+ def initialize(**args)
1875
+ update!(**args)
1876
+ end
1877
+
1878
+ # Update properties of this object
1879
+ def update!(**args)
1880
+ @aperture = args[:aperture] if args.key?(:aperture)
1881
+ @camera_make = args[:camera_make] if args.key?(:camera_make)
1882
+ @camera_model = args[:camera_model] if args.key?(:camera_model)
1883
+ @color_space = args[:color_space] if args.key?(:color_space)
1884
+ @exposure_bias = args[:exposure_bias] if args.key?(:exposure_bias)
1885
+ @exposure_mode = args[:exposure_mode] if args.key?(:exposure_mode)
1886
+ @exposure_time = args[:exposure_time] if args.key?(:exposure_time)
1887
+ @flash_used = args[:flash_used] if args.key?(:flash_used)
1888
+ @focal_length = args[:focal_length] if args.key?(:focal_length)
1889
+ @height = args[:height] if args.key?(:height)
1890
+ @iso_speed = args[:iso_speed] if args.key?(:iso_speed)
1891
+ @lens = args[:lens] if args.key?(:lens)
1892
+ @location = args[:location] if args.key?(:location)
1893
+ @max_aperture_value = args[:max_aperture_value] if args.key?(:max_aperture_value)
1894
+ @metering_mode = args[:metering_mode] if args.key?(:metering_mode)
1895
+ @rotation = args[:rotation] if args.key?(:rotation)
1896
+ @sensor = args[:sensor] if args.key?(:sensor)
1897
+ @subject_distance = args[:subject_distance] if args.key?(:subject_distance)
1898
+ @time = args[:time] if args.key?(:time)
1899
+ @white_balance = args[:white_balance] if args.key?(:white_balance)
1900
+ @width = args[:width] if args.key?(:width)
1901
+ end
1902
+
1903
+ # Geographic location information stored in the image.
1904
+ class Location
1905
+ include Google::Apis::Core::Hashable
1906
+
1907
+ # The altitude stored in the image.
1908
+ # Corresponds to the JSON property `altitude`
1909
+ # @return [Float]
1910
+ attr_accessor :altitude
1911
+
1912
+ # The latitude stored in the image.
1913
+ # Corresponds to the JSON property `latitude`
1914
+ # @return [Float]
1915
+ attr_accessor :latitude
1916
+
1917
+ # The longitude stored in the image.
1918
+ # Corresponds to the JSON property `longitude`
1919
+ # @return [Float]
1920
+ attr_accessor :longitude
1921
+
1922
+ def initialize(**args)
1923
+ update!(**args)
1924
+ end
1925
+
1926
+ # Update properties of this object
1927
+ def update!(**args)
1928
+ @altitude = args[:altitude] if args.key?(:altitude)
1929
+ @latitude = args[:latitude] if args.key?(:latitude)
1930
+ @longitude = args[:longitude] if args.key?(:longitude)
1931
+ end
1932
+ end
1933
+ end
1934
+
1935
+ # Shortcut file details. Only populated for shortcut files, which have the
1936
+ # mimeType field set to application/vnd.google-apps.shortcut.
1937
+ class ShortcutDetails
1938
+ include Google::Apis::Core::Hashable
1939
+
1940
+ # The ID of the file that this shortcut points to.
1941
+ # Corresponds to the JSON property `targetId`
1942
+ # @return [String]
1943
+ attr_accessor :target_id
1944
+
1945
+ # The MIME type of the file that this shortcut points to. The value of this
1946
+ # field is a snapshot of the target's MIME type, captured when the shortcut is
1947
+ # created.
1948
+ # Corresponds to the JSON property `targetMimeType`
1949
+ # @return [String]
1950
+ attr_accessor :target_mime_type
1951
+
1952
+ def initialize(**args)
1953
+ update!(**args)
1954
+ end
1955
+
1956
+ # Update properties of this object
1957
+ def update!(**args)
1958
+ @target_id = args[:target_id] if args.key?(:target_id)
1959
+ @target_mime_type = args[:target_mime_type] if args.key?(:target_mime_type)
1960
+ end
1961
+ end
1962
+
1963
+ # Additional metadata about video media. This may not be available immediately
1964
+ # upon upload.
1965
+ class VideoMediaMetadata
1966
+ include Google::Apis::Core::Hashable
1967
+
1968
+ # The duration of the video in milliseconds.
1969
+ # Corresponds to the JSON property `durationMillis`
1970
+ # @return [Fixnum]
1971
+ attr_accessor :duration_millis
1972
+
1973
+ # The height of the video in pixels.
1974
+ # Corresponds to the JSON property `height`
1975
+ # @return [Fixnum]
1976
+ attr_accessor :height
1977
+
1978
+ # The width of the video in pixels.
1979
+ # Corresponds to the JSON property `width`
1980
+ # @return [Fixnum]
1981
+ attr_accessor :width
1982
+
1983
+ def initialize(**args)
1984
+ update!(**args)
1985
+ end
1986
+
1987
+ # Update properties of this object
1988
+ def update!(**args)
1989
+ @duration_millis = args[:duration_millis] if args.key?(:duration_millis)
1990
+ @height = args[:height] if args.key?(:height)
1991
+ @width = args[:width] if args.key?(:width)
1992
+ end
1993
+ end
1994
+ end
1995
+
1996
+ # A list of files.
1997
+ class FileList
1998
+ include Google::Apis::Core::Hashable
1999
+
2000
+ # The list of files. If nextPageToken is populated, then this list may be
2001
+ # incomplete and an additional page of results should be fetched.
2002
+ # Corresponds to the JSON property `files`
2003
+ # @return [Array<Google::Apis::DriveV3::File>]
2004
+ attr_accessor :files
2005
+
2006
+ # Whether the search process was incomplete. If true, then some search results
2007
+ # may be missing, since all documents were not searched. This may occur when
2008
+ # searching multiple drives with the "allDrives" corpora, but all corpora could
2009
+ # not be searched. When this happens, it is suggested that clients narrow their
2010
+ # query by choosing a different corpus such as "user" or "drive".
2011
+ # Corresponds to the JSON property `incompleteSearch`
2012
+ # @return [Boolean]
2013
+ attr_accessor :incomplete_search
2014
+ alias_method :incomplete_search?, :incomplete_search
2015
+
2016
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2017
+ # fileList".
2018
+ # Corresponds to the JSON property `kind`
2019
+ # @return [String]
2020
+ attr_accessor :kind
2021
+
2022
+ # The page token for the next page of files. This will be absent if the end of
2023
+ # the files list has been reached. If the token is rejected for any reason, it
2024
+ # should be discarded, and pagination should be restarted from the first page of
2025
+ # results.
2026
+ # Corresponds to the JSON property `nextPageToken`
2027
+ # @return [String]
2028
+ attr_accessor :next_page_token
2029
+
2030
+ def initialize(**args)
2031
+ update!(**args)
2032
+ end
2033
+
2034
+ # Update properties of this object
2035
+ def update!(**args)
2036
+ @files = args[:files] if args.key?(:files)
2037
+ @incomplete_search = args[:incomplete_search] if args.key?(:incomplete_search)
2038
+ @kind = args[:kind] if args.key?(:kind)
2039
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2040
+ end
2041
+ end
2042
+
2043
+ # A list of generated file IDs which can be provided in create requests.
2044
+ class GeneratedIds
2045
+ include Google::Apis::Core::Hashable
2046
+
2047
+ # The IDs generated for the requesting user in the specified space.
2048
+ # Corresponds to the JSON property `ids`
2049
+ # @return [Array<String>]
2050
+ attr_accessor :ids
2051
+
2052
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2053
+ # generatedIds".
2054
+ # Corresponds to the JSON property `kind`
2055
+ # @return [String]
2056
+ attr_accessor :kind
2057
+
2058
+ # The type of file that can be created with these IDs.
2059
+ # Corresponds to the JSON property `space`
2060
+ # @return [String]
2061
+ attr_accessor :space
2062
+
2063
+ def initialize(**args)
2064
+ update!(**args)
2065
+ end
2066
+
2067
+ # Update properties of this object
2068
+ def update!(**args)
2069
+ @ids = args[:ids] if args.key?(:ids)
2070
+ @kind = args[:kind] if args.key?(:kind)
2071
+ @space = args[:space] if args.key?(:space)
2072
+ end
2073
+ end
2074
+
2075
+ # A permission for a file. A permission grants a user, group, domain or the
2076
+ # world access to a file or a folder hierarchy.
2077
+ class Permission
2078
+ include Google::Apis::Core::Hashable
2079
+
2080
+ # Whether the permission allows the file to be discovered through search. This
2081
+ # is only applicable for permissions of type domain or anyone.
2082
+ # Corresponds to the JSON property `allowFileDiscovery`
2083
+ # @return [Boolean]
2084
+ attr_accessor :allow_file_discovery
2085
+ alias_method :allow_file_discovery?, :allow_file_discovery
2086
+
2087
+ # Whether the account associated with this permission has been deleted. This
2088
+ # field only pertains to user and group permissions.
2089
+ # Corresponds to the JSON property `deleted`
2090
+ # @return [Boolean]
2091
+ attr_accessor :deleted
2092
+ alias_method :deleted?, :deleted
2093
+
2094
+ # The "pretty" name of the value of the permission. The following is a list of
2095
+ # examples for each type of permission:
2096
+ # - user - User's full name, as defined for their Google account, such as "Joe
2097
+ # Smith."
2098
+ # - group - Name of the Google Group, such as "The Company Administrators."
2099
+ # - domain - String domain name, such as "thecompany.com."
2100
+ # - anyone - No displayName is present.
2101
+ # Corresponds to the JSON property `displayName`
2102
+ # @return [String]
2103
+ attr_accessor :display_name
2104
+
2105
+ # The domain to which this permission refers.
2106
+ # Corresponds to the JSON property `domain`
2107
+ # @return [String]
2108
+ attr_accessor :domain
2109
+
2110
+ # The email address of the user or group to which this permission refers.
2111
+ # Corresponds to the JSON property `emailAddress`
2112
+ # @return [String]
2113
+ attr_accessor :email_address
2114
+
2115
+ # The time at which this permission will expire (RFC 3339 date-time). Expiration
2116
+ # times have the following restrictions:
2117
+ # - They can only be set on user and group permissions
2118
+ # - The time must be in the future
2119
+ # - The time cannot be more than a year in the future
2120
+ # Corresponds to the JSON property `expirationTime`
2121
+ # @return [DateTime]
2122
+ attr_accessor :expiration_time
2123
+
2124
+ # The ID of this permission. This is a unique identifier for the grantee, and is
2125
+ # published in User resources as permissionId. IDs should be treated as opaque
2126
+ # values.
2127
+ # Corresponds to the JSON property `id`
2128
+ # @return [String]
2129
+ attr_accessor :id
2130
+
2131
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2132
+ # permission".
2133
+ # Corresponds to the JSON property `kind`
2134
+ # @return [String]
2135
+ attr_accessor :kind
2136
+
2137
+ # Details of whether the permissions on this shared drive item are inherited or
2138
+ # directly on this item. This is an output-only field which is present only for
2139
+ # shared drive items.
2140
+ # Corresponds to the JSON property `permissionDetails`
2141
+ # @return [Array<Google::Apis::DriveV3::Permission::PermissionDetail>]
2142
+ attr_accessor :permission_details
2143
+
2144
+ # A link to the user's profile photo, if available.
2145
+ # Corresponds to the JSON property `photoLink`
2146
+ # @return [String]
2147
+ attr_accessor :photo_link
2148
+
2149
+ # The role granted by this permission. While new values may be supported in the
2150
+ # future, the following are currently allowed:
2151
+ # - owner
2152
+ # - organizer
2153
+ # - fileOrganizer
2154
+ # - writer
2155
+ # - commenter
2156
+ # - reader
2157
+ # Corresponds to the JSON property `role`
2158
+ # @return [String]
2159
+ attr_accessor :role
2160
+
2161
+ # Deprecated - use permissionDetails instead.
2162
+ # Corresponds to the JSON property `teamDrivePermissionDetails`
2163
+ # @return [Array<Google::Apis::DriveV3::Permission::TeamDrivePermissionDetail>]
2164
+ attr_accessor :team_drive_permission_details
2165
+
2166
+ # The type of the grantee. Valid values are:
2167
+ # - user
2168
+ # - group
2169
+ # - domain
2170
+ # - anyone When creating a permission, if type is user or group, you must
2171
+ # provide an emailAddress for the user or group. When type is domain, you must
2172
+ # provide a domain. There isn't extra information required for a anyone type.
2173
+ # Corresponds to the JSON property `type`
2174
+ # @return [String]
2175
+ attr_accessor :type
2176
+
2177
+ # Indicates the view for this permission. Only populated for permissions that
2178
+ # belong to a view. published is the only supported value.
2179
+ # Corresponds to the JSON property `view`
2180
+ # @return [String]
2181
+ attr_accessor :view
2182
+
2183
+ def initialize(**args)
2184
+ update!(**args)
2185
+ end
2186
+
2187
+ # Update properties of this object
2188
+ def update!(**args)
2189
+ @allow_file_discovery = args[:allow_file_discovery] if args.key?(:allow_file_discovery)
2190
+ @deleted = args[:deleted] if args.key?(:deleted)
2191
+ @display_name = args[:display_name] if args.key?(:display_name)
2192
+ @domain = args[:domain] if args.key?(:domain)
2193
+ @email_address = args[:email_address] if args.key?(:email_address)
2194
+ @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
2195
+ @id = args[:id] if args.key?(:id)
2196
+ @kind = args[:kind] if args.key?(:kind)
2197
+ @permission_details = args[:permission_details] if args.key?(:permission_details)
2198
+ @photo_link = args[:photo_link] if args.key?(:photo_link)
2199
+ @role = args[:role] if args.key?(:role)
2200
+ @team_drive_permission_details = args[:team_drive_permission_details] if args.key?(:team_drive_permission_details)
2201
+ @type = args[:type] if args.key?(:type)
2202
+ @view = args[:view] if args.key?(:view)
2203
+ end
2204
+
2205
+ #
2206
+ class PermissionDetail
2207
+ include Google::Apis::Core::Hashable
2208
+
2209
+ # Whether this permission is inherited. This field is always populated. This is
2210
+ # an output-only field.
2211
+ # Corresponds to the JSON property `inherited`
2212
+ # @return [Boolean]
2213
+ attr_accessor :inherited
2214
+ alias_method :inherited?, :inherited
2215
+
2216
+ # The ID of the item from which this permission is inherited. This is an output-
2217
+ # only field.
2218
+ # Corresponds to the JSON property `inheritedFrom`
2219
+ # @return [String]
2220
+ attr_accessor :inherited_from
2221
+
2222
+ # The permission type for this user. While new values may be added in future,
2223
+ # the following are currently possible:
2224
+ # - file
2225
+ # - member
2226
+ # Corresponds to the JSON property `permissionType`
2227
+ # @return [String]
2228
+ attr_accessor :permission_type
2229
+
2230
+ # The primary role for this user. While new values may be added in the future,
2231
+ # the following are currently possible:
2232
+ # - organizer
2233
+ # - fileOrganizer
2234
+ # - writer
2235
+ # - commenter
2236
+ # - reader
2237
+ # Corresponds to the JSON property `role`
2238
+ # @return [String]
2239
+ attr_accessor :role
2240
+
2241
+ def initialize(**args)
2242
+ update!(**args)
2243
+ end
2244
+
2245
+ # Update properties of this object
2246
+ def update!(**args)
2247
+ @inherited = args[:inherited] if args.key?(:inherited)
2248
+ @inherited_from = args[:inherited_from] if args.key?(:inherited_from)
2249
+ @permission_type = args[:permission_type] if args.key?(:permission_type)
2250
+ @role = args[:role] if args.key?(:role)
2251
+ end
2252
+ end
2253
+
2254
+ #
2255
+ class TeamDrivePermissionDetail
2256
+ include Google::Apis::Core::Hashable
2257
+
2258
+ # Deprecated - use permissionDetails/inherited instead.
2259
+ # Corresponds to the JSON property `inherited`
2260
+ # @return [Boolean]
2261
+ attr_accessor :inherited
2262
+ alias_method :inherited?, :inherited
2263
+
2264
+ # Deprecated - use permissionDetails/inheritedFrom instead.
2265
+ # Corresponds to the JSON property `inheritedFrom`
2266
+ # @return [String]
2267
+ attr_accessor :inherited_from
2268
+
2269
+ # Deprecated - use permissionDetails/role instead.
2270
+ # Corresponds to the JSON property `role`
2271
+ # @return [String]
2272
+ attr_accessor :role
2273
+
2274
+ # Deprecated - use permissionDetails/permissionType instead.
2275
+ # Corresponds to the JSON property `teamDrivePermissionType`
2276
+ # @return [String]
2277
+ attr_accessor :team_drive_permission_type
2278
+
2279
+ def initialize(**args)
2280
+ update!(**args)
2281
+ end
2282
+
2283
+ # Update properties of this object
2284
+ def update!(**args)
2285
+ @inherited = args[:inherited] if args.key?(:inherited)
2286
+ @inherited_from = args[:inherited_from] if args.key?(:inherited_from)
2287
+ @role = args[:role] if args.key?(:role)
2288
+ @team_drive_permission_type = args[:team_drive_permission_type] if args.key?(:team_drive_permission_type)
2289
+ end
2290
+ end
2291
+ end
2292
+
2293
+ # A list of permissions for a file.
2294
+ class PermissionList
2295
+ include Google::Apis::Core::Hashable
2296
+
2297
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2298
+ # permissionList".
2299
+ # Corresponds to the JSON property `kind`
2300
+ # @return [String]
2301
+ attr_accessor :kind
2302
+
2303
+ # The page token for the next page of permissions. This field will be absent if
2304
+ # the end of the permissions list has been reached. If the token is rejected for
2305
+ # any reason, it should be discarded, and pagination should be restarted from
2306
+ # the first page of results.
2307
+ # Corresponds to the JSON property `nextPageToken`
2308
+ # @return [String]
2309
+ attr_accessor :next_page_token
2310
+
2311
+ # The list of permissions. If nextPageToken is populated, then this list may be
2312
+ # incomplete and an additional page of results should be fetched.
2313
+ # Corresponds to the JSON property `permissions`
2314
+ # @return [Array<Google::Apis::DriveV3::Permission>]
2315
+ attr_accessor :permissions
2316
+
2317
+ def initialize(**args)
2318
+ update!(**args)
2319
+ end
2320
+
2321
+ # Update properties of this object
2322
+ def update!(**args)
2323
+ @kind = args[:kind] if args.key?(:kind)
2324
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2325
+ @permissions = args[:permissions] if args.key?(:permissions)
2326
+ end
2327
+ end
2328
+
2329
+ # A reply to a comment on a file.
2330
+ class Reply
2331
+ include Google::Apis::Core::Hashable
2332
+
2333
+ # The action the reply performed to the parent comment. Valid values are:
2334
+ # - resolve
2335
+ # - reopen
2336
+ # Corresponds to the JSON property `action`
2337
+ # @return [String]
2338
+ attr_accessor :action
2339
+
2340
+ # Information about a Drive user.
2341
+ # Corresponds to the JSON property `author`
2342
+ # @return [Google::Apis::DriveV3::User]
2343
+ attr_accessor :author
2344
+
2345
+ # The plain text content of the reply. This field is used for setting the
2346
+ # content, while htmlContent should be displayed. This is required on creates if
2347
+ # no action is specified.
2348
+ # Corresponds to the JSON property `content`
2349
+ # @return [String]
2350
+ attr_accessor :content
2351
+
2352
+ # The time at which the reply was created (RFC 3339 date-time).
2353
+ # Corresponds to the JSON property `createdTime`
2354
+ # @return [DateTime]
2355
+ attr_accessor :created_time
2356
+
2357
+ # Whether the reply has been deleted. A deleted reply has no content.
2358
+ # Corresponds to the JSON property `deleted`
2359
+ # @return [Boolean]
2360
+ attr_accessor :deleted
2361
+ alias_method :deleted?, :deleted
2362
+
2363
+ # The content of the reply with HTML formatting.
2364
+ # Corresponds to the JSON property `htmlContent`
2365
+ # @return [String]
2366
+ attr_accessor :html_content
2367
+
2368
+ # The ID of the reply.
2369
+ # Corresponds to the JSON property `id`
2370
+ # @return [String]
2371
+ attr_accessor :id
2372
+
2373
+ # Identifies what kind of resource this is. Value: the fixed string "drive#reply"
2374
+ # .
2375
+ # Corresponds to the JSON property `kind`
2376
+ # @return [String]
2377
+ attr_accessor :kind
2378
+
2379
+ # The last time the reply was modified (RFC 3339 date-time).
2380
+ # Corresponds to the JSON property `modifiedTime`
2381
+ # @return [DateTime]
2382
+ attr_accessor :modified_time
2383
+
2384
+ def initialize(**args)
2385
+ update!(**args)
2386
+ end
2387
+
2388
+ # Update properties of this object
2389
+ def update!(**args)
2390
+ @action = args[:action] if args.key?(:action)
2391
+ @author = args[:author] if args.key?(:author)
2392
+ @content = args[:content] if args.key?(:content)
2393
+ @created_time = args[:created_time] if args.key?(:created_time)
2394
+ @deleted = args[:deleted] if args.key?(:deleted)
2395
+ @html_content = args[:html_content] if args.key?(:html_content)
2396
+ @id = args[:id] if args.key?(:id)
2397
+ @kind = args[:kind] if args.key?(:kind)
2398
+ @modified_time = args[:modified_time] if args.key?(:modified_time)
2399
+ end
2400
+ end
2401
+
2402
+ # A list of replies to a comment on a file.
2403
+ class ReplyList
2404
+ include Google::Apis::Core::Hashable
2405
+
2406
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2407
+ # replyList".
2408
+ # Corresponds to the JSON property `kind`
2409
+ # @return [String]
2410
+ attr_accessor :kind
2411
+
2412
+ # The page token for the next page of replies. This will be absent if the end of
2413
+ # the replies list has been reached. If the token is rejected for any reason, it
2414
+ # should be discarded, and pagination should be restarted from the first page of
2415
+ # results.
2416
+ # Corresponds to the JSON property `nextPageToken`
2417
+ # @return [String]
2418
+ attr_accessor :next_page_token
2419
+
2420
+ # The list of replies. If nextPageToken is populated, then this list may be
2421
+ # incomplete and an additional page of results should be fetched.
2422
+ # Corresponds to the JSON property `replies`
2423
+ # @return [Array<Google::Apis::DriveV3::Reply>]
2424
+ attr_accessor :replies
2425
+
2426
+ def initialize(**args)
2427
+ update!(**args)
2428
+ end
2429
+
2430
+ # Update properties of this object
2431
+ def update!(**args)
2432
+ @kind = args[:kind] if args.key?(:kind)
2433
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2434
+ @replies = args[:replies] if args.key?(:replies)
2435
+ end
2436
+ end
2437
+
2438
+ # The metadata for a revision to a file.
2439
+ class Revision
2440
+ include Google::Apis::Core::Hashable
2441
+
2442
+ # Links for exporting Docs Editors files to specific formats.
2443
+ # Corresponds to the JSON property `exportLinks`
2444
+ # @return [Hash<String,String>]
2445
+ attr_accessor :export_links
2446
+
2447
+ # The ID of the revision.
2448
+ # Corresponds to the JSON property `id`
2449
+ # @return [String]
2450
+ attr_accessor :id
2451
+
2452
+ # Whether to keep this revision forever, even if it is no longer the head
2453
+ # revision. If not set, the revision will be automatically purged 30 days after
2454
+ # newer content is uploaded. This can be set on a maximum of 200 revisions for a
2455
+ # file.
2456
+ # This field is only applicable to files with binary content in Drive.
2457
+ # Corresponds to the JSON property `keepForever`
2458
+ # @return [Boolean]
2459
+ attr_accessor :keep_forever
2460
+ alias_method :keep_forever?, :keep_forever
2461
+
2462
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2463
+ # revision".
2464
+ # Corresponds to the JSON property `kind`
2465
+ # @return [String]
2466
+ attr_accessor :kind
2467
+
2468
+ # Information about a Drive user.
2469
+ # Corresponds to the JSON property `lastModifyingUser`
2470
+ # @return [Google::Apis::DriveV3::User]
2471
+ attr_accessor :last_modifying_user
2472
+
2473
+ # The MD5 checksum of the revision's content. This is only applicable to files
2474
+ # with binary content in Drive.
2475
+ # Corresponds to the JSON property `md5Checksum`
2476
+ # @return [String]
2477
+ attr_accessor :md5_checksum
2478
+
2479
+ # The MIME type of the revision.
2480
+ # Corresponds to the JSON property `mimeType`
2481
+ # @return [String]
2482
+ attr_accessor :mime_type
2483
+
2484
+ # The last time the revision was modified (RFC 3339 date-time).
2485
+ # Corresponds to the JSON property `modifiedTime`
2486
+ # @return [DateTime]
2487
+ attr_accessor :modified_time
2488
+
2489
+ # The original filename used to create this revision. This is only applicable to
2490
+ # files with binary content in Drive.
2491
+ # Corresponds to the JSON property `originalFilename`
2492
+ # @return [String]
2493
+ attr_accessor :original_filename
2494
+
2495
+ # Whether subsequent revisions will be automatically republished. This is only
2496
+ # applicable to Docs Editors files.
2497
+ # Corresponds to the JSON property `publishAuto`
2498
+ # @return [Boolean]
2499
+ attr_accessor :publish_auto
2500
+ alias_method :publish_auto?, :publish_auto
2501
+
2502
+ # Whether this revision is published. This is only applicable to Docs Editors
2503
+ # files.
2504
+ # Corresponds to the JSON property `published`
2505
+ # @return [Boolean]
2506
+ attr_accessor :published
2507
+ alias_method :published?, :published
2508
+
2509
+ # A link to the published revision. This is only populated for Google Sites
2510
+ # files.
2511
+ # Corresponds to the JSON property `publishedLink`
2512
+ # @return [String]
2513
+ attr_accessor :published_link
2514
+
2515
+ # Whether this revision is published outside the domain. This is only applicable
2516
+ # to Docs Editors files.
2517
+ # Corresponds to the JSON property `publishedOutsideDomain`
2518
+ # @return [Boolean]
2519
+ attr_accessor :published_outside_domain
2520
+ alias_method :published_outside_domain?, :published_outside_domain
2521
+
2522
+ # The size of the revision's content in bytes. This is only applicable to files
2523
+ # with binary content in Drive.
2524
+ # Corresponds to the JSON property `size`
2525
+ # @return [Fixnum]
2526
+ attr_accessor :size
2527
+
2528
+ def initialize(**args)
2529
+ update!(**args)
2530
+ end
2531
+
2532
+ # Update properties of this object
2533
+ def update!(**args)
2534
+ @export_links = args[:export_links] if args.key?(:export_links)
2535
+ @id = args[:id] if args.key?(:id)
2536
+ @keep_forever = args[:keep_forever] if args.key?(:keep_forever)
2537
+ @kind = args[:kind] if args.key?(:kind)
2538
+ @last_modifying_user = args[:last_modifying_user] if args.key?(:last_modifying_user)
2539
+ @md5_checksum = args[:md5_checksum] if args.key?(:md5_checksum)
2540
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
2541
+ @modified_time = args[:modified_time] if args.key?(:modified_time)
2542
+ @original_filename = args[:original_filename] if args.key?(:original_filename)
2543
+ @publish_auto = args[:publish_auto] if args.key?(:publish_auto)
2544
+ @published = args[:published] if args.key?(:published)
2545
+ @published_link = args[:published_link] if args.key?(:published_link)
2546
+ @published_outside_domain = args[:published_outside_domain] if args.key?(:published_outside_domain)
2547
+ @size = args[:size] if args.key?(:size)
2548
+ end
2549
+ end
2550
+
2551
+ # A list of revisions of a file.
2552
+ class RevisionList
2553
+ include Google::Apis::Core::Hashable
2554
+
2555
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2556
+ # revisionList".
2557
+ # Corresponds to the JSON property `kind`
2558
+ # @return [String]
2559
+ attr_accessor :kind
2560
+
2561
+ # The page token for the next page of revisions. This will be absent if the end
2562
+ # of the revisions list has been reached. If the token is rejected for any
2563
+ # reason, it should be discarded, and pagination should be restarted from the
2564
+ # first page of results.
2565
+ # Corresponds to the JSON property `nextPageToken`
2566
+ # @return [String]
2567
+ attr_accessor :next_page_token
2568
+
2569
+ # The list of revisions. If nextPageToken is populated, then this list may be
2570
+ # incomplete and an additional page of results should be fetched.
2571
+ # Corresponds to the JSON property `revisions`
2572
+ # @return [Array<Google::Apis::DriveV3::Revision>]
2573
+ attr_accessor :revisions
2574
+
2575
+ def initialize(**args)
2576
+ update!(**args)
2577
+ end
2578
+
2579
+ # Update properties of this object
2580
+ def update!(**args)
2581
+ @kind = args[:kind] if args.key?(:kind)
2582
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2583
+ @revisions = args[:revisions] if args.key?(:revisions)
2584
+ end
2585
+ end
2586
+
2587
+ #
2588
+ class StartPageToken
2589
+ include Google::Apis::Core::Hashable
2590
+
2591
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2592
+ # startPageToken".
2593
+ # Corresponds to the JSON property `kind`
2594
+ # @return [String]
2595
+ attr_accessor :kind
2596
+
2597
+ # The starting page token for listing changes.
2598
+ # Corresponds to the JSON property `startPageToken`
2599
+ # @return [String]
2600
+ attr_accessor :start_page_token
2601
+
2602
+ def initialize(**args)
2603
+ update!(**args)
2604
+ end
2605
+
2606
+ # Update properties of this object
2607
+ def update!(**args)
2608
+ @kind = args[:kind] if args.key?(:kind)
2609
+ @start_page_token = args[:start_page_token] if args.key?(:start_page_token)
2610
+ end
2611
+ end
2612
+
2613
+ # Deprecated: use the drive collection instead.
2614
+ class TeamDrive
2615
+ include Google::Apis::Core::Hashable
2616
+
2617
+ # An image file and cropping parameters from which a background image for this
2618
+ # Team Drive is set. This is a write only field; it can only be set on drive.
2619
+ # teamdrives.update requests that don't set themeId. When specified, all fields
2620
+ # of the backgroundImageFile must be set.
2621
+ # Corresponds to the JSON property `backgroundImageFile`
2622
+ # @return [Google::Apis::DriveV3::TeamDrive::BackgroundImageFile]
2623
+ attr_accessor :background_image_file
2624
+
2625
+ # A short-lived link to this Team Drive's background image.
2626
+ # Corresponds to the JSON property `backgroundImageLink`
2627
+ # @return [String]
2628
+ attr_accessor :background_image_link
2629
+
2630
+ # Capabilities the current user has on this Team Drive.
2631
+ # Corresponds to the JSON property `capabilities`
2632
+ # @return [Google::Apis::DriveV3::TeamDrive::Capabilities]
2633
+ attr_accessor :capabilities
2634
+
2635
+ # The color of this Team Drive as an RGB hex string. It can only be set on a
2636
+ # drive.teamdrives.update request that does not set themeId.
2637
+ # Corresponds to the JSON property `colorRgb`
2638
+ # @return [String]
2639
+ attr_accessor :color_rgb
2640
+
2641
+ # The time at which the Team Drive was created (RFC 3339 date-time).
2642
+ # Corresponds to the JSON property `createdTime`
2643
+ # @return [DateTime]
2644
+ attr_accessor :created_time
2645
+
2646
+ # The ID of this Team Drive which is also the ID of the top level folder of this
2647
+ # Team Drive.
2648
+ # Corresponds to the JSON property `id`
2649
+ # @return [String]
2650
+ attr_accessor :id
2651
+
2652
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2653
+ # teamDrive".
2654
+ # Corresponds to the JSON property `kind`
2655
+ # @return [String]
2656
+ attr_accessor :kind
2657
+
2658
+ # The name of this Team Drive.
2659
+ # Corresponds to the JSON property `name`
2660
+ # @return [String]
2661
+ attr_accessor :name
2662
+
2663
+ # A set of restrictions that apply to this Team Drive or items inside this Team
2664
+ # Drive.
2665
+ # Corresponds to the JSON property `restrictions`
2666
+ # @return [Google::Apis::DriveV3::TeamDrive::Restrictions]
2667
+ attr_accessor :restrictions
2668
+
2669
+ # The ID of the theme from which the background image and color will be set. The
2670
+ # set of possible teamDriveThemes can be retrieved from a drive.about.get
2671
+ # response. When not specified on a drive.teamdrives.create request, a random
2672
+ # theme is chosen from which the background image and color are set. This is a
2673
+ # write-only field; it can only be set on requests that don't set colorRgb or
2674
+ # backgroundImageFile.
2675
+ # Corresponds to the JSON property `themeId`
2676
+ # @return [String]
2677
+ attr_accessor :theme_id
2678
+
2679
+ def initialize(**args)
2680
+ update!(**args)
2681
+ end
2682
+
2683
+ # Update properties of this object
2684
+ def update!(**args)
2685
+ @background_image_file = args[:background_image_file] if args.key?(:background_image_file)
2686
+ @background_image_link = args[:background_image_link] if args.key?(:background_image_link)
2687
+ @capabilities = args[:capabilities] if args.key?(:capabilities)
2688
+ @color_rgb = args[:color_rgb] if args.key?(:color_rgb)
2689
+ @created_time = args[:created_time] if args.key?(:created_time)
2690
+ @id = args[:id] if args.key?(:id)
2691
+ @kind = args[:kind] if args.key?(:kind)
2692
+ @name = args[:name] if args.key?(:name)
2693
+ @restrictions = args[:restrictions] if args.key?(:restrictions)
2694
+ @theme_id = args[:theme_id] if args.key?(:theme_id)
2695
+ end
2696
+
2697
+ # An image file and cropping parameters from which a background image for this
2698
+ # Team Drive is set. This is a write only field; it can only be set on drive.
2699
+ # teamdrives.update requests that don't set themeId. When specified, all fields
2700
+ # of the backgroundImageFile must be set.
2701
+ class BackgroundImageFile
2702
+ include Google::Apis::Core::Hashable
2703
+
2704
+ # The ID of an image file in Drive to use for the background image.
2705
+ # Corresponds to the JSON property `id`
2706
+ # @return [String]
2707
+ attr_accessor :id
2708
+
2709
+ # The width of the cropped image in the closed range of 0 to 1. This value
2710
+ # represents the width of the cropped image divided by the width of the entire
2711
+ # image. The height is computed by applying a width to height aspect ratio of 80
2712
+ # to 9. The resulting image must be at least 1280 pixels wide and 144 pixels
2713
+ # high.
2714
+ # Corresponds to the JSON property `width`
2715
+ # @return [Float]
2716
+ attr_accessor :width
2717
+
2718
+ # The X coordinate of the upper left corner of the cropping area in the
2719
+ # background image. This is a value in the closed range of 0 to 1. This value
2720
+ # represents the horizontal distance from the left side of the entire image to
2721
+ # the left side of the cropping area divided by the width of the entire image.
2722
+ # Corresponds to the JSON property `xCoordinate`
2723
+ # @return [Float]
2724
+ attr_accessor :x_coordinate
2725
+
2726
+ # The Y coordinate of the upper left corner of the cropping area in the
2727
+ # background image. This is a value in the closed range of 0 to 1. This value
2728
+ # represents the vertical distance from the top side of the entire image to the
2729
+ # top side of the cropping area divided by the height of the entire image.
2730
+ # Corresponds to the JSON property `yCoordinate`
2731
+ # @return [Float]
2732
+ attr_accessor :y_coordinate
2733
+
2734
+ def initialize(**args)
2735
+ update!(**args)
2736
+ end
2737
+
2738
+ # Update properties of this object
2739
+ def update!(**args)
2740
+ @id = args[:id] if args.key?(:id)
2741
+ @width = args[:width] if args.key?(:width)
2742
+ @x_coordinate = args[:x_coordinate] if args.key?(:x_coordinate)
2743
+ @y_coordinate = args[:y_coordinate] if args.key?(:y_coordinate)
2744
+ end
2745
+ end
2746
+
2747
+ # Capabilities the current user has on this Team Drive.
2748
+ class Capabilities
2749
+ include Google::Apis::Core::Hashable
2750
+
2751
+ # Whether the current user can add children to folders in this Team Drive.
2752
+ # Corresponds to the JSON property `canAddChildren`
2753
+ # @return [Boolean]
2754
+ attr_accessor :can_add_children
2755
+ alias_method :can_add_children?, :can_add_children
2756
+
2757
+ # Whether the current user can change the copyRequiresWriterPermission
2758
+ # restriction of this Team Drive.
2759
+ # Corresponds to the JSON property `canChangeCopyRequiresWriterPermissionRestriction`
2760
+ # @return [Boolean]
2761
+ attr_accessor :can_change_copy_requires_writer_permission_restriction
2762
+ alias_method :can_change_copy_requires_writer_permission_restriction?, :can_change_copy_requires_writer_permission_restriction
2763
+
2764
+ # Whether the current user can change the domainUsersOnly restriction of this
2765
+ # Team Drive.
2766
+ # Corresponds to the JSON property `canChangeDomainUsersOnlyRestriction`
2767
+ # @return [Boolean]
2768
+ attr_accessor :can_change_domain_users_only_restriction
2769
+ alias_method :can_change_domain_users_only_restriction?, :can_change_domain_users_only_restriction
2770
+
2771
+ # Whether the current user can change the background of this Team Drive.
2772
+ # Corresponds to the JSON property `canChangeTeamDriveBackground`
2773
+ # @return [Boolean]
2774
+ attr_accessor :can_change_team_drive_background
2775
+ alias_method :can_change_team_drive_background?, :can_change_team_drive_background
2776
+
2777
+ # Whether the current user can change the teamMembersOnly restriction of this
2778
+ # Team Drive.
2779
+ # Corresponds to the JSON property `canChangeTeamMembersOnlyRestriction`
2780
+ # @return [Boolean]
2781
+ attr_accessor :can_change_team_members_only_restriction
2782
+ alias_method :can_change_team_members_only_restriction?, :can_change_team_members_only_restriction
2783
+
2784
+ # Whether the current user can comment on files in this Team Drive.
2785
+ # Corresponds to the JSON property `canComment`
2786
+ # @return [Boolean]
2787
+ attr_accessor :can_comment
2788
+ alias_method :can_comment?, :can_comment
2789
+
2790
+ # Whether the current user can copy files in this Team Drive.
2791
+ # Corresponds to the JSON property `canCopy`
2792
+ # @return [Boolean]
2793
+ attr_accessor :can_copy
2794
+ alias_method :can_copy?, :can_copy
2795
+
2796
+ # Whether the current user can delete children from folders in this Team Drive.
2797
+ # Corresponds to the JSON property `canDeleteChildren`
2798
+ # @return [Boolean]
2799
+ attr_accessor :can_delete_children
2800
+ alias_method :can_delete_children?, :can_delete_children
2801
+
2802
+ # Whether the current user can delete this Team Drive. Attempting to delete the
2803
+ # Team Drive may still fail if there are untrashed items inside the Team Drive.
2804
+ # Corresponds to the JSON property `canDeleteTeamDrive`
2805
+ # @return [Boolean]
2806
+ attr_accessor :can_delete_team_drive
2807
+ alias_method :can_delete_team_drive?, :can_delete_team_drive
2808
+
2809
+ # Whether the current user can download files in this Team Drive.
2810
+ # Corresponds to the JSON property `canDownload`
2811
+ # @return [Boolean]
2812
+ attr_accessor :can_download
2813
+ alias_method :can_download?, :can_download
2814
+
2815
+ # Whether the current user can edit files in this Team Drive
2816
+ # Corresponds to the JSON property `canEdit`
2817
+ # @return [Boolean]
2818
+ attr_accessor :can_edit
2819
+ alias_method :can_edit?, :can_edit
2820
+
2821
+ # Whether the current user can list the children of folders in this Team Drive.
2822
+ # Corresponds to the JSON property `canListChildren`
2823
+ # @return [Boolean]
2824
+ attr_accessor :can_list_children
2825
+ alias_method :can_list_children?, :can_list_children
2826
+
2827
+ # Whether the current user can add members to this Team Drive or remove them or
2828
+ # change their role.
2829
+ # Corresponds to the JSON property `canManageMembers`
2830
+ # @return [Boolean]
2831
+ attr_accessor :can_manage_members
2832
+ alias_method :can_manage_members?, :can_manage_members
2833
+
2834
+ # Whether the current user can read the revisions resource of files in this Team
2835
+ # Drive.
2836
+ # Corresponds to the JSON property `canReadRevisions`
2837
+ # @return [Boolean]
2838
+ attr_accessor :can_read_revisions
2839
+ alias_method :can_read_revisions?, :can_read_revisions
2840
+
2841
+ # Deprecated - use canDeleteChildren or canTrashChildren instead.
2842
+ # Corresponds to the JSON property `canRemoveChildren`
2843
+ # @return [Boolean]
2844
+ attr_accessor :can_remove_children
2845
+ alias_method :can_remove_children?, :can_remove_children
2846
+
2847
+ # Whether the current user can rename files or folders in this Team Drive.
2848
+ # Corresponds to the JSON property `canRename`
2849
+ # @return [Boolean]
2850
+ attr_accessor :can_rename
2851
+ alias_method :can_rename?, :can_rename
2852
+
2853
+ # Whether the current user can rename this Team Drive.
2854
+ # Corresponds to the JSON property `canRenameTeamDrive`
2855
+ # @return [Boolean]
2856
+ attr_accessor :can_rename_team_drive
2857
+ alias_method :can_rename_team_drive?, :can_rename_team_drive
2858
+
2859
+ # Whether the current user can share files or folders in this Team Drive.
2860
+ # Corresponds to the JSON property `canShare`
2861
+ # @return [Boolean]
2862
+ attr_accessor :can_share
2863
+ alias_method :can_share?, :can_share
2864
+
2865
+ # Whether the current user can trash children from folders in this Team Drive.
2866
+ # Corresponds to the JSON property `canTrashChildren`
2867
+ # @return [Boolean]
2868
+ attr_accessor :can_trash_children
2869
+ alias_method :can_trash_children?, :can_trash_children
2870
+
2871
+ def initialize(**args)
2872
+ update!(**args)
2873
+ end
2874
+
2875
+ # Update properties of this object
2876
+ def update!(**args)
2877
+ @can_add_children = args[:can_add_children] if args.key?(:can_add_children)
2878
+ @can_change_copy_requires_writer_permission_restriction = args[:can_change_copy_requires_writer_permission_restriction] if args.key?(:can_change_copy_requires_writer_permission_restriction)
2879
+ @can_change_domain_users_only_restriction = args[:can_change_domain_users_only_restriction] if args.key?(:can_change_domain_users_only_restriction)
2880
+ @can_change_team_drive_background = args[:can_change_team_drive_background] if args.key?(:can_change_team_drive_background)
2881
+ @can_change_team_members_only_restriction = args[:can_change_team_members_only_restriction] if args.key?(:can_change_team_members_only_restriction)
2882
+ @can_comment = args[:can_comment] if args.key?(:can_comment)
2883
+ @can_copy = args[:can_copy] if args.key?(:can_copy)
2884
+ @can_delete_children = args[:can_delete_children] if args.key?(:can_delete_children)
2885
+ @can_delete_team_drive = args[:can_delete_team_drive] if args.key?(:can_delete_team_drive)
2886
+ @can_download = args[:can_download] if args.key?(:can_download)
2887
+ @can_edit = args[:can_edit] if args.key?(:can_edit)
2888
+ @can_list_children = args[:can_list_children] if args.key?(:can_list_children)
2889
+ @can_manage_members = args[:can_manage_members] if args.key?(:can_manage_members)
2890
+ @can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
2891
+ @can_remove_children = args[:can_remove_children] if args.key?(:can_remove_children)
2892
+ @can_rename = args[:can_rename] if args.key?(:can_rename)
2893
+ @can_rename_team_drive = args[:can_rename_team_drive] if args.key?(:can_rename_team_drive)
2894
+ @can_share = args[:can_share] if args.key?(:can_share)
2895
+ @can_trash_children = args[:can_trash_children] if args.key?(:can_trash_children)
2896
+ end
2897
+ end
2898
+
2899
+ # A set of restrictions that apply to this Team Drive or items inside this Team
2900
+ # Drive.
2901
+ class Restrictions
2902
+ include Google::Apis::Core::Hashable
2903
+
2904
+ # Whether administrative privileges on this Team Drive are required to modify
2905
+ # restrictions.
2906
+ # Corresponds to the JSON property `adminManagedRestrictions`
2907
+ # @return [Boolean]
2908
+ attr_accessor :admin_managed_restrictions
2909
+ alias_method :admin_managed_restrictions?, :admin_managed_restrictions
2910
+
2911
+ # Whether the options to copy, print, or download files inside this Team Drive,
2912
+ # should be disabled for readers and commenters. When this restriction is set to
2913
+ # true, it will override the similarly named field to true for any file inside
2914
+ # this Team Drive.
2915
+ # Corresponds to the JSON property `copyRequiresWriterPermission`
2916
+ # @return [Boolean]
2917
+ attr_accessor :copy_requires_writer_permission
2918
+ alias_method :copy_requires_writer_permission?, :copy_requires_writer_permission
2919
+
2920
+ # Whether access to this Team Drive and items inside this Team Drive is
2921
+ # restricted to users of the domain to which this Team Drive belongs. This
2922
+ # restriction may be overridden by other sharing policies controlled outside of
2923
+ # this Team Drive.
2924
+ # Corresponds to the JSON property `domainUsersOnly`
2925
+ # @return [Boolean]
2926
+ attr_accessor :domain_users_only
2927
+ alias_method :domain_users_only?, :domain_users_only
2928
+
2929
+ # Whether access to items inside this Team Drive is restricted to members of
2930
+ # this Team Drive.
2931
+ # Corresponds to the JSON property `teamMembersOnly`
2932
+ # @return [Boolean]
2933
+ attr_accessor :team_members_only
2934
+ alias_method :team_members_only?, :team_members_only
2935
+
2936
+ def initialize(**args)
2937
+ update!(**args)
2938
+ end
2939
+
2940
+ # Update properties of this object
2941
+ def update!(**args)
2942
+ @admin_managed_restrictions = args[:admin_managed_restrictions] if args.key?(:admin_managed_restrictions)
2943
+ @copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
2944
+ @domain_users_only = args[:domain_users_only] if args.key?(:domain_users_only)
2945
+ @team_members_only = args[:team_members_only] if args.key?(:team_members_only)
2946
+ end
2947
+ end
2948
+ end
2949
+
2950
+ # A list of Team Drives.
2951
+ class TeamDriveList
2952
+ include Google::Apis::Core::Hashable
2953
+
2954
+ # Identifies what kind of resource this is. Value: the fixed string "drive#
2955
+ # teamDriveList".
2956
+ # Corresponds to the JSON property `kind`
2957
+ # @return [String]
2958
+ attr_accessor :kind
2959
+
2960
+ # The page token for the next page of Team Drives. This will be absent if the
2961
+ # end of the Team Drives list has been reached. If the token is rejected for any
2962
+ # reason, it should be discarded, and pagination should be restarted from the
2963
+ # first page of results.
2964
+ # Corresponds to the JSON property `nextPageToken`
2965
+ # @return [String]
2966
+ attr_accessor :next_page_token
2967
+
2968
+ # The list of Team Drives. If nextPageToken is populated, then this list may be
2969
+ # incomplete and an additional page of results should be fetched.
2970
+ # Corresponds to the JSON property `teamDrives`
2971
+ # @return [Array<Google::Apis::DriveV3::TeamDrive>]
2972
+ attr_accessor :team_drives
2973
+
2974
+ def initialize(**args)
2975
+ update!(**args)
2976
+ end
2977
+
2978
+ # Update properties of this object
2979
+ def update!(**args)
2980
+ @kind = args[:kind] if args.key?(:kind)
2981
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2982
+ @team_drives = args[:team_drives] if args.key?(:team_drives)
2983
+ end
2984
+ end
2985
+
2986
+ # Information about a Drive user.
2987
+ class User
2988
+ include Google::Apis::Core::Hashable
2989
+
2990
+ # A plain text displayable name for this user.
2991
+ # Corresponds to the JSON property `displayName`
2992
+ # @return [String]
2993
+ attr_accessor :display_name
2994
+
2995
+ # The email address of the user. This may not be present in certain contexts if
2996
+ # the user has not made their email address visible to the requester.
2997
+ # Corresponds to the JSON property `emailAddress`
2998
+ # @return [String]
2999
+ attr_accessor :email_address
3000
+
3001
+ # Identifies what kind of resource this is. Value: the fixed string "drive#user".
3002
+ # Corresponds to the JSON property `kind`
3003
+ # @return [String]
3004
+ attr_accessor :kind
3005
+
3006
+ # Whether this user is the requesting user.
3007
+ # Corresponds to the JSON property `me`
3008
+ # @return [Boolean]
3009
+ attr_accessor :me
3010
+ alias_method :me?, :me
3011
+
3012
+ # The user's ID as visible in Permission resources.
3013
+ # Corresponds to the JSON property `permissionId`
3014
+ # @return [String]
3015
+ attr_accessor :permission_id
3016
+
3017
+ # A link to the user's profile photo, if available.
3018
+ # Corresponds to the JSON property `photoLink`
3019
+ # @return [String]
3020
+ attr_accessor :photo_link
3021
+
3022
+ def initialize(**args)
3023
+ update!(**args)
3024
+ end
3025
+
3026
+ # Update properties of this object
3027
+ def update!(**args)
3028
+ @display_name = args[:display_name] if args.key?(:display_name)
3029
+ @email_address = args[:email_address] if args.key?(:email_address)
3030
+ @kind = args[:kind] if args.key?(:kind)
3031
+ @me = args[:me] if args.key?(:me)
3032
+ @permission_id = args[:permission_id] if args.key?(:permission_id)
3033
+ @photo_link = args[:photo_link] if args.key?(:photo_link)
3034
+ end
3035
+ end
3036
+ end
3037
+ end
3038
+ end