google-apis-drive_v2 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-drive_v2.rb +15 -0
- data/lib/google/apis/drive_v2.rb +61 -0
- data/lib/google/apis/drive_v2/classes.rb +4137 -0
- data/lib/google/apis/drive_v2/gem_version.rb +28 -0
- data/lib/google/apis/drive_v2/representations.rb +1290 -0
- data/lib/google/apis/drive_v2/service.rb +3409 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a9ea3964ca3792d940a1b3d4c80010c31f8b886fcbf44c9a30643575e17a31ed
|
4
|
+
data.tar.gz: e7d90c22ba2d4472d0d60a703e4315aa1166689cc93b06cc0bfd52650794eb98
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 24c67e8d8cfb69b4d1afe87bb29687d3e70432e67d86d9242a544208d53d10679594073a6e79f198d43eeed04a572939864a80e75cf21d35bd7c116b887b978d
|
7
|
+
data.tar.gz: 27255defdf94e04a676dc14334e6e6f7b5503b0792a252d982ef808df32d14655ab2c1dd71755978351e4c695030313ab35b3a2d1e304bc03b1e35aa76a8d390
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-drive_v2
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/drive_v2/*.rb
|
9
|
+
lib/google/apis/drive_v2.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -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.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V2 of the Drive API
|
2
|
+
|
3
|
+
This is a simple client library for version V2 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_v2', '~> 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_v2
|
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_v2"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::DriveV2::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::DriveV2::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_v2`, 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_v2"
|
@@ -0,0 +1,61 @@
|
|
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_v2/service.rb'
|
16
|
+
require 'google/apis/drive_v2/classes.rb'
|
17
|
+
require 'google/apis/drive_v2/representations.rb'
|
18
|
+
require 'google/apis/drive_v2/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 DriveV2
|
29
|
+
# Version of the Drive API this client connects to.
|
30
|
+
# This is NOT the gem version.
|
31
|
+
VERSION = 'V2'
|
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 your Google Drive apps
|
40
|
+
AUTH_DRIVE_APPS_READONLY = 'https://www.googleapis.com/auth/drive.apps.readonly'
|
41
|
+
|
42
|
+
# View and manage Google Drive files and folders that you have opened or created with this app
|
43
|
+
AUTH_DRIVE_FILE = 'https://www.googleapis.com/auth/drive.file'
|
44
|
+
|
45
|
+
# View and manage metadata of files in your Google Drive
|
46
|
+
AUTH_DRIVE_METADATA = 'https://www.googleapis.com/auth/drive.metadata'
|
47
|
+
|
48
|
+
# View metadata for files in your Google Drive
|
49
|
+
AUTH_DRIVE_METADATA_READONLY = 'https://www.googleapis.com/auth/drive.metadata.readonly'
|
50
|
+
|
51
|
+
# View the photos, videos and albums in your Google Photos
|
52
|
+
AUTH_DRIVE_PHOTOS_READONLY = 'https://www.googleapis.com/auth/drive.photos.readonly'
|
53
|
+
|
54
|
+
# See and download all your Google Drive files
|
55
|
+
AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly'
|
56
|
+
|
57
|
+
# Modify your Google Apps Script scripts' behavior
|
58
|
+
AUTH_DRIVE_SCRIPTS = 'https://www.googleapis.com/auth/drive.scripts'
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,4137 @@
|
|
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 DriveV2
|
24
|
+
|
25
|
+
# An item with user information and settings.
|
26
|
+
class About
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Information about supported additional roles per file type. The most specific
|
30
|
+
# type takes precedence.
|
31
|
+
# Corresponds to the JSON property `additionalRoleInfo`
|
32
|
+
# @return [Array<Google::Apis::DriveV2::About::AdditionalRoleInfo>]
|
33
|
+
attr_accessor :additional_role_info
|
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
|
+
# The domain sharing policy for the current user. Possible values are:
|
48
|
+
# - allowed
|
49
|
+
# - allowedWithWarning
|
50
|
+
# - incomingOnly
|
51
|
+
# - disallowed
|
52
|
+
# Corresponds to the JSON property `domainSharingPolicy`
|
53
|
+
# @return [String]
|
54
|
+
attr_accessor :domain_sharing_policy
|
55
|
+
|
56
|
+
# A list of themes that are supported for shared drives.
|
57
|
+
# Corresponds to the JSON property `driveThemes`
|
58
|
+
# @return [Array<Google::Apis::DriveV2::About::DriveTheme>]
|
59
|
+
attr_accessor :drive_themes
|
60
|
+
|
61
|
+
# The ETag of the item.
|
62
|
+
# Corresponds to the JSON property `etag`
|
63
|
+
# @return [String]
|
64
|
+
attr_accessor :etag
|
65
|
+
|
66
|
+
# The allowable export formats.
|
67
|
+
# Corresponds to the JSON property `exportFormats`
|
68
|
+
# @return [Array<Google::Apis::DriveV2::About::ExportFormat>]
|
69
|
+
attr_accessor :export_formats
|
70
|
+
|
71
|
+
# List of additional features enabled on this account.
|
72
|
+
# Corresponds to the JSON property `features`
|
73
|
+
# @return [Array<Google::Apis::DriveV2::About::Feature>]
|
74
|
+
attr_accessor :features
|
75
|
+
|
76
|
+
# The palette of allowable folder colors as RGB hex strings.
|
77
|
+
# Corresponds to the JSON property `folderColorPalette`
|
78
|
+
# @return [Array<String>]
|
79
|
+
attr_accessor :folder_color_palette
|
80
|
+
|
81
|
+
# The allowable import formats.
|
82
|
+
# Corresponds to the JSON property `importFormats`
|
83
|
+
# @return [Array<Google::Apis::DriveV2::About::ImportFormat>]
|
84
|
+
attr_accessor :import_formats
|
85
|
+
|
86
|
+
# A boolean indicating whether the authenticated app is installed by the
|
87
|
+
# authenticated user.
|
88
|
+
# Corresponds to the JSON property `isCurrentAppInstalled`
|
89
|
+
# @return [Boolean]
|
90
|
+
attr_accessor :is_current_app_installed
|
91
|
+
alias_method :is_current_app_installed?, :is_current_app_installed
|
92
|
+
|
93
|
+
# This is always drive#about.
|
94
|
+
# Corresponds to the JSON property `kind`
|
95
|
+
# @return [String]
|
96
|
+
attr_accessor :kind
|
97
|
+
|
98
|
+
# The user's language or locale code, as defined by BCP 47, with some extensions
|
99
|
+
# from Unicode's LDML format (http://www.unicode.org/reports/tr35/).
|
100
|
+
# Corresponds to the JSON property `languageCode`
|
101
|
+
# @return [String]
|
102
|
+
attr_accessor :language_code
|
103
|
+
|
104
|
+
# The largest change id.
|
105
|
+
# Corresponds to the JSON property `largestChangeId`
|
106
|
+
# @return [Fixnum]
|
107
|
+
attr_accessor :largest_change_id
|
108
|
+
|
109
|
+
# List of max upload sizes for each file type. The most specific type takes
|
110
|
+
# precedence.
|
111
|
+
# Corresponds to the JSON property `maxUploadSizes`
|
112
|
+
# @return [Array<Google::Apis::DriveV2::About::MaxUploadSize>]
|
113
|
+
attr_accessor :max_upload_sizes
|
114
|
+
|
115
|
+
# The name of the current user.
|
116
|
+
# Corresponds to the JSON property `name`
|
117
|
+
# @return [String]
|
118
|
+
attr_accessor :name
|
119
|
+
|
120
|
+
# The current user's ID as visible in the permissions collection.
|
121
|
+
# Corresponds to the JSON property `permissionId`
|
122
|
+
# @return [String]
|
123
|
+
attr_accessor :permission_id
|
124
|
+
|
125
|
+
# The amount of storage quota used by different Google services.
|
126
|
+
# Corresponds to the JSON property `quotaBytesByService`
|
127
|
+
# @return [Array<Google::Apis::DriveV2::About::QuotaBytesByService>]
|
128
|
+
attr_accessor :quota_bytes_by_service
|
129
|
+
|
130
|
+
# The total number of quota bytes. This is only relevant when quotaType is
|
131
|
+
# LIMITED.
|
132
|
+
# Corresponds to the JSON property `quotaBytesTotal`
|
133
|
+
# @return [Fixnum]
|
134
|
+
attr_accessor :quota_bytes_total
|
135
|
+
|
136
|
+
# The number of quota bytes used by Google Drive.
|
137
|
+
# Corresponds to the JSON property `quotaBytesUsed`
|
138
|
+
# @return [Fixnum]
|
139
|
+
attr_accessor :quota_bytes_used
|
140
|
+
|
141
|
+
# The number of quota bytes used by all Google apps (Drive, Picasa, etc.).
|
142
|
+
# Corresponds to the JSON property `quotaBytesUsedAggregate`
|
143
|
+
# @return [Fixnum]
|
144
|
+
attr_accessor :quota_bytes_used_aggregate
|
145
|
+
|
146
|
+
# The number of quota bytes used by trashed items.
|
147
|
+
# Corresponds to the JSON property `quotaBytesUsedInTrash`
|
148
|
+
# @return [Fixnum]
|
149
|
+
attr_accessor :quota_bytes_used_in_trash
|
150
|
+
|
151
|
+
# The type of the user's storage quota. Possible values are:
|
152
|
+
# - LIMITED
|
153
|
+
# - UNLIMITED
|
154
|
+
# Corresponds to the JSON property `quotaType`
|
155
|
+
# @return [String]
|
156
|
+
attr_accessor :quota_type
|
157
|
+
|
158
|
+
# The number of remaining change ids, limited to no more than 2500.
|
159
|
+
# Corresponds to the JSON property `remainingChangeIds`
|
160
|
+
# @return [Fixnum]
|
161
|
+
attr_accessor :remaining_change_ids
|
162
|
+
|
163
|
+
# The id of the root folder.
|
164
|
+
# Corresponds to the JSON property `rootFolderId`
|
165
|
+
# @return [String]
|
166
|
+
attr_accessor :root_folder_id
|
167
|
+
|
168
|
+
# A link back to this item.
|
169
|
+
# Corresponds to the JSON property `selfLink`
|
170
|
+
# @return [String]
|
171
|
+
attr_accessor :self_link
|
172
|
+
|
173
|
+
# Deprecated - use driveThemes instead.
|
174
|
+
# Corresponds to the JSON property `teamDriveThemes`
|
175
|
+
# @return [Array<Google::Apis::DriveV2::About::TeamDriveTheme>]
|
176
|
+
attr_accessor :team_drive_themes
|
177
|
+
|
178
|
+
# Information about a Drive user.
|
179
|
+
# Corresponds to the JSON property `user`
|
180
|
+
# @return [Google::Apis::DriveV2::User]
|
181
|
+
attr_accessor :user
|
182
|
+
|
183
|
+
def initialize(**args)
|
184
|
+
update!(**args)
|
185
|
+
end
|
186
|
+
|
187
|
+
# Update properties of this object
|
188
|
+
def update!(**args)
|
189
|
+
@additional_role_info = args[:additional_role_info] if args.key?(:additional_role_info)
|
190
|
+
@can_create_drives = args[:can_create_drives] if args.key?(:can_create_drives)
|
191
|
+
@can_create_team_drives = args[:can_create_team_drives] if args.key?(:can_create_team_drives)
|
192
|
+
@domain_sharing_policy = args[:domain_sharing_policy] if args.key?(:domain_sharing_policy)
|
193
|
+
@drive_themes = args[:drive_themes] if args.key?(:drive_themes)
|
194
|
+
@etag = args[:etag] if args.key?(:etag)
|
195
|
+
@export_formats = args[:export_formats] if args.key?(:export_formats)
|
196
|
+
@features = args[:features] if args.key?(:features)
|
197
|
+
@folder_color_palette = args[:folder_color_palette] if args.key?(:folder_color_palette)
|
198
|
+
@import_formats = args[:import_formats] if args.key?(:import_formats)
|
199
|
+
@is_current_app_installed = args[:is_current_app_installed] if args.key?(:is_current_app_installed)
|
200
|
+
@kind = args[:kind] if args.key?(:kind)
|
201
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
202
|
+
@largest_change_id = args[:largest_change_id] if args.key?(:largest_change_id)
|
203
|
+
@max_upload_sizes = args[:max_upload_sizes] if args.key?(:max_upload_sizes)
|
204
|
+
@name = args[:name] if args.key?(:name)
|
205
|
+
@permission_id = args[:permission_id] if args.key?(:permission_id)
|
206
|
+
@quota_bytes_by_service = args[:quota_bytes_by_service] if args.key?(:quota_bytes_by_service)
|
207
|
+
@quota_bytes_total = args[:quota_bytes_total] if args.key?(:quota_bytes_total)
|
208
|
+
@quota_bytes_used = args[:quota_bytes_used] if args.key?(:quota_bytes_used)
|
209
|
+
@quota_bytes_used_aggregate = args[:quota_bytes_used_aggregate] if args.key?(:quota_bytes_used_aggregate)
|
210
|
+
@quota_bytes_used_in_trash = args[:quota_bytes_used_in_trash] if args.key?(:quota_bytes_used_in_trash)
|
211
|
+
@quota_type = args[:quota_type] if args.key?(:quota_type)
|
212
|
+
@remaining_change_ids = args[:remaining_change_ids] if args.key?(:remaining_change_ids)
|
213
|
+
@root_folder_id = args[:root_folder_id] if args.key?(:root_folder_id)
|
214
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
215
|
+
@team_drive_themes = args[:team_drive_themes] if args.key?(:team_drive_themes)
|
216
|
+
@user = args[:user] if args.key?(:user)
|
217
|
+
end
|
218
|
+
|
219
|
+
#
|
220
|
+
class AdditionalRoleInfo
|
221
|
+
include Google::Apis::Core::Hashable
|
222
|
+
|
223
|
+
# The supported additional roles per primary role.
|
224
|
+
# Corresponds to the JSON property `roleSets`
|
225
|
+
# @return [Array<Google::Apis::DriveV2::About::AdditionalRoleInfo::RoleSet>]
|
226
|
+
attr_accessor :role_sets
|
227
|
+
|
228
|
+
# The content type that this additional role info applies to.
|
229
|
+
# Corresponds to the JSON property `type`
|
230
|
+
# @return [String]
|
231
|
+
attr_accessor :type
|
232
|
+
|
233
|
+
def initialize(**args)
|
234
|
+
update!(**args)
|
235
|
+
end
|
236
|
+
|
237
|
+
# Update properties of this object
|
238
|
+
def update!(**args)
|
239
|
+
@role_sets = args[:role_sets] if args.key?(:role_sets)
|
240
|
+
@type = args[:type] if args.key?(:type)
|
241
|
+
end
|
242
|
+
|
243
|
+
#
|
244
|
+
class RoleSet
|
245
|
+
include Google::Apis::Core::Hashable
|
246
|
+
|
247
|
+
# The supported additional roles with the primary role.
|
248
|
+
# Corresponds to the JSON property `additionalRoles`
|
249
|
+
# @return [Array<String>]
|
250
|
+
attr_accessor :additional_roles
|
251
|
+
|
252
|
+
# A primary permission role.
|
253
|
+
# Corresponds to the JSON property `primaryRole`
|
254
|
+
# @return [String]
|
255
|
+
attr_accessor :primary_role
|
256
|
+
|
257
|
+
def initialize(**args)
|
258
|
+
update!(**args)
|
259
|
+
end
|
260
|
+
|
261
|
+
# Update properties of this object
|
262
|
+
def update!(**args)
|
263
|
+
@additional_roles = args[:additional_roles] if args.key?(:additional_roles)
|
264
|
+
@primary_role = args[:primary_role] if args.key?(:primary_role)
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
#
|
270
|
+
class DriveTheme
|
271
|
+
include Google::Apis::Core::Hashable
|
272
|
+
|
273
|
+
# A link to this theme's background image.
|
274
|
+
# Corresponds to the JSON property `backgroundImageLink`
|
275
|
+
# @return [String]
|
276
|
+
attr_accessor :background_image_link
|
277
|
+
|
278
|
+
# The color of this theme as an RGB hex string.
|
279
|
+
# Corresponds to the JSON property `colorRgb`
|
280
|
+
# @return [String]
|
281
|
+
attr_accessor :color_rgb
|
282
|
+
|
283
|
+
# The ID of the theme.
|
284
|
+
# Corresponds to the JSON property `id`
|
285
|
+
# @return [String]
|
286
|
+
attr_accessor :id
|
287
|
+
|
288
|
+
def initialize(**args)
|
289
|
+
update!(**args)
|
290
|
+
end
|
291
|
+
|
292
|
+
# Update properties of this object
|
293
|
+
def update!(**args)
|
294
|
+
@background_image_link = args[:background_image_link] if args.key?(:background_image_link)
|
295
|
+
@color_rgb = args[:color_rgb] if args.key?(:color_rgb)
|
296
|
+
@id = args[:id] if args.key?(:id)
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
#
|
301
|
+
class ExportFormat
|
302
|
+
include Google::Apis::Core::Hashable
|
303
|
+
|
304
|
+
# The content type to convert from.
|
305
|
+
# Corresponds to the JSON property `source`
|
306
|
+
# @return [String]
|
307
|
+
attr_accessor :source
|
308
|
+
|
309
|
+
# The possible content types to convert to.
|
310
|
+
# Corresponds to the JSON property `targets`
|
311
|
+
# @return [Array<String>]
|
312
|
+
attr_accessor :targets
|
313
|
+
|
314
|
+
def initialize(**args)
|
315
|
+
update!(**args)
|
316
|
+
end
|
317
|
+
|
318
|
+
# Update properties of this object
|
319
|
+
def update!(**args)
|
320
|
+
@source = args[:source] if args.key?(:source)
|
321
|
+
@targets = args[:targets] if args.key?(:targets)
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
#
|
326
|
+
class Feature
|
327
|
+
include Google::Apis::Core::Hashable
|
328
|
+
|
329
|
+
# The name of the feature.
|
330
|
+
# Corresponds to the JSON property `featureName`
|
331
|
+
# @return [String]
|
332
|
+
attr_accessor :feature_name
|
333
|
+
|
334
|
+
# The request limit rate for this feature, in queries per second.
|
335
|
+
# Corresponds to the JSON property `featureRate`
|
336
|
+
# @return [Float]
|
337
|
+
attr_accessor :feature_rate
|
338
|
+
|
339
|
+
def initialize(**args)
|
340
|
+
update!(**args)
|
341
|
+
end
|
342
|
+
|
343
|
+
# Update properties of this object
|
344
|
+
def update!(**args)
|
345
|
+
@feature_name = args[:feature_name] if args.key?(:feature_name)
|
346
|
+
@feature_rate = args[:feature_rate] if args.key?(:feature_rate)
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
350
|
+
#
|
351
|
+
class ImportFormat
|
352
|
+
include Google::Apis::Core::Hashable
|
353
|
+
|
354
|
+
# The imported file's content type to convert from.
|
355
|
+
# Corresponds to the JSON property `source`
|
356
|
+
# @return [String]
|
357
|
+
attr_accessor :source
|
358
|
+
|
359
|
+
# The possible content types to convert to.
|
360
|
+
# Corresponds to the JSON property `targets`
|
361
|
+
# @return [Array<String>]
|
362
|
+
attr_accessor :targets
|
363
|
+
|
364
|
+
def initialize(**args)
|
365
|
+
update!(**args)
|
366
|
+
end
|
367
|
+
|
368
|
+
# Update properties of this object
|
369
|
+
def update!(**args)
|
370
|
+
@source = args[:source] if args.key?(:source)
|
371
|
+
@targets = args[:targets] if args.key?(:targets)
|
372
|
+
end
|
373
|
+
end
|
374
|
+
|
375
|
+
#
|
376
|
+
class MaxUploadSize
|
377
|
+
include Google::Apis::Core::Hashable
|
378
|
+
|
379
|
+
# The max upload size for this type.
|
380
|
+
# Corresponds to the JSON property `size`
|
381
|
+
# @return [Fixnum]
|
382
|
+
attr_accessor :size
|
383
|
+
|
384
|
+
# The file type.
|
385
|
+
# Corresponds to the JSON property `type`
|
386
|
+
# @return [String]
|
387
|
+
attr_accessor :type
|
388
|
+
|
389
|
+
def initialize(**args)
|
390
|
+
update!(**args)
|
391
|
+
end
|
392
|
+
|
393
|
+
# Update properties of this object
|
394
|
+
def update!(**args)
|
395
|
+
@size = args[:size] if args.key?(:size)
|
396
|
+
@type = args[:type] if args.key?(:type)
|
397
|
+
end
|
398
|
+
end
|
399
|
+
|
400
|
+
#
|
401
|
+
class QuotaBytesByService
|
402
|
+
include Google::Apis::Core::Hashable
|
403
|
+
|
404
|
+
# The storage quota bytes used by the service.
|
405
|
+
# Corresponds to the JSON property `bytesUsed`
|
406
|
+
# @return [Fixnum]
|
407
|
+
attr_accessor :bytes_used
|
408
|
+
|
409
|
+
# The service's name, e.g. DRIVE, GMAIL, or PHOTOS.
|
410
|
+
# Corresponds to the JSON property `serviceName`
|
411
|
+
# @return [String]
|
412
|
+
attr_accessor :service_name
|
413
|
+
|
414
|
+
def initialize(**args)
|
415
|
+
update!(**args)
|
416
|
+
end
|
417
|
+
|
418
|
+
# Update properties of this object
|
419
|
+
def update!(**args)
|
420
|
+
@bytes_used = args[:bytes_used] if args.key?(:bytes_used)
|
421
|
+
@service_name = args[:service_name] if args.key?(:service_name)
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
#
|
426
|
+
class TeamDriveTheme
|
427
|
+
include Google::Apis::Core::Hashable
|
428
|
+
|
429
|
+
# Deprecated - use driveThemes/backgroundImageLink instead.
|
430
|
+
# Corresponds to the JSON property `backgroundImageLink`
|
431
|
+
# @return [String]
|
432
|
+
attr_accessor :background_image_link
|
433
|
+
|
434
|
+
# Deprecated - use driveThemes/colorRgb instead.
|
435
|
+
# Corresponds to the JSON property `colorRgb`
|
436
|
+
# @return [String]
|
437
|
+
attr_accessor :color_rgb
|
438
|
+
|
439
|
+
# Deprecated - use driveThemes/id instead.
|
440
|
+
# Corresponds to the JSON property `id`
|
441
|
+
# @return [String]
|
442
|
+
attr_accessor :id
|
443
|
+
|
444
|
+
def initialize(**args)
|
445
|
+
update!(**args)
|
446
|
+
end
|
447
|
+
|
448
|
+
# Update properties of this object
|
449
|
+
def update!(**args)
|
450
|
+
@background_image_link = args[:background_image_link] if args.key?(:background_image_link)
|
451
|
+
@color_rgb = args[:color_rgb] if args.key?(:color_rgb)
|
452
|
+
@id = args[:id] if args.key?(:id)
|
453
|
+
end
|
454
|
+
end
|
455
|
+
end
|
456
|
+
|
457
|
+
# The apps resource provides a list of the apps that a user has installed, with
|
458
|
+
# information about each app's supported MIME types, file extensions, and other
|
459
|
+
# details.
|
460
|
+
class App
|
461
|
+
include Google::Apis::Core::Hashable
|
462
|
+
|
463
|
+
# Whether the app is authorized to access data on the user's Drive.
|
464
|
+
# Corresponds to the JSON property `authorized`
|
465
|
+
# @return [Boolean]
|
466
|
+
attr_accessor :authorized
|
467
|
+
alias_method :authorized?, :authorized
|
468
|
+
|
469
|
+
# The template url to create a new file with this app in a given folder. The
|
470
|
+
# template will contain `folderId` to be replaced by the folder to create the
|
471
|
+
# new file in.
|
472
|
+
# Corresponds to the JSON property `createInFolderTemplate`
|
473
|
+
# @return [String]
|
474
|
+
attr_accessor :create_in_folder_template
|
475
|
+
|
476
|
+
# The url to create a new file with this app.
|
477
|
+
# Corresponds to the JSON property `createUrl`
|
478
|
+
# @return [String]
|
479
|
+
attr_accessor :create_url
|
480
|
+
|
481
|
+
# Whether the app has drive-wide scope. An app with drive-wide scope can access
|
482
|
+
# all files in the user's drive.
|
483
|
+
# Corresponds to the JSON property `hasDriveWideScope`
|
484
|
+
# @return [Boolean]
|
485
|
+
attr_accessor :has_drive_wide_scope
|
486
|
+
alias_method :has_drive_wide_scope?, :has_drive_wide_scope
|
487
|
+
|
488
|
+
# The various icons for the app.
|
489
|
+
# Corresponds to the JSON property `icons`
|
490
|
+
# @return [Array<Google::Apis::DriveV2::App::Icon>]
|
491
|
+
attr_accessor :icons
|
492
|
+
|
493
|
+
# The ID of the app.
|
494
|
+
# Corresponds to the JSON property `id`
|
495
|
+
# @return [String]
|
496
|
+
attr_accessor :id
|
497
|
+
|
498
|
+
# Whether the app is installed.
|
499
|
+
# Corresponds to the JSON property `installed`
|
500
|
+
# @return [Boolean]
|
501
|
+
attr_accessor :installed
|
502
|
+
alias_method :installed?, :installed
|
503
|
+
|
504
|
+
# This is always drive#app.
|
505
|
+
# Corresponds to the JSON property `kind`
|
506
|
+
# @return [String]
|
507
|
+
attr_accessor :kind
|
508
|
+
|
509
|
+
# A long description of the app.
|
510
|
+
# Corresponds to the JSON property `longDescription`
|
511
|
+
# @return [String]
|
512
|
+
attr_accessor :long_description
|
513
|
+
|
514
|
+
# The name of the app.
|
515
|
+
# Corresponds to the JSON property `name`
|
516
|
+
# @return [String]
|
517
|
+
attr_accessor :name
|
518
|
+
|
519
|
+
# The type of object this app creates (e.g. Chart). If empty, the app name
|
520
|
+
# should be used instead.
|
521
|
+
# Corresponds to the JSON property `objectType`
|
522
|
+
# @return [String]
|
523
|
+
attr_accessor :object_type
|
524
|
+
|
525
|
+
# The template url for opening files with this app. The template will contain `
|
526
|
+
# ids` and/or `exportIds` to be replaced by the actual file ids. See Open Files
|
527
|
+
# for the full documentation.
|
528
|
+
# Corresponds to the JSON property `openUrlTemplate`
|
529
|
+
# @return [String]
|
530
|
+
attr_accessor :open_url_template
|
531
|
+
|
532
|
+
# The list of primary file extensions.
|
533
|
+
# Corresponds to the JSON property `primaryFileExtensions`
|
534
|
+
# @return [Array<String>]
|
535
|
+
attr_accessor :primary_file_extensions
|
536
|
+
|
537
|
+
# The list of primary mime types.
|
538
|
+
# Corresponds to the JSON property `primaryMimeTypes`
|
539
|
+
# @return [Array<String>]
|
540
|
+
attr_accessor :primary_mime_types
|
541
|
+
|
542
|
+
# The ID of the product listing for this app.
|
543
|
+
# Corresponds to the JSON property `productId`
|
544
|
+
# @return [String]
|
545
|
+
attr_accessor :product_id
|
546
|
+
|
547
|
+
# A link to the product listing for this app.
|
548
|
+
# Corresponds to the JSON property `productUrl`
|
549
|
+
# @return [String]
|
550
|
+
attr_accessor :product_url
|
551
|
+
|
552
|
+
# The list of secondary file extensions.
|
553
|
+
# Corresponds to the JSON property `secondaryFileExtensions`
|
554
|
+
# @return [Array<String>]
|
555
|
+
attr_accessor :secondary_file_extensions
|
556
|
+
|
557
|
+
# The list of secondary mime types.
|
558
|
+
# Corresponds to the JSON property `secondaryMimeTypes`
|
559
|
+
# @return [Array<String>]
|
560
|
+
attr_accessor :secondary_mime_types
|
561
|
+
|
562
|
+
# A short description of the app.
|
563
|
+
# Corresponds to the JSON property `shortDescription`
|
564
|
+
# @return [String]
|
565
|
+
attr_accessor :short_description
|
566
|
+
|
567
|
+
# Whether this app supports creating new objects.
|
568
|
+
# Corresponds to the JSON property `supportsCreate`
|
569
|
+
# @return [Boolean]
|
570
|
+
attr_accessor :supports_create
|
571
|
+
alias_method :supports_create?, :supports_create
|
572
|
+
|
573
|
+
# Whether this app supports importing from Docs Editors.
|
574
|
+
# Corresponds to the JSON property `supportsImport`
|
575
|
+
# @return [Boolean]
|
576
|
+
attr_accessor :supports_import
|
577
|
+
alias_method :supports_import?, :supports_import
|
578
|
+
|
579
|
+
# Whether this app supports opening more than one file.
|
580
|
+
# Corresponds to the JSON property `supportsMultiOpen`
|
581
|
+
# @return [Boolean]
|
582
|
+
attr_accessor :supports_multi_open
|
583
|
+
alias_method :supports_multi_open?, :supports_multi_open
|
584
|
+
|
585
|
+
# Whether this app supports creating new files when offline.
|
586
|
+
# Corresponds to the JSON property `supportsOfflineCreate`
|
587
|
+
# @return [Boolean]
|
588
|
+
attr_accessor :supports_offline_create
|
589
|
+
alias_method :supports_offline_create?, :supports_offline_create
|
590
|
+
|
591
|
+
# Whether the app is selected as the default handler for the types it supports.
|
592
|
+
# Corresponds to the JSON property `useByDefault`
|
593
|
+
# @return [Boolean]
|
594
|
+
attr_accessor :use_by_default
|
595
|
+
alias_method :use_by_default?, :use_by_default
|
596
|
+
|
597
|
+
def initialize(**args)
|
598
|
+
update!(**args)
|
599
|
+
end
|
600
|
+
|
601
|
+
# Update properties of this object
|
602
|
+
def update!(**args)
|
603
|
+
@authorized = args[:authorized] if args.key?(:authorized)
|
604
|
+
@create_in_folder_template = args[:create_in_folder_template] if args.key?(:create_in_folder_template)
|
605
|
+
@create_url = args[:create_url] if args.key?(:create_url)
|
606
|
+
@has_drive_wide_scope = args[:has_drive_wide_scope] if args.key?(:has_drive_wide_scope)
|
607
|
+
@icons = args[:icons] if args.key?(:icons)
|
608
|
+
@id = args[:id] if args.key?(:id)
|
609
|
+
@installed = args[:installed] if args.key?(:installed)
|
610
|
+
@kind = args[:kind] if args.key?(:kind)
|
611
|
+
@long_description = args[:long_description] if args.key?(:long_description)
|
612
|
+
@name = args[:name] if args.key?(:name)
|
613
|
+
@object_type = args[:object_type] if args.key?(:object_type)
|
614
|
+
@open_url_template = args[:open_url_template] if args.key?(:open_url_template)
|
615
|
+
@primary_file_extensions = args[:primary_file_extensions] if args.key?(:primary_file_extensions)
|
616
|
+
@primary_mime_types = args[:primary_mime_types] if args.key?(:primary_mime_types)
|
617
|
+
@product_id = args[:product_id] if args.key?(:product_id)
|
618
|
+
@product_url = args[:product_url] if args.key?(:product_url)
|
619
|
+
@secondary_file_extensions = args[:secondary_file_extensions] if args.key?(:secondary_file_extensions)
|
620
|
+
@secondary_mime_types = args[:secondary_mime_types] if args.key?(:secondary_mime_types)
|
621
|
+
@short_description = args[:short_description] if args.key?(:short_description)
|
622
|
+
@supports_create = args[:supports_create] if args.key?(:supports_create)
|
623
|
+
@supports_import = args[:supports_import] if args.key?(:supports_import)
|
624
|
+
@supports_multi_open = args[:supports_multi_open] if args.key?(:supports_multi_open)
|
625
|
+
@supports_offline_create = args[:supports_offline_create] if args.key?(:supports_offline_create)
|
626
|
+
@use_by_default = args[:use_by_default] if args.key?(:use_by_default)
|
627
|
+
end
|
628
|
+
|
629
|
+
#
|
630
|
+
class Icon
|
631
|
+
include Google::Apis::Core::Hashable
|
632
|
+
|
633
|
+
# Category of the icon. Allowed values are:
|
634
|
+
# - application - icon for the application
|
635
|
+
# - document - icon for a file associated with the app
|
636
|
+
# - documentShared - icon for a shared file associated with the app
|
637
|
+
# Corresponds to the JSON property `category`
|
638
|
+
# @return [String]
|
639
|
+
attr_accessor :category
|
640
|
+
|
641
|
+
# URL for the icon.
|
642
|
+
# Corresponds to the JSON property `iconUrl`
|
643
|
+
# @return [String]
|
644
|
+
attr_accessor :icon_url
|
645
|
+
|
646
|
+
# Size of the icon. Represented as the maximum of the width and height.
|
647
|
+
# Corresponds to the JSON property `size`
|
648
|
+
# @return [Fixnum]
|
649
|
+
attr_accessor :size
|
650
|
+
|
651
|
+
def initialize(**args)
|
652
|
+
update!(**args)
|
653
|
+
end
|
654
|
+
|
655
|
+
# Update properties of this object
|
656
|
+
def update!(**args)
|
657
|
+
@category = args[:category] if args.key?(:category)
|
658
|
+
@icon_url = args[:icon_url] if args.key?(:icon_url)
|
659
|
+
@size = args[:size] if args.key?(:size)
|
660
|
+
end
|
661
|
+
end
|
662
|
+
end
|
663
|
+
|
664
|
+
# A list of third-party applications which the user has installed or given
|
665
|
+
# access to Google Drive.
|
666
|
+
class AppList
|
667
|
+
include Google::Apis::Core::Hashable
|
668
|
+
|
669
|
+
# List of app IDs that the user has specified to use by default. The list is in
|
670
|
+
# reverse-priority order (lowest to highest).
|
671
|
+
# Corresponds to the JSON property `defaultAppIds`
|
672
|
+
# @return [Array<String>]
|
673
|
+
attr_accessor :default_app_ids
|
674
|
+
|
675
|
+
# The ETag of the list.
|
676
|
+
# Corresponds to the JSON property `etag`
|
677
|
+
# @return [String]
|
678
|
+
attr_accessor :etag
|
679
|
+
|
680
|
+
# The list of apps.
|
681
|
+
# Corresponds to the JSON property `items`
|
682
|
+
# @return [Array<Google::Apis::DriveV2::App>]
|
683
|
+
attr_accessor :items
|
684
|
+
|
685
|
+
# This is always drive#appList.
|
686
|
+
# Corresponds to the JSON property `kind`
|
687
|
+
# @return [String]
|
688
|
+
attr_accessor :kind
|
689
|
+
|
690
|
+
# A link back to this list.
|
691
|
+
# Corresponds to the JSON property `selfLink`
|
692
|
+
# @return [String]
|
693
|
+
attr_accessor :self_link
|
694
|
+
|
695
|
+
def initialize(**args)
|
696
|
+
update!(**args)
|
697
|
+
end
|
698
|
+
|
699
|
+
# Update properties of this object
|
700
|
+
def update!(**args)
|
701
|
+
@default_app_ids = args[:default_app_ids] if args.key?(:default_app_ids)
|
702
|
+
@etag = args[:etag] if args.key?(:etag)
|
703
|
+
@items = args[:items] if args.key?(:items)
|
704
|
+
@kind = args[:kind] if args.key?(:kind)
|
705
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
706
|
+
end
|
707
|
+
end
|
708
|
+
|
709
|
+
# Representation of a change to a file or shared drive.
|
710
|
+
class Change
|
711
|
+
include Google::Apis::Core::Hashable
|
712
|
+
|
713
|
+
# The type of the change. Possible values are file and drive.
|
714
|
+
# Corresponds to the JSON property `changeType`
|
715
|
+
# @return [String]
|
716
|
+
attr_accessor :change_type
|
717
|
+
|
718
|
+
# Whether the file or shared drive has been removed from this list of changes,
|
719
|
+
# for example by deletion or loss of access.
|
720
|
+
# Corresponds to the JSON property `deleted`
|
721
|
+
# @return [Boolean]
|
722
|
+
attr_accessor :deleted
|
723
|
+
alias_method :deleted?, :deleted
|
724
|
+
|
725
|
+
# Representation of a shared drive.
|
726
|
+
# Corresponds to the JSON property `drive`
|
727
|
+
# @return [Google::Apis::DriveV2::Drive]
|
728
|
+
attr_accessor :drive
|
729
|
+
|
730
|
+
# The ID of the shared drive associated with this change.
|
731
|
+
# Corresponds to the JSON property `driveId`
|
732
|
+
# @return [String]
|
733
|
+
attr_accessor :drive_id
|
734
|
+
|
735
|
+
# The metadata for a file.
|
736
|
+
# Corresponds to the JSON property `file`
|
737
|
+
# @return [Google::Apis::DriveV2::File]
|
738
|
+
attr_accessor :file
|
739
|
+
|
740
|
+
# The ID of the file associated with this change.
|
741
|
+
# Corresponds to the JSON property `fileId`
|
742
|
+
# @return [String]
|
743
|
+
attr_accessor :file_id
|
744
|
+
|
745
|
+
# The ID of the change.
|
746
|
+
# Corresponds to the JSON property `id`
|
747
|
+
# @return [Fixnum]
|
748
|
+
attr_accessor :id
|
749
|
+
|
750
|
+
# This is always drive#change.
|
751
|
+
# Corresponds to the JSON property `kind`
|
752
|
+
# @return [String]
|
753
|
+
attr_accessor :kind
|
754
|
+
|
755
|
+
# The time of this modification.
|
756
|
+
# Corresponds to the JSON property `modificationDate`
|
757
|
+
# @return [DateTime]
|
758
|
+
attr_accessor :modification_date
|
759
|
+
|
760
|
+
# A link back to this change.
|
761
|
+
# Corresponds to the JSON property `selfLink`
|
762
|
+
# @return [String]
|
763
|
+
attr_accessor :self_link
|
764
|
+
|
765
|
+
# Deprecated: use the drive collection instead.
|
766
|
+
# Corresponds to the JSON property `teamDrive`
|
767
|
+
# @return [Google::Apis::DriveV2::TeamDrive]
|
768
|
+
attr_accessor :team_drive
|
769
|
+
|
770
|
+
# Deprecated - use driveId instead.
|
771
|
+
# Corresponds to the JSON property `teamDriveId`
|
772
|
+
# @return [String]
|
773
|
+
attr_accessor :team_drive_id
|
774
|
+
|
775
|
+
# Deprecated - use changeType instead.
|
776
|
+
# Corresponds to the JSON property `type`
|
777
|
+
# @return [String]
|
778
|
+
attr_accessor :type
|
779
|
+
|
780
|
+
def initialize(**args)
|
781
|
+
update!(**args)
|
782
|
+
end
|
783
|
+
|
784
|
+
# Update properties of this object
|
785
|
+
def update!(**args)
|
786
|
+
@change_type = args[:change_type] if args.key?(:change_type)
|
787
|
+
@deleted = args[:deleted] if args.key?(:deleted)
|
788
|
+
@drive = args[:drive] if args.key?(:drive)
|
789
|
+
@drive_id = args[:drive_id] if args.key?(:drive_id)
|
790
|
+
@file = args[:file] if args.key?(:file)
|
791
|
+
@file_id = args[:file_id] if args.key?(:file_id)
|
792
|
+
@id = args[:id] if args.key?(:id)
|
793
|
+
@kind = args[:kind] if args.key?(:kind)
|
794
|
+
@modification_date = args[:modification_date] if args.key?(:modification_date)
|
795
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
796
|
+
@team_drive = args[:team_drive] if args.key?(:team_drive)
|
797
|
+
@team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id)
|
798
|
+
@type = args[:type] if args.key?(:type)
|
799
|
+
end
|
800
|
+
end
|
801
|
+
|
802
|
+
# A list of changes for a user.
|
803
|
+
class ChangeList
|
804
|
+
include Google::Apis::Core::Hashable
|
805
|
+
|
806
|
+
# The ETag of the list.
|
807
|
+
# Corresponds to the JSON property `etag`
|
808
|
+
# @return [String]
|
809
|
+
attr_accessor :etag
|
810
|
+
|
811
|
+
# The list of changes. If nextPageToken is populated, then this list may be
|
812
|
+
# incomplete and an additional page of results should be fetched.
|
813
|
+
# Corresponds to the JSON property `items`
|
814
|
+
# @return [Array<Google::Apis::DriveV2::Change>]
|
815
|
+
attr_accessor :items
|
816
|
+
|
817
|
+
# This is always drive#changeList.
|
818
|
+
# Corresponds to the JSON property `kind`
|
819
|
+
# @return [String]
|
820
|
+
attr_accessor :kind
|
821
|
+
|
822
|
+
# The current largest change ID.
|
823
|
+
# Corresponds to the JSON property `largestChangeId`
|
824
|
+
# @return [Fixnum]
|
825
|
+
attr_accessor :largest_change_id
|
826
|
+
|
827
|
+
# The starting page token for future changes. This will be present only if the
|
828
|
+
# end of the current changes list has been reached.
|
829
|
+
# Corresponds to the JSON property `newStartPageToken`
|
830
|
+
# @return [String]
|
831
|
+
attr_accessor :new_start_page_token
|
832
|
+
|
833
|
+
# A link to the next page of changes.
|
834
|
+
# Corresponds to the JSON property `nextLink`
|
835
|
+
# @return [String]
|
836
|
+
attr_accessor :next_link
|
837
|
+
|
838
|
+
# The page token for the next page of changes. This will be absent if the end of
|
839
|
+
# the changes list has been reached. If the token is rejected for any reason, it
|
840
|
+
# should be discarded, and pagination should be restarted from the first page of
|
841
|
+
# results.
|
842
|
+
# Corresponds to the JSON property `nextPageToken`
|
843
|
+
# @return [String]
|
844
|
+
attr_accessor :next_page_token
|
845
|
+
|
846
|
+
# A link back to this list.
|
847
|
+
# Corresponds to the JSON property `selfLink`
|
848
|
+
# @return [String]
|
849
|
+
attr_accessor :self_link
|
850
|
+
|
851
|
+
def initialize(**args)
|
852
|
+
update!(**args)
|
853
|
+
end
|
854
|
+
|
855
|
+
# Update properties of this object
|
856
|
+
def update!(**args)
|
857
|
+
@etag = args[:etag] if args.key?(:etag)
|
858
|
+
@items = args[:items] if args.key?(:items)
|
859
|
+
@kind = args[:kind] if args.key?(:kind)
|
860
|
+
@largest_change_id = args[:largest_change_id] if args.key?(:largest_change_id)
|
861
|
+
@new_start_page_token = args[:new_start_page_token] if args.key?(:new_start_page_token)
|
862
|
+
@next_link = args[:next_link] if args.key?(:next_link)
|
863
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
864
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
865
|
+
end
|
866
|
+
end
|
867
|
+
|
868
|
+
# An notification channel used to watch for resource changes.
|
869
|
+
class Channel
|
870
|
+
include Google::Apis::Core::Hashable
|
871
|
+
|
872
|
+
# The address where notifications are delivered for this channel.
|
873
|
+
# Corresponds to the JSON property `address`
|
874
|
+
# @return [String]
|
875
|
+
attr_accessor :address
|
876
|
+
|
877
|
+
# Date and time of notification channel expiration, expressed as a Unix
|
878
|
+
# timestamp, in milliseconds. Optional.
|
879
|
+
# Corresponds to the JSON property `expiration`
|
880
|
+
# @return [Fixnum]
|
881
|
+
attr_accessor :expiration
|
882
|
+
|
883
|
+
# A UUID or similar unique string that identifies this channel.
|
884
|
+
# Corresponds to the JSON property `id`
|
885
|
+
# @return [String]
|
886
|
+
attr_accessor :id
|
887
|
+
|
888
|
+
# Identifies this as a notification channel used to watch for changes to a
|
889
|
+
# resource, which is "api#channel".
|
890
|
+
# Corresponds to the JSON property `kind`
|
891
|
+
# @return [String]
|
892
|
+
attr_accessor :kind
|
893
|
+
|
894
|
+
# Additional parameters controlling delivery channel behavior. Optional.
|
895
|
+
# Corresponds to the JSON property `params`
|
896
|
+
# @return [Hash<String,String>]
|
897
|
+
attr_accessor :params
|
898
|
+
|
899
|
+
# A Boolean value to indicate whether payload is wanted. Optional.
|
900
|
+
# Corresponds to the JSON property `payload`
|
901
|
+
# @return [Boolean]
|
902
|
+
attr_accessor :payload
|
903
|
+
alias_method :payload?, :payload
|
904
|
+
|
905
|
+
# An opaque ID that identifies the resource being watched on this channel.
|
906
|
+
# Stable across different API versions.
|
907
|
+
# Corresponds to the JSON property `resourceId`
|
908
|
+
# @return [String]
|
909
|
+
attr_accessor :resource_id
|
910
|
+
|
911
|
+
# A version-specific identifier for the watched resource.
|
912
|
+
# Corresponds to the JSON property `resourceUri`
|
913
|
+
# @return [String]
|
914
|
+
attr_accessor :resource_uri
|
915
|
+
|
916
|
+
# An arbitrary string delivered to the target address with each notification
|
917
|
+
# delivered over this channel. Optional.
|
918
|
+
# Corresponds to the JSON property `token`
|
919
|
+
# @return [String]
|
920
|
+
attr_accessor :token
|
921
|
+
|
922
|
+
# The type of delivery mechanism used for this channel.
|
923
|
+
# Corresponds to the JSON property `type`
|
924
|
+
# @return [String]
|
925
|
+
attr_accessor :type
|
926
|
+
|
927
|
+
def initialize(**args)
|
928
|
+
update!(**args)
|
929
|
+
end
|
930
|
+
|
931
|
+
# Update properties of this object
|
932
|
+
def update!(**args)
|
933
|
+
@address = args[:address] if args.key?(:address)
|
934
|
+
@expiration = args[:expiration] if args.key?(:expiration)
|
935
|
+
@id = args[:id] if args.key?(:id)
|
936
|
+
@kind = args[:kind] if args.key?(:kind)
|
937
|
+
@params = args[:params] if args.key?(:params)
|
938
|
+
@payload = args[:payload] if args.key?(:payload)
|
939
|
+
@resource_id = args[:resource_id] if args.key?(:resource_id)
|
940
|
+
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
|
941
|
+
@token = args[:token] if args.key?(:token)
|
942
|
+
@type = args[:type] if args.key?(:type)
|
943
|
+
end
|
944
|
+
end
|
945
|
+
|
946
|
+
# A list of children of a file.
|
947
|
+
class ChildList
|
948
|
+
include Google::Apis::Core::Hashable
|
949
|
+
|
950
|
+
# The ETag of the list.
|
951
|
+
# Corresponds to the JSON property `etag`
|
952
|
+
# @return [String]
|
953
|
+
attr_accessor :etag
|
954
|
+
|
955
|
+
# The list of children. If nextPageToken is populated, then this list may be
|
956
|
+
# incomplete and an additional page of results should be fetched.
|
957
|
+
# Corresponds to the JSON property `items`
|
958
|
+
# @return [Array<Google::Apis::DriveV2::ChildReference>]
|
959
|
+
attr_accessor :items
|
960
|
+
|
961
|
+
# This is always drive#childList.
|
962
|
+
# Corresponds to the JSON property `kind`
|
963
|
+
# @return [String]
|
964
|
+
attr_accessor :kind
|
965
|
+
|
966
|
+
# A link to the next page of children.
|
967
|
+
# Corresponds to the JSON property `nextLink`
|
968
|
+
# @return [String]
|
969
|
+
attr_accessor :next_link
|
970
|
+
|
971
|
+
# The page token for the next page of children. This will be absent if the end
|
972
|
+
# of the children list has been reached. If the token is rejected for any reason,
|
973
|
+
# it should be discarded, and pagination should be restarted from the first
|
974
|
+
# page of results.
|
975
|
+
# Corresponds to the JSON property `nextPageToken`
|
976
|
+
# @return [String]
|
977
|
+
attr_accessor :next_page_token
|
978
|
+
|
979
|
+
# A link back to this list.
|
980
|
+
# Corresponds to the JSON property `selfLink`
|
981
|
+
# @return [String]
|
982
|
+
attr_accessor :self_link
|
983
|
+
|
984
|
+
def initialize(**args)
|
985
|
+
update!(**args)
|
986
|
+
end
|
987
|
+
|
988
|
+
# Update properties of this object
|
989
|
+
def update!(**args)
|
990
|
+
@etag = args[:etag] if args.key?(:etag)
|
991
|
+
@items = args[:items] if args.key?(:items)
|
992
|
+
@kind = args[:kind] if args.key?(:kind)
|
993
|
+
@next_link = args[:next_link] if args.key?(:next_link)
|
994
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
995
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
996
|
+
end
|
997
|
+
end
|
998
|
+
|
999
|
+
# A reference to a folder's child.
|
1000
|
+
class ChildReference
|
1001
|
+
include Google::Apis::Core::Hashable
|
1002
|
+
|
1003
|
+
# A link to the child.
|
1004
|
+
# Corresponds to the JSON property `childLink`
|
1005
|
+
# @return [String]
|
1006
|
+
attr_accessor :child_link
|
1007
|
+
|
1008
|
+
# The ID of the child.
|
1009
|
+
# Corresponds to the JSON property `id`
|
1010
|
+
# @return [String]
|
1011
|
+
attr_accessor :id
|
1012
|
+
|
1013
|
+
# This is always drive#childReference.
|
1014
|
+
# Corresponds to the JSON property `kind`
|
1015
|
+
# @return [String]
|
1016
|
+
attr_accessor :kind
|
1017
|
+
|
1018
|
+
# A link back to this reference.
|
1019
|
+
# Corresponds to the JSON property `selfLink`
|
1020
|
+
# @return [String]
|
1021
|
+
attr_accessor :self_link
|
1022
|
+
|
1023
|
+
def initialize(**args)
|
1024
|
+
update!(**args)
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
# Update properties of this object
|
1028
|
+
def update!(**args)
|
1029
|
+
@child_link = args[:child_link] if args.key?(:child_link)
|
1030
|
+
@id = args[:id] if args.key?(:id)
|
1031
|
+
@kind = args[:kind] if args.key?(:kind)
|
1032
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
1033
|
+
end
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
# A comment on a file in Google Drive.
|
1037
|
+
class Comment
|
1038
|
+
include Google::Apis::Core::Hashable
|
1039
|
+
|
1040
|
+
# A region of the document represented as a JSON string. See anchor
|
1041
|
+
# documentation for details on how to define and interpret anchor properties.
|
1042
|
+
# Corresponds to the JSON property `anchor`
|
1043
|
+
# @return [String]
|
1044
|
+
attr_accessor :anchor
|
1045
|
+
|
1046
|
+
# Information about a Drive user.
|
1047
|
+
# Corresponds to the JSON property `author`
|
1048
|
+
# @return [Google::Apis::DriveV2::User]
|
1049
|
+
attr_accessor :author
|
1050
|
+
|
1051
|
+
# The ID of the comment.
|
1052
|
+
# Corresponds to the JSON property `commentId`
|
1053
|
+
# @return [String]
|
1054
|
+
attr_accessor :comment_id
|
1055
|
+
|
1056
|
+
# The plain text content used to create this comment. This is not HTML safe and
|
1057
|
+
# should only be used as a starting point to make edits to a comment's content.
|
1058
|
+
# Corresponds to the JSON property `content`
|
1059
|
+
# @return [String]
|
1060
|
+
attr_accessor :content
|
1061
|
+
|
1062
|
+
# The context of the file which is being commented on.
|
1063
|
+
# Corresponds to the JSON property `context`
|
1064
|
+
# @return [Google::Apis::DriveV2::Comment::Context]
|
1065
|
+
attr_accessor :context
|
1066
|
+
|
1067
|
+
# The date when this comment was first created.
|
1068
|
+
# Corresponds to the JSON property `createdDate`
|
1069
|
+
# @return [DateTime]
|
1070
|
+
attr_accessor :created_date
|
1071
|
+
|
1072
|
+
# Whether this comment has been deleted. If a comment has been deleted the
|
1073
|
+
# content will be cleared and this will only represent a comment that once
|
1074
|
+
# existed.
|
1075
|
+
# Corresponds to the JSON property `deleted`
|
1076
|
+
# @return [Boolean]
|
1077
|
+
attr_accessor :deleted
|
1078
|
+
alias_method :deleted?, :deleted
|
1079
|
+
|
1080
|
+
# The file which this comment is addressing.
|
1081
|
+
# Corresponds to the JSON property `fileId`
|
1082
|
+
# @return [String]
|
1083
|
+
attr_accessor :file_id
|
1084
|
+
|
1085
|
+
# The title of the file which this comment is addressing.
|
1086
|
+
# Corresponds to the JSON property `fileTitle`
|
1087
|
+
# @return [String]
|
1088
|
+
attr_accessor :file_title
|
1089
|
+
|
1090
|
+
# HTML formatted content for this comment.
|
1091
|
+
# Corresponds to the JSON property `htmlContent`
|
1092
|
+
# @return [String]
|
1093
|
+
attr_accessor :html_content
|
1094
|
+
|
1095
|
+
# This is always drive#comment.
|
1096
|
+
# Corresponds to the JSON property `kind`
|
1097
|
+
# @return [String]
|
1098
|
+
attr_accessor :kind
|
1099
|
+
|
1100
|
+
# The date when this comment or any of its replies were last modified.
|
1101
|
+
# Corresponds to the JSON property `modifiedDate`
|
1102
|
+
# @return [DateTime]
|
1103
|
+
attr_accessor :modified_date
|
1104
|
+
|
1105
|
+
# Replies to this post.
|
1106
|
+
# Corresponds to the JSON property `replies`
|
1107
|
+
# @return [Array<Google::Apis::DriveV2::CommentReply>]
|
1108
|
+
attr_accessor :replies
|
1109
|
+
|
1110
|
+
# A link back to this comment.
|
1111
|
+
# Corresponds to the JSON property `selfLink`
|
1112
|
+
# @return [String]
|
1113
|
+
attr_accessor :self_link
|
1114
|
+
|
1115
|
+
# The status of this comment. Status can be changed by posting a reply to a
|
1116
|
+
# comment with the desired status.
|
1117
|
+
# - "open" - The comment is still open.
|
1118
|
+
# - "resolved" - The comment has been resolved by one of its replies.
|
1119
|
+
# Corresponds to the JSON property `status`
|
1120
|
+
# @return [String]
|
1121
|
+
attr_accessor :status
|
1122
|
+
|
1123
|
+
def initialize(**args)
|
1124
|
+
update!(**args)
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
# Update properties of this object
|
1128
|
+
def update!(**args)
|
1129
|
+
@anchor = args[:anchor] if args.key?(:anchor)
|
1130
|
+
@author = args[:author] if args.key?(:author)
|
1131
|
+
@comment_id = args[:comment_id] if args.key?(:comment_id)
|
1132
|
+
@content = args[:content] if args.key?(:content)
|
1133
|
+
@context = args[:context] if args.key?(:context)
|
1134
|
+
@created_date = args[:created_date] if args.key?(:created_date)
|
1135
|
+
@deleted = args[:deleted] if args.key?(:deleted)
|
1136
|
+
@file_id = args[:file_id] if args.key?(:file_id)
|
1137
|
+
@file_title = args[:file_title] if args.key?(:file_title)
|
1138
|
+
@html_content = args[:html_content] if args.key?(:html_content)
|
1139
|
+
@kind = args[:kind] if args.key?(:kind)
|
1140
|
+
@modified_date = args[:modified_date] if args.key?(:modified_date)
|
1141
|
+
@replies = args[:replies] if args.key?(:replies)
|
1142
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
1143
|
+
@status = args[:status] if args.key?(:status)
|
1144
|
+
end
|
1145
|
+
|
1146
|
+
# The context of the file which is being commented on.
|
1147
|
+
class Context
|
1148
|
+
include Google::Apis::Core::Hashable
|
1149
|
+
|
1150
|
+
# The MIME type of the context snippet.
|
1151
|
+
# Corresponds to the JSON property `type`
|
1152
|
+
# @return [String]
|
1153
|
+
attr_accessor :type
|
1154
|
+
|
1155
|
+
# Data representation of the segment of the file being commented on. In the case
|
1156
|
+
# of a text file for example, this would be the actual text that the comment is
|
1157
|
+
# about.
|
1158
|
+
# Corresponds to the JSON property `value`
|
1159
|
+
# @return [String]
|
1160
|
+
attr_accessor :value
|
1161
|
+
|
1162
|
+
def initialize(**args)
|
1163
|
+
update!(**args)
|
1164
|
+
end
|
1165
|
+
|
1166
|
+
# Update properties of this object
|
1167
|
+
def update!(**args)
|
1168
|
+
@type = args[:type] if args.key?(:type)
|
1169
|
+
@value = args[:value] if args.key?(:value)
|
1170
|
+
end
|
1171
|
+
end
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
# A list of comments on a file in Google Drive.
|
1175
|
+
class CommentList
|
1176
|
+
include Google::Apis::Core::Hashable
|
1177
|
+
|
1178
|
+
# The list of comments. If nextPageToken is populated, then this list may be
|
1179
|
+
# incomplete and an additional page of results should be fetched.
|
1180
|
+
# Corresponds to the JSON property `items`
|
1181
|
+
# @return [Array<Google::Apis::DriveV2::Comment>]
|
1182
|
+
attr_accessor :items
|
1183
|
+
|
1184
|
+
# This is always drive#commentList.
|
1185
|
+
# Corresponds to the JSON property `kind`
|
1186
|
+
# @return [String]
|
1187
|
+
attr_accessor :kind
|
1188
|
+
|
1189
|
+
# A link to the next page of comments.
|
1190
|
+
# Corresponds to the JSON property `nextLink`
|
1191
|
+
# @return [String]
|
1192
|
+
attr_accessor :next_link
|
1193
|
+
|
1194
|
+
# The page token for the next page of comments. This will be absent if the end
|
1195
|
+
# of the comments list has been reached. If the token is rejected for any reason,
|
1196
|
+
# it should be discarded, and pagination should be restarted from the first
|
1197
|
+
# page of results.
|
1198
|
+
# Corresponds to the JSON property `nextPageToken`
|
1199
|
+
# @return [String]
|
1200
|
+
attr_accessor :next_page_token
|
1201
|
+
|
1202
|
+
# A link back to this list.
|
1203
|
+
# Corresponds to the JSON property `selfLink`
|
1204
|
+
# @return [String]
|
1205
|
+
attr_accessor :self_link
|
1206
|
+
|
1207
|
+
def initialize(**args)
|
1208
|
+
update!(**args)
|
1209
|
+
end
|
1210
|
+
|
1211
|
+
# Update properties of this object
|
1212
|
+
def update!(**args)
|
1213
|
+
@items = args[:items] if args.key?(:items)
|
1214
|
+
@kind = args[:kind] if args.key?(:kind)
|
1215
|
+
@next_link = args[:next_link] if args.key?(:next_link)
|
1216
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1217
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
1218
|
+
end
|
1219
|
+
end
|
1220
|
+
|
1221
|
+
# A comment on a file in Google Drive.
|
1222
|
+
class CommentReply
|
1223
|
+
include Google::Apis::Core::Hashable
|
1224
|
+
|
1225
|
+
# Information about a Drive user.
|
1226
|
+
# Corresponds to the JSON property `author`
|
1227
|
+
# @return [Google::Apis::DriveV2::User]
|
1228
|
+
attr_accessor :author
|
1229
|
+
|
1230
|
+
# The plain text content used to create this reply. This is not HTML safe and
|
1231
|
+
# should only be used as a starting point to make edits to a reply's content.
|
1232
|
+
# This field is required on inserts if no verb is specified (resolve/reopen).
|
1233
|
+
# Corresponds to the JSON property `content`
|
1234
|
+
# @return [String]
|
1235
|
+
attr_accessor :content
|
1236
|
+
|
1237
|
+
# The date when this reply was first created.
|
1238
|
+
# Corresponds to the JSON property `createdDate`
|
1239
|
+
# @return [DateTime]
|
1240
|
+
attr_accessor :created_date
|
1241
|
+
|
1242
|
+
# Whether this reply has been deleted. If a reply has been deleted the content
|
1243
|
+
# will be cleared and this will only represent a reply that once existed.
|
1244
|
+
# Corresponds to the JSON property `deleted`
|
1245
|
+
# @return [Boolean]
|
1246
|
+
attr_accessor :deleted
|
1247
|
+
alias_method :deleted?, :deleted
|
1248
|
+
|
1249
|
+
# HTML formatted content for this reply.
|
1250
|
+
# Corresponds to the JSON property `htmlContent`
|
1251
|
+
# @return [String]
|
1252
|
+
attr_accessor :html_content
|
1253
|
+
|
1254
|
+
# This is always drive#commentReply.
|
1255
|
+
# Corresponds to the JSON property `kind`
|
1256
|
+
# @return [String]
|
1257
|
+
attr_accessor :kind
|
1258
|
+
|
1259
|
+
# The date when this reply was last modified.
|
1260
|
+
# Corresponds to the JSON property `modifiedDate`
|
1261
|
+
# @return [DateTime]
|
1262
|
+
attr_accessor :modified_date
|
1263
|
+
|
1264
|
+
# The ID of the reply.
|
1265
|
+
# Corresponds to the JSON property `replyId`
|
1266
|
+
# @return [String]
|
1267
|
+
attr_accessor :reply_id
|
1268
|
+
|
1269
|
+
# The action this reply performed to the parent comment. When creating a new
|
1270
|
+
# reply this is the action to be perform to the parent comment. Possible values
|
1271
|
+
# are:
|
1272
|
+
# - "resolve" - To resolve a comment.
|
1273
|
+
# - "reopen" - To reopen (un-resolve) a comment.
|
1274
|
+
# Corresponds to the JSON property `verb`
|
1275
|
+
# @return [String]
|
1276
|
+
attr_accessor :verb
|
1277
|
+
|
1278
|
+
def initialize(**args)
|
1279
|
+
update!(**args)
|
1280
|
+
end
|
1281
|
+
|
1282
|
+
# Update properties of this object
|
1283
|
+
def update!(**args)
|
1284
|
+
@author = args[:author] if args.key?(:author)
|
1285
|
+
@content = args[:content] if args.key?(:content)
|
1286
|
+
@created_date = args[:created_date] if args.key?(:created_date)
|
1287
|
+
@deleted = args[:deleted] if args.key?(:deleted)
|
1288
|
+
@html_content = args[:html_content] if args.key?(:html_content)
|
1289
|
+
@kind = args[:kind] if args.key?(:kind)
|
1290
|
+
@modified_date = args[:modified_date] if args.key?(:modified_date)
|
1291
|
+
@reply_id = args[:reply_id] if args.key?(:reply_id)
|
1292
|
+
@verb = args[:verb] if args.key?(:verb)
|
1293
|
+
end
|
1294
|
+
end
|
1295
|
+
|
1296
|
+
# A list of replies to a comment on a file in Google Drive.
|
1297
|
+
class CommentReplyList
|
1298
|
+
include Google::Apis::Core::Hashable
|
1299
|
+
|
1300
|
+
# The list of replies. If nextPageToken is populated, then this list may be
|
1301
|
+
# incomplete and an additional page of results should be fetched.
|
1302
|
+
# Corresponds to the JSON property `items`
|
1303
|
+
# @return [Array<Google::Apis::DriveV2::CommentReply>]
|
1304
|
+
attr_accessor :items
|
1305
|
+
|
1306
|
+
# This is always drive#commentReplyList.
|
1307
|
+
# Corresponds to the JSON property `kind`
|
1308
|
+
# @return [String]
|
1309
|
+
attr_accessor :kind
|
1310
|
+
|
1311
|
+
# A link to the next page of replies.
|
1312
|
+
# Corresponds to the JSON property `nextLink`
|
1313
|
+
# @return [String]
|
1314
|
+
attr_accessor :next_link
|
1315
|
+
|
1316
|
+
# The page token for the next page of replies. This will be absent if the end of
|
1317
|
+
# the replies list has been reached. If the token is rejected for any reason, it
|
1318
|
+
# should be discarded, and pagination should be restarted from the first page of
|
1319
|
+
# results.
|
1320
|
+
# Corresponds to the JSON property `nextPageToken`
|
1321
|
+
# @return [String]
|
1322
|
+
attr_accessor :next_page_token
|
1323
|
+
|
1324
|
+
# A link back to this list.
|
1325
|
+
# Corresponds to the JSON property `selfLink`
|
1326
|
+
# @return [String]
|
1327
|
+
attr_accessor :self_link
|
1328
|
+
|
1329
|
+
def initialize(**args)
|
1330
|
+
update!(**args)
|
1331
|
+
end
|
1332
|
+
|
1333
|
+
# Update properties of this object
|
1334
|
+
def update!(**args)
|
1335
|
+
@items = args[:items] if args.key?(:items)
|
1336
|
+
@kind = args[:kind] if args.key?(:kind)
|
1337
|
+
@next_link = args[:next_link] if args.key?(:next_link)
|
1338
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1339
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
1340
|
+
end
|
1341
|
+
end
|
1342
|
+
|
1343
|
+
# A restriction for accessing the content of the file.
|
1344
|
+
class ContentRestriction
|
1345
|
+
include Google::Apis::Core::Hashable
|
1346
|
+
|
1347
|
+
# Whether the content of the file is read-only. If a file is read-only, a new
|
1348
|
+
# revision of the file may not be added, comments may not be added or modified,
|
1349
|
+
# and the title of the file may not be modified.
|
1350
|
+
# Corresponds to the JSON property `readOnly`
|
1351
|
+
# @return [Boolean]
|
1352
|
+
attr_accessor :read_only
|
1353
|
+
alias_method :read_only?, :read_only
|
1354
|
+
|
1355
|
+
# Reason for why the content of the file is restricted. This is only mutable on
|
1356
|
+
# requests that also set readOnly=true.
|
1357
|
+
# Corresponds to the JSON property `reason`
|
1358
|
+
# @return [String]
|
1359
|
+
attr_accessor :reason
|
1360
|
+
|
1361
|
+
# Information about a Drive user.
|
1362
|
+
# Corresponds to the JSON property `restrictingUser`
|
1363
|
+
# @return [Google::Apis::DriveV2::User]
|
1364
|
+
attr_accessor :restricting_user
|
1365
|
+
|
1366
|
+
# The time at which the content restriction was set (formatted RFC 3339
|
1367
|
+
# timestamp). Only populated if readOnly is true.
|
1368
|
+
# Corresponds to the JSON property `restrictionDate`
|
1369
|
+
# @return [DateTime]
|
1370
|
+
attr_accessor :restriction_date
|
1371
|
+
|
1372
|
+
# The type of the content restriction. Currently the only possible value is
|
1373
|
+
# globalContentRestriction.
|
1374
|
+
# Corresponds to the JSON property `type`
|
1375
|
+
# @return [String]
|
1376
|
+
attr_accessor :type
|
1377
|
+
|
1378
|
+
def initialize(**args)
|
1379
|
+
update!(**args)
|
1380
|
+
end
|
1381
|
+
|
1382
|
+
# Update properties of this object
|
1383
|
+
def update!(**args)
|
1384
|
+
@read_only = args[:read_only] if args.key?(:read_only)
|
1385
|
+
@reason = args[:reason] if args.key?(:reason)
|
1386
|
+
@restricting_user = args[:restricting_user] if args.key?(:restricting_user)
|
1387
|
+
@restriction_date = args[:restriction_date] if args.key?(:restriction_date)
|
1388
|
+
@type = args[:type] if args.key?(:type)
|
1389
|
+
end
|
1390
|
+
end
|
1391
|
+
|
1392
|
+
# Representation of a shared drive.
|
1393
|
+
class Drive
|
1394
|
+
include Google::Apis::Core::Hashable
|
1395
|
+
|
1396
|
+
# An image file and cropping parameters from which a background image for this
|
1397
|
+
# shared drive is set. This is a write only field; it can only be set on drive.
|
1398
|
+
# drives.update requests that don't set themeId. When specified, all fields of
|
1399
|
+
# the backgroundImageFile must be set.
|
1400
|
+
# Corresponds to the JSON property `backgroundImageFile`
|
1401
|
+
# @return [Google::Apis::DriveV2::Drive::BackgroundImageFile]
|
1402
|
+
attr_accessor :background_image_file
|
1403
|
+
|
1404
|
+
# A short-lived link to this shared drive's background image.
|
1405
|
+
# Corresponds to the JSON property `backgroundImageLink`
|
1406
|
+
# @return [String]
|
1407
|
+
attr_accessor :background_image_link
|
1408
|
+
|
1409
|
+
# Capabilities the current user has on this shared drive.
|
1410
|
+
# Corresponds to the JSON property `capabilities`
|
1411
|
+
# @return [Google::Apis::DriveV2::Drive::Capabilities]
|
1412
|
+
attr_accessor :capabilities
|
1413
|
+
|
1414
|
+
# The color of this shared drive as an RGB hex string. It can only be set on a
|
1415
|
+
# drive.drives.update request that does not set themeId.
|
1416
|
+
# Corresponds to the JSON property `colorRgb`
|
1417
|
+
# @return [String]
|
1418
|
+
attr_accessor :color_rgb
|
1419
|
+
|
1420
|
+
# The time at which the shared drive was created (RFC 3339 date-time).
|
1421
|
+
# Corresponds to the JSON property `createdDate`
|
1422
|
+
# @return [DateTime]
|
1423
|
+
attr_accessor :created_date
|
1424
|
+
|
1425
|
+
# Whether the shared drive is hidden from default view.
|
1426
|
+
# Corresponds to the JSON property `hidden`
|
1427
|
+
# @return [Boolean]
|
1428
|
+
attr_accessor :hidden
|
1429
|
+
alias_method :hidden?, :hidden
|
1430
|
+
|
1431
|
+
# The ID of this shared drive which is also the ID of the top level folder of
|
1432
|
+
# this shared drive.
|
1433
|
+
# Corresponds to the JSON property `id`
|
1434
|
+
# @return [String]
|
1435
|
+
attr_accessor :id
|
1436
|
+
|
1437
|
+
# This is always drive#drive
|
1438
|
+
# Corresponds to the JSON property `kind`
|
1439
|
+
# @return [String]
|
1440
|
+
attr_accessor :kind
|
1441
|
+
|
1442
|
+
# The name of this shared drive.
|
1443
|
+
# Corresponds to the JSON property `name`
|
1444
|
+
# @return [String]
|
1445
|
+
attr_accessor :name
|
1446
|
+
|
1447
|
+
# A set of restrictions that apply to this shared drive or items inside this
|
1448
|
+
# shared drive.
|
1449
|
+
# Corresponds to the JSON property `restrictions`
|
1450
|
+
# @return [Google::Apis::DriveV2::Drive::Restrictions]
|
1451
|
+
attr_accessor :restrictions
|
1452
|
+
|
1453
|
+
# The ID of the theme from which the background image and color will be set. The
|
1454
|
+
# set of possible driveThemes can be retrieved from a drive.about.get response.
|
1455
|
+
# When not specified on a drive.drives.insert request, a random theme is chosen
|
1456
|
+
# from which the background image and color are set. This is a write-only field;
|
1457
|
+
# it can only be set on requests that don't set colorRgb or backgroundImageFile.
|
1458
|
+
# Corresponds to the JSON property `themeId`
|
1459
|
+
# @return [String]
|
1460
|
+
attr_accessor :theme_id
|
1461
|
+
|
1462
|
+
def initialize(**args)
|
1463
|
+
update!(**args)
|
1464
|
+
end
|
1465
|
+
|
1466
|
+
# Update properties of this object
|
1467
|
+
def update!(**args)
|
1468
|
+
@background_image_file = args[:background_image_file] if args.key?(:background_image_file)
|
1469
|
+
@background_image_link = args[:background_image_link] if args.key?(:background_image_link)
|
1470
|
+
@capabilities = args[:capabilities] if args.key?(:capabilities)
|
1471
|
+
@color_rgb = args[:color_rgb] if args.key?(:color_rgb)
|
1472
|
+
@created_date = args[:created_date] if args.key?(:created_date)
|
1473
|
+
@hidden = args[:hidden] if args.key?(:hidden)
|
1474
|
+
@id = args[:id] if args.key?(:id)
|
1475
|
+
@kind = args[:kind] if args.key?(:kind)
|
1476
|
+
@name = args[:name] if args.key?(:name)
|
1477
|
+
@restrictions = args[:restrictions] if args.key?(:restrictions)
|
1478
|
+
@theme_id = args[:theme_id] if args.key?(:theme_id)
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
# An image file and cropping parameters from which a background image for this
|
1482
|
+
# shared drive is set. This is a write only field; it can only be set on drive.
|
1483
|
+
# drives.update requests that don't set themeId. When specified, all fields of
|
1484
|
+
# the backgroundImageFile must be set.
|
1485
|
+
class BackgroundImageFile
|
1486
|
+
include Google::Apis::Core::Hashable
|
1487
|
+
|
1488
|
+
# The ID of an image file in Google Drive to use for the background image.
|
1489
|
+
# Corresponds to the JSON property `id`
|
1490
|
+
# @return [String]
|
1491
|
+
attr_accessor :id
|
1492
|
+
|
1493
|
+
# The width of the cropped image in the closed range of 0 to 1. This value
|
1494
|
+
# represents the width of the cropped image divided by the width of the entire
|
1495
|
+
# image. The height is computed by applying a width to height aspect ratio of 80
|
1496
|
+
# to 9. The resulting image must be at least 1280 pixels wide and 144 pixels
|
1497
|
+
# high.
|
1498
|
+
# Corresponds to the JSON property `width`
|
1499
|
+
# @return [Float]
|
1500
|
+
attr_accessor :width
|
1501
|
+
|
1502
|
+
# The X coordinate of the upper left corner of the cropping area in the
|
1503
|
+
# background image. This is a value in the closed range of 0 to 1. This value
|
1504
|
+
# represents the horizontal distance from the left side of the entire image to
|
1505
|
+
# the left side of the cropping area divided by the width of the entire image.
|
1506
|
+
# Corresponds to the JSON property `xCoordinate`
|
1507
|
+
# @return [Float]
|
1508
|
+
attr_accessor :x_coordinate
|
1509
|
+
|
1510
|
+
# The Y coordinate of the upper left corner of the cropping area in the
|
1511
|
+
# background image. This is a value in the closed range of 0 to 1. This value
|
1512
|
+
# represents the vertical distance from the top side of the entire image to the
|
1513
|
+
# top side of the cropping area divided by the height of the entire image.
|
1514
|
+
# Corresponds to the JSON property `yCoordinate`
|
1515
|
+
# @return [Float]
|
1516
|
+
attr_accessor :y_coordinate
|
1517
|
+
|
1518
|
+
def initialize(**args)
|
1519
|
+
update!(**args)
|
1520
|
+
end
|
1521
|
+
|
1522
|
+
# Update properties of this object
|
1523
|
+
def update!(**args)
|
1524
|
+
@id = args[:id] if args.key?(:id)
|
1525
|
+
@width = args[:width] if args.key?(:width)
|
1526
|
+
@x_coordinate = args[:x_coordinate] if args.key?(:x_coordinate)
|
1527
|
+
@y_coordinate = args[:y_coordinate] if args.key?(:y_coordinate)
|
1528
|
+
end
|
1529
|
+
end
|
1530
|
+
|
1531
|
+
# Capabilities the current user has on this shared drive.
|
1532
|
+
class Capabilities
|
1533
|
+
include Google::Apis::Core::Hashable
|
1534
|
+
|
1535
|
+
# Whether the current user can add children to folders in this shared drive.
|
1536
|
+
# Corresponds to the JSON property `canAddChildren`
|
1537
|
+
# @return [Boolean]
|
1538
|
+
attr_accessor :can_add_children
|
1539
|
+
alias_method :can_add_children?, :can_add_children
|
1540
|
+
|
1541
|
+
# Whether the current user can change the copyRequiresWriterPermission
|
1542
|
+
# restriction of this shared drive.
|
1543
|
+
# Corresponds to the JSON property `canChangeCopyRequiresWriterPermissionRestriction`
|
1544
|
+
# @return [Boolean]
|
1545
|
+
attr_accessor :can_change_copy_requires_writer_permission_restriction
|
1546
|
+
alias_method :can_change_copy_requires_writer_permission_restriction?, :can_change_copy_requires_writer_permission_restriction
|
1547
|
+
|
1548
|
+
# Whether the current user can change the domainUsersOnly restriction of this
|
1549
|
+
# shared drive.
|
1550
|
+
# Corresponds to the JSON property `canChangeDomainUsersOnlyRestriction`
|
1551
|
+
# @return [Boolean]
|
1552
|
+
attr_accessor :can_change_domain_users_only_restriction
|
1553
|
+
alias_method :can_change_domain_users_only_restriction?, :can_change_domain_users_only_restriction
|
1554
|
+
|
1555
|
+
# Whether the current user can change the background of this shared drive.
|
1556
|
+
# Corresponds to the JSON property `canChangeDriveBackground`
|
1557
|
+
# @return [Boolean]
|
1558
|
+
attr_accessor :can_change_drive_background
|
1559
|
+
alias_method :can_change_drive_background?, :can_change_drive_background
|
1560
|
+
|
1561
|
+
# Whether the current user can change the driveMembersOnly restriction of this
|
1562
|
+
# shared drive.
|
1563
|
+
# Corresponds to the JSON property `canChangeDriveMembersOnlyRestriction`
|
1564
|
+
# @return [Boolean]
|
1565
|
+
attr_accessor :can_change_drive_members_only_restriction
|
1566
|
+
alias_method :can_change_drive_members_only_restriction?, :can_change_drive_members_only_restriction
|
1567
|
+
|
1568
|
+
# Whether the current user can comment on files in this shared drive.
|
1569
|
+
# Corresponds to the JSON property `canComment`
|
1570
|
+
# @return [Boolean]
|
1571
|
+
attr_accessor :can_comment
|
1572
|
+
alias_method :can_comment?, :can_comment
|
1573
|
+
|
1574
|
+
# Whether the current user can copy files in this shared drive.
|
1575
|
+
# Corresponds to the JSON property `canCopy`
|
1576
|
+
# @return [Boolean]
|
1577
|
+
attr_accessor :can_copy
|
1578
|
+
alias_method :can_copy?, :can_copy
|
1579
|
+
|
1580
|
+
# Whether the current user can delete children from folders in this shared drive.
|
1581
|
+
# Corresponds to the JSON property `canDeleteChildren`
|
1582
|
+
# @return [Boolean]
|
1583
|
+
attr_accessor :can_delete_children
|
1584
|
+
alias_method :can_delete_children?, :can_delete_children
|
1585
|
+
|
1586
|
+
# Whether the current user can delete this shared drive. Attempting to delete
|
1587
|
+
# the shared drive may still fail if there are untrashed items inside the shared
|
1588
|
+
# drive.
|
1589
|
+
# Corresponds to the JSON property `canDeleteDrive`
|
1590
|
+
# @return [Boolean]
|
1591
|
+
attr_accessor :can_delete_drive
|
1592
|
+
alias_method :can_delete_drive?, :can_delete_drive
|
1593
|
+
|
1594
|
+
# Whether the current user can download files in this shared drive.
|
1595
|
+
# Corresponds to the JSON property `canDownload`
|
1596
|
+
# @return [Boolean]
|
1597
|
+
attr_accessor :can_download
|
1598
|
+
alias_method :can_download?, :can_download
|
1599
|
+
|
1600
|
+
# Whether the current user can edit files in this shared drive
|
1601
|
+
# Corresponds to the JSON property `canEdit`
|
1602
|
+
# @return [Boolean]
|
1603
|
+
attr_accessor :can_edit
|
1604
|
+
alias_method :can_edit?, :can_edit
|
1605
|
+
|
1606
|
+
# Whether the current user can list the children of folders in this shared drive.
|
1607
|
+
# Corresponds to the JSON property `canListChildren`
|
1608
|
+
# @return [Boolean]
|
1609
|
+
attr_accessor :can_list_children
|
1610
|
+
alias_method :can_list_children?, :can_list_children
|
1611
|
+
|
1612
|
+
# Whether the current user can add members to this shared drive or remove them
|
1613
|
+
# or change their role.
|
1614
|
+
# Corresponds to the JSON property `canManageMembers`
|
1615
|
+
# @return [Boolean]
|
1616
|
+
attr_accessor :can_manage_members
|
1617
|
+
alias_method :can_manage_members?, :can_manage_members
|
1618
|
+
|
1619
|
+
# Whether the current user can read the revisions resource of files in this
|
1620
|
+
# shared drive.
|
1621
|
+
# Corresponds to the JSON property `canReadRevisions`
|
1622
|
+
# @return [Boolean]
|
1623
|
+
attr_accessor :can_read_revisions
|
1624
|
+
alias_method :can_read_revisions?, :can_read_revisions
|
1625
|
+
|
1626
|
+
# Whether the current user can rename files or folders in this shared drive.
|
1627
|
+
# Corresponds to the JSON property `canRename`
|
1628
|
+
# @return [Boolean]
|
1629
|
+
attr_accessor :can_rename
|
1630
|
+
alias_method :can_rename?, :can_rename
|
1631
|
+
|
1632
|
+
# Whether the current user can rename this shared drive.
|
1633
|
+
# Corresponds to the JSON property `canRenameDrive`
|
1634
|
+
# @return [Boolean]
|
1635
|
+
attr_accessor :can_rename_drive
|
1636
|
+
alias_method :can_rename_drive?, :can_rename_drive
|
1637
|
+
|
1638
|
+
# Whether the current user can share files or folders in this shared drive.
|
1639
|
+
# Corresponds to the JSON property `canShare`
|
1640
|
+
# @return [Boolean]
|
1641
|
+
attr_accessor :can_share
|
1642
|
+
alias_method :can_share?, :can_share
|
1643
|
+
|
1644
|
+
# Whether the current user can trash children from folders in this shared drive.
|
1645
|
+
# Corresponds to the JSON property `canTrashChildren`
|
1646
|
+
# @return [Boolean]
|
1647
|
+
attr_accessor :can_trash_children
|
1648
|
+
alias_method :can_trash_children?, :can_trash_children
|
1649
|
+
|
1650
|
+
def initialize(**args)
|
1651
|
+
update!(**args)
|
1652
|
+
end
|
1653
|
+
|
1654
|
+
# Update properties of this object
|
1655
|
+
def update!(**args)
|
1656
|
+
@can_add_children = args[:can_add_children] if args.key?(:can_add_children)
|
1657
|
+
@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)
|
1658
|
+
@can_change_domain_users_only_restriction = args[:can_change_domain_users_only_restriction] if args.key?(:can_change_domain_users_only_restriction)
|
1659
|
+
@can_change_drive_background = args[:can_change_drive_background] if args.key?(:can_change_drive_background)
|
1660
|
+
@can_change_drive_members_only_restriction = args[:can_change_drive_members_only_restriction] if args.key?(:can_change_drive_members_only_restriction)
|
1661
|
+
@can_comment = args[:can_comment] if args.key?(:can_comment)
|
1662
|
+
@can_copy = args[:can_copy] if args.key?(:can_copy)
|
1663
|
+
@can_delete_children = args[:can_delete_children] if args.key?(:can_delete_children)
|
1664
|
+
@can_delete_drive = args[:can_delete_drive] if args.key?(:can_delete_drive)
|
1665
|
+
@can_download = args[:can_download] if args.key?(:can_download)
|
1666
|
+
@can_edit = args[:can_edit] if args.key?(:can_edit)
|
1667
|
+
@can_list_children = args[:can_list_children] if args.key?(:can_list_children)
|
1668
|
+
@can_manage_members = args[:can_manage_members] if args.key?(:can_manage_members)
|
1669
|
+
@can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
|
1670
|
+
@can_rename = args[:can_rename] if args.key?(:can_rename)
|
1671
|
+
@can_rename_drive = args[:can_rename_drive] if args.key?(:can_rename_drive)
|
1672
|
+
@can_share = args[:can_share] if args.key?(:can_share)
|
1673
|
+
@can_trash_children = args[:can_trash_children] if args.key?(:can_trash_children)
|
1674
|
+
end
|
1675
|
+
end
|
1676
|
+
|
1677
|
+
# A set of restrictions that apply to this shared drive or items inside this
|
1678
|
+
# shared drive.
|
1679
|
+
class Restrictions
|
1680
|
+
include Google::Apis::Core::Hashable
|
1681
|
+
|
1682
|
+
# Whether administrative privileges on this shared drive are required to modify
|
1683
|
+
# restrictions.
|
1684
|
+
# Corresponds to the JSON property `adminManagedRestrictions`
|
1685
|
+
# @return [Boolean]
|
1686
|
+
attr_accessor :admin_managed_restrictions
|
1687
|
+
alias_method :admin_managed_restrictions?, :admin_managed_restrictions
|
1688
|
+
|
1689
|
+
# Whether the options to copy, print, or download files inside this shared drive,
|
1690
|
+
# should be disabled for readers and commenters. When this restriction is set
|
1691
|
+
# to true, it will override the similarly named field to true for any file
|
1692
|
+
# inside this shared drive.
|
1693
|
+
# Corresponds to the JSON property `copyRequiresWriterPermission`
|
1694
|
+
# @return [Boolean]
|
1695
|
+
attr_accessor :copy_requires_writer_permission
|
1696
|
+
alias_method :copy_requires_writer_permission?, :copy_requires_writer_permission
|
1697
|
+
|
1698
|
+
# Whether access to this shared drive and items inside this shared drive is
|
1699
|
+
# restricted to users of the domain to which this shared drive belongs. This
|
1700
|
+
# restriction may be overridden by other sharing policies controlled outside of
|
1701
|
+
# this shared drive.
|
1702
|
+
# Corresponds to the JSON property `domainUsersOnly`
|
1703
|
+
# @return [Boolean]
|
1704
|
+
attr_accessor :domain_users_only
|
1705
|
+
alias_method :domain_users_only?, :domain_users_only
|
1706
|
+
|
1707
|
+
# Whether access to items inside this shared drive is restricted to its members.
|
1708
|
+
# Corresponds to the JSON property `driveMembersOnly`
|
1709
|
+
# @return [Boolean]
|
1710
|
+
attr_accessor :drive_members_only
|
1711
|
+
alias_method :drive_members_only?, :drive_members_only
|
1712
|
+
|
1713
|
+
def initialize(**args)
|
1714
|
+
update!(**args)
|
1715
|
+
end
|
1716
|
+
|
1717
|
+
# Update properties of this object
|
1718
|
+
def update!(**args)
|
1719
|
+
@admin_managed_restrictions = args[:admin_managed_restrictions] if args.key?(:admin_managed_restrictions)
|
1720
|
+
@copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
|
1721
|
+
@domain_users_only = args[:domain_users_only] if args.key?(:domain_users_only)
|
1722
|
+
@drive_members_only = args[:drive_members_only] if args.key?(:drive_members_only)
|
1723
|
+
end
|
1724
|
+
end
|
1725
|
+
end
|
1726
|
+
|
1727
|
+
# A list of shared drives.
|
1728
|
+
class DriveList
|
1729
|
+
include Google::Apis::Core::Hashable
|
1730
|
+
|
1731
|
+
# The list of shared drives. If nextPageToken is populated, then this list may
|
1732
|
+
# be incomplete and an additional page of results should be fetched.
|
1733
|
+
# Corresponds to the JSON property `items`
|
1734
|
+
# @return [Array<Google::Apis::DriveV2::Drive>]
|
1735
|
+
attr_accessor :items
|
1736
|
+
|
1737
|
+
# This is always drive#driveList
|
1738
|
+
# Corresponds to the JSON property `kind`
|
1739
|
+
# @return [String]
|
1740
|
+
attr_accessor :kind
|
1741
|
+
|
1742
|
+
# The page token for the next page of shared drives. This will be absent if the
|
1743
|
+
# end of the list has been reached. If the token is rejected for any reason, it
|
1744
|
+
# should be discarded, and pagination should be restarted from the first page of
|
1745
|
+
# results.
|
1746
|
+
# Corresponds to the JSON property `nextPageToken`
|
1747
|
+
# @return [String]
|
1748
|
+
attr_accessor :next_page_token
|
1749
|
+
|
1750
|
+
def initialize(**args)
|
1751
|
+
update!(**args)
|
1752
|
+
end
|
1753
|
+
|
1754
|
+
# Update properties of this object
|
1755
|
+
def update!(**args)
|
1756
|
+
@items = args[:items] if args.key?(:items)
|
1757
|
+
@kind = args[:kind] if args.key?(:kind)
|
1758
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1759
|
+
end
|
1760
|
+
end
|
1761
|
+
|
1762
|
+
# The metadata for a file.
|
1763
|
+
class File
|
1764
|
+
include Google::Apis::Core::Hashable
|
1765
|
+
|
1766
|
+
# A link for opening the file in a relevant Google editor or viewer.
|
1767
|
+
# Corresponds to the JSON property `alternateLink`
|
1768
|
+
# @return [String]
|
1769
|
+
attr_accessor :alternate_link
|
1770
|
+
|
1771
|
+
# Whether this file is in the Application Data folder.
|
1772
|
+
# Corresponds to the JSON property `appDataContents`
|
1773
|
+
# @return [Boolean]
|
1774
|
+
attr_accessor :app_data_contents
|
1775
|
+
alias_method :app_data_contents?, :app_data_contents
|
1776
|
+
|
1777
|
+
# Deprecated: use capabilities/canComment.
|
1778
|
+
# Corresponds to the JSON property `canComment`
|
1779
|
+
# @return [Boolean]
|
1780
|
+
attr_accessor :can_comment
|
1781
|
+
alias_method :can_comment?, :can_comment
|
1782
|
+
|
1783
|
+
# Deprecated: use capabilities/canReadRevisions.
|
1784
|
+
# Corresponds to the JSON property `canReadRevisions`
|
1785
|
+
# @return [Boolean]
|
1786
|
+
attr_accessor :can_read_revisions
|
1787
|
+
alias_method :can_read_revisions?, :can_read_revisions
|
1788
|
+
|
1789
|
+
# Capabilities the current user has on this file. Each capability corresponds to
|
1790
|
+
# a fine-grained action that a user may take.
|
1791
|
+
# Corresponds to the JSON property `capabilities`
|
1792
|
+
# @return [Google::Apis::DriveV2::File::Capabilities]
|
1793
|
+
attr_accessor :capabilities
|
1794
|
+
|
1795
|
+
# Restrictions for accessing the content of the file. Only populated if such a
|
1796
|
+
# restriction exists.
|
1797
|
+
# Corresponds to the JSON property `contentRestrictions`
|
1798
|
+
# @return [Array<Google::Apis::DriveV2::ContentRestriction>]
|
1799
|
+
attr_accessor :content_restrictions
|
1800
|
+
|
1801
|
+
# Whether the options to copy, print, or download this file, should be disabled
|
1802
|
+
# for readers and commenters.
|
1803
|
+
# Corresponds to the JSON property `copyRequiresWriterPermission`
|
1804
|
+
# @return [Boolean]
|
1805
|
+
attr_accessor :copy_requires_writer_permission
|
1806
|
+
alias_method :copy_requires_writer_permission?, :copy_requires_writer_permission
|
1807
|
+
|
1808
|
+
# Deprecated: use capabilities/canCopy.
|
1809
|
+
# Corresponds to the JSON property `copyable`
|
1810
|
+
# @return [Boolean]
|
1811
|
+
attr_accessor :copyable
|
1812
|
+
alias_method :copyable?, :copyable
|
1813
|
+
|
1814
|
+
# Create time for this file (formatted RFC 3339 timestamp).
|
1815
|
+
# Corresponds to the JSON property `createdDate`
|
1816
|
+
# @return [DateTime]
|
1817
|
+
attr_accessor :created_date
|
1818
|
+
|
1819
|
+
# A link to open this file with the user's default app for this file. Only
|
1820
|
+
# populated when the drive.apps.readonly scope is used.
|
1821
|
+
# Corresponds to the JSON property `defaultOpenWithLink`
|
1822
|
+
# @return [String]
|
1823
|
+
attr_accessor :default_open_with_link
|
1824
|
+
|
1825
|
+
# A short description of the file.
|
1826
|
+
# Corresponds to the JSON property `description`
|
1827
|
+
# @return [String]
|
1828
|
+
attr_accessor :description
|
1829
|
+
|
1830
|
+
# Short lived download URL for the file. This field is only populated for files
|
1831
|
+
# with content stored in Google Drive; it is not populated for Docs Editors or
|
1832
|
+
# shortcut files.
|
1833
|
+
# Corresponds to the JSON property `downloadUrl`
|
1834
|
+
# @return [String]
|
1835
|
+
attr_accessor :download_url
|
1836
|
+
|
1837
|
+
# ID of the shared drive the file resides in. Only populated for items in shared
|
1838
|
+
# drives.
|
1839
|
+
# Corresponds to the JSON property `driveId`
|
1840
|
+
# @return [String]
|
1841
|
+
attr_accessor :drive_id
|
1842
|
+
|
1843
|
+
# Deprecated: use capabilities/canEdit.
|
1844
|
+
# Corresponds to the JSON property `editable`
|
1845
|
+
# @return [Boolean]
|
1846
|
+
attr_accessor :editable
|
1847
|
+
alias_method :editable?, :editable
|
1848
|
+
|
1849
|
+
# A link for embedding the file.
|
1850
|
+
# Corresponds to the JSON property `embedLink`
|
1851
|
+
# @return [String]
|
1852
|
+
attr_accessor :embed_link
|
1853
|
+
|
1854
|
+
# ETag of the file.
|
1855
|
+
# Corresponds to the JSON property `etag`
|
1856
|
+
# @return [String]
|
1857
|
+
attr_accessor :etag
|
1858
|
+
|
1859
|
+
# Whether this file has been explicitly trashed, as opposed to recursively
|
1860
|
+
# trashed.
|
1861
|
+
# Corresponds to the JSON property `explicitlyTrashed`
|
1862
|
+
# @return [Boolean]
|
1863
|
+
attr_accessor :explicitly_trashed
|
1864
|
+
alias_method :explicitly_trashed?, :explicitly_trashed
|
1865
|
+
|
1866
|
+
# Links for exporting Docs Editors files to specific formats.
|
1867
|
+
# Corresponds to the JSON property `exportLinks`
|
1868
|
+
# @return [Hash<String,String>]
|
1869
|
+
attr_accessor :export_links
|
1870
|
+
|
1871
|
+
# The final component of fullFileExtension with trailing text that does not
|
1872
|
+
# appear to be part of the extension removed. This field is only populated for
|
1873
|
+
# files with content stored in Google Drive; it is not populated for Docs
|
1874
|
+
# Editors or shortcut files.
|
1875
|
+
# Corresponds to the JSON property `fileExtension`
|
1876
|
+
# @return [String]
|
1877
|
+
attr_accessor :file_extension
|
1878
|
+
|
1879
|
+
# The size of the file in bytes. This field is populated for files with content
|
1880
|
+
# stored in Google Drive and for files in Docs Editors; it is not populated for
|
1881
|
+
# shortcut files.
|
1882
|
+
# Corresponds to the JSON property `fileSize`
|
1883
|
+
# @return [Fixnum]
|
1884
|
+
attr_accessor :file_size
|
1885
|
+
|
1886
|
+
# Folder color as an RGB hex string if the file is a folder. The list of
|
1887
|
+
# supported colors is available in the folderColorPalette field of the About
|
1888
|
+
# resource. If an unsupported color is specified, it will be changed to the
|
1889
|
+
# closest color in the palette. Not populated for items in shared drives.
|
1890
|
+
# Corresponds to the JSON property `folderColorRgb`
|
1891
|
+
# @return [String]
|
1892
|
+
attr_accessor :folder_color_rgb
|
1893
|
+
|
1894
|
+
# The full file extension; extracted from the title. May contain multiple
|
1895
|
+
# concatenated extensions, such as "tar.gz". Removing an extension from the
|
1896
|
+
# title does not clear this field; however, changing the extension on the title
|
1897
|
+
# does update this field. This field is only populated for files with content
|
1898
|
+
# stored in Google Drive; it is not populated for Docs Editors or shortcut files.
|
1899
|
+
# Corresponds to the JSON property `fullFileExtension`
|
1900
|
+
# @return [String]
|
1901
|
+
attr_accessor :full_file_extension
|
1902
|
+
|
1903
|
+
# Whether there are permissions directly on this file. This field is only
|
1904
|
+
# populated for items in shared drives.
|
1905
|
+
# Corresponds to the JSON property `hasAugmentedPermissions`
|
1906
|
+
# @return [Boolean]
|
1907
|
+
attr_accessor :has_augmented_permissions
|
1908
|
+
alias_method :has_augmented_permissions?, :has_augmented_permissions
|
1909
|
+
|
1910
|
+
# Whether this file has a thumbnail. This does not indicate whether the
|
1911
|
+
# requesting app has access to the thumbnail. To check access, look for the
|
1912
|
+
# presence of the thumbnailLink field.
|
1913
|
+
# Corresponds to the JSON property `hasThumbnail`
|
1914
|
+
# @return [Boolean]
|
1915
|
+
attr_accessor :has_thumbnail
|
1916
|
+
alias_method :has_thumbnail?, :has_thumbnail
|
1917
|
+
|
1918
|
+
# The ID of the file's head revision. This field is only populated for files
|
1919
|
+
# with content stored in Google Drive; it is not populated for Docs Editors or
|
1920
|
+
# shortcut files.
|
1921
|
+
# Corresponds to the JSON property `headRevisionId`
|
1922
|
+
# @return [String]
|
1923
|
+
attr_accessor :head_revision_id
|
1924
|
+
|
1925
|
+
# A link to the file's icon.
|
1926
|
+
# Corresponds to the JSON property `iconLink`
|
1927
|
+
# @return [String]
|
1928
|
+
attr_accessor :icon_link
|
1929
|
+
|
1930
|
+
# The ID of the file.
|
1931
|
+
# Corresponds to the JSON property `id`
|
1932
|
+
# @return [String]
|
1933
|
+
attr_accessor :id
|
1934
|
+
|
1935
|
+
# Metadata about image media. This will only be present for image types, and its
|
1936
|
+
# contents will depend on what can be parsed from the image content.
|
1937
|
+
# Corresponds to the JSON property `imageMediaMetadata`
|
1938
|
+
# @return [Google::Apis::DriveV2::File::ImageMediaMetadata]
|
1939
|
+
attr_accessor :image_media_metadata
|
1940
|
+
|
1941
|
+
# Indexable text attributes for the file (can only be written)
|
1942
|
+
# Corresponds to the JSON property `indexableText`
|
1943
|
+
# @return [Google::Apis::DriveV2::File::IndexableText]
|
1944
|
+
attr_accessor :indexable_text
|
1945
|
+
|
1946
|
+
# Whether the file was created or opened by the requesting app.
|
1947
|
+
# Corresponds to the JSON property `isAppAuthorized`
|
1948
|
+
# @return [Boolean]
|
1949
|
+
attr_accessor :is_app_authorized
|
1950
|
+
alias_method :is_app_authorized?, :is_app_authorized
|
1951
|
+
|
1952
|
+
# The type of file. This is always drive#file.
|
1953
|
+
# Corresponds to the JSON property `kind`
|
1954
|
+
# @return [String]
|
1955
|
+
attr_accessor :kind
|
1956
|
+
|
1957
|
+
# A group of labels for the file.
|
1958
|
+
# Corresponds to the JSON property `labels`
|
1959
|
+
# @return [Google::Apis::DriveV2::File::Labels]
|
1960
|
+
attr_accessor :labels
|
1961
|
+
|
1962
|
+
# Information about a Drive user.
|
1963
|
+
# Corresponds to the JSON property `lastModifyingUser`
|
1964
|
+
# @return [Google::Apis::DriveV2::User]
|
1965
|
+
attr_accessor :last_modifying_user
|
1966
|
+
|
1967
|
+
# Name of the last user to modify this file.
|
1968
|
+
# Corresponds to the JSON property `lastModifyingUserName`
|
1969
|
+
# @return [String]
|
1970
|
+
attr_accessor :last_modifying_user_name
|
1971
|
+
|
1972
|
+
# Last time this file was viewed by the user (formatted RFC 3339 timestamp).
|
1973
|
+
# Corresponds to the JSON property `lastViewedByMeDate`
|
1974
|
+
# @return [DateTime]
|
1975
|
+
attr_accessor :last_viewed_by_me_date
|
1976
|
+
|
1977
|
+
# Deprecated.
|
1978
|
+
# Corresponds to the JSON property `markedViewedByMeDate`
|
1979
|
+
# @return [DateTime]
|
1980
|
+
attr_accessor :marked_viewed_by_me_date
|
1981
|
+
|
1982
|
+
# An MD5 checksum for the content of this file. This field is only populated for
|
1983
|
+
# files with content stored in Google Drive; it is not populated for Docs
|
1984
|
+
# Editors or shortcut files.
|
1985
|
+
# Corresponds to the JSON property `md5Checksum`
|
1986
|
+
# @return [String]
|
1987
|
+
attr_accessor :md5_checksum
|
1988
|
+
|
1989
|
+
# The MIME type of the file. This is only mutable on update when uploading new
|
1990
|
+
# content. This field can be left blank, and the mimetype will be determined
|
1991
|
+
# from the uploaded content's MIME type.
|
1992
|
+
# Corresponds to the JSON property `mimeType`
|
1993
|
+
# @return [String]
|
1994
|
+
attr_accessor :mime_type
|
1995
|
+
|
1996
|
+
# Last time this file was modified by the user (formatted RFC 3339 timestamp).
|
1997
|
+
# Note that setting modifiedDate will also update the modifiedByMe date for the
|
1998
|
+
# user which set the date.
|
1999
|
+
# Corresponds to the JSON property `modifiedByMeDate`
|
2000
|
+
# @return [DateTime]
|
2001
|
+
attr_accessor :modified_by_me_date
|
2002
|
+
|
2003
|
+
# Last time this file was modified by anyone (formatted RFC 3339 timestamp).
|
2004
|
+
# This is only mutable on update when the setModifiedDate parameter is set.
|
2005
|
+
# Corresponds to the JSON property `modifiedDate`
|
2006
|
+
# @return [DateTime]
|
2007
|
+
attr_accessor :modified_date
|
2008
|
+
|
2009
|
+
# A map of the id of each of the user's apps to a link to open this file with
|
2010
|
+
# that app. Only populated when the drive.apps.readonly scope is used.
|
2011
|
+
# Corresponds to the JSON property `openWithLinks`
|
2012
|
+
# @return [Hash<String,String>]
|
2013
|
+
attr_accessor :open_with_links
|
2014
|
+
|
2015
|
+
# The original filename of the uploaded content if available, or else the
|
2016
|
+
# original value of the title field. This is only available for files with
|
2017
|
+
# binary content in Google Drive.
|
2018
|
+
# Corresponds to the JSON property `originalFilename`
|
2019
|
+
# @return [String]
|
2020
|
+
attr_accessor :original_filename
|
2021
|
+
|
2022
|
+
# Whether the file is owned by the current user. Not populated for items in
|
2023
|
+
# shared drives.
|
2024
|
+
# Corresponds to the JSON property `ownedByMe`
|
2025
|
+
# @return [Boolean]
|
2026
|
+
attr_accessor :owned_by_me
|
2027
|
+
alias_method :owned_by_me?, :owned_by_me
|
2028
|
+
|
2029
|
+
# Name(s) of the owner(s) of this file. Not populated for items in shared drives.
|
2030
|
+
# Corresponds to the JSON property `ownerNames`
|
2031
|
+
# @return [Array<String>]
|
2032
|
+
attr_accessor :owner_names
|
2033
|
+
|
2034
|
+
# The owner(s) of this file. Not populated for items in shared drives.
|
2035
|
+
# Corresponds to the JSON property `owners`
|
2036
|
+
# @return [Array<Google::Apis::DriveV2::User>]
|
2037
|
+
attr_accessor :owners
|
2038
|
+
|
2039
|
+
# Collection of parent folders which contain this file.
|
2040
|
+
# If not specified as part of an insert request, the file will be placed
|
2041
|
+
# directly in the user's My Drive folder. If not specified as part of a copy
|
2042
|
+
# request, the file will inherit any discoverable parents of the source file.
|
2043
|
+
# Update requests can also use the addParents and removeParents parameters to
|
2044
|
+
# modify the parents list.
|
2045
|
+
# Corresponds to the JSON property `parents`
|
2046
|
+
# @return [Array<Google::Apis::DriveV2::ParentReference>]
|
2047
|
+
attr_accessor :parents
|
2048
|
+
|
2049
|
+
# List of permission IDs for users with access to this file.
|
2050
|
+
# Corresponds to the JSON property `permissionIds`
|
2051
|
+
# @return [Array<String>]
|
2052
|
+
attr_accessor :permission_ids
|
2053
|
+
|
2054
|
+
# The list of permissions for users with access to this file. Not populated for
|
2055
|
+
# items in shared drives.
|
2056
|
+
# Corresponds to the JSON property `permissions`
|
2057
|
+
# @return [Array<Google::Apis::DriveV2::Permission>]
|
2058
|
+
attr_accessor :permissions
|
2059
|
+
|
2060
|
+
# The list of properties.
|
2061
|
+
# Corresponds to the JSON property `properties`
|
2062
|
+
# @return [Array<Google::Apis::DriveV2::Property>]
|
2063
|
+
attr_accessor :properties
|
2064
|
+
|
2065
|
+
# The number of quota bytes used by this file.
|
2066
|
+
# Corresponds to the JSON property `quotaBytesUsed`
|
2067
|
+
# @return [Fixnum]
|
2068
|
+
attr_accessor :quota_bytes_used
|
2069
|
+
|
2070
|
+
# A link back to this file.
|
2071
|
+
# Corresponds to the JSON property `selfLink`
|
2072
|
+
# @return [String]
|
2073
|
+
attr_accessor :self_link
|
2074
|
+
|
2075
|
+
# Deprecated: use capabilities/canShare.
|
2076
|
+
# Corresponds to the JSON property `shareable`
|
2077
|
+
# @return [Boolean]
|
2078
|
+
attr_accessor :shareable
|
2079
|
+
alias_method :shareable?, :shareable
|
2080
|
+
|
2081
|
+
# Whether the file has been shared. Not populated for items in shared drives.
|
2082
|
+
# Corresponds to the JSON property `shared`
|
2083
|
+
# @return [Boolean]
|
2084
|
+
attr_accessor :shared
|
2085
|
+
alias_method :shared?, :shared
|
2086
|
+
|
2087
|
+
# Time at which this file was shared with the user (formatted RFC 3339 timestamp)
|
2088
|
+
# .
|
2089
|
+
# Corresponds to the JSON property `sharedWithMeDate`
|
2090
|
+
# @return [DateTime]
|
2091
|
+
attr_accessor :shared_with_me_date
|
2092
|
+
|
2093
|
+
# Information about a Drive user.
|
2094
|
+
# Corresponds to the JSON property `sharingUser`
|
2095
|
+
# @return [Google::Apis::DriveV2::User]
|
2096
|
+
attr_accessor :sharing_user
|
2097
|
+
|
2098
|
+
# Shortcut file details. Only populated for shortcut files, which have the
|
2099
|
+
# mimeType field set to application/vnd.google-apps.shortcut.
|
2100
|
+
# Corresponds to the JSON property `shortcutDetails`
|
2101
|
+
# @return [Google::Apis::DriveV2::File::ShortcutDetails]
|
2102
|
+
attr_accessor :shortcut_details
|
2103
|
+
|
2104
|
+
# The list of spaces which contain the file. Supported values are 'drive', '
|
2105
|
+
# appDataFolder' and 'photos'.
|
2106
|
+
# Corresponds to the JSON property `spaces`
|
2107
|
+
# @return [Array<String>]
|
2108
|
+
attr_accessor :spaces
|
2109
|
+
|
2110
|
+
# Deprecated - use driveId instead.
|
2111
|
+
# Corresponds to the JSON property `teamDriveId`
|
2112
|
+
# @return [String]
|
2113
|
+
attr_accessor :team_drive_id
|
2114
|
+
|
2115
|
+
# A thumbnail for the file. This will only be used if a standard thumbnail
|
2116
|
+
# cannot be generated.
|
2117
|
+
# Corresponds to the JSON property `thumbnail`
|
2118
|
+
# @return [Google::Apis::DriveV2::File::Thumbnail]
|
2119
|
+
attr_accessor :thumbnail
|
2120
|
+
|
2121
|
+
# A short-lived link to the file's thumbnail. Typically lasts on the order of
|
2122
|
+
# hours. Only populated when the requesting app can access the file's content.
|
2123
|
+
# If the file isn't shared publicly, the URL returned in Files.thumbnailLink
|
2124
|
+
# must be fetched using a credentialed request.
|
2125
|
+
# Corresponds to the JSON property `thumbnailLink`
|
2126
|
+
# @return [String]
|
2127
|
+
attr_accessor :thumbnail_link
|
2128
|
+
|
2129
|
+
# The thumbnail version for use in thumbnail cache invalidation.
|
2130
|
+
# Corresponds to the JSON property `thumbnailVersion`
|
2131
|
+
# @return [Fixnum]
|
2132
|
+
attr_accessor :thumbnail_version
|
2133
|
+
|
2134
|
+
# The title of this file. Note that for immutable items such as the top level
|
2135
|
+
# folders of shared drives, My Drive root folder, and Application Data folder
|
2136
|
+
# the title is constant.
|
2137
|
+
# Corresponds to the JSON property `title`
|
2138
|
+
# @return [String]
|
2139
|
+
attr_accessor :title
|
2140
|
+
|
2141
|
+
# The time that the item was trashed (formatted RFC 3339 timestamp). Only
|
2142
|
+
# populated for items in shared drives.
|
2143
|
+
# Corresponds to the JSON property `trashedDate`
|
2144
|
+
# @return [DateTime]
|
2145
|
+
attr_accessor :trashed_date
|
2146
|
+
|
2147
|
+
# Information about a Drive user.
|
2148
|
+
# Corresponds to the JSON property `trashingUser`
|
2149
|
+
# @return [Google::Apis::DriveV2::User]
|
2150
|
+
attr_accessor :trashing_user
|
2151
|
+
|
2152
|
+
# A permission for a file.
|
2153
|
+
# Corresponds to the JSON property `userPermission`
|
2154
|
+
# @return [Google::Apis::DriveV2::Permission]
|
2155
|
+
attr_accessor :user_permission
|
2156
|
+
|
2157
|
+
# A monotonically increasing version number for the file. This reflects every
|
2158
|
+
# change made to the file on the server, even those not visible to the
|
2159
|
+
# requesting user.
|
2160
|
+
# Corresponds to the JSON property `version`
|
2161
|
+
# @return [Fixnum]
|
2162
|
+
attr_accessor :version
|
2163
|
+
|
2164
|
+
# Metadata about video media. This will only be present for video types.
|
2165
|
+
# Corresponds to the JSON property `videoMediaMetadata`
|
2166
|
+
# @return [Google::Apis::DriveV2::File::VideoMediaMetadata]
|
2167
|
+
attr_accessor :video_media_metadata
|
2168
|
+
|
2169
|
+
# A link for downloading the content of the file in a browser using cookie based
|
2170
|
+
# authentication. In cases where the content is shared publicly, the content can
|
2171
|
+
# be downloaded without any credentials.
|
2172
|
+
# Corresponds to the JSON property `webContentLink`
|
2173
|
+
# @return [String]
|
2174
|
+
attr_accessor :web_content_link
|
2175
|
+
|
2176
|
+
# A link only available on public folders for viewing their static web assets (
|
2177
|
+
# HTML, CSS, JS, etc) via Google Drive's Website Hosting.
|
2178
|
+
# Corresponds to the JSON property `webViewLink`
|
2179
|
+
# @return [String]
|
2180
|
+
attr_accessor :web_view_link
|
2181
|
+
|
2182
|
+
# Whether writers can share the document with other users. Not populated for
|
2183
|
+
# items in shared drives.
|
2184
|
+
# Corresponds to the JSON property `writersCanShare`
|
2185
|
+
# @return [Boolean]
|
2186
|
+
attr_accessor :writers_can_share
|
2187
|
+
alias_method :writers_can_share?, :writers_can_share
|
2188
|
+
|
2189
|
+
def initialize(**args)
|
2190
|
+
update!(**args)
|
2191
|
+
end
|
2192
|
+
|
2193
|
+
# Update properties of this object
|
2194
|
+
def update!(**args)
|
2195
|
+
@alternate_link = args[:alternate_link] if args.key?(:alternate_link)
|
2196
|
+
@app_data_contents = args[:app_data_contents] if args.key?(:app_data_contents)
|
2197
|
+
@can_comment = args[:can_comment] if args.key?(:can_comment)
|
2198
|
+
@can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
|
2199
|
+
@capabilities = args[:capabilities] if args.key?(:capabilities)
|
2200
|
+
@content_restrictions = args[:content_restrictions] if args.key?(:content_restrictions)
|
2201
|
+
@copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
|
2202
|
+
@copyable = args[:copyable] if args.key?(:copyable)
|
2203
|
+
@created_date = args[:created_date] if args.key?(:created_date)
|
2204
|
+
@default_open_with_link = args[:default_open_with_link] if args.key?(:default_open_with_link)
|
2205
|
+
@description = args[:description] if args.key?(:description)
|
2206
|
+
@download_url = args[:download_url] if args.key?(:download_url)
|
2207
|
+
@drive_id = args[:drive_id] if args.key?(:drive_id)
|
2208
|
+
@editable = args[:editable] if args.key?(:editable)
|
2209
|
+
@embed_link = args[:embed_link] if args.key?(:embed_link)
|
2210
|
+
@etag = args[:etag] if args.key?(:etag)
|
2211
|
+
@explicitly_trashed = args[:explicitly_trashed] if args.key?(:explicitly_trashed)
|
2212
|
+
@export_links = args[:export_links] if args.key?(:export_links)
|
2213
|
+
@file_extension = args[:file_extension] if args.key?(:file_extension)
|
2214
|
+
@file_size = args[:file_size] if args.key?(:file_size)
|
2215
|
+
@folder_color_rgb = args[:folder_color_rgb] if args.key?(:folder_color_rgb)
|
2216
|
+
@full_file_extension = args[:full_file_extension] if args.key?(:full_file_extension)
|
2217
|
+
@has_augmented_permissions = args[:has_augmented_permissions] if args.key?(:has_augmented_permissions)
|
2218
|
+
@has_thumbnail = args[:has_thumbnail] if args.key?(:has_thumbnail)
|
2219
|
+
@head_revision_id = args[:head_revision_id] if args.key?(:head_revision_id)
|
2220
|
+
@icon_link = args[:icon_link] if args.key?(:icon_link)
|
2221
|
+
@id = args[:id] if args.key?(:id)
|
2222
|
+
@image_media_metadata = args[:image_media_metadata] if args.key?(:image_media_metadata)
|
2223
|
+
@indexable_text = args[:indexable_text] if args.key?(:indexable_text)
|
2224
|
+
@is_app_authorized = args[:is_app_authorized] if args.key?(:is_app_authorized)
|
2225
|
+
@kind = args[:kind] if args.key?(:kind)
|
2226
|
+
@labels = args[:labels] if args.key?(:labels)
|
2227
|
+
@last_modifying_user = args[:last_modifying_user] if args.key?(:last_modifying_user)
|
2228
|
+
@last_modifying_user_name = args[:last_modifying_user_name] if args.key?(:last_modifying_user_name)
|
2229
|
+
@last_viewed_by_me_date = args[:last_viewed_by_me_date] if args.key?(:last_viewed_by_me_date)
|
2230
|
+
@marked_viewed_by_me_date = args[:marked_viewed_by_me_date] if args.key?(:marked_viewed_by_me_date)
|
2231
|
+
@md5_checksum = args[:md5_checksum] if args.key?(:md5_checksum)
|
2232
|
+
@mime_type = args[:mime_type] if args.key?(:mime_type)
|
2233
|
+
@modified_by_me_date = args[:modified_by_me_date] if args.key?(:modified_by_me_date)
|
2234
|
+
@modified_date = args[:modified_date] if args.key?(:modified_date)
|
2235
|
+
@open_with_links = args[:open_with_links] if args.key?(:open_with_links)
|
2236
|
+
@original_filename = args[:original_filename] if args.key?(:original_filename)
|
2237
|
+
@owned_by_me = args[:owned_by_me] if args.key?(:owned_by_me)
|
2238
|
+
@owner_names = args[:owner_names] if args.key?(:owner_names)
|
2239
|
+
@owners = args[:owners] if args.key?(:owners)
|
2240
|
+
@parents = args[:parents] if args.key?(:parents)
|
2241
|
+
@permission_ids = args[:permission_ids] if args.key?(:permission_ids)
|
2242
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
2243
|
+
@properties = args[:properties] if args.key?(:properties)
|
2244
|
+
@quota_bytes_used = args[:quota_bytes_used] if args.key?(:quota_bytes_used)
|
2245
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
2246
|
+
@shareable = args[:shareable] if args.key?(:shareable)
|
2247
|
+
@shared = args[:shared] if args.key?(:shared)
|
2248
|
+
@shared_with_me_date = args[:shared_with_me_date] if args.key?(:shared_with_me_date)
|
2249
|
+
@sharing_user = args[:sharing_user] if args.key?(:sharing_user)
|
2250
|
+
@shortcut_details = args[:shortcut_details] if args.key?(:shortcut_details)
|
2251
|
+
@spaces = args[:spaces] if args.key?(:spaces)
|
2252
|
+
@team_drive_id = args[:team_drive_id] if args.key?(:team_drive_id)
|
2253
|
+
@thumbnail = args[:thumbnail] if args.key?(:thumbnail)
|
2254
|
+
@thumbnail_link = args[:thumbnail_link] if args.key?(:thumbnail_link)
|
2255
|
+
@thumbnail_version = args[:thumbnail_version] if args.key?(:thumbnail_version)
|
2256
|
+
@title = args[:title] if args.key?(:title)
|
2257
|
+
@trashed_date = args[:trashed_date] if args.key?(:trashed_date)
|
2258
|
+
@trashing_user = args[:trashing_user] if args.key?(:trashing_user)
|
2259
|
+
@user_permission = args[:user_permission] if args.key?(:user_permission)
|
2260
|
+
@version = args[:version] if args.key?(:version)
|
2261
|
+
@video_media_metadata = args[:video_media_metadata] if args.key?(:video_media_metadata)
|
2262
|
+
@web_content_link = args[:web_content_link] if args.key?(:web_content_link)
|
2263
|
+
@web_view_link = args[:web_view_link] if args.key?(:web_view_link)
|
2264
|
+
@writers_can_share = args[:writers_can_share] if args.key?(:writers_can_share)
|
2265
|
+
end
|
2266
|
+
|
2267
|
+
# Capabilities the current user has on this file. Each capability corresponds to
|
2268
|
+
# a fine-grained action that a user may take.
|
2269
|
+
class Capabilities
|
2270
|
+
include Google::Apis::Core::Hashable
|
2271
|
+
|
2272
|
+
# Whether the current user can add children to this folder. This is always false
|
2273
|
+
# when the item is not a folder.
|
2274
|
+
# Corresponds to the JSON property `canAddChildren`
|
2275
|
+
# @return [Boolean]
|
2276
|
+
attr_accessor :can_add_children
|
2277
|
+
alias_method :can_add_children?, :can_add_children
|
2278
|
+
|
2279
|
+
# Whether the current user can add a folder from another drive (different shared
|
2280
|
+
# drive or My Drive) to this folder. This is false when the item is not a folder.
|
2281
|
+
# Only populated for items in shared drives.
|
2282
|
+
# Corresponds to the JSON property `canAddFolderFromAnotherDrive`
|
2283
|
+
# @return [Boolean]
|
2284
|
+
attr_accessor :can_add_folder_from_another_drive
|
2285
|
+
alias_method :can_add_folder_from_another_drive?, :can_add_folder_from_another_drive
|
2286
|
+
|
2287
|
+
# Whether the current user can add a parent for the item without removing an
|
2288
|
+
# existing parent in the same request. Not populated for shared drive files.
|
2289
|
+
# Corresponds to the JSON property `canAddMyDriveParent`
|
2290
|
+
# @return [Boolean]
|
2291
|
+
attr_accessor :can_add_my_drive_parent
|
2292
|
+
alias_method :can_add_my_drive_parent?, :can_add_my_drive_parent
|
2293
|
+
|
2294
|
+
# Whether the current user can change the copyRequiresWriterPermission
|
2295
|
+
# restriction of this file.
|
2296
|
+
# Corresponds to the JSON property `canChangeCopyRequiresWriterPermission`
|
2297
|
+
# @return [Boolean]
|
2298
|
+
attr_accessor :can_change_copy_requires_writer_permission
|
2299
|
+
alias_method :can_change_copy_requires_writer_permission?, :can_change_copy_requires_writer_permission
|
2300
|
+
|
2301
|
+
# Deprecated
|
2302
|
+
# Corresponds to the JSON property `canChangeRestrictedDownload`
|
2303
|
+
# @return [Boolean]
|
2304
|
+
attr_accessor :can_change_restricted_download
|
2305
|
+
alias_method :can_change_restricted_download?, :can_change_restricted_download
|
2306
|
+
|
2307
|
+
# Whether the current user can comment on this file.
|
2308
|
+
# Corresponds to the JSON property `canComment`
|
2309
|
+
# @return [Boolean]
|
2310
|
+
attr_accessor :can_comment
|
2311
|
+
alias_method :can_comment?, :can_comment
|
2312
|
+
|
2313
|
+
# Whether the current user can copy this file. For an item in a shared drive,
|
2314
|
+
# whether the current user can copy non-folder descendants of this item, or this
|
2315
|
+
# item itself if it is not a folder.
|
2316
|
+
# Corresponds to the JSON property `canCopy`
|
2317
|
+
# @return [Boolean]
|
2318
|
+
attr_accessor :can_copy
|
2319
|
+
alias_method :can_copy?, :can_copy
|
2320
|
+
|
2321
|
+
# Whether the current user can delete this file.
|
2322
|
+
# Corresponds to the JSON property `canDelete`
|
2323
|
+
# @return [Boolean]
|
2324
|
+
attr_accessor :can_delete
|
2325
|
+
alias_method :can_delete?, :can_delete
|
2326
|
+
|
2327
|
+
# Whether the current user can delete children of this folder. This is false
|
2328
|
+
# when the item is not a folder. Only populated for items in shared drives.
|
2329
|
+
# Corresponds to the JSON property `canDeleteChildren`
|
2330
|
+
# @return [Boolean]
|
2331
|
+
attr_accessor :can_delete_children
|
2332
|
+
alias_method :can_delete_children?, :can_delete_children
|
2333
|
+
|
2334
|
+
# Whether the current user can download this file.
|
2335
|
+
# Corresponds to the JSON property `canDownload`
|
2336
|
+
# @return [Boolean]
|
2337
|
+
attr_accessor :can_download
|
2338
|
+
alias_method :can_download?, :can_download
|
2339
|
+
|
2340
|
+
# Whether the current user can edit this file. Other factors may limit the type
|
2341
|
+
# of changes a user can make to a file. For example, see
|
2342
|
+
# canChangeCopyRequiresWriterPermission or canModifyContent.
|
2343
|
+
# Corresponds to the JSON property `canEdit`
|
2344
|
+
# @return [Boolean]
|
2345
|
+
attr_accessor :can_edit
|
2346
|
+
alias_method :can_edit?, :can_edit
|
2347
|
+
|
2348
|
+
# Whether the current user can list the children of this folder. This is always
|
2349
|
+
# false when the item is not a folder.
|
2350
|
+
# Corresponds to the JSON property `canListChildren`
|
2351
|
+
# @return [Boolean]
|
2352
|
+
attr_accessor :can_list_children
|
2353
|
+
alias_method :can_list_children?, :can_list_children
|
2354
|
+
|
2355
|
+
# Whether the current user can modify the content of this file.
|
2356
|
+
# Corresponds to the JSON property `canModifyContent`
|
2357
|
+
# @return [Boolean]
|
2358
|
+
attr_accessor :can_modify_content
|
2359
|
+
alias_method :can_modify_content?, :can_modify_content
|
2360
|
+
|
2361
|
+
# Whether the current user can modify restrictions on content of this file.
|
2362
|
+
# Corresponds to the JSON property `canModifyContentRestriction`
|
2363
|
+
# @return [Boolean]
|
2364
|
+
attr_accessor :can_modify_content_restriction
|
2365
|
+
alias_method :can_modify_content_restriction?, :can_modify_content_restriction
|
2366
|
+
|
2367
|
+
# Whether the current user can move children of this folder outside of the
|
2368
|
+
# shared drive. This is false when the item is not a folder. Only populated for
|
2369
|
+
# items in shared drives.
|
2370
|
+
# Corresponds to the JSON property `canMoveChildrenOutOfDrive`
|
2371
|
+
# @return [Boolean]
|
2372
|
+
attr_accessor :can_move_children_out_of_drive
|
2373
|
+
alias_method :can_move_children_out_of_drive?, :can_move_children_out_of_drive
|
2374
|
+
|
2375
|
+
# Deprecated - use canMoveChildrenOutOfDrive instead.
|
2376
|
+
# Corresponds to the JSON property `canMoveChildrenOutOfTeamDrive`
|
2377
|
+
# @return [Boolean]
|
2378
|
+
attr_accessor :can_move_children_out_of_team_drive
|
2379
|
+
alias_method :can_move_children_out_of_team_drive?, :can_move_children_out_of_team_drive
|
2380
|
+
|
2381
|
+
# Whether the current user can move children of this folder within this drive.
|
2382
|
+
# This is false when the item is not a folder. Note that a request to move the
|
2383
|
+
# child may still fail depending on the current user's access to the child and
|
2384
|
+
# to the destination folder.
|
2385
|
+
# Corresponds to the JSON property `canMoveChildrenWithinDrive`
|
2386
|
+
# @return [Boolean]
|
2387
|
+
attr_accessor :can_move_children_within_drive
|
2388
|
+
alias_method :can_move_children_within_drive?, :can_move_children_within_drive
|
2389
|
+
|
2390
|
+
# Deprecated - use canMoveChildrenWithinDrive instead.
|
2391
|
+
# Corresponds to the JSON property `canMoveChildrenWithinTeamDrive`
|
2392
|
+
# @return [Boolean]
|
2393
|
+
attr_accessor :can_move_children_within_team_drive
|
2394
|
+
alias_method :can_move_children_within_team_drive?, :can_move_children_within_team_drive
|
2395
|
+
|
2396
|
+
# Deprecated - use canMoveItemOutOfDrive instead.
|
2397
|
+
# Corresponds to the JSON property `canMoveItemIntoTeamDrive`
|
2398
|
+
# @return [Boolean]
|
2399
|
+
attr_accessor :can_move_item_into_team_drive
|
2400
|
+
alias_method :can_move_item_into_team_drive?, :can_move_item_into_team_drive
|
2401
|
+
|
2402
|
+
# Whether the current user can move this item outside of this drive by changing
|
2403
|
+
# its parent. Note that a request to change the parent of the item may still
|
2404
|
+
# fail depending on the new parent that is being added.
|
2405
|
+
# Corresponds to the JSON property `canMoveItemOutOfDrive`
|
2406
|
+
# @return [Boolean]
|
2407
|
+
attr_accessor :can_move_item_out_of_drive
|
2408
|
+
alias_method :can_move_item_out_of_drive?, :can_move_item_out_of_drive
|
2409
|
+
|
2410
|
+
# Deprecated - use canMoveItemOutOfDrive instead.
|
2411
|
+
# Corresponds to the JSON property `canMoveItemOutOfTeamDrive`
|
2412
|
+
# @return [Boolean]
|
2413
|
+
attr_accessor :can_move_item_out_of_team_drive
|
2414
|
+
alias_method :can_move_item_out_of_team_drive?, :can_move_item_out_of_team_drive
|
2415
|
+
|
2416
|
+
# Whether the current user can move this item within this drive. Note that a
|
2417
|
+
# request to change the parent of the item may still fail depending on the new
|
2418
|
+
# parent that is being added and the parent that is being removed.
|
2419
|
+
# Corresponds to the JSON property `canMoveItemWithinDrive`
|
2420
|
+
# @return [Boolean]
|
2421
|
+
attr_accessor :can_move_item_within_drive
|
2422
|
+
alias_method :can_move_item_within_drive?, :can_move_item_within_drive
|
2423
|
+
|
2424
|
+
# Deprecated - use canMoveItemWithinDrive instead.
|
2425
|
+
# Corresponds to the JSON property `canMoveItemWithinTeamDrive`
|
2426
|
+
# @return [Boolean]
|
2427
|
+
attr_accessor :can_move_item_within_team_drive
|
2428
|
+
alias_method :can_move_item_within_team_drive?, :can_move_item_within_team_drive
|
2429
|
+
|
2430
|
+
# Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead.
|
2431
|
+
# Corresponds to the JSON property `canMoveTeamDriveItem`
|
2432
|
+
# @return [Boolean]
|
2433
|
+
attr_accessor :can_move_team_drive_item
|
2434
|
+
alias_method :can_move_team_drive_item?, :can_move_team_drive_item
|
2435
|
+
|
2436
|
+
# Whether the current user can read the shared drive to which this file belongs.
|
2437
|
+
# Only populated for items in shared drives.
|
2438
|
+
# Corresponds to the JSON property `canReadDrive`
|
2439
|
+
# @return [Boolean]
|
2440
|
+
attr_accessor :can_read_drive
|
2441
|
+
alias_method :can_read_drive?, :can_read_drive
|
2442
|
+
|
2443
|
+
# Whether the current user can read the revisions resource of this file. For a
|
2444
|
+
# shared drive item, whether revisions of non-folder descendants of this item,
|
2445
|
+
# or this item itself if it is not a folder, can be read.
|
2446
|
+
# Corresponds to the JSON property `canReadRevisions`
|
2447
|
+
# @return [Boolean]
|
2448
|
+
attr_accessor :can_read_revisions
|
2449
|
+
alias_method :can_read_revisions?, :can_read_revisions
|
2450
|
+
|
2451
|
+
# Deprecated - use canReadDrive instead.
|
2452
|
+
# Corresponds to the JSON property `canReadTeamDrive`
|
2453
|
+
# @return [Boolean]
|
2454
|
+
attr_accessor :can_read_team_drive
|
2455
|
+
alias_method :can_read_team_drive?, :can_read_team_drive
|
2456
|
+
|
2457
|
+
# Whether the current user can remove children from this folder. This is always
|
2458
|
+
# false when the item is not a folder. For a folder in a shared drive, use
|
2459
|
+
# canDeleteChildren or canTrashChildren instead.
|
2460
|
+
# Corresponds to the JSON property `canRemoveChildren`
|
2461
|
+
# @return [Boolean]
|
2462
|
+
attr_accessor :can_remove_children
|
2463
|
+
alias_method :can_remove_children?, :can_remove_children
|
2464
|
+
|
2465
|
+
# Whether the current user can remove a parent from the item without adding
|
2466
|
+
# another parent in the same request. Not populated for shared drive files.
|
2467
|
+
# Corresponds to the JSON property `canRemoveMyDriveParent`
|
2468
|
+
# @return [Boolean]
|
2469
|
+
attr_accessor :can_remove_my_drive_parent
|
2470
|
+
alias_method :can_remove_my_drive_parent?, :can_remove_my_drive_parent
|
2471
|
+
|
2472
|
+
# Whether the current user can rename this file.
|
2473
|
+
# Corresponds to the JSON property `canRename`
|
2474
|
+
# @return [Boolean]
|
2475
|
+
attr_accessor :can_rename
|
2476
|
+
alias_method :can_rename?, :can_rename
|
2477
|
+
|
2478
|
+
# Whether the current user can modify the sharing settings for this file.
|
2479
|
+
# Corresponds to the JSON property `canShare`
|
2480
|
+
# @return [Boolean]
|
2481
|
+
attr_accessor :can_share
|
2482
|
+
alias_method :can_share?, :can_share
|
2483
|
+
|
2484
|
+
# Whether the current user can move this file to trash.
|
2485
|
+
# Corresponds to the JSON property `canTrash`
|
2486
|
+
# @return [Boolean]
|
2487
|
+
attr_accessor :can_trash
|
2488
|
+
alias_method :can_trash?, :can_trash
|
2489
|
+
|
2490
|
+
# Whether the current user can trash children of this folder. This is false when
|
2491
|
+
# the item is not a folder. Only populated for items in shared drives.
|
2492
|
+
# Corresponds to the JSON property `canTrashChildren`
|
2493
|
+
# @return [Boolean]
|
2494
|
+
attr_accessor :can_trash_children
|
2495
|
+
alias_method :can_trash_children?, :can_trash_children
|
2496
|
+
|
2497
|
+
# Whether the current user can restore this file from trash.
|
2498
|
+
# Corresponds to the JSON property `canUntrash`
|
2499
|
+
# @return [Boolean]
|
2500
|
+
attr_accessor :can_untrash
|
2501
|
+
alias_method :can_untrash?, :can_untrash
|
2502
|
+
|
2503
|
+
def initialize(**args)
|
2504
|
+
update!(**args)
|
2505
|
+
end
|
2506
|
+
|
2507
|
+
# Update properties of this object
|
2508
|
+
def update!(**args)
|
2509
|
+
@can_add_children = args[:can_add_children] if args.key?(:can_add_children)
|
2510
|
+
@can_add_folder_from_another_drive = args[:can_add_folder_from_another_drive] if args.key?(:can_add_folder_from_another_drive)
|
2511
|
+
@can_add_my_drive_parent = args[:can_add_my_drive_parent] if args.key?(:can_add_my_drive_parent)
|
2512
|
+
@can_change_copy_requires_writer_permission = args[:can_change_copy_requires_writer_permission] if args.key?(:can_change_copy_requires_writer_permission)
|
2513
|
+
@can_change_restricted_download = args[:can_change_restricted_download] if args.key?(:can_change_restricted_download)
|
2514
|
+
@can_comment = args[:can_comment] if args.key?(:can_comment)
|
2515
|
+
@can_copy = args[:can_copy] if args.key?(:can_copy)
|
2516
|
+
@can_delete = args[:can_delete] if args.key?(:can_delete)
|
2517
|
+
@can_delete_children = args[:can_delete_children] if args.key?(:can_delete_children)
|
2518
|
+
@can_download = args[:can_download] if args.key?(:can_download)
|
2519
|
+
@can_edit = args[:can_edit] if args.key?(:can_edit)
|
2520
|
+
@can_list_children = args[:can_list_children] if args.key?(:can_list_children)
|
2521
|
+
@can_modify_content = args[:can_modify_content] if args.key?(:can_modify_content)
|
2522
|
+
@can_modify_content_restriction = args[:can_modify_content_restriction] if args.key?(:can_modify_content_restriction)
|
2523
|
+
@can_move_children_out_of_drive = args[:can_move_children_out_of_drive] if args.key?(:can_move_children_out_of_drive)
|
2524
|
+
@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)
|
2525
|
+
@can_move_children_within_drive = args[:can_move_children_within_drive] if args.key?(:can_move_children_within_drive)
|
2526
|
+
@can_move_children_within_team_drive = args[:can_move_children_within_team_drive] if args.key?(:can_move_children_within_team_drive)
|
2527
|
+
@can_move_item_into_team_drive = args[:can_move_item_into_team_drive] if args.key?(:can_move_item_into_team_drive)
|
2528
|
+
@can_move_item_out_of_drive = args[:can_move_item_out_of_drive] if args.key?(:can_move_item_out_of_drive)
|
2529
|
+
@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)
|
2530
|
+
@can_move_item_within_drive = args[:can_move_item_within_drive] if args.key?(:can_move_item_within_drive)
|
2531
|
+
@can_move_item_within_team_drive = args[:can_move_item_within_team_drive] if args.key?(:can_move_item_within_team_drive)
|
2532
|
+
@can_move_team_drive_item = args[:can_move_team_drive_item] if args.key?(:can_move_team_drive_item)
|
2533
|
+
@can_read_drive = args[:can_read_drive] if args.key?(:can_read_drive)
|
2534
|
+
@can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
|
2535
|
+
@can_read_team_drive = args[:can_read_team_drive] if args.key?(:can_read_team_drive)
|
2536
|
+
@can_remove_children = args[:can_remove_children] if args.key?(:can_remove_children)
|
2537
|
+
@can_remove_my_drive_parent = args[:can_remove_my_drive_parent] if args.key?(:can_remove_my_drive_parent)
|
2538
|
+
@can_rename = args[:can_rename] if args.key?(:can_rename)
|
2539
|
+
@can_share = args[:can_share] if args.key?(:can_share)
|
2540
|
+
@can_trash = args[:can_trash] if args.key?(:can_trash)
|
2541
|
+
@can_trash_children = args[:can_trash_children] if args.key?(:can_trash_children)
|
2542
|
+
@can_untrash = args[:can_untrash] if args.key?(:can_untrash)
|
2543
|
+
end
|
2544
|
+
end
|
2545
|
+
|
2546
|
+
# Metadata about image media. This will only be present for image types, and its
|
2547
|
+
# contents will depend on what can be parsed from the image content.
|
2548
|
+
class ImageMediaMetadata
|
2549
|
+
include Google::Apis::Core::Hashable
|
2550
|
+
|
2551
|
+
# The aperture used to create the photo (f-number).
|
2552
|
+
# Corresponds to the JSON property `aperture`
|
2553
|
+
# @return [Float]
|
2554
|
+
attr_accessor :aperture
|
2555
|
+
|
2556
|
+
# The make of the camera used to create the photo.
|
2557
|
+
# Corresponds to the JSON property `cameraMake`
|
2558
|
+
# @return [String]
|
2559
|
+
attr_accessor :camera_make
|
2560
|
+
|
2561
|
+
# The model of the camera used to create the photo.
|
2562
|
+
# Corresponds to the JSON property `cameraModel`
|
2563
|
+
# @return [String]
|
2564
|
+
attr_accessor :camera_model
|
2565
|
+
|
2566
|
+
# The color space of the photo.
|
2567
|
+
# Corresponds to the JSON property `colorSpace`
|
2568
|
+
# @return [String]
|
2569
|
+
attr_accessor :color_space
|
2570
|
+
|
2571
|
+
# The date and time the photo was taken (EXIF format timestamp).
|
2572
|
+
# Corresponds to the JSON property `date`
|
2573
|
+
# @return [String]
|
2574
|
+
attr_accessor :date
|
2575
|
+
|
2576
|
+
# The exposure bias of the photo (APEX value).
|
2577
|
+
# Corresponds to the JSON property `exposureBias`
|
2578
|
+
# @return [Float]
|
2579
|
+
attr_accessor :exposure_bias
|
2580
|
+
|
2581
|
+
# The exposure mode used to create the photo.
|
2582
|
+
# Corresponds to the JSON property `exposureMode`
|
2583
|
+
# @return [String]
|
2584
|
+
attr_accessor :exposure_mode
|
2585
|
+
|
2586
|
+
# The length of the exposure, in seconds.
|
2587
|
+
# Corresponds to the JSON property `exposureTime`
|
2588
|
+
# @return [Float]
|
2589
|
+
attr_accessor :exposure_time
|
2590
|
+
|
2591
|
+
# Whether a flash was used to create the photo.
|
2592
|
+
# Corresponds to the JSON property `flashUsed`
|
2593
|
+
# @return [Boolean]
|
2594
|
+
attr_accessor :flash_used
|
2595
|
+
alias_method :flash_used?, :flash_used
|
2596
|
+
|
2597
|
+
# The focal length used to create the photo, in millimeters.
|
2598
|
+
# Corresponds to the JSON property `focalLength`
|
2599
|
+
# @return [Float]
|
2600
|
+
attr_accessor :focal_length
|
2601
|
+
|
2602
|
+
# The height of the image in pixels.
|
2603
|
+
# Corresponds to the JSON property `height`
|
2604
|
+
# @return [Fixnum]
|
2605
|
+
attr_accessor :height
|
2606
|
+
|
2607
|
+
# The ISO speed used to create the photo.
|
2608
|
+
# Corresponds to the JSON property `isoSpeed`
|
2609
|
+
# @return [Fixnum]
|
2610
|
+
attr_accessor :iso_speed
|
2611
|
+
|
2612
|
+
# The lens used to create the photo.
|
2613
|
+
# Corresponds to the JSON property `lens`
|
2614
|
+
# @return [String]
|
2615
|
+
attr_accessor :lens
|
2616
|
+
|
2617
|
+
# Geographic location information stored in the image.
|
2618
|
+
# Corresponds to the JSON property `location`
|
2619
|
+
# @return [Google::Apis::DriveV2::File::ImageMediaMetadata::Location]
|
2620
|
+
attr_accessor :location
|
2621
|
+
|
2622
|
+
# The smallest f-number of the lens at the focal length used to create the photo
|
2623
|
+
# (APEX value).
|
2624
|
+
# Corresponds to the JSON property `maxApertureValue`
|
2625
|
+
# @return [Float]
|
2626
|
+
attr_accessor :max_aperture_value
|
2627
|
+
|
2628
|
+
# The metering mode used to create the photo.
|
2629
|
+
# Corresponds to the JSON property `meteringMode`
|
2630
|
+
# @return [String]
|
2631
|
+
attr_accessor :metering_mode
|
2632
|
+
|
2633
|
+
# The number of clockwise 90 degree rotations applied from the image's original
|
2634
|
+
# orientation.
|
2635
|
+
# Corresponds to the JSON property `rotation`
|
2636
|
+
# @return [Fixnum]
|
2637
|
+
attr_accessor :rotation
|
2638
|
+
|
2639
|
+
# The type of sensor used to create the photo.
|
2640
|
+
# Corresponds to the JSON property `sensor`
|
2641
|
+
# @return [String]
|
2642
|
+
attr_accessor :sensor
|
2643
|
+
|
2644
|
+
# The distance to the subject of the photo, in meters.
|
2645
|
+
# Corresponds to the JSON property `subjectDistance`
|
2646
|
+
# @return [Fixnum]
|
2647
|
+
attr_accessor :subject_distance
|
2648
|
+
|
2649
|
+
# The white balance mode used to create the photo.
|
2650
|
+
# Corresponds to the JSON property `whiteBalance`
|
2651
|
+
# @return [String]
|
2652
|
+
attr_accessor :white_balance
|
2653
|
+
|
2654
|
+
# The width of the image in pixels.
|
2655
|
+
# Corresponds to the JSON property `width`
|
2656
|
+
# @return [Fixnum]
|
2657
|
+
attr_accessor :width
|
2658
|
+
|
2659
|
+
def initialize(**args)
|
2660
|
+
update!(**args)
|
2661
|
+
end
|
2662
|
+
|
2663
|
+
# Update properties of this object
|
2664
|
+
def update!(**args)
|
2665
|
+
@aperture = args[:aperture] if args.key?(:aperture)
|
2666
|
+
@camera_make = args[:camera_make] if args.key?(:camera_make)
|
2667
|
+
@camera_model = args[:camera_model] if args.key?(:camera_model)
|
2668
|
+
@color_space = args[:color_space] if args.key?(:color_space)
|
2669
|
+
@date = args[:date] if args.key?(:date)
|
2670
|
+
@exposure_bias = args[:exposure_bias] if args.key?(:exposure_bias)
|
2671
|
+
@exposure_mode = args[:exposure_mode] if args.key?(:exposure_mode)
|
2672
|
+
@exposure_time = args[:exposure_time] if args.key?(:exposure_time)
|
2673
|
+
@flash_used = args[:flash_used] if args.key?(:flash_used)
|
2674
|
+
@focal_length = args[:focal_length] if args.key?(:focal_length)
|
2675
|
+
@height = args[:height] if args.key?(:height)
|
2676
|
+
@iso_speed = args[:iso_speed] if args.key?(:iso_speed)
|
2677
|
+
@lens = args[:lens] if args.key?(:lens)
|
2678
|
+
@location = args[:location] if args.key?(:location)
|
2679
|
+
@max_aperture_value = args[:max_aperture_value] if args.key?(:max_aperture_value)
|
2680
|
+
@metering_mode = args[:metering_mode] if args.key?(:metering_mode)
|
2681
|
+
@rotation = args[:rotation] if args.key?(:rotation)
|
2682
|
+
@sensor = args[:sensor] if args.key?(:sensor)
|
2683
|
+
@subject_distance = args[:subject_distance] if args.key?(:subject_distance)
|
2684
|
+
@white_balance = args[:white_balance] if args.key?(:white_balance)
|
2685
|
+
@width = args[:width] if args.key?(:width)
|
2686
|
+
end
|
2687
|
+
|
2688
|
+
# Geographic location information stored in the image.
|
2689
|
+
class Location
|
2690
|
+
include Google::Apis::Core::Hashable
|
2691
|
+
|
2692
|
+
# The altitude stored in the image.
|
2693
|
+
# Corresponds to the JSON property `altitude`
|
2694
|
+
# @return [Float]
|
2695
|
+
attr_accessor :altitude
|
2696
|
+
|
2697
|
+
# The latitude stored in the image.
|
2698
|
+
# Corresponds to the JSON property `latitude`
|
2699
|
+
# @return [Float]
|
2700
|
+
attr_accessor :latitude
|
2701
|
+
|
2702
|
+
# The longitude stored in the image.
|
2703
|
+
# Corresponds to the JSON property `longitude`
|
2704
|
+
# @return [Float]
|
2705
|
+
attr_accessor :longitude
|
2706
|
+
|
2707
|
+
def initialize(**args)
|
2708
|
+
update!(**args)
|
2709
|
+
end
|
2710
|
+
|
2711
|
+
# Update properties of this object
|
2712
|
+
def update!(**args)
|
2713
|
+
@altitude = args[:altitude] if args.key?(:altitude)
|
2714
|
+
@latitude = args[:latitude] if args.key?(:latitude)
|
2715
|
+
@longitude = args[:longitude] if args.key?(:longitude)
|
2716
|
+
end
|
2717
|
+
end
|
2718
|
+
end
|
2719
|
+
|
2720
|
+
# Indexable text attributes for the file (can only be written)
|
2721
|
+
class IndexableText
|
2722
|
+
include Google::Apis::Core::Hashable
|
2723
|
+
|
2724
|
+
# The text to be indexed for this file.
|
2725
|
+
# Corresponds to the JSON property `text`
|
2726
|
+
# @return [String]
|
2727
|
+
attr_accessor :text
|
2728
|
+
|
2729
|
+
def initialize(**args)
|
2730
|
+
update!(**args)
|
2731
|
+
end
|
2732
|
+
|
2733
|
+
# Update properties of this object
|
2734
|
+
def update!(**args)
|
2735
|
+
@text = args[:text] if args.key?(:text)
|
2736
|
+
end
|
2737
|
+
end
|
2738
|
+
|
2739
|
+
# A group of labels for the file.
|
2740
|
+
class Labels
|
2741
|
+
include Google::Apis::Core::Hashable
|
2742
|
+
|
2743
|
+
# Deprecated.
|
2744
|
+
# Corresponds to the JSON property `hidden`
|
2745
|
+
# @return [Boolean]
|
2746
|
+
attr_accessor :hidden
|
2747
|
+
alias_method :hidden?, :hidden
|
2748
|
+
|
2749
|
+
# Whether the file has been modified by this user.
|
2750
|
+
# Corresponds to the JSON property `modified`
|
2751
|
+
# @return [Boolean]
|
2752
|
+
attr_accessor :modified
|
2753
|
+
alias_method :modified?, :modified
|
2754
|
+
|
2755
|
+
# Deprecated - use copyRequiresWriterPermission instead.
|
2756
|
+
# Corresponds to the JSON property `restricted`
|
2757
|
+
# @return [Boolean]
|
2758
|
+
attr_accessor :restricted
|
2759
|
+
alias_method :restricted?, :restricted
|
2760
|
+
|
2761
|
+
# Whether this file is starred by the user.
|
2762
|
+
# Corresponds to the JSON property `starred`
|
2763
|
+
# @return [Boolean]
|
2764
|
+
attr_accessor :starred
|
2765
|
+
alias_method :starred?, :starred
|
2766
|
+
|
2767
|
+
# Whether the file has been trashed, either explicitly or from a trashed parent
|
2768
|
+
# folder. Only the owner may trash a file. The trashed item is excluded from all
|
2769
|
+
# files.list responses returned for any user who does not own the file. However,
|
2770
|
+
# all users with access to the file can see the trashed item metadata in an API
|
2771
|
+
# response. All users with access can copy, download, export, and share the file.
|
2772
|
+
# Corresponds to the JSON property `trashed`
|
2773
|
+
# @return [Boolean]
|
2774
|
+
attr_accessor :trashed
|
2775
|
+
alias_method :trashed?, :trashed
|
2776
|
+
|
2777
|
+
# Whether this file has been viewed by this user.
|
2778
|
+
# Corresponds to the JSON property `viewed`
|
2779
|
+
# @return [Boolean]
|
2780
|
+
attr_accessor :viewed
|
2781
|
+
alias_method :viewed?, :viewed
|
2782
|
+
|
2783
|
+
def initialize(**args)
|
2784
|
+
update!(**args)
|
2785
|
+
end
|
2786
|
+
|
2787
|
+
# Update properties of this object
|
2788
|
+
def update!(**args)
|
2789
|
+
@hidden = args[:hidden] if args.key?(:hidden)
|
2790
|
+
@modified = args[:modified] if args.key?(:modified)
|
2791
|
+
@restricted = args[:restricted] if args.key?(:restricted)
|
2792
|
+
@starred = args[:starred] if args.key?(:starred)
|
2793
|
+
@trashed = args[:trashed] if args.key?(:trashed)
|
2794
|
+
@viewed = args[:viewed] if args.key?(:viewed)
|
2795
|
+
end
|
2796
|
+
end
|
2797
|
+
|
2798
|
+
# Shortcut file details. Only populated for shortcut files, which have the
|
2799
|
+
# mimeType field set to application/vnd.google-apps.shortcut.
|
2800
|
+
class ShortcutDetails
|
2801
|
+
include Google::Apis::Core::Hashable
|
2802
|
+
|
2803
|
+
# The ID of the file that this shortcut points to.
|
2804
|
+
# Corresponds to the JSON property `targetId`
|
2805
|
+
# @return [String]
|
2806
|
+
attr_accessor :target_id
|
2807
|
+
|
2808
|
+
# The MIME type of the file that this shortcut points to. The value of this
|
2809
|
+
# field is a snapshot of the target's MIME type, captured when the shortcut is
|
2810
|
+
# created.
|
2811
|
+
# Corresponds to the JSON property `targetMimeType`
|
2812
|
+
# @return [String]
|
2813
|
+
attr_accessor :target_mime_type
|
2814
|
+
|
2815
|
+
def initialize(**args)
|
2816
|
+
update!(**args)
|
2817
|
+
end
|
2818
|
+
|
2819
|
+
# Update properties of this object
|
2820
|
+
def update!(**args)
|
2821
|
+
@target_id = args[:target_id] if args.key?(:target_id)
|
2822
|
+
@target_mime_type = args[:target_mime_type] if args.key?(:target_mime_type)
|
2823
|
+
end
|
2824
|
+
end
|
2825
|
+
|
2826
|
+
# A thumbnail for the file. This will only be used if a standard thumbnail
|
2827
|
+
# cannot be generated.
|
2828
|
+
class Thumbnail
|
2829
|
+
include Google::Apis::Core::Hashable
|
2830
|
+
|
2831
|
+
# The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to
|
2832
|
+
# RFC 4648 section 5.
|
2833
|
+
# Corresponds to the JSON property `image`
|
2834
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
2835
|
+
# @return [String]
|
2836
|
+
attr_accessor :image
|
2837
|
+
|
2838
|
+
# The MIME type of the thumbnail.
|
2839
|
+
# Corresponds to the JSON property `mimeType`
|
2840
|
+
# @return [String]
|
2841
|
+
attr_accessor :mime_type
|
2842
|
+
|
2843
|
+
def initialize(**args)
|
2844
|
+
update!(**args)
|
2845
|
+
end
|
2846
|
+
|
2847
|
+
# Update properties of this object
|
2848
|
+
def update!(**args)
|
2849
|
+
@image = args[:image] if args.key?(:image)
|
2850
|
+
@mime_type = args[:mime_type] if args.key?(:mime_type)
|
2851
|
+
end
|
2852
|
+
end
|
2853
|
+
|
2854
|
+
# Metadata about video media. This will only be present for video types.
|
2855
|
+
class VideoMediaMetadata
|
2856
|
+
include Google::Apis::Core::Hashable
|
2857
|
+
|
2858
|
+
# The duration of the video in milliseconds.
|
2859
|
+
# Corresponds to the JSON property `durationMillis`
|
2860
|
+
# @return [Fixnum]
|
2861
|
+
attr_accessor :duration_millis
|
2862
|
+
|
2863
|
+
# The height of the video in pixels.
|
2864
|
+
# Corresponds to the JSON property `height`
|
2865
|
+
# @return [Fixnum]
|
2866
|
+
attr_accessor :height
|
2867
|
+
|
2868
|
+
# The width of the video in pixels.
|
2869
|
+
# Corresponds to the JSON property `width`
|
2870
|
+
# @return [Fixnum]
|
2871
|
+
attr_accessor :width
|
2872
|
+
|
2873
|
+
def initialize(**args)
|
2874
|
+
update!(**args)
|
2875
|
+
end
|
2876
|
+
|
2877
|
+
# Update properties of this object
|
2878
|
+
def update!(**args)
|
2879
|
+
@duration_millis = args[:duration_millis] if args.key?(:duration_millis)
|
2880
|
+
@height = args[:height] if args.key?(:height)
|
2881
|
+
@width = args[:width] if args.key?(:width)
|
2882
|
+
end
|
2883
|
+
end
|
2884
|
+
end
|
2885
|
+
|
2886
|
+
# A list of files.
|
2887
|
+
class FileList
|
2888
|
+
include Google::Apis::Core::Hashable
|
2889
|
+
|
2890
|
+
# The ETag of the list.
|
2891
|
+
# Corresponds to the JSON property `etag`
|
2892
|
+
# @return [String]
|
2893
|
+
attr_accessor :etag
|
2894
|
+
|
2895
|
+
# Whether the search process was incomplete. If true, then some search results
|
2896
|
+
# may be missing, since all documents were not searched. This may occur when
|
2897
|
+
# searching multiple drives with the "allDrives" corpora, but all corpora could
|
2898
|
+
# not be searched. When this happens, it is suggested that clients narrow their
|
2899
|
+
# query by choosing a different corpus such as "default" or "drive".
|
2900
|
+
# Corresponds to the JSON property `incompleteSearch`
|
2901
|
+
# @return [Boolean]
|
2902
|
+
attr_accessor :incomplete_search
|
2903
|
+
alias_method :incomplete_search?, :incomplete_search
|
2904
|
+
|
2905
|
+
# The list of files. If nextPageToken is populated, then this list may be
|
2906
|
+
# incomplete and an additional page of results should be fetched.
|
2907
|
+
# Corresponds to the JSON property `items`
|
2908
|
+
# @return [Array<Google::Apis::DriveV2::File>]
|
2909
|
+
attr_accessor :items
|
2910
|
+
|
2911
|
+
# This is always drive#fileList.
|
2912
|
+
# Corresponds to the JSON property `kind`
|
2913
|
+
# @return [String]
|
2914
|
+
attr_accessor :kind
|
2915
|
+
|
2916
|
+
# A link to the next page of files.
|
2917
|
+
# Corresponds to the JSON property `nextLink`
|
2918
|
+
# @return [String]
|
2919
|
+
attr_accessor :next_link
|
2920
|
+
|
2921
|
+
# The page token for the next page of files. This will be absent if the end of
|
2922
|
+
# the files list has been reached. If the token is rejected for any reason, it
|
2923
|
+
# should be discarded, and pagination should be restarted from the first page of
|
2924
|
+
# results.
|
2925
|
+
# Corresponds to the JSON property `nextPageToken`
|
2926
|
+
# @return [String]
|
2927
|
+
attr_accessor :next_page_token
|
2928
|
+
|
2929
|
+
# A link back to this list.
|
2930
|
+
# Corresponds to the JSON property `selfLink`
|
2931
|
+
# @return [String]
|
2932
|
+
attr_accessor :self_link
|
2933
|
+
|
2934
|
+
def initialize(**args)
|
2935
|
+
update!(**args)
|
2936
|
+
end
|
2937
|
+
|
2938
|
+
# Update properties of this object
|
2939
|
+
def update!(**args)
|
2940
|
+
@etag = args[:etag] if args.key?(:etag)
|
2941
|
+
@incomplete_search = args[:incomplete_search] if args.key?(:incomplete_search)
|
2942
|
+
@items = args[:items] if args.key?(:items)
|
2943
|
+
@kind = args[:kind] if args.key?(:kind)
|
2944
|
+
@next_link = args[:next_link] if args.key?(:next_link)
|
2945
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
2946
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
2947
|
+
end
|
2948
|
+
end
|
2949
|
+
|
2950
|
+
# A list of generated IDs which can be provided in insert requests
|
2951
|
+
class GeneratedIds
|
2952
|
+
include Google::Apis::Core::Hashable
|
2953
|
+
|
2954
|
+
# The IDs generated for the requesting user in the specified space.
|
2955
|
+
# Corresponds to the JSON property `ids`
|
2956
|
+
# @return [Array<String>]
|
2957
|
+
attr_accessor :ids
|
2958
|
+
|
2959
|
+
# This is always drive#generatedIds
|
2960
|
+
# Corresponds to the JSON property `kind`
|
2961
|
+
# @return [String]
|
2962
|
+
attr_accessor :kind
|
2963
|
+
|
2964
|
+
# The type of file that can be created with these IDs.
|
2965
|
+
# Corresponds to the JSON property `space`
|
2966
|
+
# @return [String]
|
2967
|
+
attr_accessor :space
|
2968
|
+
|
2969
|
+
def initialize(**args)
|
2970
|
+
update!(**args)
|
2971
|
+
end
|
2972
|
+
|
2973
|
+
# Update properties of this object
|
2974
|
+
def update!(**args)
|
2975
|
+
@ids = args[:ids] if args.key?(:ids)
|
2976
|
+
@kind = args[:kind] if args.key?(:kind)
|
2977
|
+
@space = args[:space] if args.key?(:space)
|
2978
|
+
end
|
2979
|
+
end
|
2980
|
+
|
2981
|
+
# A list of a file's parents.
|
2982
|
+
class ParentList
|
2983
|
+
include Google::Apis::Core::Hashable
|
2984
|
+
|
2985
|
+
# The ETag of the list.
|
2986
|
+
# Corresponds to the JSON property `etag`
|
2987
|
+
# @return [String]
|
2988
|
+
attr_accessor :etag
|
2989
|
+
|
2990
|
+
# The list of parents.
|
2991
|
+
# Corresponds to the JSON property `items`
|
2992
|
+
# @return [Array<Google::Apis::DriveV2::ParentReference>]
|
2993
|
+
attr_accessor :items
|
2994
|
+
|
2995
|
+
# This is always drive#parentList.
|
2996
|
+
# Corresponds to the JSON property `kind`
|
2997
|
+
# @return [String]
|
2998
|
+
attr_accessor :kind
|
2999
|
+
|
3000
|
+
# A link back to this list.
|
3001
|
+
# Corresponds to the JSON property `selfLink`
|
3002
|
+
# @return [String]
|
3003
|
+
attr_accessor :self_link
|
3004
|
+
|
3005
|
+
def initialize(**args)
|
3006
|
+
update!(**args)
|
3007
|
+
end
|
3008
|
+
|
3009
|
+
# Update properties of this object
|
3010
|
+
def update!(**args)
|
3011
|
+
@etag = args[:etag] if args.key?(:etag)
|
3012
|
+
@items = args[:items] if args.key?(:items)
|
3013
|
+
@kind = args[:kind] if args.key?(:kind)
|
3014
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
3015
|
+
end
|
3016
|
+
end
|
3017
|
+
|
3018
|
+
# A reference to a file's parent.
|
3019
|
+
class ParentReference
|
3020
|
+
include Google::Apis::Core::Hashable
|
3021
|
+
|
3022
|
+
# The ID of the parent.
|
3023
|
+
# Corresponds to the JSON property `id`
|
3024
|
+
# @return [String]
|
3025
|
+
attr_accessor :id
|
3026
|
+
|
3027
|
+
# Whether or not the parent is the root folder.
|
3028
|
+
# Corresponds to the JSON property `isRoot`
|
3029
|
+
# @return [Boolean]
|
3030
|
+
attr_accessor :is_root
|
3031
|
+
alias_method :is_root?, :is_root
|
3032
|
+
|
3033
|
+
# This is always drive#parentReference.
|
3034
|
+
# Corresponds to the JSON property `kind`
|
3035
|
+
# @return [String]
|
3036
|
+
attr_accessor :kind
|
3037
|
+
|
3038
|
+
# A link to the parent.
|
3039
|
+
# Corresponds to the JSON property `parentLink`
|
3040
|
+
# @return [String]
|
3041
|
+
attr_accessor :parent_link
|
3042
|
+
|
3043
|
+
# A link back to this reference.
|
3044
|
+
# Corresponds to the JSON property `selfLink`
|
3045
|
+
# @return [String]
|
3046
|
+
attr_accessor :self_link
|
3047
|
+
|
3048
|
+
def initialize(**args)
|
3049
|
+
update!(**args)
|
3050
|
+
end
|
3051
|
+
|
3052
|
+
# Update properties of this object
|
3053
|
+
def update!(**args)
|
3054
|
+
@id = args[:id] if args.key?(:id)
|
3055
|
+
@is_root = args[:is_root] if args.key?(:is_root)
|
3056
|
+
@kind = args[:kind] if args.key?(:kind)
|
3057
|
+
@parent_link = args[:parent_link] if args.key?(:parent_link)
|
3058
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
3059
|
+
end
|
3060
|
+
end
|
3061
|
+
|
3062
|
+
# A permission for a file.
|
3063
|
+
class Permission
|
3064
|
+
include Google::Apis::Core::Hashable
|
3065
|
+
|
3066
|
+
# Additional roles for this user. Only commenter is currently allowed, though
|
3067
|
+
# more may be supported in the future.
|
3068
|
+
# Corresponds to the JSON property `additionalRoles`
|
3069
|
+
# @return [Array<String>]
|
3070
|
+
attr_accessor :additional_roles
|
3071
|
+
|
3072
|
+
# Deprecated.
|
3073
|
+
# Corresponds to the JSON property `authKey`
|
3074
|
+
# @return [String]
|
3075
|
+
attr_accessor :auth_key
|
3076
|
+
|
3077
|
+
# Whether the account associated with this permission has been deleted. This
|
3078
|
+
# field only pertains to user and group permissions.
|
3079
|
+
# Corresponds to the JSON property `deleted`
|
3080
|
+
# @return [Boolean]
|
3081
|
+
attr_accessor :deleted
|
3082
|
+
alias_method :deleted?, :deleted
|
3083
|
+
|
3084
|
+
# The domain name of the entity this permission refers to. This is an output-
|
3085
|
+
# only field which is present when the permission type is user, group or domain.
|
3086
|
+
# Corresponds to the JSON property `domain`
|
3087
|
+
# @return [String]
|
3088
|
+
attr_accessor :domain
|
3089
|
+
|
3090
|
+
# The email address of the user or group this permission refers to. This is an
|
3091
|
+
# output-only field which is present when the permission type is user or group.
|
3092
|
+
# Corresponds to the JSON property `emailAddress`
|
3093
|
+
# @return [String]
|
3094
|
+
attr_accessor :email_address
|
3095
|
+
|
3096
|
+
# The ETag of the permission.
|
3097
|
+
# Corresponds to the JSON property `etag`
|
3098
|
+
# @return [String]
|
3099
|
+
attr_accessor :etag
|
3100
|
+
|
3101
|
+
# The time at which this permission will expire (RFC 3339 date-time). Expiration
|
3102
|
+
# dates have the following restrictions:
|
3103
|
+
# - They cannot be set on shared drive items
|
3104
|
+
# - They can only be set on user and group permissions
|
3105
|
+
# - The date must be in the future
|
3106
|
+
# - The date cannot be more than a year in the future
|
3107
|
+
# - The date can only be set on drive.permissions.update or drive.permissions.
|
3108
|
+
# patch requests
|
3109
|
+
# Corresponds to the JSON property `expirationDate`
|
3110
|
+
# @return [DateTime]
|
3111
|
+
attr_accessor :expiration_date
|
3112
|
+
|
3113
|
+
# The ID of the user this permission refers to, and identical to the
|
3114
|
+
# permissionId in the About and Files resources. When making a drive.permissions.
|
3115
|
+
# insert request, exactly one of the id or value fields must be specified unless
|
3116
|
+
# the permission type is anyone, in which case both id and value are ignored.
|
3117
|
+
# Corresponds to the JSON property `id`
|
3118
|
+
# @return [String]
|
3119
|
+
attr_accessor :id
|
3120
|
+
|
3121
|
+
# This is always drive#permission.
|
3122
|
+
# Corresponds to the JSON property `kind`
|
3123
|
+
# @return [String]
|
3124
|
+
attr_accessor :kind
|
3125
|
+
|
3126
|
+
# The name for this permission.
|
3127
|
+
# Corresponds to the JSON property `name`
|
3128
|
+
# @return [String]
|
3129
|
+
attr_accessor :name
|
3130
|
+
|
3131
|
+
# Details of whether the permissions on this shared drive item are inherited or
|
3132
|
+
# directly on this item. This is an output-only field which is present only for
|
3133
|
+
# shared drive items.
|
3134
|
+
# Corresponds to the JSON property `permissionDetails`
|
3135
|
+
# @return [Array<Google::Apis::DriveV2::Permission::PermissionDetail>]
|
3136
|
+
attr_accessor :permission_details
|
3137
|
+
|
3138
|
+
# A link to the profile photo, if available.
|
3139
|
+
# Corresponds to the JSON property `photoLink`
|
3140
|
+
# @return [String]
|
3141
|
+
attr_accessor :photo_link
|
3142
|
+
|
3143
|
+
# The primary role for this user. While new values may be supported in the
|
3144
|
+
# future, the following are currently allowed:
|
3145
|
+
# - owner
|
3146
|
+
# - organizer
|
3147
|
+
# - fileOrganizer
|
3148
|
+
# - writer
|
3149
|
+
# - reader
|
3150
|
+
# Corresponds to the JSON property `role`
|
3151
|
+
# @return [String]
|
3152
|
+
attr_accessor :role
|
3153
|
+
|
3154
|
+
# A link back to this permission.
|
3155
|
+
# Corresponds to the JSON property `selfLink`
|
3156
|
+
# @return [String]
|
3157
|
+
attr_accessor :self_link
|
3158
|
+
|
3159
|
+
# Deprecated - use permissionDetails instead.
|
3160
|
+
# Corresponds to the JSON property `teamDrivePermissionDetails`
|
3161
|
+
# @return [Array<Google::Apis::DriveV2::Permission::TeamDrivePermissionDetail>]
|
3162
|
+
attr_accessor :team_drive_permission_details
|
3163
|
+
|
3164
|
+
# The account type. Allowed values are:
|
3165
|
+
# - user
|
3166
|
+
# - group
|
3167
|
+
# - domain
|
3168
|
+
# - anyone
|
3169
|
+
# Corresponds to the JSON property `type`
|
3170
|
+
# @return [String]
|
3171
|
+
attr_accessor :type
|
3172
|
+
|
3173
|
+
# The email address or domain name for the entity. This is used during inserts
|
3174
|
+
# and is not populated in responses. When making a drive.permissions.insert
|
3175
|
+
# request, exactly one of the id or value fields must be specified unless the
|
3176
|
+
# permission type is anyone, in which case both id and value are ignored.
|
3177
|
+
# Corresponds to the JSON property `value`
|
3178
|
+
# @return [String]
|
3179
|
+
attr_accessor :value
|
3180
|
+
|
3181
|
+
# Indicates the view for this permission. Only populated for permissions that
|
3182
|
+
# belong to a view. published is the only supported value.
|
3183
|
+
# Corresponds to the JSON property `view`
|
3184
|
+
# @return [String]
|
3185
|
+
attr_accessor :view
|
3186
|
+
|
3187
|
+
# Whether the link is required for this permission.
|
3188
|
+
# Corresponds to the JSON property `withLink`
|
3189
|
+
# @return [Boolean]
|
3190
|
+
attr_accessor :with_link
|
3191
|
+
alias_method :with_link?, :with_link
|
3192
|
+
|
3193
|
+
def initialize(**args)
|
3194
|
+
update!(**args)
|
3195
|
+
end
|
3196
|
+
|
3197
|
+
# Update properties of this object
|
3198
|
+
def update!(**args)
|
3199
|
+
@additional_roles = args[:additional_roles] if args.key?(:additional_roles)
|
3200
|
+
@auth_key = args[:auth_key] if args.key?(:auth_key)
|
3201
|
+
@deleted = args[:deleted] if args.key?(:deleted)
|
3202
|
+
@domain = args[:domain] if args.key?(:domain)
|
3203
|
+
@email_address = args[:email_address] if args.key?(:email_address)
|
3204
|
+
@etag = args[:etag] if args.key?(:etag)
|
3205
|
+
@expiration_date = args[:expiration_date] if args.key?(:expiration_date)
|
3206
|
+
@id = args[:id] if args.key?(:id)
|
3207
|
+
@kind = args[:kind] if args.key?(:kind)
|
3208
|
+
@name = args[:name] if args.key?(:name)
|
3209
|
+
@permission_details = args[:permission_details] if args.key?(:permission_details)
|
3210
|
+
@photo_link = args[:photo_link] if args.key?(:photo_link)
|
3211
|
+
@role = args[:role] if args.key?(:role)
|
3212
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
3213
|
+
@team_drive_permission_details = args[:team_drive_permission_details] if args.key?(:team_drive_permission_details)
|
3214
|
+
@type = args[:type] if args.key?(:type)
|
3215
|
+
@value = args[:value] if args.key?(:value)
|
3216
|
+
@view = args[:view] if args.key?(:view)
|
3217
|
+
@with_link = args[:with_link] if args.key?(:with_link)
|
3218
|
+
end
|
3219
|
+
|
3220
|
+
#
|
3221
|
+
class PermissionDetail
|
3222
|
+
include Google::Apis::Core::Hashable
|
3223
|
+
|
3224
|
+
# Additional roles for this user. Only commenter is currently possible, though
|
3225
|
+
# more may be supported in the future.
|
3226
|
+
# Corresponds to the JSON property `additionalRoles`
|
3227
|
+
# @return [Array<String>]
|
3228
|
+
attr_accessor :additional_roles
|
3229
|
+
|
3230
|
+
# Whether this permission is inherited. This field is always populated. This is
|
3231
|
+
# an output-only field.
|
3232
|
+
# Corresponds to the JSON property `inherited`
|
3233
|
+
# @return [Boolean]
|
3234
|
+
attr_accessor :inherited
|
3235
|
+
alias_method :inherited?, :inherited
|
3236
|
+
|
3237
|
+
# The ID of the item from which this permission is inherited. This is an output-
|
3238
|
+
# only field.
|
3239
|
+
# Corresponds to the JSON property `inheritedFrom`
|
3240
|
+
# @return [String]
|
3241
|
+
attr_accessor :inherited_from
|
3242
|
+
|
3243
|
+
# The permission type for this user. While new values may be added in future,
|
3244
|
+
# the following are currently possible:
|
3245
|
+
# - file
|
3246
|
+
# - member
|
3247
|
+
# Corresponds to the JSON property `permissionType`
|
3248
|
+
# @return [String]
|
3249
|
+
attr_accessor :permission_type
|
3250
|
+
|
3251
|
+
# The primary role for this user. While new values may be added in the future,
|
3252
|
+
# the following are currently possible:
|
3253
|
+
# - organizer
|
3254
|
+
# - fileOrganizer
|
3255
|
+
# - writer
|
3256
|
+
# - reader
|
3257
|
+
# Corresponds to the JSON property `role`
|
3258
|
+
# @return [String]
|
3259
|
+
attr_accessor :role
|
3260
|
+
|
3261
|
+
def initialize(**args)
|
3262
|
+
update!(**args)
|
3263
|
+
end
|
3264
|
+
|
3265
|
+
# Update properties of this object
|
3266
|
+
def update!(**args)
|
3267
|
+
@additional_roles = args[:additional_roles] if args.key?(:additional_roles)
|
3268
|
+
@inherited = args[:inherited] if args.key?(:inherited)
|
3269
|
+
@inherited_from = args[:inherited_from] if args.key?(:inherited_from)
|
3270
|
+
@permission_type = args[:permission_type] if args.key?(:permission_type)
|
3271
|
+
@role = args[:role] if args.key?(:role)
|
3272
|
+
end
|
3273
|
+
end
|
3274
|
+
|
3275
|
+
#
|
3276
|
+
class TeamDrivePermissionDetail
|
3277
|
+
include Google::Apis::Core::Hashable
|
3278
|
+
|
3279
|
+
# Deprecated - use permissionDetails/additionalRoles instead.
|
3280
|
+
# Corresponds to the JSON property `additionalRoles`
|
3281
|
+
# @return [Array<String>]
|
3282
|
+
attr_accessor :additional_roles
|
3283
|
+
|
3284
|
+
# Deprecated - use permissionDetails/inherited instead.
|
3285
|
+
# Corresponds to the JSON property `inherited`
|
3286
|
+
# @return [Boolean]
|
3287
|
+
attr_accessor :inherited
|
3288
|
+
alias_method :inherited?, :inherited
|
3289
|
+
|
3290
|
+
# Deprecated - use permissionDetails/inheritedFrom instead.
|
3291
|
+
# Corresponds to the JSON property `inheritedFrom`
|
3292
|
+
# @return [String]
|
3293
|
+
attr_accessor :inherited_from
|
3294
|
+
|
3295
|
+
# Deprecated - use permissionDetails/role instead.
|
3296
|
+
# Corresponds to the JSON property `role`
|
3297
|
+
# @return [String]
|
3298
|
+
attr_accessor :role
|
3299
|
+
|
3300
|
+
# Deprecated - use permissionDetails/permissionType instead.
|
3301
|
+
# Corresponds to the JSON property `teamDrivePermissionType`
|
3302
|
+
# @return [String]
|
3303
|
+
attr_accessor :team_drive_permission_type
|
3304
|
+
|
3305
|
+
def initialize(**args)
|
3306
|
+
update!(**args)
|
3307
|
+
end
|
3308
|
+
|
3309
|
+
# Update properties of this object
|
3310
|
+
def update!(**args)
|
3311
|
+
@additional_roles = args[:additional_roles] if args.key?(:additional_roles)
|
3312
|
+
@inherited = args[:inherited] if args.key?(:inherited)
|
3313
|
+
@inherited_from = args[:inherited_from] if args.key?(:inherited_from)
|
3314
|
+
@role = args[:role] if args.key?(:role)
|
3315
|
+
@team_drive_permission_type = args[:team_drive_permission_type] if args.key?(:team_drive_permission_type)
|
3316
|
+
end
|
3317
|
+
end
|
3318
|
+
end
|
3319
|
+
|
3320
|
+
# An ID for a user or group as seen in Permission items.
|
3321
|
+
class PermissionId
|
3322
|
+
include Google::Apis::Core::Hashable
|
3323
|
+
|
3324
|
+
# The permission ID.
|
3325
|
+
# Corresponds to the JSON property `id`
|
3326
|
+
# @return [String]
|
3327
|
+
attr_accessor :id
|
3328
|
+
|
3329
|
+
# This is always drive#permissionId.
|
3330
|
+
# Corresponds to the JSON property `kind`
|
3331
|
+
# @return [String]
|
3332
|
+
attr_accessor :kind
|
3333
|
+
|
3334
|
+
def initialize(**args)
|
3335
|
+
update!(**args)
|
3336
|
+
end
|
3337
|
+
|
3338
|
+
# Update properties of this object
|
3339
|
+
def update!(**args)
|
3340
|
+
@id = args[:id] if args.key?(:id)
|
3341
|
+
@kind = args[:kind] if args.key?(:kind)
|
3342
|
+
end
|
3343
|
+
end
|
3344
|
+
|
3345
|
+
# A list of permissions associated with a file.
|
3346
|
+
class PermissionList
|
3347
|
+
include Google::Apis::Core::Hashable
|
3348
|
+
|
3349
|
+
# The ETag of the list.
|
3350
|
+
# Corresponds to the JSON property `etag`
|
3351
|
+
# @return [String]
|
3352
|
+
attr_accessor :etag
|
3353
|
+
|
3354
|
+
# The list of permissions.
|
3355
|
+
# Corresponds to the JSON property `items`
|
3356
|
+
# @return [Array<Google::Apis::DriveV2::Permission>]
|
3357
|
+
attr_accessor :items
|
3358
|
+
|
3359
|
+
# This is always drive#permissionList.
|
3360
|
+
# Corresponds to the JSON property `kind`
|
3361
|
+
# @return [String]
|
3362
|
+
attr_accessor :kind
|
3363
|
+
|
3364
|
+
# The page token for the next page of permissions. This field will be absent if
|
3365
|
+
# the end of the permissions list has been reached. If the token is rejected for
|
3366
|
+
# any reason, it should be discarded, and pagination should be restarted from
|
3367
|
+
# the first page of results.
|
3368
|
+
# Corresponds to the JSON property `nextPageToken`
|
3369
|
+
# @return [String]
|
3370
|
+
attr_accessor :next_page_token
|
3371
|
+
|
3372
|
+
# A link back to this list.
|
3373
|
+
# Corresponds to the JSON property `selfLink`
|
3374
|
+
# @return [String]
|
3375
|
+
attr_accessor :self_link
|
3376
|
+
|
3377
|
+
def initialize(**args)
|
3378
|
+
update!(**args)
|
3379
|
+
end
|
3380
|
+
|
3381
|
+
# Update properties of this object
|
3382
|
+
def update!(**args)
|
3383
|
+
@etag = args[:etag] if args.key?(:etag)
|
3384
|
+
@items = args[:items] if args.key?(:items)
|
3385
|
+
@kind = args[:kind] if args.key?(:kind)
|
3386
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
3387
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
3388
|
+
end
|
3389
|
+
end
|
3390
|
+
|
3391
|
+
# A key-value pair attached to a file that is either public or private to an
|
3392
|
+
# application.
|
3393
|
+
# The following limits apply to file properties:
|
3394
|
+
# - Maximum of 100 properties total per file
|
3395
|
+
# - Maximum of 30 private properties per app
|
3396
|
+
# - Maximum of 30 public properties
|
3397
|
+
# - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding
|
3398
|
+
# for a single property.
|
3399
|
+
class Property
|
3400
|
+
include Google::Apis::Core::Hashable
|
3401
|
+
|
3402
|
+
# ETag of the property.
|
3403
|
+
# Corresponds to the JSON property `etag`
|
3404
|
+
# @return [String]
|
3405
|
+
attr_accessor :etag
|
3406
|
+
|
3407
|
+
# The key of this property.
|
3408
|
+
# Corresponds to the JSON property `key`
|
3409
|
+
# @return [String]
|
3410
|
+
attr_accessor :key
|
3411
|
+
|
3412
|
+
# This is always drive#property.
|
3413
|
+
# Corresponds to the JSON property `kind`
|
3414
|
+
# @return [String]
|
3415
|
+
attr_accessor :kind
|
3416
|
+
|
3417
|
+
# The link back to this property.
|
3418
|
+
# Corresponds to the JSON property `selfLink`
|
3419
|
+
# @return [String]
|
3420
|
+
attr_accessor :self_link
|
3421
|
+
|
3422
|
+
# The value of this property.
|
3423
|
+
# Corresponds to the JSON property `value`
|
3424
|
+
# @return [String]
|
3425
|
+
attr_accessor :value
|
3426
|
+
|
3427
|
+
# The visibility of this property. Allowed values are PRIVATE and PUBLIC. (
|
3428
|
+
# Default: PRIVATE). Private properties can only be retrieved using an
|
3429
|
+
# authenticated request. An authenticated request uses an access token obtained
|
3430
|
+
# with a OAuth 2 client ID. You cannot use an API key to retrieve private
|
3431
|
+
# properties.
|
3432
|
+
# Corresponds to the JSON property `visibility`
|
3433
|
+
# @return [String]
|
3434
|
+
attr_accessor :visibility
|
3435
|
+
|
3436
|
+
def initialize(**args)
|
3437
|
+
update!(**args)
|
3438
|
+
end
|
3439
|
+
|
3440
|
+
# Update properties of this object
|
3441
|
+
def update!(**args)
|
3442
|
+
@etag = args[:etag] if args.key?(:etag)
|
3443
|
+
@key = args[:key] if args.key?(:key)
|
3444
|
+
@kind = args[:kind] if args.key?(:kind)
|
3445
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
3446
|
+
@value = args[:value] if args.key?(:value)
|
3447
|
+
@visibility = args[:visibility] if args.key?(:visibility)
|
3448
|
+
end
|
3449
|
+
end
|
3450
|
+
|
3451
|
+
# A collection of properties, key-value pairs that are either public or private
|
3452
|
+
# to an application.
|
3453
|
+
class PropertyList
|
3454
|
+
include Google::Apis::Core::Hashable
|
3455
|
+
|
3456
|
+
# The ETag of the list.
|
3457
|
+
# Corresponds to the JSON property `etag`
|
3458
|
+
# @return [String]
|
3459
|
+
attr_accessor :etag
|
3460
|
+
|
3461
|
+
# The list of properties.
|
3462
|
+
# Corresponds to the JSON property `items`
|
3463
|
+
# @return [Array<Google::Apis::DriveV2::Property>]
|
3464
|
+
attr_accessor :items
|
3465
|
+
|
3466
|
+
# This is always drive#propertyList.
|
3467
|
+
# Corresponds to the JSON property `kind`
|
3468
|
+
# @return [String]
|
3469
|
+
attr_accessor :kind
|
3470
|
+
|
3471
|
+
# The link back to this list.
|
3472
|
+
# Corresponds to the JSON property `selfLink`
|
3473
|
+
# @return [String]
|
3474
|
+
attr_accessor :self_link
|
3475
|
+
|
3476
|
+
def initialize(**args)
|
3477
|
+
update!(**args)
|
3478
|
+
end
|
3479
|
+
|
3480
|
+
# Update properties of this object
|
3481
|
+
def update!(**args)
|
3482
|
+
@etag = args[:etag] if args.key?(:etag)
|
3483
|
+
@items = args[:items] if args.key?(:items)
|
3484
|
+
@kind = args[:kind] if args.key?(:kind)
|
3485
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
3486
|
+
end
|
3487
|
+
end
|
3488
|
+
|
3489
|
+
# A revision of a file.
|
3490
|
+
class Revision
|
3491
|
+
include Google::Apis::Core::Hashable
|
3492
|
+
|
3493
|
+
#
|
3494
|
+
# Corresponds to the JSON property `downloadUrl`
|
3495
|
+
# @return [String]
|
3496
|
+
attr_accessor :download_url
|
3497
|
+
|
3498
|
+
# The ETag of the revision.
|
3499
|
+
# Corresponds to the JSON property `etag`
|
3500
|
+
# @return [String]
|
3501
|
+
attr_accessor :etag
|
3502
|
+
|
3503
|
+
# Links for exporting Docs Editors files to specific formats.
|
3504
|
+
# Corresponds to the JSON property `exportLinks`
|
3505
|
+
# @return [Hash<String,String>]
|
3506
|
+
attr_accessor :export_links
|
3507
|
+
|
3508
|
+
# The size of the revision in bytes. This will only be populated on files with
|
3509
|
+
# content stored in Drive.
|
3510
|
+
# Corresponds to the JSON property `fileSize`
|
3511
|
+
# @return [Fixnum]
|
3512
|
+
attr_accessor :file_size
|
3513
|
+
|
3514
|
+
# The ID of the revision.
|
3515
|
+
# Corresponds to the JSON property `id`
|
3516
|
+
# @return [String]
|
3517
|
+
attr_accessor :id
|
3518
|
+
|
3519
|
+
# This is always drive#revision.
|
3520
|
+
# Corresponds to the JSON property `kind`
|
3521
|
+
# @return [String]
|
3522
|
+
attr_accessor :kind
|
3523
|
+
|
3524
|
+
# Information about a Drive user.
|
3525
|
+
# Corresponds to the JSON property `lastModifyingUser`
|
3526
|
+
# @return [Google::Apis::DriveV2::User]
|
3527
|
+
attr_accessor :last_modifying_user
|
3528
|
+
|
3529
|
+
# Name of the last user to modify this revision.
|
3530
|
+
# Corresponds to the JSON property `lastModifyingUserName`
|
3531
|
+
# @return [String]
|
3532
|
+
attr_accessor :last_modifying_user_name
|
3533
|
+
|
3534
|
+
# An MD5 checksum for the content of this revision. This will only be populated
|
3535
|
+
# on files with content stored in Drive.
|
3536
|
+
# Corresponds to the JSON property `md5Checksum`
|
3537
|
+
# @return [String]
|
3538
|
+
attr_accessor :md5_checksum
|
3539
|
+
|
3540
|
+
# The MIME type of the revision.
|
3541
|
+
# Corresponds to the JSON property `mimeType`
|
3542
|
+
# @return [String]
|
3543
|
+
attr_accessor :mime_type
|
3544
|
+
|
3545
|
+
# Last time this revision was modified (formatted RFC 3339 timestamp).
|
3546
|
+
# Corresponds to the JSON property `modifiedDate`
|
3547
|
+
# @return [DateTime]
|
3548
|
+
attr_accessor :modified_date
|
3549
|
+
|
3550
|
+
# The original filename when this revision was created. This will only be
|
3551
|
+
# populated on files with content stored in Drive.
|
3552
|
+
# Corresponds to the JSON property `originalFilename`
|
3553
|
+
# @return [String]
|
3554
|
+
attr_accessor :original_filename
|
3555
|
+
|
3556
|
+
# Whether this revision is pinned to prevent automatic purging. This will only
|
3557
|
+
# be populated and can only be modified on files with content stored in Drive,
|
3558
|
+
# excluding Docs Editors files. Revisions can also be pinned when they are
|
3559
|
+
# created through the drive.files.insert/update/copy by using the pinned query
|
3560
|
+
# parameter. Pinned revisions are stored indefinitely using additional storage
|
3561
|
+
# quota, up to a maximum of 200 revisions.
|
3562
|
+
# Corresponds to the JSON property `pinned`
|
3563
|
+
# @return [Boolean]
|
3564
|
+
attr_accessor :pinned
|
3565
|
+
alias_method :pinned?, :pinned
|
3566
|
+
|
3567
|
+
# Whether subsequent revisions will be automatically republished. This is only
|
3568
|
+
# populated and can only be modified for Docs Editors files.
|
3569
|
+
# Corresponds to the JSON property `publishAuto`
|
3570
|
+
# @return [Boolean]
|
3571
|
+
attr_accessor :publish_auto
|
3572
|
+
alias_method :publish_auto?, :publish_auto
|
3573
|
+
|
3574
|
+
# Whether this revision is published. This is only populated and can only be
|
3575
|
+
# modified for Docs Editors files.
|
3576
|
+
# Corresponds to the JSON property `published`
|
3577
|
+
# @return [Boolean]
|
3578
|
+
attr_accessor :published
|
3579
|
+
alias_method :published?, :published
|
3580
|
+
|
3581
|
+
# A link to the published revision. This is only populated for Google Sites
|
3582
|
+
# files.
|
3583
|
+
# Corresponds to the JSON property `publishedLink`
|
3584
|
+
# @return [String]
|
3585
|
+
attr_accessor :published_link
|
3586
|
+
|
3587
|
+
# Whether this revision is published outside the domain. This is only populated
|
3588
|
+
# and can only be modified for Docs Editors files.
|
3589
|
+
# Corresponds to the JSON property `publishedOutsideDomain`
|
3590
|
+
# @return [Boolean]
|
3591
|
+
attr_accessor :published_outside_domain
|
3592
|
+
alias_method :published_outside_domain?, :published_outside_domain
|
3593
|
+
|
3594
|
+
# A link back to this revision.
|
3595
|
+
# Corresponds to the JSON property `selfLink`
|
3596
|
+
# @return [String]
|
3597
|
+
attr_accessor :self_link
|
3598
|
+
|
3599
|
+
def initialize(**args)
|
3600
|
+
update!(**args)
|
3601
|
+
end
|
3602
|
+
|
3603
|
+
# Update properties of this object
|
3604
|
+
def update!(**args)
|
3605
|
+
@download_url = args[:download_url] if args.key?(:download_url)
|
3606
|
+
@etag = args[:etag] if args.key?(:etag)
|
3607
|
+
@export_links = args[:export_links] if args.key?(:export_links)
|
3608
|
+
@file_size = args[:file_size] if args.key?(:file_size)
|
3609
|
+
@id = args[:id] if args.key?(:id)
|
3610
|
+
@kind = args[:kind] if args.key?(:kind)
|
3611
|
+
@last_modifying_user = args[:last_modifying_user] if args.key?(:last_modifying_user)
|
3612
|
+
@last_modifying_user_name = args[:last_modifying_user_name] if args.key?(:last_modifying_user_name)
|
3613
|
+
@md5_checksum = args[:md5_checksum] if args.key?(:md5_checksum)
|
3614
|
+
@mime_type = args[:mime_type] if args.key?(:mime_type)
|
3615
|
+
@modified_date = args[:modified_date] if args.key?(:modified_date)
|
3616
|
+
@original_filename = args[:original_filename] if args.key?(:original_filename)
|
3617
|
+
@pinned = args[:pinned] if args.key?(:pinned)
|
3618
|
+
@publish_auto = args[:publish_auto] if args.key?(:publish_auto)
|
3619
|
+
@published = args[:published] if args.key?(:published)
|
3620
|
+
@published_link = args[:published_link] if args.key?(:published_link)
|
3621
|
+
@published_outside_domain = args[:published_outside_domain] if args.key?(:published_outside_domain)
|
3622
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
3623
|
+
end
|
3624
|
+
end
|
3625
|
+
|
3626
|
+
# A list of revisions of a file.
|
3627
|
+
class RevisionList
|
3628
|
+
include Google::Apis::Core::Hashable
|
3629
|
+
|
3630
|
+
# The ETag of the list.
|
3631
|
+
# Corresponds to the JSON property `etag`
|
3632
|
+
# @return [String]
|
3633
|
+
attr_accessor :etag
|
3634
|
+
|
3635
|
+
# The list of revisions. If nextPageToken is populated, then this list may be
|
3636
|
+
# incomplete and an additional page of results should be fetched.
|
3637
|
+
# Corresponds to the JSON property `items`
|
3638
|
+
# @return [Array<Google::Apis::DriveV2::Revision>]
|
3639
|
+
attr_accessor :items
|
3640
|
+
|
3641
|
+
# This is always drive#revisionList.
|
3642
|
+
# Corresponds to the JSON property `kind`
|
3643
|
+
# @return [String]
|
3644
|
+
attr_accessor :kind
|
3645
|
+
|
3646
|
+
# The page token for the next page of revisions. This field will be absent if
|
3647
|
+
# the end of the revisions list has been reached. If the token is rejected for
|
3648
|
+
# any reason, it should be discarded and pagination should be restarted from the
|
3649
|
+
# first page of results.
|
3650
|
+
# Corresponds to the JSON property `nextPageToken`
|
3651
|
+
# @return [String]
|
3652
|
+
attr_accessor :next_page_token
|
3653
|
+
|
3654
|
+
# A link back to this list.
|
3655
|
+
# Corresponds to the JSON property `selfLink`
|
3656
|
+
# @return [String]
|
3657
|
+
attr_accessor :self_link
|
3658
|
+
|
3659
|
+
def initialize(**args)
|
3660
|
+
update!(**args)
|
3661
|
+
end
|
3662
|
+
|
3663
|
+
# Update properties of this object
|
3664
|
+
def update!(**args)
|
3665
|
+
@etag = args[:etag] if args.key?(:etag)
|
3666
|
+
@items = args[:items] if args.key?(:items)
|
3667
|
+
@kind = args[:kind] if args.key?(:kind)
|
3668
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
3669
|
+
@self_link = args[:self_link] if args.key?(:self_link)
|
3670
|
+
end
|
3671
|
+
end
|
3672
|
+
|
3673
|
+
#
|
3674
|
+
class StartPageToken
|
3675
|
+
include Google::Apis::Core::Hashable
|
3676
|
+
|
3677
|
+
# Identifies what kind of resource this is. Value: the fixed string "drive#
|
3678
|
+
# startPageToken".
|
3679
|
+
# Corresponds to the JSON property `kind`
|
3680
|
+
# @return [String]
|
3681
|
+
attr_accessor :kind
|
3682
|
+
|
3683
|
+
# The starting page token for listing changes.
|
3684
|
+
# Corresponds to the JSON property `startPageToken`
|
3685
|
+
# @return [String]
|
3686
|
+
attr_accessor :start_page_token
|
3687
|
+
|
3688
|
+
def initialize(**args)
|
3689
|
+
update!(**args)
|
3690
|
+
end
|
3691
|
+
|
3692
|
+
# Update properties of this object
|
3693
|
+
def update!(**args)
|
3694
|
+
@kind = args[:kind] if args.key?(:kind)
|
3695
|
+
@start_page_token = args[:start_page_token] if args.key?(:start_page_token)
|
3696
|
+
end
|
3697
|
+
end
|
3698
|
+
|
3699
|
+
# Deprecated: use the drive collection instead.
|
3700
|
+
class TeamDrive
|
3701
|
+
include Google::Apis::Core::Hashable
|
3702
|
+
|
3703
|
+
# An image file and cropping parameters from which a background image for this
|
3704
|
+
# Team Drive is set. This is a write only field; it can only be set on drive.
|
3705
|
+
# teamdrives.update requests that don't set themeId. When specified, all fields
|
3706
|
+
# of the backgroundImageFile must be set.
|
3707
|
+
# Corresponds to the JSON property `backgroundImageFile`
|
3708
|
+
# @return [Google::Apis::DriveV2::TeamDrive::BackgroundImageFile]
|
3709
|
+
attr_accessor :background_image_file
|
3710
|
+
|
3711
|
+
# A short-lived link to this Team Drive's background image.
|
3712
|
+
# Corresponds to the JSON property `backgroundImageLink`
|
3713
|
+
# @return [String]
|
3714
|
+
attr_accessor :background_image_link
|
3715
|
+
|
3716
|
+
# Capabilities the current user has on this Team Drive.
|
3717
|
+
# Corresponds to the JSON property `capabilities`
|
3718
|
+
# @return [Google::Apis::DriveV2::TeamDrive::Capabilities]
|
3719
|
+
attr_accessor :capabilities
|
3720
|
+
|
3721
|
+
# The color of this Team Drive as an RGB hex string. It can only be set on a
|
3722
|
+
# drive.teamdrives.update request that does not set themeId.
|
3723
|
+
# Corresponds to the JSON property `colorRgb`
|
3724
|
+
# @return [String]
|
3725
|
+
attr_accessor :color_rgb
|
3726
|
+
|
3727
|
+
# The time at which the Team Drive was created (RFC 3339 date-time).
|
3728
|
+
# Corresponds to the JSON property `createdDate`
|
3729
|
+
# @return [DateTime]
|
3730
|
+
attr_accessor :created_date
|
3731
|
+
|
3732
|
+
# The ID of this Team Drive which is also the ID of the top level folder of this
|
3733
|
+
# Team Drive.
|
3734
|
+
# Corresponds to the JSON property `id`
|
3735
|
+
# @return [String]
|
3736
|
+
attr_accessor :id
|
3737
|
+
|
3738
|
+
# This is always drive#teamDrive
|
3739
|
+
# Corresponds to the JSON property `kind`
|
3740
|
+
# @return [String]
|
3741
|
+
attr_accessor :kind
|
3742
|
+
|
3743
|
+
# The name of this Team Drive.
|
3744
|
+
# Corresponds to the JSON property `name`
|
3745
|
+
# @return [String]
|
3746
|
+
attr_accessor :name
|
3747
|
+
|
3748
|
+
# A set of restrictions that apply to this Team Drive or items inside this Team
|
3749
|
+
# Drive.
|
3750
|
+
# Corresponds to the JSON property `restrictions`
|
3751
|
+
# @return [Google::Apis::DriveV2::TeamDrive::Restrictions]
|
3752
|
+
attr_accessor :restrictions
|
3753
|
+
|
3754
|
+
# The ID of the theme from which the background image and color will be set. The
|
3755
|
+
# set of possible teamDriveThemes can be retrieved from a drive.about.get
|
3756
|
+
# response. When not specified on a drive.teamdrives.insert request, a random
|
3757
|
+
# theme is chosen from which the background image and color are set. This is a
|
3758
|
+
# write-only field; it can only be set on requests that don't set colorRgb or
|
3759
|
+
# backgroundImageFile.
|
3760
|
+
# Corresponds to the JSON property `themeId`
|
3761
|
+
# @return [String]
|
3762
|
+
attr_accessor :theme_id
|
3763
|
+
|
3764
|
+
def initialize(**args)
|
3765
|
+
update!(**args)
|
3766
|
+
end
|
3767
|
+
|
3768
|
+
# Update properties of this object
|
3769
|
+
def update!(**args)
|
3770
|
+
@background_image_file = args[:background_image_file] if args.key?(:background_image_file)
|
3771
|
+
@background_image_link = args[:background_image_link] if args.key?(:background_image_link)
|
3772
|
+
@capabilities = args[:capabilities] if args.key?(:capabilities)
|
3773
|
+
@color_rgb = args[:color_rgb] if args.key?(:color_rgb)
|
3774
|
+
@created_date = args[:created_date] if args.key?(:created_date)
|
3775
|
+
@id = args[:id] if args.key?(:id)
|
3776
|
+
@kind = args[:kind] if args.key?(:kind)
|
3777
|
+
@name = args[:name] if args.key?(:name)
|
3778
|
+
@restrictions = args[:restrictions] if args.key?(:restrictions)
|
3779
|
+
@theme_id = args[:theme_id] if args.key?(:theme_id)
|
3780
|
+
end
|
3781
|
+
|
3782
|
+
# An image file and cropping parameters from which a background image for this
|
3783
|
+
# Team Drive is set. This is a write only field; it can only be set on drive.
|
3784
|
+
# teamdrives.update requests that don't set themeId. When specified, all fields
|
3785
|
+
# of the backgroundImageFile must be set.
|
3786
|
+
class BackgroundImageFile
|
3787
|
+
include Google::Apis::Core::Hashable
|
3788
|
+
|
3789
|
+
# The ID of an image file in Drive to use for the background image.
|
3790
|
+
# Corresponds to the JSON property `id`
|
3791
|
+
# @return [String]
|
3792
|
+
attr_accessor :id
|
3793
|
+
|
3794
|
+
# The width of the cropped image in the closed range of 0 to 1. This value
|
3795
|
+
# represents the width of the cropped image divided by the width of the entire
|
3796
|
+
# image. The height is computed by applying a width to height aspect ratio of 80
|
3797
|
+
# to 9. The resulting image must be at least 1280 pixels wide and 144 pixels
|
3798
|
+
# high.
|
3799
|
+
# Corresponds to the JSON property `width`
|
3800
|
+
# @return [Float]
|
3801
|
+
attr_accessor :width
|
3802
|
+
|
3803
|
+
# The X coordinate of the upper left corner of the cropping area in the
|
3804
|
+
# background image. This is a value in the closed range of 0 to 1. This value
|
3805
|
+
# represents the horizontal distance from the left side of the entire image to
|
3806
|
+
# the left side of the cropping area divided by the width of the entire image.
|
3807
|
+
# Corresponds to the JSON property `xCoordinate`
|
3808
|
+
# @return [Float]
|
3809
|
+
attr_accessor :x_coordinate
|
3810
|
+
|
3811
|
+
# The Y coordinate of the upper left corner of the cropping area in the
|
3812
|
+
# background image. This is a value in the closed range of 0 to 1. This value
|
3813
|
+
# represents the vertical distance from the top side of the entire image to the
|
3814
|
+
# top side of the cropping area divided by the height of the entire image.
|
3815
|
+
# Corresponds to the JSON property `yCoordinate`
|
3816
|
+
# @return [Float]
|
3817
|
+
attr_accessor :y_coordinate
|
3818
|
+
|
3819
|
+
def initialize(**args)
|
3820
|
+
update!(**args)
|
3821
|
+
end
|
3822
|
+
|
3823
|
+
# Update properties of this object
|
3824
|
+
def update!(**args)
|
3825
|
+
@id = args[:id] if args.key?(:id)
|
3826
|
+
@width = args[:width] if args.key?(:width)
|
3827
|
+
@x_coordinate = args[:x_coordinate] if args.key?(:x_coordinate)
|
3828
|
+
@y_coordinate = args[:y_coordinate] if args.key?(:y_coordinate)
|
3829
|
+
end
|
3830
|
+
end
|
3831
|
+
|
3832
|
+
# Capabilities the current user has on this Team Drive.
|
3833
|
+
class Capabilities
|
3834
|
+
include Google::Apis::Core::Hashable
|
3835
|
+
|
3836
|
+
# Whether the current user can add children to folders in this Team Drive.
|
3837
|
+
# Corresponds to the JSON property `canAddChildren`
|
3838
|
+
# @return [Boolean]
|
3839
|
+
attr_accessor :can_add_children
|
3840
|
+
alias_method :can_add_children?, :can_add_children
|
3841
|
+
|
3842
|
+
# Whether the current user can change the copyRequiresWriterPermission
|
3843
|
+
# restriction of this Team Drive.
|
3844
|
+
# Corresponds to the JSON property `canChangeCopyRequiresWriterPermissionRestriction`
|
3845
|
+
# @return [Boolean]
|
3846
|
+
attr_accessor :can_change_copy_requires_writer_permission_restriction
|
3847
|
+
alias_method :can_change_copy_requires_writer_permission_restriction?, :can_change_copy_requires_writer_permission_restriction
|
3848
|
+
|
3849
|
+
# Whether the current user can change the domainUsersOnly restriction of this
|
3850
|
+
# Team Drive.
|
3851
|
+
# Corresponds to the JSON property `canChangeDomainUsersOnlyRestriction`
|
3852
|
+
# @return [Boolean]
|
3853
|
+
attr_accessor :can_change_domain_users_only_restriction
|
3854
|
+
alias_method :can_change_domain_users_only_restriction?, :can_change_domain_users_only_restriction
|
3855
|
+
|
3856
|
+
# Whether the current user can change the background of this Team Drive.
|
3857
|
+
# Corresponds to the JSON property `canChangeTeamDriveBackground`
|
3858
|
+
# @return [Boolean]
|
3859
|
+
attr_accessor :can_change_team_drive_background
|
3860
|
+
alias_method :can_change_team_drive_background?, :can_change_team_drive_background
|
3861
|
+
|
3862
|
+
# Whether the current user can change the teamMembersOnly restriction of this
|
3863
|
+
# Team Drive.
|
3864
|
+
# Corresponds to the JSON property `canChangeTeamMembersOnlyRestriction`
|
3865
|
+
# @return [Boolean]
|
3866
|
+
attr_accessor :can_change_team_members_only_restriction
|
3867
|
+
alias_method :can_change_team_members_only_restriction?, :can_change_team_members_only_restriction
|
3868
|
+
|
3869
|
+
# Whether the current user can comment on files in this Team Drive.
|
3870
|
+
# Corresponds to the JSON property `canComment`
|
3871
|
+
# @return [Boolean]
|
3872
|
+
attr_accessor :can_comment
|
3873
|
+
alias_method :can_comment?, :can_comment
|
3874
|
+
|
3875
|
+
# Whether the current user can copy files in this Team Drive.
|
3876
|
+
# Corresponds to the JSON property `canCopy`
|
3877
|
+
# @return [Boolean]
|
3878
|
+
attr_accessor :can_copy
|
3879
|
+
alias_method :can_copy?, :can_copy
|
3880
|
+
|
3881
|
+
# Whether the current user can delete children from folders in this Team Drive.
|
3882
|
+
# Corresponds to the JSON property `canDeleteChildren`
|
3883
|
+
# @return [Boolean]
|
3884
|
+
attr_accessor :can_delete_children
|
3885
|
+
alias_method :can_delete_children?, :can_delete_children
|
3886
|
+
|
3887
|
+
# Whether the current user can delete this Team Drive. Attempting to delete the
|
3888
|
+
# Team Drive may still fail if there are untrashed items inside the Team Drive.
|
3889
|
+
# Corresponds to the JSON property `canDeleteTeamDrive`
|
3890
|
+
# @return [Boolean]
|
3891
|
+
attr_accessor :can_delete_team_drive
|
3892
|
+
alias_method :can_delete_team_drive?, :can_delete_team_drive
|
3893
|
+
|
3894
|
+
# Whether the current user can download files in this Team Drive.
|
3895
|
+
# Corresponds to the JSON property `canDownload`
|
3896
|
+
# @return [Boolean]
|
3897
|
+
attr_accessor :can_download
|
3898
|
+
alias_method :can_download?, :can_download
|
3899
|
+
|
3900
|
+
# Whether the current user can edit files in this Team Drive
|
3901
|
+
# Corresponds to the JSON property `canEdit`
|
3902
|
+
# @return [Boolean]
|
3903
|
+
attr_accessor :can_edit
|
3904
|
+
alias_method :can_edit?, :can_edit
|
3905
|
+
|
3906
|
+
# Whether the current user can list the children of folders in this Team Drive.
|
3907
|
+
# Corresponds to the JSON property `canListChildren`
|
3908
|
+
# @return [Boolean]
|
3909
|
+
attr_accessor :can_list_children
|
3910
|
+
alias_method :can_list_children?, :can_list_children
|
3911
|
+
|
3912
|
+
# Whether the current user can add members to this Team Drive or remove them or
|
3913
|
+
# change their role.
|
3914
|
+
# Corresponds to the JSON property `canManageMembers`
|
3915
|
+
# @return [Boolean]
|
3916
|
+
attr_accessor :can_manage_members
|
3917
|
+
alias_method :can_manage_members?, :can_manage_members
|
3918
|
+
|
3919
|
+
# Whether the current user can read the revisions resource of files in this Team
|
3920
|
+
# Drive.
|
3921
|
+
# Corresponds to the JSON property `canReadRevisions`
|
3922
|
+
# @return [Boolean]
|
3923
|
+
attr_accessor :can_read_revisions
|
3924
|
+
alias_method :can_read_revisions?, :can_read_revisions
|
3925
|
+
|
3926
|
+
# Deprecated - use canDeleteChildren or canTrashChildren instead.
|
3927
|
+
# Corresponds to the JSON property `canRemoveChildren`
|
3928
|
+
# @return [Boolean]
|
3929
|
+
attr_accessor :can_remove_children
|
3930
|
+
alias_method :can_remove_children?, :can_remove_children
|
3931
|
+
|
3932
|
+
# Whether the current user can rename files or folders in this Team Drive.
|
3933
|
+
# Corresponds to the JSON property `canRename`
|
3934
|
+
# @return [Boolean]
|
3935
|
+
attr_accessor :can_rename
|
3936
|
+
alias_method :can_rename?, :can_rename
|
3937
|
+
|
3938
|
+
# Whether the current user can rename this Team Drive.
|
3939
|
+
# Corresponds to the JSON property `canRenameTeamDrive`
|
3940
|
+
# @return [Boolean]
|
3941
|
+
attr_accessor :can_rename_team_drive
|
3942
|
+
alias_method :can_rename_team_drive?, :can_rename_team_drive
|
3943
|
+
|
3944
|
+
# Whether the current user can share files or folders in this Team Drive.
|
3945
|
+
# Corresponds to the JSON property `canShare`
|
3946
|
+
# @return [Boolean]
|
3947
|
+
attr_accessor :can_share
|
3948
|
+
alias_method :can_share?, :can_share
|
3949
|
+
|
3950
|
+
# Whether the current user can trash children from folders in this Team Drive.
|
3951
|
+
# Corresponds to the JSON property `canTrashChildren`
|
3952
|
+
# @return [Boolean]
|
3953
|
+
attr_accessor :can_trash_children
|
3954
|
+
alias_method :can_trash_children?, :can_trash_children
|
3955
|
+
|
3956
|
+
def initialize(**args)
|
3957
|
+
update!(**args)
|
3958
|
+
end
|
3959
|
+
|
3960
|
+
# Update properties of this object
|
3961
|
+
def update!(**args)
|
3962
|
+
@can_add_children = args[:can_add_children] if args.key?(:can_add_children)
|
3963
|
+
@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)
|
3964
|
+
@can_change_domain_users_only_restriction = args[:can_change_domain_users_only_restriction] if args.key?(:can_change_domain_users_only_restriction)
|
3965
|
+
@can_change_team_drive_background = args[:can_change_team_drive_background] if args.key?(:can_change_team_drive_background)
|
3966
|
+
@can_change_team_members_only_restriction = args[:can_change_team_members_only_restriction] if args.key?(:can_change_team_members_only_restriction)
|
3967
|
+
@can_comment = args[:can_comment] if args.key?(:can_comment)
|
3968
|
+
@can_copy = args[:can_copy] if args.key?(:can_copy)
|
3969
|
+
@can_delete_children = args[:can_delete_children] if args.key?(:can_delete_children)
|
3970
|
+
@can_delete_team_drive = args[:can_delete_team_drive] if args.key?(:can_delete_team_drive)
|
3971
|
+
@can_download = args[:can_download] if args.key?(:can_download)
|
3972
|
+
@can_edit = args[:can_edit] if args.key?(:can_edit)
|
3973
|
+
@can_list_children = args[:can_list_children] if args.key?(:can_list_children)
|
3974
|
+
@can_manage_members = args[:can_manage_members] if args.key?(:can_manage_members)
|
3975
|
+
@can_read_revisions = args[:can_read_revisions] if args.key?(:can_read_revisions)
|
3976
|
+
@can_remove_children = args[:can_remove_children] if args.key?(:can_remove_children)
|
3977
|
+
@can_rename = args[:can_rename] if args.key?(:can_rename)
|
3978
|
+
@can_rename_team_drive = args[:can_rename_team_drive] if args.key?(:can_rename_team_drive)
|
3979
|
+
@can_share = args[:can_share] if args.key?(:can_share)
|
3980
|
+
@can_trash_children = args[:can_trash_children] if args.key?(:can_trash_children)
|
3981
|
+
end
|
3982
|
+
end
|
3983
|
+
|
3984
|
+
# A set of restrictions that apply to this Team Drive or items inside this Team
|
3985
|
+
# Drive.
|
3986
|
+
class Restrictions
|
3987
|
+
include Google::Apis::Core::Hashable
|
3988
|
+
|
3989
|
+
# Whether administrative privileges on this Team Drive are required to modify
|
3990
|
+
# restrictions.
|
3991
|
+
# Corresponds to the JSON property `adminManagedRestrictions`
|
3992
|
+
# @return [Boolean]
|
3993
|
+
attr_accessor :admin_managed_restrictions
|
3994
|
+
alias_method :admin_managed_restrictions?, :admin_managed_restrictions
|
3995
|
+
|
3996
|
+
# Whether the options to copy, print, or download files inside this Team Drive,
|
3997
|
+
# should be disabled for readers and commenters. When this restriction is set to
|
3998
|
+
# true, it will override the similarly named field to true for any file inside
|
3999
|
+
# this Team Drive.
|
4000
|
+
# Corresponds to the JSON property `copyRequiresWriterPermission`
|
4001
|
+
# @return [Boolean]
|
4002
|
+
attr_accessor :copy_requires_writer_permission
|
4003
|
+
alias_method :copy_requires_writer_permission?, :copy_requires_writer_permission
|
4004
|
+
|
4005
|
+
# Whether access to this Team Drive and items inside this Team Drive is
|
4006
|
+
# restricted to users of the domain to which this Team Drive belongs. This
|
4007
|
+
# restriction may be overridden by other sharing policies controlled outside of
|
4008
|
+
# this Team Drive.
|
4009
|
+
# Corresponds to the JSON property `domainUsersOnly`
|
4010
|
+
# @return [Boolean]
|
4011
|
+
attr_accessor :domain_users_only
|
4012
|
+
alias_method :domain_users_only?, :domain_users_only
|
4013
|
+
|
4014
|
+
# Whether access to items inside this Team Drive is restricted to members of
|
4015
|
+
# this Team Drive.
|
4016
|
+
# Corresponds to the JSON property `teamMembersOnly`
|
4017
|
+
# @return [Boolean]
|
4018
|
+
attr_accessor :team_members_only
|
4019
|
+
alias_method :team_members_only?, :team_members_only
|
4020
|
+
|
4021
|
+
def initialize(**args)
|
4022
|
+
update!(**args)
|
4023
|
+
end
|
4024
|
+
|
4025
|
+
# Update properties of this object
|
4026
|
+
def update!(**args)
|
4027
|
+
@admin_managed_restrictions = args[:admin_managed_restrictions] if args.key?(:admin_managed_restrictions)
|
4028
|
+
@copy_requires_writer_permission = args[:copy_requires_writer_permission] if args.key?(:copy_requires_writer_permission)
|
4029
|
+
@domain_users_only = args[:domain_users_only] if args.key?(:domain_users_only)
|
4030
|
+
@team_members_only = args[:team_members_only] if args.key?(:team_members_only)
|
4031
|
+
end
|
4032
|
+
end
|
4033
|
+
end
|
4034
|
+
|
4035
|
+
# A list of Team Drives.
|
4036
|
+
class TeamDriveList
|
4037
|
+
include Google::Apis::Core::Hashable
|
4038
|
+
|
4039
|
+
# The list of Team Drives.
|
4040
|
+
# Corresponds to the JSON property `items`
|
4041
|
+
# @return [Array<Google::Apis::DriveV2::TeamDrive>]
|
4042
|
+
attr_accessor :items
|
4043
|
+
|
4044
|
+
# This is always drive#teamDriveList
|
4045
|
+
# Corresponds to the JSON property `kind`
|
4046
|
+
# @return [String]
|
4047
|
+
attr_accessor :kind
|
4048
|
+
|
4049
|
+
# The page token for the next page of Team Drives.
|
4050
|
+
# Corresponds to the JSON property `nextPageToken`
|
4051
|
+
# @return [String]
|
4052
|
+
attr_accessor :next_page_token
|
4053
|
+
|
4054
|
+
def initialize(**args)
|
4055
|
+
update!(**args)
|
4056
|
+
end
|
4057
|
+
|
4058
|
+
# Update properties of this object
|
4059
|
+
def update!(**args)
|
4060
|
+
@items = args[:items] if args.key?(:items)
|
4061
|
+
@kind = args[:kind] if args.key?(:kind)
|
4062
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
4063
|
+
end
|
4064
|
+
end
|
4065
|
+
|
4066
|
+
# Information about a Drive user.
|
4067
|
+
class User
|
4068
|
+
include Google::Apis::Core::Hashable
|
4069
|
+
|
4070
|
+
# A plain text displayable name for this user.
|
4071
|
+
# Corresponds to the JSON property `displayName`
|
4072
|
+
# @return [String]
|
4073
|
+
attr_accessor :display_name
|
4074
|
+
|
4075
|
+
# The email address of the user.
|
4076
|
+
# Corresponds to the JSON property `emailAddress`
|
4077
|
+
# @return [String]
|
4078
|
+
attr_accessor :email_address
|
4079
|
+
|
4080
|
+
# Whether this user is the same as the authenticated user for whom the request
|
4081
|
+
# was made.
|
4082
|
+
# Corresponds to the JSON property `isAuthenticatedUser`
|
4083
|
+
# @return [Boolean]
|
4084
|
+
attr_accessor :is_authenticated_user
|
4085
|
+
alias_method :is_authenticated_user?, :is_authenticated_user
|
4086
|
+
|
4087
|
+
# This is always drive#user.
|
4088
|
+
# Corresponds to the JSON property `kind`
|
4089
|
+
# @return [String]
|
4090
|
+
attr_accessor :kind
|
4091
|
+
|
4092
|
+
# The user's ID as visible in the permissions collection.
|
4093
|
+
# Corresponds to the JSON property `permissionId`
|
4094
|
+
# @return [String]
|
4095
|
+
attr_accessor :permission_id
|
4096
|
+
|
4097
|
+
# The user's profile picture.
|
4098
|
+
# Corresponds to the JSON property `picture`
|
4099
|
+
# @return [Google::Apis::DriveV2::User::Picture]
|
4100
|
+
attr_accessor :picture
|
4101
|
+
|
4102
|
+
def initialize(**args)
|
4103
|
+
update!(**args)
|
4104
|
+
end
|
4105
|
+
|
4106
|
+
# Update properties of this object
|
4107
|
+
def update!(**args)
|
4108
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
4109
|
+
@email_address = args[:email_address] if args.key?(:email_address)
|
4110
|
+
@is_authenticated_user = args[:is_authenticated_user] if args.key?(:is_authenticated_user)
|
4111
|
+
@kind = args[:kind] if args.key?(:kind)
|
4112
|
+
@permission_id = args[:permission_id] if args.key?(:permission_id)
|
4113
|
+
@picture = args[:picture] if args.key?(:picture)
|
4114
|
+
end
|
4115
|
+
|
4116
|
+
# The user's profile picture.
|
4117
|
+
class Picture
|
4118
|
+
include Google::Apis::Core::Hashable
|
4119
|
+
|
4120
|
+
# A URL that points to a profile picture of this user.
|
4121
|
+
# Corresponds to the JSON property `url`
|
4122
|
+
# @return [String]
|
4123
|
+
attr_accessor :url
|
4124
|
+
|
4125
|
+
def initialize(**args)
|
4126
|
+
update!(**args)
|
4127
|
+
end
|
4128
|
+
|
4129
|
+
# Update properties of this object
|
4130
|
+
def update!(**args)
|
4131
|
+
@url = args[:url] if args.key?(:url)
|
4132
|
+
end
|
4133
|
+
end
|
4134
|
+
end
|
4135
|
+
end
|
4136
|
+
end
|
4137
|
+
end
|