google-apis-vectortile_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
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
+ module Google
16
+ module Apis
17
+ module VectortileV1
18
+ # Version of the google-apis-vectortile_v1 gem
19
+ GEM_VERSION = "0.1.0"
20
+
21
+ # Version of the code generator used to generate this client
22
+ GENERATOR_VERSION = "0.1.1"
23
+
24
+ # Revision of the discovery document this client was generated from
25
+ REVISION = "20201202"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,348 @@
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 VectortileV1
24
+
25
+ class Area
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class BasemapZOrder
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class ExtrudedArea
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class Feature
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class FeatureTile
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class FirstDerivativeElevationGrid
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class Geometry
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class Line
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class ModeledVolume
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class ProviderInfo
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class Relation
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class RoadInfo
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class Row
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
103
+ class SecondDerivativeElevationGrid
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class SegmentInfo
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class TerrainTile
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
121
+ class TileCoordinates
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
127
+ class TriangleStrip
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class Vertex2DList
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
139
+ class Vertex3DList
140
+ class Representation < Google::Apis::Core::JsonRepresentation; end
141
+
142
+ include Google::Apis::Core::JsonObjectSupport
143
+ end
144
+
145
+ class Area
146
+ # @private
147
+ class Representation < Google::Apis::Core::JsonRepresentation
148
+ property :basemap_z_order, as: 'basemapZOrder', class: Google::Apis::VectortileV1::BasemapZOrder, decorator: Google::Apis::VectortileV1::BasemapZOrder::Representation
149
+
150
+ property :has_external_edges, as: 'hasExternalEdges'
151
+ collection :internal_edges, as: 'internalEdges'
152
+ collection :loop_breaks, as: 'loopBreaks'
153
+ collection :triangle_indices, as: 'triangleIndices'
154
+ property :type, as: 'type'
155
+ property :vertex_offsets, as: 'vertexOffsets', class: Google::Apis::VectortileV1::Vertex2DList, decorator: Google::Apis::VectortileV1::Vertex2DList::Representation
156
+
157
+ property :z_order, as: 'zOrder'
158
+ end
159
+ end
160
+
161
+ class BasemapZOrder
162
+ # @private
163
+ class Representation < Google::Apis::Core::JsonRepresentation
164
+ property :z_grade, as: 'zGrade'
165
+ property :z_plane, as: 'zPlane'
166
+ property :z_within_grade, as: 'zWithinGrade'
167
+ end
168
+ end
169
+
170
+ class ExtrudedArea
171
+ # @private
172
+ class Representation < Google::Apis::Core::JsonRepresentation
173
+ property :area, as: 'area', class: Google::Apis::VectortileV1::Area, decorator: Google::Apis::VectortileV1::Area::Representation
174
+
175
+ property :max_z, as: 'maxZ'
176
+ property :min_z, as: 'minZ'
177
+ end
178
+ end
179
+
180
+ class Feature
181
+ # @private
182
+ class Representation < Google::Apis::Core::JsonRepresentation
183
+ property :display_name, as: 'displayName'
184
+ property :geometry, as: 'geometry', class: Google::Apis::VectortileV1::Geometry, decorator: Google::Apis::VectortileV1::Geometry::Representation
185
+
186
+ property :place_id, as: 'placeId'
187
+ collection :relations, as: 'relations', class: Google::Apis::VectortileV1::Relation, decorator: Google::Apis::VectortileV1::Relation::Representation
188
+
189
+ property :segment_info, as: 'segmentInfo', class: Google::Apis::VectortileV1::SegmentInfo, decorator: Google::Apis::VectortileV1::SegmentInfo::Representation
190
+
191
+ property :type, as: 'type'
192
+ end
193
+ end
194
+
195
+ class FeatureTile
196
+ # @private
197
+ class Representation < Google::Apis::Core::JsonRepresentation
198
+ property :coordinates, as: 'coordinates', class: Google::Apis::VectortileV1::TileCoordinates, decorator: Google::Apis::VectortileV1::TileCoordinates::Representation
199
+
200
+ collection :features, as: 'features', class: Google::Apis::VectortileV1::Feature, decorator: Google::Apis::VectortileV1::Feature::Representation
201
+
202
+ property :name, as: 'name'
203
+ collection :providers, as: 'providers', class: Google::Apis::VectortileV1::ProviderInfo, decorator: Google::Apis::VectortileV1::ProviderInfo::Representation
204
+
205
+ property :status, as: 'status'
206
+ property :version_id, as: 'versionId'
207
+ end
208
+ end
209
+
210
+ class FirstDerivativeElevationGrid
211
+ # @private
212
+ class Representation < Google::Apis::Core::JsonRepresentation
213
+ property :altitude_multiplier, as: 'altitudeMultiplier'
214
+ collection :rows, as: 'rows', class: Google::Apis::VectortileV1::Row, decorator: Google::Apis::VectortileV1::Row::Representation
215
+
216
+ end
217
+ end
218
+
219
+ class Geometry
220
+ # @private
221
+ class Representation < Google::Apis::Core::JsonRepresentation
222
+ collection :areas, as: 'areas', class: Google::Apis::VectortileV1::Area, decorator: Google::Apis::VectortileV1::Area::Representation
223
+
224
+ collection :extruded_areas, as: 'extrudedAreas', class: Google::Apis::VectortileV1::ExtrudedArea, decorator: Google::Apis::VectortileV1::ExtrudedArea::Representation
225
+
226
+ collection :lines, as: 'lines', class: Google::Apis::VectortileV1::Line, decorator: Google::Apis::VectortileV1::Line::Representation
227
+
228
+ collection :modeled_volumes, as: 'modeledVolumes', class: Google::Apis::VectortileV1::ModeledVolume, decorator: Google::Apis::VectortileV1::ModeledVolume::Representation
229
+
230
+ end
231
+ end
232
+
233
+ class Line
234
+ # @private
235
+ class Representation < Google::Apis::Core::JsonRepresentation
236
+ property :basemap_z_order, as: 'basemapZOrder', class: Google::Apis::VectortileV1::BasemapZOrder, decorator: Google::Apis::VectortileV1::BasemapZOrder::Representation
237
+
238
+ property :vertex_offsets, as: 'vertexOffsets', class: Google::Apis::VectortileV1::Vertex2DList, decorator: Google::Apis::VectortileV1::Vertex2DList::Representation
239
+
240
+ property :z_order, as: 'zOrder'
241
+ end
242
+ end
243
+
244
+ class ModeledVolume
245
+ # @private
246
+ class Representation < Google::Apis::Core::JsonRepresentation
247
+ collection :strips, as: 'strips', class: Google::Apis::VectortileV1::TriangleStrip, decorator: Google::Apis::VectortileV1::TriangleStrip::Representation
248
+
249
+ property :vertex_offsets, as: 'vertexOffsets', class: Google::Apis::VectortileV1::Vertex3DList, decorator: Google::Apis::VectortileV1::Vertex3DList::Representation
250
+
251
+ end
252
+ end
253
+
254
+ class ProviderInfo
255
+ # @private
256
+ class Representation < Google::Apis::Core::JsonRepresentation
257
+ property :description, as: 'description'
258
+ end
259
+ end
260
+
261
+ class Relation
262
+ # @private
263
+ class Representation < Google::Apis::Core::JsonRepresentation
264
+ property :related_feature_index, as: 'relatedFeatureIndex'
265
+ property :relation_type, as: 'relationType'
266
+ end
267
+ end
268
+
269
+ class RoadInfo
270
+ # @private
271
+ class Representation < Google::Apis::Core::JsonRepresentation
272
+ property :is_private, as: 'isPrivate'
273
+ end
274
+ end
275
+
276
+ class Row
277
+ # @private
278
+ class Representation < Google::Apis::Core::JsonRepresentation
279
+ collection :altitude_diffs, as: 'altitudeDiffs'
280
+ end
281
+ end
282
+
283
+ class SecondDerivativeElevationGrid
284
+ # @private
285
+ class Representation < Google::Apis::Core::JsonRepresentation
286
+ property :altitude_multiplier, as: 'altitudeMultiplier'
287
+ property :column_count, as: 'columnCount'
288
+ property :encoded_data, :base64 => true, as: 'encodedData'
289
+ property :row_count, as: 'rowCount'
290
+ end
291
+ end
292
+
293
+ class SegmentInfo
294
+ # @private
295
+ class Representation < Google::Apis::Core::JsonRepresentation
296
+ property :road_info, as: 'roadInfo', class: Google::Apis::VectortileV1::RoadInfo, decorator: Google::Apis::VectortileV1::RoadInfo::Representation
297
+
298
+ end
299
+ end
300
+
301
+ class TerrainTile
302
+ # @private
303
+ class Representation < Google::Apis::Core::JsonRepresentation
304
+ property :coordinates, as: 'coordinates', class: Google::Apis::VectortileV1::TileCoordinates, decorator: Google::Apis::VectortileV1::TileCoordinates::Representation
305
+
306
+ property :first_derivative, as: 'firstDerivative', class: Google::Apis::VectortileV1::FirstDerivativeElevationGrid, decorator: Google::Apis::VectortileV1::FirstDerivativeElevationGrid::Representation
307
+
308
+ property :name, as: 'name'
309
+ property :second_derivative, as: 'secondDerivative', class: Google::Apis::VectortileV1::SecondDerivativeElevationGrid, decorator: Google::Apis::VectortileV1::SecondDerivativeElevationGrid::Representation
310
+
311
+ end
312
+ end
313
+
314
+ class TileCoordinates
315
+ # @private
316
+ class Representation < Google::Apis::Core::JsonRepresentation
317
+ property :x, as: 'x'
318
+ property :y, as: 'y'
319
+ property :zoom, as: 'zoom'
320
+ end
321
+ end
322
+
323
+ class TriangleStrip
324
+ # @private
325
+ class Representation < Google::Apis::Core::JsonRepresentation
326
+ collection :vertex_indices, as: 'vertexIndices'
327
+ end
328
+ end
329
+
330
+ class Vertex2DList
331
+ # @private
332
+ class Representation < Google::Apis::Core::JsonRepresentation
333
+ collection :x_offsets, as: 'xOffsets'
334
+ collection :y_offsets, as: 'yOffsets'
335
+ end
336
+ end
337
+
338
+ class Vertex3DList
339
+ # @private
340
+ class Representation < Google::Apis::Core::JsonRepresentation
341
+ collection :x_offsets, as: 'xOffsets'
342
+ collection :y_offsets, as: 'yOffsets'
343
+ collection :z_offsets, as: 'zOffsets'
344
+ end
345
+ end
346
+ end
347
+ end
348
+ end
@@ -0,0 +1,257 @@
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/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module VectortileV1
23
+ # Semantic Tile API
24
+ #
25
+ # Serves vector tiles containing geospatial data.
26
+ #
27
+ # @example
28
+ # require 'google/apis/vectortile_v1'
29
+ #
30
+ # Vectortile = Google::Apis::VectortileV1 # Alias the module
31
+ # service = Vectortile::SemanticTileService.new
32
+ #
33
+ # @see https://developers.google.com/maps/contact-sales/
34
+ class SemanticTileService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://vectortile.googleapis.com/', '',
47
+ client_name: 'google-apis-vectortile_v1',
48
+ client_version: Google::Apis::VectortileV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets a feature tile by its tile resource name.
53
+ # @param [String] name
54
+ # Required. Resource name of the tile. The tile resource name is prefixed by its
55
+ # collection ID `tiles/` followed by the resource ID, which encodes the tile's
56
+ # global x and y coordinates and zoom level as `@,,z`. For example, `tiles/@1,2,
57
+ # 3z`.
58
+ # @param [String] client_info_api_client
59
+ # API client name and version. For example, the SDK calling the API. The exact
60
+ # format is up to the client.
61
+ # @param [String] client_info_application_id
62
+ # Application ID, such as the package name on Android and the bundle identifier
63
+ # on iOS platforms.
64
+ # @param [String] client_info_application_version
65
+ # Application version number, such as "1.2.3". The exact format is application-
66
+ # dependent.
67
+ # @param [String] client_info_device_model
68
+ # Device model as reported by the device. The exact format is platform-dependent.
69
+ # @param [String] client_info_operating_system
70
+ # Operating system name and version as reported by the OS. For example, "Mac OS
71
+ # X 10.10.4". The exact format is platform-dependent.
72
+ # @param [String] client_info_platform
73
+ # Platform where the application is running.
74
+ # @param [String] client_info_user_id
75
+ # Required. A client-generated user ID. The ID should be generated and persisted
76
+ # during the first user session or whenever a pre-existing ID is not found. The
77
+ # exact format is up to the client. This must be non-empty in a
78
+ # GetFeatureTileRequest (whether via the header or GetFeatureTileRequest.
79
+ # client_info).
80
+ # @param [String] client_tile_version_id
81
+ # Optional version id identifying the tile that is already in the client's cache.
82
+ # This field should be populated with the most recent version_id value returned
83
+ # by the API for the requested tile. If the version id is empty the server
84
+ # always returns a newly rendered tile. If it is provided the server checks if
85
+ # the tile contents would be identical to one that's already on the client, and
86
+ # if so, returns a stripped-down response tile with STATUS_OK_DATA_UNCHANGED
87
+ # instead.
88
+ # @param [Boolean] enable_detailed_highway_types
89
+ # Flag indicating whether detailed highway types should be returned. If this is
90
+ # set, the CONTROLLED_ACCESS_HIGHWAY type may be returned. If not, then these
91
+ # highways will have the generic HIGHWAY type. This exists for backwards
92
+ # compatibility reasons.
93
+ # @param [Boolean] enable_feature_names
94
+ # Flag indicating whether human-readable names should be returned for features.
95
+ # If this is set, the display_name field on the feature will be filled out.
96
+ # @param [Boolean] enable_modeled_volumes
97
+ # Flag indicating whether 3D building models should be enabled. If this is set
98
+ # structures will be returned as 3D modeled volumes rather than 2.5D extruded
99
+ # areas where possible.
100
+ # @param [Boolean] enable_political_features
101
+ # Flag indicating whether political features should be returned.
102
+ # @param [Boolean] enable_private_roads
103
+ # Flag indicating whether the returned tile will contain road features that are
104
+ # marked private. Private roads are indicated by the Feature.segment_info.
105
+ # road_info.is_private field.
106
+ # @param [Boolean] enable_unclipped_buildings
107
+ # Flag indicating whether unclipped buildings should be returned. If this is set,
108
+ # building render ops will extend beyond the tile boundary. Buildings will only
109
+ # be returned on the tile that contains their centroid.
110
+ # @param [String] language_code
111
+ # Required. The BCP-47 language code corresponding to the language in which the
112
+ # name was requested, such as "en-US" or "sr-Latn". For more information, see
113
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
114
+ # @param [String] region_code
115
+ # Required. The Unicode country/region code (CLDR) of the location from which
116
+ # the request is coming from, such as "US" and "419". For more information, see
117
+ # http://www.unicode.org/reports/tr35/#unicode_region_subtag.
118
+ # @param [String] fields
119
+ # Selector specifying which fields to include in a partial response.
120
+ # @param [String] quota_user
121
+ # Available to use for quota purposes for server-side applications. Can be any
122
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
123
+ # @param [Google::Apis::RequestOptions] options
124
+ # Request-specific options
125
+ #
126
+ # @yield [result, err] Result & error if block supplied
127
+ # @yieldparam result [Google::Apis::VectortileV1::FeatureTile] parsed result object
128
+ # @yieldparam err [StandardError] error object if request failed
129
+ #
130
+ # @return [Google::Apis::VectortileV1::FeatureTile]
131
+ #
132
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
133
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
134
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
135
+ def get_featuretile(name, client_info_api_client: nil, client_info_application_id: nil, client_info_application_version: nil, client_info_device_model: nil, client_info_operating_system: nil, client_info_platform: nil, client_info_user_id: nil, client_tile_version_id: nil, enable_detailed_highway_types: nil, enable_feature_names: nil, enable_modeled_volumes: nil, enable_political_features: nil, enable_private_roads: nil, enable_unclipped_buildings: nil, language_code: nil, region_code: nil, fields: nil, quota_user: nil, options: nil, &block)
136
+ command = make_simple_command(:get, 'v1/{+name}', options)
137
+ command.response_representation = Google::Apis::VectortileV1::FeatureTile::Representation
138
+ command.response_class = Google::Apis::VectortileV1::FeatureTile
139
+ command.params['name'] = name unless name.nil?
140
+ command.query['clientInfo.apiClient'] = client_info_api_client unless client_info_api_client.nil?
141
+ command.query['clientInfo.applicationId'] = client_info_application_id unless client_info_application_id.nil?
142
+ command.query['clientInfo.applicationVersion'] = client_info_application_version unless client_info_application_version.nil?
143
+ command.query['clientInfo.deviceModel'] = client_info_device_model unless client_info_device_model.nil?
144
+ command.query['clientInfo.operatingSystem'] = client_info_operating_system unless client_info_operating_system.nil?
145
+ command.query['clientInfo.platform'] = client_info_platform unless client_info_platform.nil?
146
+ command.query['clientInfo.userId'] = client_info_user_id unless client_info_user_id.nil?
147
+ command.query['clientTileVersionId'] = client_tile_version_id unless client_tile_version_id.nil?
148
+ command.query['enableDetailedHighwayTypes'] = enable_detailed_highway_types unless enable_detailed_highway_types.nil?
149
+ command.query['enableFeatureNames'] = enable_feature_names unless enable_feature_names.nil?
150
+ command.query['enableModeledVolumes'] = enable_modeled_volumes unless enable_modeled_volumes.nil?
151
+ command.query['enablePoliticalFeatures'] = enable_political_features unless enable_political_features.nil?
152
+ command.query['enablePrivateRoads'] = enable_private_roads unless enable_private_roads.nil?
153
+ command.query['enableUnclippedBuildings'] = enable_unclipped_buildings unless enable_unclipped_buildings.nil?
154
+ command.query['languageCode'] = language_code unless language_code.nil?
155
+ command.query['regionCode'] = region_code unless region_code.nil?
156
+ command.query['fields'] = fields unless fields.nil?
157
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
158
+ execute_or_queue_command(command, &block)
159
+ end
160
+
161
+ # Gets a terrain tile by its tile resource name.
162
+ # @param [String] name
163
+ # Required. Resource name of the tile. The tile resource name is prefixed by its
164
+ # collection ID `terraintiles/` followed by the resource ID, which encodes the
165
+ # tile's global x and y coordinates and zoom level as `@,,z`. For example, `
166
+ # terraintiles/@1,2,3z`.
167
+ # @param [Fixnum] altitude_precision_centimeters
168
+ # The precision of terrain altitudes in centimeters. Possible values: between 1 (
169
+ # cm level precision) and 1,000,000 (10-kilometer level precision).
170
+ # @param [String] client_info_api_client
171
+ # API client name and version. For example, the SDK calling the API. The exact
172
+ # format is up to the client.
173
+ # @param [String] client_info_application_id
174
+ # Application ID, such as the package name on Android and the bundle identifier
175
+ # on iOS platforms.
176
+ # @param [String] client_info_application_version
177
+ # Application version number, such as "1.2.3". The exact format is application-
178
+ # dependent.
179
+ # @param [String] client_info_device_model
180
+ # Device model as reported by the device. The exact format is platform-dependent.
181
+ # @param [String] client_info_operating_system
182
+ # Operating system name and version as reported by the OS. For example, "Mac OS
183
+ # X 10.10.4". The exact format is platform-dependent.
184
+ # @param [String] client_info_platform
185
+ # Platform where the application is running.
186
+ # @param [String] client_info_user_id
187
+ # Required. A client-generated user ID. The ID should be generated and persisted
188
+ # during the first user session or whenever a pre-existing ID is not found. The
189
+ # exact format is up to the client. This must be non-empty in a
190
+ # GetFeatureTileRequest (whether via the header or GetFeatureTileRequest.
191
+ # client_info).
192
+ # @param [Fixnum] max_elevation_resolution_cells
193
+ # The maximum allowed resolution for the returned elevation heightmap. Possible
194
+ # values: between 1 and 1024 (and not less than min_elevation_resolution_cells).
195
+ # Over-sized heightmaps will be non-uniformly down-sampled such that each edge
196
+ # is no longer than this value. Non-uniformity is chosen to maximise the amount
197
+ # of preserved data. For example: Original resolution: 100px (width) * 30px (
198
+ # height) max_elevation_resolution: 30 New resolution: 30px (width) * 30px (
199
+ # height)
200
+ # @param [Fixnum] min_elevation_resolution_cells
201
+ # The minimum allowed resolution for the returned elevation heightmap. Possible
202
+ # values: between 0 and 1024 (and not more than max_elevation_resolution_cells).
203
+ # Zero is supported for backward compatibility. Under-sized heightmaps will be
204
+ # non-uniformly up-sampled such that each edge is no shorter than this value.
205
+ # Non-uniformity is chosen to maximise the amount of preserved data. For example:
206
+ # Original resolution: 30px (width) * 10px (height) min_elevation_resolution:
207
+ # 30 New resolution: 30px (width) * 30px (height)
208
+ # @param [Array<String>, String] terrain_formats
209
+ # Terrain formats that the client understands.
210
+ # @param [String] fields
211
+ # Selector specifying which fields to include in a partial response.
212
+ # @param [String] quota_user
213
+ # Available to use for quota purposes for server-side applications. Can be any
214
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
215
+ # @param [Google::Apis::RequestOptions] options
216
+ # Request-specific options
217
+ #
218
+ # @yield [result, err] Result & error if block supplied
219
+ # @yieldparam result [Google::Apis::VectortileV1::TerrainTile] parsed result object
220
+ # @yieldparam err [StandardError] error object if request failed
221
+ #
222
+ # @return [Google::Apis::VectortileV1::TerrainTile]
223
+ #
224
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
225
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
226
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
227
+ def get_terraintile(name, altitude_precision_centimeters: nil, client_info_api_client: nil, client_info_application_id: nil, client_info_application_version: nil, client_info_device_model: nil, client_info_operating_system: nil, client_info_platform: nil, client_info_user_id: nil, max_elevation_resolution_cells: nil, min_elevation_resolution_cells: nil, terrain_formats: nil, fields: nil, quota_user: nil, options: nil, &block)
228
+ command = make_simple_command(:get, 'v1/{+name}', options)
229
+ command.response_representation = Google::Apis::VectortileV1::TerrainTile::Representation
230
+ command.response_class = Google::Apis::VectortileV1::TerrainTile
231
+ command.params['name'] = name unless name.nil?
232
+ command.query['altitudePrecisionCentimeters'] = altitude_precision_centimeters unless altitude_precision_centimeters.nil?
233
+ command.query['clientInfo.apiClient'] = client_info_api_client unless client_info_api_client.nil?
234
+ command.query['clientInfo.applicationId'] = client_info_application_id unless client_info_application_id.nil?
235
+ command.query['clientInfo.applicationVersion'] = client_info_application_version unless client_info_application_version.nil?
236
+ command.query['clientInfo.deviceModel'] = client_info_device_model unless client_info_device_model.nil?
237
+ command.query['clientInfo.operatingSystem'] = client_info_operating_system unless client_info_operating_system.nil?
238
+ command.query['clientInfo.platform'] = client_info_platform unless client_info_platform.nil?
239
+ command.query['clientInfo.userId'] = client_info_user_id unless client_info_user_id.nil?
240
+ command.query['maxElevationResolutionCells'] = max_elevation_resolution_cells unless max_elevation_resolution_cells.nil?
241
+ command.query['minElevationResolutionCells'] = min_elevation_resolution_cells unless min_elevation_resolution_cells.nil?
242
+ command.query['terrainFormats'] = terrain_formats unless terrain_formats.nil?
243
+ command.query['fields'] = fields unless fields.nil?
244
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
245
+ execute_or_queue_command(command, &block)
246
+ end
247
+
248
+ protected
249
+
250
+ def apply_command_defaults(command)
251
+ command.query['key'] = key unless key.nil?
252
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
253
+ end
254
+ end
255
+ end
256
+ end
257
+ end