google-apis-poly_v1 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-poly_v1.rb +15 -0
- data/lib/google/apis/poly_v1.rb +34 -0
- data/lib/google/apis/poly_v1/classes.rb +614 -0
- data/lib/google/apis/poly_v1/gem_version.rb +28 -0
- data/lib/google/apis/poly_v1/representations.rb +278 -0
- data/lib/google/apis/poly_v1/service.rb +266 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 665f5ec8acf055035d7dc7bc1831699e077c8d0c552f2b974df5787c79453c54
|
4
|
+
data.tar.gz: 90874dc43fbdc148ea7d07ba74a3192072fc6f7ccb04f1a6f8403dd10cb5ae66
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 373c3c21752f8758e3666e769df0d965b5f87570cee25cf30c31f4aae989897fab3f70998e598c19b60e29bd11b89bd3b022926ee5114824158575568316591e
|
7
|
+
data.tar.gz: 0f8847ee3bba8195b36ebe43feb6a570c0341743cc56d89d07e9c4bec3fed761459b2dd3814bc312b1a854332ccdc822f21fcb629694238d8ec9447a8765fad1
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-poly_v1
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/poly_v1/*.rb
|
9
|
+
lib/google/apis/poly_v1.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 V1 of the Poly API
|
2
|
+
|
3
|
+
This is a simple client library for version V1 of the Poly 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/poly.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-poly_v1', '~> 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-poly_v1
|
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/poly_v1"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::PolyV1::PolyServiceService.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 Poly service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the Poly API, see the {Google::Apis::PolyV1::PolyServiceService 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-poly_v1`, 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/poly/) 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/poly_v1"
|
@@ -0,0 +1,34 @@
|
|
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/poly_v1/service.rb'
|
16
|
+
require 'google/apis/poly_v1/classes.rb'
|
17
|
+
require 'google/apis/poly_v1/representations.rb'
|
18
|
+
require 'google/apis/poly_v1/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Poly API
|
23
|
+
#
|
24
|
+
# The Poly API provides read access to assets hosted on poly.google.com to all,
|
25
|
+
# and upload access to poly.google.com for whitelisted accounts.
|
26
|
+
#
|
27
|
+
# @see https://developers.google.com/poly/
|
28
|
+
module PolyV1
|
29
|
+
# Version of the Poly API this client connects to.
|
30
|
+
# This is NOT the gem version.
|
31
|
+
VERSION = 'V1'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,614 @@
|
|
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 PolyV1
|
24
|
+
|
25
|
+
# Represents and describes an asset in the Poly library. An asset is a 3D model
|
26
|
+
# or scene created using [Tilt Brush](//www.tiltbrush.com), [Blocks](//vr.google.
|
27
|
+
# com/blocks/), or any 3D program that produces a file that can be upload to
|
28
|
+
# Poly.
|
29
|
+
class Asset
|
30
|
+
include Google::Apis::Core::Hashable
|
31
|
+
|
32
|
+
# The author's publicly visible name. Use this name when giving credit to the
|
33
|
+
# author. For more information, see [Licensing](/poly/discover/licensing).
|
34
|
+
# Corresponds to the JSON property `authorName`
|
35
|
+
# @return [String]
|
36
|
+
attr_accessor :author_name
|
37
|
+
|
38
|
+
# For published assets, the time when the asset was published. For unpublished
|
39
|
+
# assets, the time when the asset was created.
|
40
|
+
# Corresponds to the JSON property `createTime`
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :create_time
|
43
|
+
|
44
|
+
# The human-readable description, set by the asset's author.
|
45
|
+
# Corresponds to the JSON property `description`
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :description
|
48
|
+
|
49
|
+
# The human-readable name, set by the asset's author.
|
50
|
+
# Corresponds to the JSON property `displayName`
|
51
|
+
# @return [String]
|
52
|
+
attr_accessor :display_name
|
53
|
+
|
54
|
+
# A list of Formats where each format describes one representation of the asset.
|
55
|
+
# Corresponds to the JSON property `formats`
|
56
|
+
# @return [Array<Google::Apis::PolyV1::Format>]
|
57
|
+
attr_accessor :formats
|
58
|
+
|
59
|
+
# Whether this asset has been curated by the Poly team.
|
60
|
+
# Corresponds to the JSON property `isCurated`
|
61
|
+
# @return [Boolean]
|
62
|
+
attr_accessor :is_curated
|
63
|
+
alias_method :is_curated?, :is_curated
|
64
|
+
|
65
|
+
# The license under which the author has made the asset available for use, if
|
66
|
+
# any.
|
67
|
+
# Corresponds to the JSON property `license`
|
68
|
+
# @return [String]
|
69
|
+
attr_accessor :license
|
70
|
+
|
71
|
+
# Application-defined opaque metadata for this asset. This field is only
|
72
|
+
# returned when querying for the signed-in user's own assets, not for public
|
73
|
+
# assets. This string is limited to 1K chars. It is up to the creator of the
|
74
|
+
# asset to define the format for this string (for example, JSON).
|
75
|
+
# Corresponds to the JSON property `metadata`
|
76
|
+
# @return [String]
|
77
|
+
attr_accessor :metadata
|
78
|
+
|
79
|
+
# The unique identifier for the asset in the form: `assets/`ASSET_ID``.
|
80
|
+
# Corresponds to the JSON property `name`
|
81
|
+
# @return [String]
|
82
|
+
attr_accessor :name
|
83
|
+
|
84
|
+
# Hints for displaying the asset, based on information available when the asset
|
85
|
+
# was uploaded.
|
86
|
+
# Corresponds to the JSON property `presentationParams`
|
87
|
+
# @return [Google::Apis::PolyV1::PresentationParams]
|
88
|
+
attr_accessor :presentation_params
|
89
|
+
|
90
|
+
# Info about the sources of this asset (i.e. assets that were remixed to create
|
91
|
+
# this asset).
|
92
|
+
# Corresponds to the JSON property `remixInfo`
|
93
|
+
# @return [Google::Apis::PolyV1::RemixInfo]
|
94
|
+
attr_accessor :remix_info
|
95
|
+
|
96
|
+
# Represents a file in Poly, which can be a root, resource, or thumbnail file.
|
97
|
+
# Corresponds to the JSON property `thumbnail`
|
98
|
+
# @return [Google::Apis::PolyV1::File]
|
99
|
+
attr_accessor :thumbnail
|
100
|
+
|
101
|
+
# The time when the asset was last modified. For published assets, whose
|
102
|
+
# contents are immutable, the update time changes only when metadata properties,
|
103
|
+
# such as visibility, are updated.
|
104
|
+
# Corresponds to the JSON property `updateTime`
|
105
|
+
# @return [String]
|
106
|
+
attr_accessor :update_time
|
107
|
+
|
108
|
+
# The visibility of the asset and who can access it.
|
109
|
+
# Corresponds to the JSON property `visibility`
|
110
|
+
# @return [String]
|
111
|
+
attr_accessor :visibility
|
112
|
+
|
113
|
+
def initialize(**args)
|
114
|
+
update!(**args)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Update properties of this object
|
118
|
+
def update!(**args)
|
119
|
+
@author_name = args[:author_name] if args.key?(:author_name)
|
120
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
121
|
+
@description = args[:description] if args.key?(:description)
|
122
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
123
|
+
@formats = args[:formats] if args.key?(:formats)
|
124
|
+
@is_curated = args[:is_curated] if args.key?(:is_curated)
|
125
|
+
@license = args[:license] if args.key?(:license)
|
126
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
127
|
+
@name = args[:name] if args.key?(:name)
|
128
|
+
@presentation_params = args[:presentation_params] if args.key?(:presentation_params)
|
129
|
+
@remix_info = args[:remix_info] if args.key?(:remix_info)
|
130
|
+
@thumbnail = args[:thumbnail] if args.key?(:thumbnail)
|
131
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
132
|
+
@visibility = args[:visibility] if args.key?(:visibility)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
# A message generated by the asset import process.
|
137
|
+
class AssetImportMessage
|
138
|
+
include Google::Apis::Core::Hashable
|
139
|
+
|
140
|
+
# The code associated with this message.
|
141
|
+
# Corresponds to the JSON property `code`
|
142
|
+
# @return [String]
|
143
|
+
attr_accessor :code
|
144
|
+
|
145
|
+
# An optional file path. Only present for those error codes that specify it.
|
146
|
+
# Corresponds to the JSON property `filePath`
|
147
|
+
# @return [String]
|
148
|
+
attr_accessor :file_path
|
149
|
+
|
150
|
+
# A message resulting from reading an image file.
|
151
|
+
# Corresponds to the JSON property `imageError`
|
152
|
+
# @return [Google::Apis::PolyV1::ImageError]
|
153
|
+
attr_accessor :image_error
|
154
|
+
|
155
|
+
# Details of an error resulting from parsing an OBJ file
|
156
|
+
# Corresponds to the JSON property `objParseError`
|
157
|
+
# @return [Google::Apis::PolyV1::ObjParseError]
|
158
|
+
attr_accessor :obj_parse_error
|
159
|
+
|
160
|
+
def initialize(**args)
|
161
|
+
update!(**args)
|
162
|
+
end
|
163
|
+
|
164
|
+
# Update properties of this object
|
165
|
+
def update!(**args)
|
166
|
+
@code = args[:code] if args.key?(:code)
|
167
|
+
@file_path = args[:file_path] if args.key?(:file_path)
|
168
|
+
@image_error = args[:image_error] if args.key?(:image_error)
|
169
|
+
@obj_parse_error = args[:obj_parse_error] if args.key?(:obj_parse_error)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Represents a file in Poly, which can be a root, resource, or thumbnail file.
|
174
|
+
class File
|
175
|
+
include Google::Apis::Core::Hashable
|
176
|
+
|
177
|
+
# The MIME content-type, such as `image/png`. For more information, see [MIME
|
178
|
+
# types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
|
179
|
+
# Corresponds to the JSON property `contentType`
|
180
|
+
# @return [String]
|
181
|
+
attr_accessor :content_type
|
182
|
+
|
183
|
+
# The path of the resource file relative to the root file. For root or thumbnail
|
184
|
+
# files, this is just the filename.
|
185
|
+
# Corresponds to the JSON property `relativePath`
|
186
|
+
# @return [String]
|
187
|
+
attr_accessor :relative_path
|
188
|
+
|
189
|
+
# The URL where the file data can be retrieved.
|
190
|
+
# Corresponds to the JSON property `url`
|
191
|
+
# @return [String]
|
192
|
+
attr_accessor :url
|
193
|
+
|
194
|
+
def initialize(**args)
|
195
|
+
update!(**args)
|
196
|
+
end
|
197
|
+
|
198
|
+
# Update properties of this object
|
199
|
+
def update!(**args)
|
200
|
+
@content_type = args[:content_type] if args.key?(:content_type)
|
201
|
+
@relative_path = args[:relative_path] if args.key?(:relative_path)
|
202
|
+
@url = args[:url] if args.key?(:url)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
# The same asset can be represented in different formats, for example, a [
|
207
|
+
# WaveFront .obj](//en.wikipedia.org/wiki/Wavefront_.obj_file) file with its
|
208
|
+
# corresponding .mtl file or a [Khronos glTF](//www.khronos.org/gltf) file with
|
209
|
+
# its corresponding .glb binary data. A format refers to a specific
|
210
|
+
# representation of an asset and contains all information needed to retrieve and
|
211
|
+
# describe this representation.
|
212
|
+
class Format
|
213
|
+
include Google::Apis::Core::Hashable
|
214
|
+
|
215
|
+
# Information on the complexity of this Format.
|
216
|
+
# Corresponds to the JSON property `formatComplexity`
|
217
|
+
# @return [Google::Apis::PolyV1::FormatComplexity]
|
218
|
+
attr_accessor :format_complexity
|
219
|
+
|
220
|
+
# A short string that identifies the format type of this representation.
|
221
|
+
# Possible values are: `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.
|
222
|
+
# Corresponds to the JSON property `formatType`
|
223
|
+
# @return [String]
|
224
|
+
attr_accessor :format_type
|
225
|
+
|
226
|
+
# A list of dependencies of the root element. May include, but is not limited to,
|
227
|
+
# materials, textures, and shader programs.
|
228
|
+
# Corresponds to the JSON property `resources`
|
229
|
+
# @return [Array<Google::Apis::PolyV1::File>]
|
230
|
+
attr_accessor :resources
|
231
|
+
|
232
|
+
# Represents a file in Poly, which can be a root, resource, or thumbnail file.
|
233
|
+
# Corresponds to the JSON property `root`
|
234
|
+
# @return [Google::Apis::PolyV1::File]
|
235
|
+
attr_accessor :root
|
236
|
+
|
237
|
+
def initialize(**args)
|
238
|
+
update!(**args)
|
239
|
+
end
|
240
|
+
|
241
|
+
# Update properties of this object
|
242
|
+
def update!(**args)
|
243
|
+
@format_complexity = args[:format_complexity] if args.key?(:format_complexity)
|
244
|
+
@format_type = args[:format_type] if args.key?(:format_type)
|
245
|
+
@resources = args[:resources] if args.key?(:resources)
|
246
|
+
@root = args[:root] if args.key?(:root)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
# Information on the complexity of this Format.
|
251
|
+
class FormatComplexity
|
252
|
+
include Google::Apis::Core::Hashable
|
253
|
+
|
254
|
+
# A non-negative integer that represents the level of detail (LOD) of this
|
255
|
+
# format relative to other formats of the same asset with the same format_type.
|
256
|
+
# This hint allows you to sort formats from the most-detailed (0) to least-
|
257
|
+
# detailed (integers greater than 0).
|
258
|
+
# Corresponds to the JSON property `lodHint`
|
259
|
+
# @return [Fixnum]
|
260
|
+
attr_accessor :lod_hint
|
261
|
+
|
262
|
+
# The estimated number of triangles.
|
263
|
+
# Corresponds to the JSON property `triangleCount`
|
264
|
+
# @return [Fixnum]
|
265
|
+
attr_accessor :triangle_count
|
266
|
+
|
267
|
+
def initialize(**args)
|
268
|
+
update!(**args)
|
269
|
+
end
|
270
|
+
|
271
|
+
# Update properties of this object
|
272
|
+
def update!(**args)
|
273
|
+
@lod_hint = args[:lod_hint] if args.key?(:lod_hint)
|
274
|
+
@triangle_count = args[:triangle_count] if args.key?(:triangle_count)
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
# A message resulting from reading an image file.
|
279
|
+
class ImageError
|
280
|
+
include Google::Apis::Core::Hashable
|
281
|
+
|
282
|
+
# The type of image error encountered. Optional for older image errors.
|
283
|
+
# Corresponds to the JSON property `code`
|
284
|
+
# @return [String]
|
285
|
+
attr_accessor :code
|
286
|
+
|
287
|
+
# The file path in the import of the image that was rejected.
|
288
|
+
# Corresponds to the JSON property `filePath`
|
289
|
+
# @return [String]
|
290
|
+
attr_accessor :file_path
|
291
|
+
|
292
|
+
def initialize(**args)
|
293
|
+
update!(**args)
|
294
|
+
end
|
295
|
+
|
296
|
+
# Update properties of this object
|
297
|
+
def update!(**args)
|
298
|
+
@code = args[:code] if args.key?(:code)
|
299
|
+
@file_path = args[:file_path] if args.key?(:file_path)
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
# A response message from a request to list.
|
304
|
+
class ListAssetsResponse
|
305
|
+
include Google::Apis::Core::Hashable
|
306
|
+
|
307
|
+
# A list of assets that match the criteria specified in the request.
|
308
|
+
# Corresponds to the JSON property `assets`
|
309
|
+
# @return [Array<Google::Apis::PolyV1::Asset>]
|
310
|
+
attr_accessor :assets
|
311
|
+
|
312
|
+
# The continuation token for retrieving the next page. If empty, indicates that
|
313
|
+
# there are no more pages. To get the next page, submit the same request
|
314
|
+
# specifying this value as the page_token.
|
315
|
+
# Corresponds to the JSON property `nextPageToken`
|
316
|
+
# @return [String]
|
317
|
+
attr_accessor :next_page_token
|
318
|
+
|
319
|
+
# The total number of assets in the list, without pagination.
|
320
|
+
# Corresponds to the JSON property `totalSize`
|
321
|
+
# @return [Fixnum]
|
322
|
+
attr_accessor :total_size
|
323
|
+
|
324
|
+
def initialize(**args)
|
325
|
+
update!(**args)
|
326
|
+
end
|
327
|
+
|
328
|
+
# Update properties of this object
|
329
|
+
def update!(**args)
|
330
|
+
@assets = args[:assets] if args.key?(:assets)
|
331
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
332
|
+
@total_size = args[:total_size] if args.key?(:total_size)
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
# A response message from a request to list.
|
337
|
+
class ListLikedAssetsResponse
|
338
|
+
include Google::Apis::Core::Hashable
|
339
|
+
|
340
|
+
# A list of assets that match the criteria specified in the request.
|
341
|
+
# Corresponds to the JSON property `assets`
|
342
|
+
# @return [Array<Google::Apis::PolyV1::Asset>]
|
343
|
+
attr_accessor :assets
|
344
|
+
|
345
|
+
# The continuation token for retrieving the next page. If empty, indicates that
|
346
|
+
# there are no more pages. To get the next page, submit the same request
|
347
|
+
# specifying this value as the page_token.
|
348
|
+
# Corresponds to the JSON property `nextPageToken`
|
349
|
+
# @return [String]
|
350
|
+
attr_accessor :next_page_token
|
351
|
+
|
352
|
+
# The total number of assets in the list, without pagination.
|
353
|
+
# Corresponds to the JSON property `totalSize`
|
354
|
+
# @return [Fixnum]
|
355
|
+
attr_accessor :total_size
|
356
|
+
|
357
|
+
def initialize(**args)
|
358
|
+
update!(**args)
|
359
|
+
end
|
360
|
+
|
361
|
+
# Update properties of this object
|
362
|
+
def update!(**args)
|
363
|
+
@assets = args[:assets] if args.key?(:assets)
|
364
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
365
|
+
@total_size = args[:total_size] if args.key?(:total_size)
|
366
|
+
end
|
367
|
+
end
|
368
|
+
|
369
|
+
# A response message from a request to list.
|
370
|
+
class ListUserAssetsResponse
|
371
|
+
include Google::Apis::Core::Hashable
|
372
|
+
|
373
|
+
# The continuation token for retrieving the next page. If empty, indicates that
|
374
|
+
# there are no more pages. To get the next page, submit the same request
|
375
|
+
# specifying this value as the page_token.
|
376
|
+
# Corresponds to the JSON property `nextPageToken`
|
377
|
+
# @return [String]
|
378
|
+
attr_accessor :next_page_token
|
379
|
+
|
380
|
+
# The total number of assets in the list, without pagination.
|
381
|
+
# Corresponds to the JSON property `totalSize`
|
382
|
+
# @return [Fixnum]
|
383
|
+
attr_accessor :total_size
|
384
|
+
|
385
|
+
# A list of UserAssets matching the request.
|
386
|
+
# Corresponds to the JSON property `userAssets`
|
387
|
+
# @return [Array<Google::Apis::PolyV1::UserAsset>]
|
388
|
+
attr_accessor :user_assets
|
389
|
+
|
390
|
+
def initialize(**args)
|
391
|
+
update!(**args)
|
392
|
+
end
|
393
|
+
|
394
|
+
# Update properties of this object
|
395
|
+
def update!(**args)
|
396
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
397
|
+
@total_size = args[:total_size] if args.key?(:total_size)
|
398
|
+
@user_assets = args[:user_assets] if args.key?(:user_assets)
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
402
|
+
# Details of an error resulting from parsing an OBJ file
|
403
|
+
class ObjParseError
|
404
|
+
include Google::Apis::Core::Hashable
|
405
|
+
|
406
|
+
# The type of problem found (required).
|
407
|
+
# Corresponds to the JSON property `code`
|
408
|
+
# @return [String]
|
409
|
+
attr_accessor :code
|
410
|
+
|
411
|
+
# The ending character index at which the problem was found.
|
412
|
+
# Corresponds to the JSON property `endIndex`
|
413
|
+
# @return [Fixnum]
|
414
|
+
attr_accessor :end_index
|
415
|
+
|
416
|
+
# The file path in which the problem was found.
|
417
|
+
# Corresponds to the JSON property `filePath`
|
418
|
+
# @return [String]
|
419
|
+
attr_accessor :file_path
|
420
|
+
|
421
|
+
# The text of the line. Note that this may be truncated if the line was very
|
422
|
+
# long. This may not include the error if it occurs after line truncation.
|
423
|
+
# Corresponds to the JSON property `line`
|
424
|
+
# @return [String]
|
425
|
+
attr_accessor :line
|
426
|
+
|
427
|
+
# Line number at which the problem was found.
|
428
|
+
# Corresponds to the JSON property `lineNumber`
|
429
|
+
# @return [Fixnum]
|
430
|
+
attr_accessor :line_number
|
431
|
+
|
432
|
+
# The starting character index at which the problem was found.
|
433
|
+
# Corresponds to the JSON property `startIndex`
|
434
|
+
# @return [Fixnum]
|
435
|
+
attr_accessor :start_index
|
436
|
+
|
437
|
+
def initialize(**args)
|
438
|
+
update!(**args)
|
439
|
+
end
|
440
|
+
|
441
|
+
# Update properties of this object
|
442
|
+
def update!(**args)
|
443
|
+
@code = args[:code] if args.key?(:code)
|
444
|
+
@end_index = args[:end_index] if args.key?(:end_index)
|
445
|
+
@file_path = args[:file_path] if args.key?(:file_path)
|
446
|
+
@line = args[:line] if args.key?(:line)
|
447
|
+
@line_number = args[:line_number] if args.key?(:line_number)
|
448
|
+
@start_index = args[:start_index] if args.key?(:start_index)
|
449
|
+
end
|
450
|
+
end
|
451
|
+
|
452
|
+
# Hints for displaying the asset, based on information available when the asset
|
453
|
+
# was uploaded.
|
454
|
+
class PresentationParams
|
455
|
+
include Google::Apis::Core::Hashable
|
456
|
+
|
457
|
+
# A background color which could be used for displaying the 3D asset in a '
|
458
|
+
# thumbnail' or 'palette' style view. Authors have the option to set this
|
459
|
+
# background color when publishing or editing their asset. This is represented
|
460
|
+
# as a six-digit hexademical triplet specifying the RGB components of the
|
461
|
+
# background color, e.g. #FF0000 for Red.
|
462
|
+
# Corresponds to the JSON property `backgroundColor`
|
463
|
+
# @return [String]
|
464
|
+
attr_accessor :background_color
|
465
|
+
|
466
|
+
# The materials' diffuse/albedo color. This does not apply to vertex colors or
|
467
|
+
# texture maps.
|
468
|
+
# Corresponds to the JSON property `colorSpace`
|
469
|
+
# @return [String]
|
470
|
+
attr_accessor :color_space
|
471
|
+
|
472
|
+
# A [Quaternion](//en.wikipedia.org/wiki/Quaternion). Please note: if in the
|
473
|
+
# response you see "w: 1" and nothing else this is the default value of [0, 0, 0,
|
474
|
+
# 1] where x,y, and z are 0.
|
475
|
+
# Corresponds to the JSON property `orientingRotation`
|
476
|
+
# @return [Google::Apis::PolyV1::Quaternion]
|
477
|
+
attr_accessor :orienting_rotation
|
478
|
+
|
479
|
+
def initialize(**args)
|
480
|
+
update!(**args)
|
481
|
+
end
|
482
|
+
|
483
|
+
# Update properties of this object
|
484
|
+
def update!(**args)
|
485
|
+
@background_color = args[:background_color] if args.key?(:background_color)
|
486
|
+
@color_space = args[:color_space] if args.key?(:color_space)
|
487
|
+
@orienting_rotation = args[:orienting_rotation] if args.key?(:orienting_rotation)
|
488
|
+
end
|
489
|
+
end
|
490
|
+
|
491
|
+
# A [Quaternion](//en.wikipedia.org/wiki/Quaternion). Please note: if in the
|
492
|
+
# response you see "w: 1" and nothing else this is the default value of [0, 0, 0,
|
493
|
+
# 1] where x,y, and z are 0.
|
494
|
+
class Quaternion
|
495
|
+
include Google::Apis::Core::Hashable
|
496
|
+
|
497
|
+
# The scalar component.
|
498
|
+
# Corresponds to the JSON property `w`
|
499
|
+
# @return [Float]
|
500
|
+
attr_accessor :w
|
501
|
+
|
502
|
+
# The x component.
|
503
|
+
# Corresponds to the JSON property `x`
|
504
|
+
# @return [Float]
|
505
|
+
attr_accessor :x
|
506
|
+
|
507
|
+
# The y component.
|
508
|
+
# Corresponds to the JSON property `y`
|
509
|
+
# @return [Float]
|
510
|
+
attr_accessor :y
|
511
|
+
|
512
|
+
# The z component.
|
513
|
+
# Corresponds to the JSON property `z`
|
514
|
+
# @return [Float]
|
515
|
+
attr_accessor :z
|
516
|
+
|
517
|
+
def initialize(**args)
|
518
|
+
update!(**args)
|
519
|
+
end
|
520
|
+
|
521
|
+
# Update properties of this object
|
522
|
+
def update!(**args)
|
523
|
+
@w = args[:w] if args.key?(:w)
|
524
|
+
@x = args[:x] if args.key?(:x)
|
525
|
+
@y = args[:y] if args.key?(:y)
|
526
|
+
@z = args[:z] if args.key?(:z)
|
527
|
+
end
|
528
|
+
end
|
529
|
+
|
530
|
+
# Info about the sources of this asset (i.e. assets that were remixed to create
|
531
|
+
# this asset).
|
532
|
+
class RemixInfo
|
533
|
+
include Google::Apis::Core::Hashable
|
534
|
+
|
535
|
+
# Resource ids for the sources of this remix, of the form: `assets/`ASSET_ID``
|
536
|
+
# Corresponds to the JSON property `sourceAsset`
|
537
|
+
# @return [Array<String>]
|
538
|
+
attr_accessor :source_asset
|
539
|
+
|
540
|
+
def initialize(**args)
|
541
|
+
update!(**args)
|
542
|
+
end
|
543
|
+
|
544
|
+
# Update properties of this object
|
545
|
+
def update!(**args)
|
546
|
+
@source_asset = args[:source_asset] if args.key?(:source_asset)
|
547
|
+
end
|
548
|
+
end
|
549
|
+
|
550
|
+
# A response message from a request to startImport. This is returned in the
|
551
|
+
# response field of the Operation.
|
552
|
+
class StartAssetImportResponse
|
553
|
+
include Google::Apis::Core::Hashable
|
554
|
+
|
555
|
+
# The id of newly created asset. If this is empty when the operation is complete
|
556
|
+
# it means the import failed. Please refer to the assetImportMessages field to
|
557
|
+
# understand what went wrong.
|
558
|
+
# Corresponds to the JSON property `assetId`
|
559
|
+
# @return [String]
|
560
|
+
attr_accessor :asset_id
|
561
|
+
|
562
|
+
# The id of the asset import.
|
563
|
+
# Corresponds to the JSON property `assetImportId`
|
564
|
+
# @return [String]
|
565
|
+
attr_accessor :asset_import_id
|
566
|
+
|
567
|
+
# The message from the asset import. This will contain any warnings (or - in the
|
568
|
+
# case of failure - errors) that occurred during import.
|
569
|
+
# Corresponds to the JSON property `assetImportMessages`
|
570
|
+
# @return [Array<Google::Apis::PolyV1::AssetImportMessage>]
|
571
|
+
attr_accessor :asset_import_messages
|
572
|
+
|
573
|
+
# The publish URL for the asset.
|
574
|
+
# Corresponds to the JSON property `publishUrl`
|
575
|
+
# @return [String]
|
576
|
+
attr_accessor :publish_url
|
577
|
+
|
578
|
+
def initialize(**args)
|
579
|
+
update!(**args)
|
580
|
+
end
|
581
|
+
|
582
|
+
# Update properties of this object
|
583
|
+
def update!(**args)
|
584
|
+
@asset_id = args[:asset_id] if args.key?(:asset_id)
|
585
|
+
@asset_import_id = args[:asset_import_id] if args.key?(:asset_import_id)
|
586
|
+
@asset_import_messages = args[:asset_import_messages] if args.key?(:asset_import_messages)
|
587
|
+
@publish_url = args[:publish_url] if args.key?(:publish_url)
|
588
|
+
end
|
589
|
+
end
|
590
|
+
|
591
|
+
# Data about the user's asset.
|
592
|
+
class UserAsset
|
593
|
+
include Google::Apis::Core::Hashable
|
594
|
+
|
595
|
+
# Represents and describes an asset in the Poly library. An asset is a 3D model
|
596
|
+
# or scene created using [Tilt Brush](//www.tiltbrush.com), [Blocks](//vr.google.
|
597
|
+
# com/blocks/), or any 3D program that produces a file that can be upload to
|
598
|
+
# Poly.
|
599
|
+
# Corresponds to the JSON property `asset`
|
600
|
+
# @return [Google::Apis::PolyV1::Asset]
|
601
|
+
attr_accessor :asset
|
602
|
+
|
603
|
+
def initialize(**args)
|
604
|
+
update!(**args)
|
605
|
+
end
|
606
|
+
|
607
|
+
# Update properties of this object
|
608
|
+
def update!(**args)
|
609
|
+
@asset = args[:asset] if args.key?(:asset)
|
610
|
+
end
|
611
|
+
end
|
612
|
+
end
|
613
|
+
end
|
614
|
+
end
|