google-apis-discovery_v1 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fdaea404c30a4e7a1783321bf5ff9333e6b7014eea2639fb72b948b40c5e1c9c
4
+ data.tar.gz: c86bb9d20c78fca226f11c06406065b75ef0c1dc41f457ef0c36c92f134a70ee
5
+ SHA512:
6
+ metadata.gz: 85958921f094b20345d922a59b0adbd93eb60f797555834cb6c78edeebb9b49253905a370f19db83fad7718d5824b26684670af00bf702510fab2cec4e346139
7
+ data.tar.gz: 92a542c6a4df958e262d22fd5b7dde10e242aaaa13bfd5d4f3e0c44c1c79c2b9a45cc279905888fb474f13df484edac0c549935c492ad37ab4786b0b31230539
@@ -0,0 +1,12 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --markup-provider=redcarpet
5
+ --markup=markdown
6
+ --main OVERVIEW.md
7
+ lib/google/apis/discovery_v1/*.rb
8
+ lib/google/apis/discovery_v1.rb
9
+ -
10
+ OVERVIEW.md
11
+ CHANGELOG.md
12
+ LICENSE.md
@@ -0,0 +1,8 @@
1
+ # Release history for google-apis-discovery_v1
2
+
3
+ ### v0.0.1 (2021-01-01)
4
+
5
+ * Early release to bootstrap google-apis-generator gem
6
+ * Regenerated from discovery document revision 20190129
7
+ * Regenerated using generator version 0.1.0
8
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Legacy REST client for version V1 of the API Discovery Service
2
+
3
+ This is a simple client library for version V1 of the API Discovery Service. 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 considered legacy. A more modern client may be available for many Google services, especially Cloud Platform services. 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/discovery.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-discovery_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-discovery_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/discovery_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::DiscoveryV1::DiscoveryService.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 legacy 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 legacy clients in general, and their examples may not reflect the Discovery service in particular.)
67
+
68
+ For reference information on specific calls in the API Discovery Service, see the {Google::Apis::DiscoveryV1::DiscoveryService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **legacy REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-discovery_v1`, is a legacy REST client. You can identify legacy clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The legacy 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, combined with hand-crafted functionality for some services. 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 Cloud Platform services, but do not yet support all the services covered by the legacy 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 legacy 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 legacy 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/discovery/) 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/discovery_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/discovery_v1/service.rb'
16
+ require 'google/apis/discovery_v1/classes.rb'
17
+ require 'google/apis/discovery_v1/representations.rb'
18
+ require 'google/apis/discovery_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # API Discovery Service
23
+ #
24
+ # Provides information about other Google APIs, such as what APIs are available,
25
+ # the resource, and method details for each API.
26
+ #
27
+ # @see https://developers.google.com/discovery/
28
+ module DiscoveryV1
29
+ # Version of the API Discovery Service this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V1'
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,961 @@
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 DiscoveryV1
24
+
25
+ #
26
+ class DirectoryList
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Indicate the version of the Discovery API used to generate this doc.
30
+ # Corresponds to the JSON property `discoveryVersion`
31
+ # @return [String]
32
+ attr_accessor :discovery_version
33
+
34
+ # The individual directory entries. One entry per api/version pair.
35
+ # Corresponds to the JSON property `items`
36
+ # @return [Array<Google::Apis::DiscoveryV1::DirectoryList::Item>]
37
+ attr_accessor :items
38
+
39
+ # The kind for this response.
40
+ # Corresponds to the JSON property `kind`
41
+ # @return [String]
42
+ attr_accessor :kind
43
+
44
+ def initialize(**args)
45
+ update!(**args)
46
+ end
47
+
48
+ # Update properties of this object
49
+ def update!(**args)
50
+ @discovery_version = args[:discovery_version] if args.key?(:discovery_version)
51
+ @items = args[:items] if args.key?(:items)
52
+ @kind = args[:kind] if args.key?(:kind)
53
+ end
54
+
55
+ #
56
+ class Item
57
+ include Google::Apis::Core::Hashable
58
+
59
+ # The description of this API.
60
+ # Corresponds to the JSON property `description`
61
+ # @return [String]
62
+ attr_accessor :description
63
+
64
+ # A link to the discovery document.
65
+ # Corresponds to the JSON property `discoveryLink`
66
+ # @return [String]
67
+ attr_accessor :discovery_link
68
+
69
+ # The URL for the discovery REST document.
70
+ # Corresponds to the JSON property `discoveryRestUrl`
71
+ # @return [String]
72
+ attr_accessor :discovery_rest_url
73
+
74
+ # A link to human readable documentation for the API.
75
+ # Corresponds to the JSON property `documentationLink`
76
+ # @return [String]
77
+ attr_accessor :documentation_link
78
+
79
+ # Links to 16x16 and 32x32 icons representing the API.
80
+ # Corresponds to the JSON property `icons`
81
+ # @return [Google::Apis::DiscoveryV1::DirectoryList::Item::Icons]
82
+ attr_accessor :icons
83
+
84
+ # The id of this API.
85
+ # Corresponds to the JSON property `id`
86
+ # @return [String]
87
+ attr_accessor :id
88
+
89
+ # The kind for this response.
90
+ # Corresponds to the JSON property `kind`
91
+ # @return [String]
92
+ attr_accessor :kind
93
+
94
+ # Labels for the status of this API, such as labs or deprecated.
95
+ # Corresponds to the JSON property `labels`
96
+ # @return [Array<String>]
97
+ attr_accessor :labels
98
+
99
+ # The name of the API.
100
+ # Corresponds to the JSON property `name`
101
+ # @return [String]
102
+ attr_accessor :name
103
+
104
+ # True if this version is the preferred version to use.
105
+ # Corresponds to the JSON property `preferred`
106
+ # @return [Boolean]
107
+ attr_accessor :preferred
108
+ alias_method :preferred?, :preferred
109
+
110
+ # The title of this API.
111
+ # Corresponds to the JSON property `title`
112
+ # @return [String]
113
+ attr_accessor :title
114
+
115
+ # The version of the API.
116
+ # Corresponds to the JSON property `version`
117
+ # @return [String]
118
+ attr_accessor :version
119
+
120
+ def initialize(**args)
121
+ update!(**args)
122
+ end
123
+
124
+ # Update properties of this object
125
+ def update!(**args)
126
+ @description = args[:description] if args.key?(:description)
127
+ @discovery_link = args[:discovery_link] if args.key?(:discovery_link)
128
+ @discovery_rest_url = args[:discovery_rest_url] if args.key?(:discovery_rest_url)
129
+ @documentation_link = args[:documentation_link] if args.key?(:documentation_link)
130
+ @icons = args[:icons] if args.key?(:icons)
131
+ @id = args[:id] if args.key?(:id)
132
+ @kind = args[:kind] if args.key?(:kind)
133
+ @labels = args[:labels] if args.key?(:labels)
134
+ @name = args[:name] if args.key?(:name)
135
+ @preferred = args[:preferred] if args.key?(:preferred)
136
+ @title = args[:title] if args.key?(:title)
137
+ @version = args[:version] if args.key?(:version)
138
+ end
139
+
140
+ # Links to 16x16 and 32x32 icons representing the API.
141
+ class Icons
142
+ include Google::Apis::Core::Hashable
143
+
144
+ # The URL of the 16x16 icon.
145
+ # Corresponds to the JSON property `x16`
146
+ # @return [String]
147
+ attr_accessor :x16
148
+
149
+ # The URL of the 32x32 icon.
150
+ # Corresponds to the JSON property `x32`
151
+ # @return [String]
152
+ attr_accessor :x32
153
+
154
+ def initialize(**args)
155
+ update!(**args)
156
+ end
157
+
158
+ # Update properties of this object
159
+ def update!(**args)
160
+ @x16 = args[:x16] if args.key?(:x16)
161
+ @x32 = args[:x32] if args.key?(:x32)
162
+ end
163
+ end
164
+ end
165
+ end
166
+
167
+ #
168
+ class JsonSchema
169
+ include Google::Apis::Core::Hashable
170
+
171
+ # A reference to another schema. The value of this property is the "id" of
172
+ # another schema.
173
+ # Corresponds to the JSON property `$ref`
174
+ # @return [String]
175
+ attr_accessor :_ref
176
+
177
+ # If this is a schema for an object, this property is the schema for any
178
+ # additional properties with dynamic keys on this object.
179
+ # Corresponds to the JSON property `additionalProperties`
180
+ # @return [Google::Apis::DiscoveryV1::JsonSchema]
181
+ attr_accessor :additional_properties
182
+
183
+ # Additional information about this property.
184
+ # Corresponds to the JSON property `annotations`
185
+ # @return [Google::Apis::DiscoveryV1::JsonSchema::Annotations]
186
+ attr_accessor :annotations
187
+
188
+ # The default value of this property (if one exists).
189
+ # Corresponds to the JSON property `default`
190
+ # @return [String]
191
+ attr_accessor :default
192
+
193
+ # A description of this object.
194
+ # Corresponds to the JSON property `description`
195
+ # @return [String]
196
+ attr_accessor :description
197
+
198
+ # Values this parameter may take (if it is an enum).
199
+ # Corresponds to the JSON property `enum`
200
+ # @return [Array<String>]
201
+ attr_accessor :enum
202
+
203
+ # The descriptions for the enums. Each position maps to the corresponding value
204
+ # in the "enum" array.
205
+ # Corresponds to the JSON property `enumDescriptions`
206
+ # @return [Array<String>]
207
+ attr_accessor :enum_descriptions
208
+
209
+ # An additional regular expression or key that helps constrain the value. For
210
+ # more details see: http://tools.ietf.org/html/draft-zyp-json-schema-03#section-
211
+ # 5.23
212
+ # Corresponds to the JSON property `format`
213
+ # @return [String]
214
+ attr_accessor :format
215
+
216
+ # Unique identifier for this schema.
217
+ # Corresponds to the JSON property `id`
218
+ # @return [String]
219
+ attr_accessor :id
220
+
221
+ # If this is a schema for an array, this property is the schema for each element
222
+ # in the array.
223
+ # Corresponds to the JSON property `items`
224
+ # @return [Google::Apis::DiscoveryV1::JsonSchema]
225
+ attr_accessor :items
226
+
227
+ # Whether this parameter goes in the query or the path for REST requests.
228
+ # Corresponds to the JSON property `location`
229
+ # @return [String]
230
+ attr_accessor :location
231
+
232
+ # The maximum value of this parameter.
233
+ # Corresponds to the JSON property `maximum`
234
+ # @return [String]
235
+ attr_accessor :maximum
236
+
237
+ # The minimum value of this parameter.
238
+ # Corresponds to the JSON property `minimum`
239
+ # @return [String]
240
+ attr_accessor :minimum
241
+
242
+ # The regular expression this parameter must conform to. Uses Java 6 regex
243
+ # format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
244
+ # Corresponds to the JSON property `pattern`
245
+ # @return [String]
246
+ attr_accessor :pattern
247
+
248
+ # If this is a schema for an object, list the schema for each property of this
249
+ # object.
250
+ # Corresponds to the JSON property `properties`
251
+ # @return [Hash<String,Google::Apis::DiscoveryV1::JsonSchema>]
252
+ attr_accessor :properties
253
+
254
+ # The value is read-only, generated by the service. The value cannot be modified
255
+ # by the client. If the value is included in a POST, PUT, or PATCH request, it
256
+ # is ignored by the service.
257
+ # Corresponds to the JSON property `readOnly`
258
+ # @return [Boolean]
259
+ attr_accessor :read_only
260
+ alias_method :read_only?, :read_only
261
+
262
+ # Whether this parameter may appear multiple times.
263
+ # Corresponds to the JSON property `repeated`
264
+ # @return [Boolean]
265
+ attr_accessor :repeated
266
+ alias_method :repeated?, :repeated
267
+
268
+ # Whether the parameter is required.
269
+ # Corresponds to the JSON property `required`
270
+ # @return [Boolean]
271
+ attr_accessor :required
272
+ alias_method :required?, :required
273
+
274
+ # The value type for this schema. A list of values can be found here: http://
275
+ # tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
276
+ # Corresponds to the JSON property `type`
277
+ # @return [String]
278
+ attr_accessor :type
279
+
280
+ # In a variant data type, the value of one property is used to determine how to
281
+ # interpret the entire entity. Its value must exist in a map of descriminant
282
+ # values to schema names.
283
+ # Corresponds to the JSON property `variant`
284
+ # @return [Google::Apis::DiscoveryV1::JsonSchema::Variant]
285
+ attr_accessor :variant
286
+
287
+ def initialize(**args)
288
+ update!(**args)
289
+ end
290
+
291
+ # Update properties of this object
292
+ def update!(**args)
293
+ @_ref = args[:_ref] if args.key?(:_ref)
294
+ @additional_properties = args[:additional_properties] if args.key?(:additional_properties)
295
+ @annotations = args[:annotations] if args.key?(:annotations)
296
+ @default = args[:default] if args.key?(:default)
297
+ @description = args[:description] if args.key?(:description)
298
+ @enum = args[:enum] if args.key?(:enum)
299
+ @enum_descriptions = args[:enum_descriptions] if args.key?(:enum_descriptions)
300
+ @format = args[:format] if args.key?(:format)
301
+ @id = args[:id] if args.key?(:id)
302
+ @items = args[:items] if args.key?(:items)
303
+ @location = args[:location] if args.key?(:location)
304
+ @maximum = args[:maximum] if args.key?(:maximum)
305
+ @minimum = args[:minimum] if args.key?(:minimum)
306
+ @pattern = args[:pattern] if args.key?(:pattern)
307
+ @properties = args[:properties] if args.key?(:properties)
308
+ @read_only = args[:read_only] if args.key?(:read_only)
309
+ @repeated = args[:repeated] if args.key?(:repeated)
310
+ @required = args[:required] if args.key?(:required)
311
+ @type = args[:type] if args.key?(:type)
312
+ @variant = args[:variant] if args.key?(:variant)
313
+ end
314
+
315
+ # Additional information about this property.
316
+ class Annotations
317
+ include Google::Apis::Core::Hashable
318
+
319
+ # A list of methods for which this property is required on requests.
320
+ # Corresponds to the JSON property `required`
321
+ # @return [Array<String>]
322
+ attr_accessor :required
323
+
324
+ def initialize(**args)
325
+ update!(**args)
326
+ end
327
+
328
+ # Update properties of this object
329
+ def update!(**args)
330
+ @required = args[:required] if args.key?(:required)
331
+ end
332
+ end
333
+
334
+ # In a variant data type, the value of one property is used to determine how to
335
+ # interpret the entire entity. Its value must exist in a map of descriminant
336
+ # values to schema names.
337
+ class Variant
338
+ include Google::Apis::Core::Hashable
339
+
340
+ # The name of the type discriminant property.
341
+ # Corresponds to the JSON property `discriminant`
342
+ # @return [String]
343
+ attr_accessor :discriminant
344
+
345
+ # The map of discriminant value to schema to use for parsing..
346
+ # Corresponds to the JSON property `map`
347
+ # @return [Array<Google::Apis::DiscoveryV1::JsonSchema::Variant::Map>]
348
+ attr_accessor :map
349
+
350
+ def initialize(**args)
351
+ update!(**args)
352
+ end
353
+
354
+ # Update properties of this object
355
+ def update!(**args)
356
+ @discriminant = args[:discriminant] if args.key?(:discriminant)
357
+ @map = args[:map] if args.key?(:map)
358
+ end
359
+
360
+ #
361
+ class Map
362
+ include Google::Apis::Core::Hashable
363
+
364
+ #
365
+ # Corresponds to the JSON property `$ref`
366
+ # @return [String]
367
+ attr_accessor :_ref
368
+
369
+ #
370
+ # Corresponds to the JSON property `type_value`
371
+ # @return [String]
372
+ attr_accessor :type_value
373
+
374
+ def initialize(**args)
375
+ update!(**args)
376
+ end
377
+
378
+ # Update properties of this object
379
+ def update!(**args)
380
+ @_ref = args[:_ref] if args.key?(:_ref)
381
+ @type_value = args[:type_value] if args.key?(:type_value)
382
+ end
383
+ end
384
+ end
385
+ end
386
+
387
+ #
388
+ class RestDescription
389
+ include Google::Apis::Core::Hashable
390
+
391
+ # Authentication information.
392
+ # Corresponds to the JSON property `auth`
393
+ # @return [Google::Apis::DiscoveryV1::RestDescription::Auth]
394
+ attr_accessor :auth
395
+
396
+ # [DEPRECATED] The base path for REST requests.
397
+ # Corresponds to the JSON property `basePath`
398
+ # @return [String]
399
+ attr_accessor :base_path
400
+
401
+ # [DEPRECATED] The base URL for REST requests.
402
+ # Corresponds to the JSON property `baseUrl`
403
+ # @return [String]
404
+ attr_accessor :base_url
405
+
406
+ # The path for REST batch requests.
407
+ # Corresponds to the JSON property `batchPath`
408
+ # @return [String]
409
+ attr_accessor :batch_path
410
+
411
+ # Indicates how the API name should be capitalized and split into various parts.
412
+ # Useful for generating pretty class names.
413
+ # Corresponds to the JSON property `canonicalName`
414
+ # @return [String]
415
+ attr_accessor :canonical_name
416
+
417
+ # The description of this API.
418
+ # Corresponds to the JSON property `description`
419
+ # @return [String]
420
+ attr_accessor :description
421
+
422
+ # Indicate the version of the Discovery API used to generate this doc.
423
+ # Corresponds to the JSON property `discoveryVersion`
424
+ # @return [String]
425
+ attr_accessor :discovery_version
426
+
427
+ # A link to human readable documentation for the API.
428
+ # Corresponds to the JSON property `documentationLink`
429
+ # @return [String]
430
+ attr_accessor :documentation_link
431
+
432
+ # The ETag for this response.
433
+ # Corresponds to the JSON property `etag`
434
+ # @return [String]
435
+ attr_accessor :etag
436
+
437
+ # Enable exponential backoff for suitable methods in the generated clients.
438
+ # Corresponds to the JSON property `exponentialBackoffDefault`
439
+ # @return [Boolean]
440
+ attr_accessor :exponential_backoff_default
441
+ alias_method :exponential_backoff_default?, :exponential_backoff_default
442
+
443
+ # A list of supported features for this API.
444
+ # Corresponds to the JSON property `features`
445
+ # @return [Array<String>]
446
+ attr_accessor :features
447
+
448
+ # Links to 16x16 and 32x32 icons representing the API.
449
+ # Corresponds to the JSON property `icons`
450
+ # @return [Google::Apis::DiscoveryV1::RestDescription::Icons]
451
+ attr_accessor :icons
452
+
453
+ # The ID of this API.
454
+ # Corresponds to the JSON property `id`
455
+ # @return [String]
456
+ attr_accessor :id
457
+
458
+ # The kind for this response.
459
+ # Corresponds to the JSON property `kind`
460
+ # @return [String]
461
+ attr_accessor :kind
462
+
463
+ # Labels for the status of this API, such as labs or deprecated.
464
+ # Corresponds to the JSON property `labels`
465
+ # @return [Array<String>]
466
+ attr_accessor :labels
467
+
468
+ # API-level methods for this API.
469
+ # Corresponds to the JSON property `methods`
470
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestMethod>]
471
+ attr_accessor :api_methods
472
+
473
+ # The name of this API.
474
+ # Corresponds to the JSON property `name`
475
+ # @return [String]
476
+ attr_accessor :name
477
+
478
+ # The domain of the owner of this API. Together with the ownerName and a
479
+ # packagePath values, this can be used to generate a library for this API which
480
+ # would have a unique fully qualified name.
481
+ # Corresponds to the JSON property `ownerDomain`
482
+ # @return [String]
483
+ attr_accessor :owner_domain
484
+
485
+ # The name of the owner of this API. See ownerDomain.
486
+ # Corresponds to the JSON property `ownerName`
487
+ # @return [String]
488
+ attr_accessor :owner_name
489
+
490
+ # The package of the owner of this API. See ownerDomain.
491
+ # Corresponds to the JSON property `packagePath`
492
+ # @return [String]
493
+ attr_accessor :package_path
494
+
495
+ # Common parameters that apply across all apis.
496
+ # Corresponds to the JSON property `parameters`
497
+ # @return [Hash<String,Google::Apis::DiscoveryV1::JsonSchema>]
498
+ attr_accessor :parameters
499
+
500
+ # The protocol described by this document.
501
+ # Corresponds to the JSON property `protocol`
502
+ # @return [String]
503
+ attr_accessor :protocol
504
+
505
+ # The resources in this API.
506
+ # Corresponds to the JSON property `resources`
507
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestResource>]
508
+ attr_accessor :resources
509
+
510
+ # The version of this API.
511
+ # Corresponds to the JSON property `revision`
512
+ # @return [String]
513
+ attr_accessor :revision
514
+
515
+ # The root URL under which all API services live.
516
+ # Corresponds to the JSON property `rootUrl`
517
+ # @return [String]
518
+ attr_accessor :root_url
519
+
520
+ # The schemas for this API.
521
+ # Corresponds to the JSON property `schemas`
522
+ # @return [Hash<String,Google::Apis::DiscoveryV1::JsonSchema>]
523
+ attr_accessor :schemas
524
+
525
+ # The base path for all REST requests.
526
+ # Corresponds to the JSON property `servicePath`
527
+ # @return [String]
528
+ attr_accessor :service_path
529
+
530
+ # The title of this API.
531
+ # Corresponds to the JSON property `title`
532
+ # @return [String]
533
+ attr_accessor :title
534
+
535
+ # The version of this API.
536
+ # Corresponds to the JSON property `version`
537
+ # @return [String]
538
+ attr_accessor :version
539
+
540
+ #
541
+ # Corresponds to the JSON property `version_module`
542
+ # @return [Boolean]
543
+ attr_accessor :version_module
544
+ alias_method :version_module?, :version_module
545
+
546
+ def initialize(**args)
547
+ update!(**args)
548
+ end
549
+
550
+ # Update properties of this object
551
+ def update!(**args)
552
+ @auth = args[:auth] if args.key?(:auth)
553
+ @base_path = args[:base_path] if args.key?(:base_path)
554
+ @base_url = args[:base_url] if args.key?(:base_url)
555
+ @batch_path = args[:batch_path] if args.key?(:batch_path)
556
+ @canonical_name = args[:canonical_name] if args.key?(:canonical_name)
557
+ @description = args[:description] if args.key?(:description)
558
+ @discovery_version = args[:discovery_version] if args.key?(:discovery_version)
559
+ @documentation_link = args[:documentation_link] if args.key?(:documentation_link)
560
+ @etag = args[:etag] if args.key?(:etag)
561
+ @exponential_backoff_default = args[:exponential_backoff_default] if args.key?(:exponential_backoff_default)
562
+ @features = args[:features] if args.key?(:features)
563
+ @icons = args[:icons] if args.key?(:icons)
564
+ @id = args[:id] if args.key?(:id)
565
+ @kind = args[:kind] if args.key?(:kind)
566
+ @labels = args[:labels] if args.key?(:labels)
567
+ @api_methods = args[:api_methods] if args.key?(:api_methods)
568
+ @name = args[:name] if args.key?(:name)
569
+ @owner_domain = args[:owner_domain] if args.key?(:owner_domain)
570
+ @owner_name = args[:owner_name] if args.key?(:owner_name)
571
+ @package_path = args[:package_path] if args.key?(:package_path)
572
+ @parameters = args[:parameters] if args.key?(:parameters)
573
+ @protocol = args[:protocol] if args.key?(:protocol)
574
+ @resources = args[:resources] if args.key?(:resources)
575
+ @revision = args[:revision] if args.key?(:revision)
576
+ @root_url = args[:root_url] if args.key?(:root_url)
577
+ @schemas = args[:schemas] if args.key?(:schemas)
578
+ @service_path = args[:service_path] if args.key?(:service_path)
579
+ @title = args[:title] if args.key?(:title)
580
+ @version = args[:version] if args.key?(:version)
581
+ @version_module = args[:version_module] if args.key?(:version_module)
582
+ end
583
+
584
+ # Authentication information.
585
+ class Auth
586
+ include Google::Apis::Core::Hashable
587
+
588
+ # OAuth 2.0 authentication information.
589
+ # Corresponds to the JSON property `oauth2`
590
+ # @return [Google::Apis::DiscoveryV1::RestDescription::Auth::Oauth2]
591
+ attr_accessor :oauth2
592
+
593
+ def initialize(**args)
594
+ update!(**args)
595
+ end
596
+
597
+ # Update properties of this object
598
+ def update!(**args)
599
+ @oauth2 = args[:oauth2] if args.key?(:oauth2)
600
+ end
601
+
602
+ # OAuth 2.0 authentication information.
603
+ class Oauth2
604
+ include Google::Apis::Core::Hashable
605
+
606
+ # Available OAuth 2.0 scopes.
607
+ # Corresponds to the JSON property `scopes`
608
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestDescription::Auth::Oauth2::Scope>]
609
+ attr_accessor :scopes
610
+
611
+ def initialize(**args)
612
+ update!(**args)
613
+ end
614
+
615
+ # Update properties of this object
616
+ def update!(**args)
617
+ @scopes = args[:scopes] if args.key?(:scopes)
618
+ end
619
+
620
+ # The scope value.
621
+ class Scope
622
+ include Google::Apis::Core::Hashable
623
+
624
+ # Description of scope.
625
+ # Corresponds to the JSON property `description`
626
+ # @return [String]
627
+ attr_accessor :description
628
+
629
+ def initialize(**args)
630
+ update!(**args)
631
+ end
632
+
633
+ # Update properties of this object
634
+ def update!(**args)
635
+ @description = args[:description] if args.key?(:description)
636
+ end
637
+ end
638
+ end
639
+ end
640
+
641
+ # Links to 16x16 and 32x32 icons representing the API.
642
+ class Icons
643
+ include Google::Apis::Core::Hashable
644
+
645
+ # The URL of the 16x16 icon.
646
+ # Corresponds to the JSON property `x16`
647
+ # @return [String]
648
+ attr_accessor :x16
649
+
650
+ # The URL of the 32x32 icon.
651
+ # Corresponds to the JSON property `x32`
652
+ # @return [String]
653
+ attr_accessor :x32
654
+
655
+ def initialize(**args)
656
+ update!(**args)
657
+ end
658
+
659
+ # Update properties of this object
660
+ def update!(**args)
661
+ @x16 = args[:x16] if args.key?(:x16)
662
+ @x32 = args[:x32] if args.key?(:x32)
663
+ end
664
+ end
665
+ end
666
+
667
+ #
668
+ class RestMethod
669
+ include Google::Apis::Core::Hashable
670
+
671
+ # Description of this method.
672
+ # Corresponds to the JSON property `description`
673
+ # @return [String]
674
+ attr_accessor :description
675
+
676
+ # Whether this method requires an ETag to be specified. The ETag is sent as an
677
+ # HTTP If-Match or If-None-Match header.
678
+ # Corresponds to the JSON property `etagRequired`
679
+ # @return [Boolean]
680
+ attr_accessor :etag_required
681
+ alias_method :etag_required?, :etag_required
682
+
683
+ # HTTP method used by this method.
684
+ # Corresponds to the JSON property `httpMethod`
685
+ # @return [String]
686
+ attr_accessor :http_method
687
+
688
+ # A unique ID for this method. This property can be used to match methods
689
+ # between different versions of Discovery.
690
+ # Corresponds to the JSON property `id`
691
+ # @return [String]
692
+ attr_accessor :id
693
+
694
+ # Media upload parameters.
695
+ # Corresponds to the JSON property `mediaUpload`
696
+ # @return [Google::Apis::DiscoveryV1::RestMethod::MediaUpload]
697
+ attr_accessor :media_upload
698
+
699
+ # Ordered list of required parameters, serves as a hint to clients on how to
700
+ # structure their method signatures. The array is ordered such that the "most-
701
+ # significant" parameter appears first.
702
+ # Corresponds to the JSON property `parameterOrder`
703
+ # @return [Array<String>]
704
+ attr_accessor :parameter_order
705
+
706
+ # Details for all parameters in this method.
707
+ # Corresponds to the JSON property `parameters`
708
+ # @return [Hash<String,Google::Apis::DiscoveryV1::JsonSchema>]
709
+ attr_accessor :parameters
710
+
711
+ # The URI path of this REST method. Should be used in conjunction with the
712
+ # basePath property at the api-level.
713
+ # Corresponds to the JSON property `path`
714
+ # @return [String]
715
+ attr_accessor :path
716
+
717
+ # The schema for the request.
718
+ # Corresponds to the JSON property `request`
719
+ # @return [Google::Apis::DiscoveryV1::RestMethod::Request]
720
+ attr_accessor :request
721
+
722
+ # The schema for the response.
723
+ # Corresponds to the JSON property `response`
724
+ # @return [Google::Apis::DiscoveryV1::RestMethod::Response]
725
+ attr_accessor :response
726
+
727
+ # OAuth 2.0 scopes applicable to this method.
728
+ # Corresponds to the JSON property `scopes`
729
+ # @return [Array<String>]
730
+ attr_accessor :scopes
731
+
732
+ # Whether this method supports media downloads.
733
+ # Corresponds to the JSON property `supportsMediaDownload`
734
+ # @return [Boolean]
735
+ attr_accessor :supports_media_download
736
+ alias_method :supports_media_download?, :supports_media_download
737
+
738
+ # Whether this method supports media uploads.
739
+ # Corresponds to the JSON property `supportsMediaUpload`
740
+ # @return [Boolean]
741
+ attr_accessor :supports_media_upload
742
+ alias_method :supports_media_upload?, :supports_media_upload
743
+
744
+ # Whether this method supports subscriptions.
745
+ # Corresponds to the JSON property `supportsSubscription`
746
+ # @return [Boolean]
747
+ attr_accessor :supports_subscription
748
+ alias_method :supports_subscription?, :supports_subscription
749
+
750
+ # Indicates that downloads from this method should use the download service URL (
751
+ # i.e. "/download"). Only applies if the method supports media download.
752
+ # Corresponds to the JSON property `useMediaDownloadService`
753
+ # @return [Boolean]
754
+ attr_accessor :use_media_download_service
755
+ alias_method :use_media_download_service?, :use_media_download_service
756
+
757
+ def initialize(**args)
758
+ update!(**args)
759
+ end
760
+
761
+ # Update properties of this object
762
+ def update!(**args)
763
+ @description = args[:description] if args.key?(:description)
764
+ @etag_required = args[:etag_required] if args.key?(:etag_required)
765
+ @http_method = args[:http_method] if args.key?(:http_method)
766
+ @id = args[:id] if args.key?(:id)
767
+ @media_upload = args[:media_upload] if args.key?(:media_upload)
768
+ @parameter_order = args[:parameter_order] if args.key?(:parameter_order)
769
+ @parameters = args[:parameters] if args.key?(:parameters)
770
+ @path = args[:path] if args.key?(:path)
771
+ @request = args[:request] if args.key?(:request)
772
+ @response = args[:response] if args.key?(:response)
773
+ @scopes = args[:scopes] if args.key?(:scopes)
774
+ @supports_media_download = args[:supports_media_download] if args.key?(:supports_media_download)
775
+ @supports_media_upload = args[:supports_media_upload] if args.key?(:supports_media_upload)
776
+ @supports_subscription = args[:supports_subscription] if args.key?(:supports_subscription)
777
+ @use_media_download_service = args[:use_media_download_service] if args.key?(:use_media_download_service)
778
+ end
779
+
780
+ # Media upload parameters.
781
+ class MediaUpload
782
+ include Google::Apis::Core::Hashable
783
+
784
+ # MIME Media Ranges for acceptable media uploads to this method.
785
+ # Corresponds to the JSON property `accept`
786
+ # @return [Array<String>]
787
+ attr_accessor :accept
788
+
789
+ # Maximum size of a media upload, such as "1MB", "2GB" or "3TB".
790
+ # Corresponds to the JSON property `maxSize`
791
+ # @return [String]
792
+ attr_accessor :max_size
793
+
794
+ # Supported upload protocols.
795
+ # Corresponds to the JSON property `protocols`
796
+ # @return [Google::Apis::DiscoveryV1::RestMethod::MediaUpload::Protocols]
797
+ attr_accessor :protocols
798
+
799
+ def initialize(**args)
800
+ update!(**args)
801
+ end
802
+
803
+ # Update properties of this object
804
+ def update!(**args)
805
+ @accept = args[:accept] if args.key?(:accept)
806
+ @max_size = args[:max_size] if args.key?(:max_size)
807
+ @protocols = args[:protocols] if args.key?(:protocols)
808
+ end
809
+
810
+ # Supported upload protocols.
811
+ class Protocols
812
+ include Google::Apis::Core::Hashable
813
+
814
+ # Supports the Resumable Media Upload protocol.
815
+ # Corresponds to the JSON property `resumable`
816
+ # @return [Google::Apis::DiscoveryV1::RestMethod::MediaUpload::Protocols::Resumable]
817
+ attr_accessor :resumable
818
+
819
+ # Supports uploading as a single HTTP request.
820
+ # Corresponds to the JSON property `simple`
821
+ # @return [Google::Apis::DiscoveryV1::RestMethod::MediaUpload::Protocols::Simple]
822
+ attr_accessor :simple
823
+
824
+ def initialize(**args)
825
+ update!(**args)
826
+ end
827
+
828
+ # Update properties of this object
829
+ def update!(**args)
830
+ @resumable = args[:resumable] if args.key?(:resumable)
831
+ @simple = args[:simple] if args.key?(:simple)
832
+ end
833
+
834
+ # Supports the Resumable Media Upload protocol.
835
+ class Resumable
836
+ include Google::Apis::Core::Hashable
837
+
838
+ # True if this endpoint supports uploading multipart media.
839
+ # Corresponds to the JSON property `multipart`
840
+ # @return [Boolean]
841
+ attr_accessor :multipart
842
+ alias_method :multipart?, :multipart
843
+
844
+ # The URI path to be used for upload. Should be used in conjunction with the
845
+ # basePath property at the api-level.
846
+ # Corresponds to the JSON property `path`
847
+ # @return [String]
848
+ attr_accessor :path
849
+
850
+ def initialize(**args)
851
+ update!(**args)
852
+ end
853
+
854
+ # Update properties of this object
855
+ def update!(**args)
856
+ @multipart = args[:multipart] if args.key?(:multipart)
857
+ @path = args[:path] if args.key?(:path)
858
+ end
859
+ end
860
+
861
+ # Supports uploading as a single HTTP request.
862
+ class Simple
863
+ include Google::Apis::Core::Hashable
864
+
865
+ # True if this endpoint supports upload multipart media.
866
+ # Corresponds to the JSON property `multipart`
867
+ # @return [Boolean]
868
+ attr_accessor :multipart
869
+ alias_method :multipart?, :multipart
870
+
871
+ # The URI path to be used for upload. Should be used in conjunction with the
872
+ # basePath property at the api-level.
873
+ # Corresponds to the JSON property `path`
874
+ # @return [String]
875
+ attr_accessor :path
876
+
877
+ def initialize(**args)
878
+ update!(**args)
879
+ end
880
+
881
+ # Update properties of this object
882
+ def update!(**args)
883
+ @multipart = args[:multipart] if args.key?(:multipart)
884
+ @path = args[:path] if args.key?(:path)
885
+ end
886
+ end
887
+ end
888
+ end
889
+
890
+ # The schema for the request.
891
+ class Request
892
+ include Google::Apis::Core::Hashable
893
+
894
+ # Schema ID for the request schema.
895
+ # Corresponds to the JSON property `$ref`
896
+ # @return [String]
897
+ attr_accessor :_ref
898
+
899
+ # parameter name.
900
+ # Corresponds to the JSON property `parameterName`
901
+ # @return [String]
902
+ attr_accessor :parameter_name
903
+
904
+ def initialize(**args)
905
+ update!(**args)
906
+ end
907
+
908
+ # Update properties of this object
909
+ def update!(**args)
910
+ @_ref = args[:_ref] if args.key?(:_ref)
911
+ @parameter_name = args[:parameter_name] if args.key?(:parameter_name)
912
+ end
913
+ end
914
+
915
+ # The schema for the response.
916
+ class Response
917
+ include Google::Apis::Core::Hashable
918
+
919
+ # Schema ID for the response schema.
920
+ # Corresponds to the JSON property `$ref`
921
+ # @return [String]
922
+ attr_accessor :_ref
923
+
924
+ def initialize(**args)
925
+ update!(**args)
926
+ end
927
+
928
+ # Update properties of this object
929
+ def update!(**args)
930
+ @_ref = args[:_ref] if args.key?(:_ref)
931
+ end
932
+ end
933
+ end
934
+
935
+ #
936
+ class RestResource
937
+ include Google::Apis::Core::Hashable
938
+
939
+ # Methods on this resource.
940
+ # Corresponds to the JSON property `methods`
941
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestMethod>]
942
+ attr_accessor :api_methods
943
+
944
+ # Sub-resources on this resource.
945
+ # Corresponds to the JSON property `resources`
946
+ # @return [Hash<String,Google::Apis::DiscoveryV1::RestResource>]
947
+ attr_accessor :resources
948
+
949
+ def initialize(**args)
950
+ update!(**args)
951
+ end
952
+
953
+ # Update properties of this object
954
+ def update!(**args)
955
+ @api_methods = args[:api_methods] if args.key?(:api_methods)
956
+ @resources = args[:resources] if args.key?(:resources)
957
+ end
958
+ end
959
+ end
960
+ end
961
+ end