twofishes 1.0.1 → 2.0.0.pre.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/thrift/geocoder.rb +344 -0
- data/lib/thrift/geocoder_types.rb +757 -0
- data/lib/twofishes.rb +9 -5
- data/lib/twofishes/client.rb +26 -26
- data/lib/twofishes/configuration.rb +7 -5
- data/lib/twofishes/errors.rb +0 -2
- data/lib/twofishes/result.rb +24 -48
- data/lib/twofishes/underscored.rb +17 -0
- data/lib/twofishes/version.rb +1 -1
- metadata +24 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9e65b3dd584c87b027b08fcb585c60687fd6aaa
|
4
|
+
data.tar.gz: d15d6db289b07d4bd41d0fdd054705c4b9d0683a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bccfdfc82d565f6734cf32fd571b235709220ca02569ca70647822beae83ca6cc85a05fab8c6cc5947bd6a29b9d5813c9d5bda6980dd88c149e564bea5f6edf4
|
7
|
+
data.tar.gz: 632f2304f30a6bb9a76fef0654663caf4e6a9086b85f8e44631307f03e9ca085b6b6cd199994ba6c31314bdd2002ebffe2330aef7b43051ff7192bbff89fff38
|
@@ -0,0 +1,344 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.2)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
module Geocoder
|
8
|
+
class Client
|
9
|
+
include ::Thrift::Client
|
10
|
+
|
11
|
+
def geocode(r)
|
12
|
+
send_geocode(r)
|
13
|
+
return recv_geocode()
|
14
|
+
end
|
15
|
+
|
16
|
+
def send_geocode(r)
|
17
|
+
send_message('geocode', Geocode_args, :r => r)
|
18
|
+
end
|
19
|
+
|
20
|
+
def recv_geocode()
|
21
|
+
result = receive_message(Geocode_result)
|
22
|
+
return result.success unless result.success.nil?
|
23
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'geocode failed: unknown result')
|
24
|
+
end
|
25
|
+
|
26
|
+
def reverseGeocode(r)
|
27
|
+
send_reverseGeocode(r)
|
28
|
+
return recv_reverseGeocode()
|
29
|
+
end
|
30
|
+
|
31
|
+
def send_reverseGeocode(r)
|
32
|
+
send_message('reverseGeocode', ReverseGeocode_args, :r => r)
|
33
|
+
end
|
34
|
+
|
35
|
+
def recv_reverseGeocode()
|
36
|
+
result = receive_message(ReverseGeocode_result)
|
37
|
+
return result.success unless result.success.nil?
|
38
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'reverseGeocode failed: unknown result')
|
39
|
+
end
|
40
|
+
|
41
|
+
def bulkReverseGeocode(r)
|
42
|
+
send_bulkReverseGeocode(r)
|
43
|
+
return recv_bulkReverseGeocode()
|
44
|
+
end
|
45
|
+
|
46
|
+
def send_bulkReverseGeocode(r)
|
47
|
+
send_message('bulkReverseGeocode', BulkReverseGeocode_args, :r => r)
|
48
|
+
end
|
49
|
+
|
50
|
+
def recv_bulkReverseGeocode()
|
51
|
+
result = receive_message(BulkReverseGeocode_result)
|
52
|
+
return result.success unless result.success.nil?
|
53
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'bulkReverseGeocode failed: unknown result')
|
54
|
+
end
|
55
|
+
|
56
|
+
def bulkSlugLookup(r)
|
57
|
+
send_bulkSlugLookup(r)
|
58
|
+
return recv_bulkSlugLookup()
|
59
|
+
end
|
60
|
+
|
61
|
+
def send_bulkSlugLookup(r)
|
62
|
+
send_message('bulkSlugLookup', BulkSlugLookup_args, :r => r)
|
63
|
+
end
|
64
|
+
|
65
|
+
def recv_bulkSlugLookup()
|
66
|
+
result = receive_message(BulkSlugLookup_result)
|
67
|
+
return result.success unless result.success.nil?
|
68
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'bulkSlugLookup failed: unknown result')
|
69
|
+
end
|
70
|
+
|
71
|
+
def refreshStore(r)
|
72
|
+
send_refreshStore(r)
|
73
|
+
return recv_refreshStore()
|
74
|
+
end
|
75
|
+
|
76
|
+
def send_refreshStore(r)
|
77
|
+
send_message('refreshStore', RefreshStore_args, :r => r)
|
78
|
+
end
|
79
|
+
|
80
|
+
def recv_refreshStore()
|
81
|
+
result = receive_message(RefreshStore_result)
|
82
|
+
return result.success unless result.success.nil?
|
83
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'refreshStore failed: unknown result')
|
84
|
+
end
|
85
|
+
|
86
|
+
def getS2CellInfos(r)
|
87
|
+
send_getS2CellInfos(r)
|
88
|
+
return recv_getS2CellInfos()
|
89
|
+
end
|
90
|
+
|
91
|
+
def send_getS2CellInfos(r)
|
92
|
+
send_message('getS2CellInfos', GetS2CellInfos_args, :r => r)
|
93
|
+
end
|
94
|
+
|
95
|
+
def recv_getS2CellInfos()
|
96
|
+
result = receive_message(GetS2CellInfos_result)
|
97
|
+
return result.success unless result.success.nil?
|
98
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getS2CellInfos failed: unknown result')
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
class Processor
|
104
|
+
include ::Thrift::Processor
|
105
|
+
|
106
|
+
def process_geocode(seqid, iprot, oprot)
|
107
|
+
args = read_args(iprot, Geocode_args)
|
108
|
+
result = Geocode_result.new()
|
109
|
+
result.success = @handler.geocode(args.r)
|
110
|
+
write_result(result, oprot, 'geocode', seqid)
|
111
|
+
end
|
112
|
+
|
113
|
+
def process_reverseGeocode(seqid, iprot, oprot)
|
114
|
+
args = read_args(iprot, ReverseGeocode_args)
|
115
|
+
result = ReverseGeocode_result.new()
|
116
|
+
result.success = @handler.reverseGeocode(args.r)
|
117
|
+
write_result(result, oprot, 'reverseGeocode', seqid)
|
118
|
+
end
|
119
|
+
|
120
|
+
def process_bulkReverseGeocode(seqid, iprot, oprot)
|
121
|
+
args = read_args(iprot, BulkReverseGeocode_args)
|
122
|
+
result = BulkReverseGeocode_result.new()
|
123
|
+
result.success = @handler.bulkReverseGeocode(args.r)
|
124
|
+
write_result(result, oprot, 'bulkReverseGeocode', seqid)
|
125
|
+
end
|
126
|
+
|
127
|
+
def process_bulkSlugLookup(seqid, iprot, oprot)
|
128
|
+
args = read_args(iprot, BulkSlugLookup_args)
|
129
|
+
result = BulkSlugLookup_result.new()
|
130
|
+
result.success = @handler.bulkSlugLookup(args.r)
|
131
|
+
write_result(result, oprot, 'bulkSlugLookup', seqid)
|
132
|
+
end
|
133
|
+
|
134
|
+
def process_refreshStore(seqid, iprot, oprot)
|
135
|
+
args = read_args(iprot, RefreshStore_args)
|
136
|
+
result = RefreshStore_result.new()
|
137
|
+
result.success = @handler.refreshStore(args.r)
|
138
|
+
write_result(result, oprot, 'refreshStore', seqid)
|
139
|
+
end
|
140
|
+
|
141
|
+
def process_getS2CellInfos(seqid, iprot, oprot)
|
142
|
+
args = read_args(iprot, GetS2CellInfos_args)
|
143
|
+
result = GetS2CellInfos_result.new()
|
144
|
+
result.success = @handler.getS2CellInfos(args.r)
|
145
|
+
write_result(result, oprot, 'getS2CellInfos', seqid)
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
149
|
+
|
150
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
151
|
+
|
152
|
+
class Geocode_args
|
153
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
154
|
+
R = 1
|
155
|
+
|
156
|
+
FIELDS = {
|
157
|
+
R => {:type => ::Thrift::Types::STRUCT, :name => 'r', :class => ::GeocodeRequest}
|
158
|
+
}
|
159
|
+
|
160
|
+
def struct_fields; FIELDS; end
|
161
|
+
|
162
|
+
def validate
|
163
|
+
end
|
164
|
+
|
165
|
+
::Thrift::Struct.generate_accessors self
|
166
|
+
end
|
167
|
+
|
168
|
+
class Geocode_result
|
169
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
170
|
+
SUCCESS = 0
|
171
|
+
|
172
|
+
FIELDS = {
|
173
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GeocodeResponse}
|
174
|
+
}
|
175
|
+
|
176
|
+
def struct_fields; FIELDS; end
|
177
|
+
|
178
|
+
def validate
|
179
|
+
end
|
180
|
+
|
181
|
+
::Thrift::Struct.generate_accessors self
|
182
|
+
end
|
183
|
+
|
184
|
+
class ReverseGeocode_args
|
185
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
186
|
+
R = 1
|
187
|
+
|
188
|
+
FIELDS = {
|
189
|
+
R => {:type => ::Thrift::Types::STRUCT, :name => 'r', :class => ::GeocodeRequest}
|
190
|
+
}
|
191
|
+
|
192
|
+
def struct_fields; FIELDS; end
|
193
|
+
|
194
|
+
def validate
|
195
|
+
end
|
196
|
+
|
197
|
+
::Thrift::Struct.generate_accessors self
|
198
|
+
end
|
199
|
+
|
200
|
+
class ReverseGeocode_result
|
201
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
202
|
+
SUCCESS = 0
|
203
|
+
|
204
|
+
FIELDS = {
|
205
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::GeocodeResponse}
|
206
|
+
}
|
207
|
+
|
208
|
+
def struct_fields; FIELDS; end
|
209
|
+
|
210
|
+
def validate
|
211
|
+
end
|
212
|
+
|
213
|
+
::Thrift::Struct.generate_accessors self
|
214
|
+
end
|
215
|
+
|
216
|
+
class BulkReverseGeocode_args
|
217
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
218
|
+
R = 1
|
219
|
+
|
220
|
+
FIELDS = {
|
221
|
+
R => {:type => ::Thrift::Types::STRUCT, :name => 'r', :class => ::BulkReverseGeocodeRequest}
|
222
|
+
}
|
223
|
+
|
224
|
+
def struct_fields; FIELDS; end
|
225
|
+
|
226
|
+
def validate
|
227
|
+
end
|
228
|
+
|
229
|
+
::Thrift::Struct.generate_accessors self
|
230
|
+
end
|
231
|
+
|
232
|
+
class BulkReverseGeocode_result
|
233
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
234
|
+
SUCCESS = 0
|
235
|
+
|
236
|
+
FIELDS = {
|
237
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::BulkReverseGeocodeResponse}
|
238
|
+
}
|
239
|
+
|
240
|
+
def struct_fields; FIELDS; end
|
241
|
+
|
242
|
+
def validate
|
243
|
+
end
|
244
|
+
|
245
|
+
::Thrift::Struct.generate_accessors self
|
246
|
+
end
|
247
|
+
|
248
|
+
class BulkSlugLookup_args
|
249
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
250
|
+
R = 1
|
251
|
+
|
252
|
+
FIELDS = {
|
253
|
+
R => {:type => ::Thrift::Types::STRUCT, :name => 'r', :class => ::BulkSlugLookupRequest}
|
254
|
+
}
|
255
|
+
|
256
|
+
def struct_fields; FIELDS; end
|
257
|
+
|
258
|
+
def validate
|
259
|
+
end
|
260
|
+
|
261
|
+
::Thrift::Struct.generate_accessors self
|
262
|
+
end
|
263
|
+
|
264
|
+
class BulkSlugLookup_result
|
265
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
266
|
+
SUCCESS = 0
|
267
|
+
|
268
|
+
FIELDS = {
|
269
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::BulkSlugLookupResponse}
|
270
|
+
}
|
271
|
+
|
272
|
+
def struct_fields; FIELDS; end
|
273
|
+
|
274
|
+
def validate
|
275
|
+
end
|
276
|
+
|
277
|
+
::Thrift::Struct.generate_accessors self
|
278
|
+
end
|
279
|
+
|
280
|
+
class RefreshStore_args
|
281
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
282
|
+
R = 1
|
283
|
+
|
284
|
+
FIELDS = {
|
285
|
+
R => {:type => ::Thrift::Types::STRUCT, :name => 'r', :class => ::RefreshStoreRequest}
|
286
|
+
}
|
287
|
+
|
288
|
+
def struct_fields; FIELDS; end
|
289
|
+
|
290
|
+
def validate
|
291
|
+
end
|
292
|
+
|
293
|
+
::Thrift::Struct.generate_accessors self
|
294
|
+
end
|
295
|
+
|
296
|
+
class RefreshStore_result
|
297
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
298
|
+
SUCCESS = 0
|
299
|
+
|
300
|
+
FIELDS = {
|
301
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::RefreshStoreResponse}
|
302
|
+
}
|
303
|
+
|
304
|
+
def struct_fields; FIELDS; end
|
305
|
+
|
306
|
+
def validate
|
307
|
+
end
|
308
|
+
|
309
|
+
::Thrift::Struct.generate_accessors self
|
310
|
+
end
|
311
|
+
|
312
|
+
class GetS2CellInfos_args
|
313
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
314
|
+
R = 1
|
315
|
+
|
316
|
+
FIELDS = {
|
317
|
+
R => {:type => ::Thrift::Types::STRUCT, :name => 'r', :class => ::S2CellInfoRequest}
|
318
|
+
}
|
319
|
+
|
320
|
+
def struct_fields; FIELDS; end
|
321
|
+
|
322
|
+
def validate
|
323
|
+
end
|
324
|
+
|
325
|
+
::Thrift::Struct.generate_accessors self
|
326
|
+
end
|
327
|
+
|
328
|
+
class GetS2CellInfos_result
|
329
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
330
|
+
SUCCESS = 0
|
331
|
+
|
332
|
+
FIELDS = {
|
333
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::S2CellInfoResponse}
|
334
|
+
}
|
335
|
+
|
336
|
+
def struct_fields; FIELDS; end
|
337
|
+
|
338
|
+
def validate
|
339
|
+
end
|
340
|
+
|
341
|
+
::Thrift::Struct.generate_accessors self
|
342
|
+
end
|
343
|
+
|
344
|
+
end
|
@@ -0,0 +1,757 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (0.9.2)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
module YahooWoeType
|
8
|
+
UNKNOWN = 0
|
9
|
+
TOWN = 7
|
10
|
+
ADMIN1 = 8
|
11
|
+
ADMIN2 = 9
|
12
|
+
ADMIN3 = 10
|
13
|
+
POSTAL_CODE = 11
|
14
|
+
COUNTRY = 12
|
15
|
+
ISLAND = 13
|
16
|
+
AIRPORT = 14
|
17
|
+
DRAINAGE = 15
|
18
|
+
PARK = 16
|
19
|
+
POI = 20
|
20
|
+
SUBURB = 22
|
21
|
+
SPORT = 23
|
22
|
+
COLLOQUIAL = 24
|
23
|
+
ZONE = 25
|
24
|
+
HISTORICAL_STATE = 26
|
25
|
+
HISTORICAL_COUNTY = 27
|
26
|
+
CONTINENT = 29
|
27
|
+
TIMEZONE = 31
|
28
|
+
HISTORICAL_TOWN = 35
|
29
|
+
STREET = 100
|
30
|
+
VALUE_MAP = {0 => "UNKNOWN", 7 => "TOWN", 8 => "ADMIN1", 9 => "ADMIN2", 10 => "ADMIN3", 11 => "POSTAL_CODE", 12 => "COUNTRY", 13 => "ISLAND", 14 => "AIRPORT", 15 => "DRAINAGE", 16 => "PARK", 20 => "POI", 22 => "SUBURB", 23 => "SPORT", 24 => "COLLOQUIAL", 25 => "ZONE", 26 => "HISTORICAL_STATE", 27 => "HISTORICAL_COUNTY", 29 => "CONTINENT", 31 => "TIMEZONE", 35 => "HISTORICAL_TOWN", 100 => "STREET"}
|
31
|
+
VALID_VALUES = Set.new([UNKNOWN, TOWN, ADMIN1, ADMIN2, ADMIN3, POSTAL_CODE, COUNTRY, ISLAND, AIRPORT, DRAINAGE, PARK, POI, SUBURB, SPORT, COLLOQUIAL, ZONE, HISTORICAL_STATE, HISTORICAL_COUNTY, CONTINENT, TIMEZONE, HISTORICAL_TOWN, STREET]).freeze
|
32
|
+
end
|
33
|
+
|
34
|
+
module FeatureNameFlags
|
35
|
+
PREFERRED = 1
|
36
|
+
ABBREVIATION = 2
|
37
|
+
DEACCENT = 4
|
38
|
+
ALIAS = 8
|
39
|
+
LOCAL_LANG = 16
|
40
|
+
ALT_NAME = 32
|
41
|
+
COLLOQUIAL = 64
|
42
|
+
SHORT_NAME = 128
|
43
|
+
NEVER_DISPLAY = 256
|
44
|
+
LOW_QUALITY = 512
|
45
|
+
HISTORIC = 1024
|
46
|
+
UNUSED1 = 2048
|
47
|
+
UNUSED2 = 4096
|
48
|
+
UNUSED3 = 8192
|
49
|
+
UNUSED4 = 16384
|
50
|
+
VALUE_MAP = {1 => "PREFERRED", 2 => "ABBREVIATION", 4 => "DEACCENT", 8 => "ALIAS", 16 => "LOCAL_LANG", 32 => "ALT_NAME", 64 => "COLLOQUIAL", 128 => "SHORT_NAME", 256 => "NEVER_DISPLAY", 512 => "LOW_QUALITY", 1024 => "HISTORIC", 2048 => "UNUSED1", 4096 => "UNUSED2", 8192 => "UNUSED3", 16384 => "UNUSED4"}
|
51
|
+
VALID_VALUES = Set.new([PREFERRED, ABBREVIATION, DEACCENT, ALIAS, LOCAL_LANG, ALT_NAME, COLLOQUIAL, SHORT_NAME, NEVER_DISPLAY, LOW_QUALITY, HISTORIC, UNUSED1, UNUSED2, UNUSED3, UNUSED4]).freeze
|
52
|
+
end
|
53
|
+
|
54
|
+
module GeocodeRelationType
|
55
|
+
PARENT = 1
|
56
|
+
HIERARCHY = 2
|
57
|
+
VALUE_MAP = {1 => "PARENT", 2 => "HIERARCHY"}
|
58
|
+
VALID_VALUES = Set.new([PARENT, HIERARCHY]).freeze
|
59
|
+
end
|
60
|
+
|
61
|
+
module NeighborhoodType
|
62
|
+
MACRO = 2
|
63
|
+
NEIGHBORHOOD = 3
|
64
|
+
SUB = 4
|
65
|
+
VALUE_MAP = {2 => "MACRO", 3 => "NEIGHBORHOOD", 4 => "SUB"}
|
66
|
+
VALID_VALUES = Set.new([MACRO, NEIGHBORHOOD, SUB]).freeze
|
67
|
+
end
|
68
|
+
|
69
|
+
module ResponseIncludes
|
70
|
+
EVERYTHING = 0
|
71
|
+
PARENTS = 1
|
72
|
+
ALL_NAMES = 2
|
73
|
+
PARENT_ALL_NAMES = 3
|
74
|
+
WKB_GEOMETRY = 4
|
75
|
+
WKT_GEOMETRY = 5
|
76
|
+
REVGEO_COVERAGE = 6
|
77
|
+
DISPLAY_NAME = 7
|
78
|
+
WKB_GEOMETRY_SIMPLIFIED = 8
|
79
|
+
WKT_GEOMETRY_SIMPLIFIED = 9
|
80
|
+
S2_COVERING = 10
|
81
|
+
VALUE_MAP = {0 => "EVERYTHING", 1 => "PARENTS", 2 => "ALL_NAMES", 3 => "PARENT_ALL_NAMES", 4 => "WKB_GEOMETRY", 5 => "WKT_GEOMETRY", 6 => "REVGEO_COVERAGE", 7 => "DISPLAY_NAME", 8 => "WKB_GEOMETRY_SIMPLIFIED", 9 => "WKT_GEOMETRY_SIMPLIFIED", 10 => "S2_COVERING"}
|
82
|
+
VALID_VALUES = Set.new([EVERYTHING, PARENTS, ALL_NAMES, PARENT_ALL_NAMES, WKB_GEOMETRY, WKT_GEOMETRY, REVGEO_COVERAGE, DISPLAY_NAME, WKB_GEOMETRY_SIMPLIFIED, WKT_GEOMETRY_SIMPLIFIED, S2_COVERING]).freeze
|
83
|
+
end
|
84
|
+
|
85
|
+
module AutocompleteBias
|
86
|
+
NONE = 0
|
87
|
+
BALANCED = 1
|
88
|
+
LOCAL = 2
|
89
|
+
GLOBAL = 3
|
90
|
+
VALUE_MAP = {0 => "NONE", 1 => "BALANCED", 2 => "LOCAL", 3 => "GLOBAL"}
|
91
|
+
VALID_VALUES = Set.new([NONE, BALANCED, LOCAL, GLOBAL]).freeze
|
92
|
+
end
|
93
|
+
|
94
|
+
class GeocodePoint
|
95
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
96
|
+
LAT = 1
|
97
|
+
LNG = 2
|
98
|
+
|
99
|
+
FIELDS = {
|
100
|
+
LAT => {:type => ::Thrift::Types::DOUBLE, :name => 'lat'},
|
101
|
+
LNG => {:type => ::Thrift::Types::DOUBLE, :name => 'lng'}
|
102
|
+
}
|
103
|
+
|
104
|
+
def struct_fields; FIELDS; end
|
105
|
+
|
106
|
+
def validate
|
107
|
+
end
|
108
|
+
|
109
|
+
::Thrift::Struct.generate_accessors self
|
110
|
+
end
|
111
|
+
|
112
|
+
class GeocodeBoundingBox
|
113
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
114
|
+
NE = 1
|
115
|
+
SW = 2
|
116
|
+
|
117
|
+
FIELDS = {
|
118
|
+
NE => {:type => ::Thrift::Types::STRUCT, :name => 'ne', :class => ::GeocodePoint},
|
119
|
+
SW => {:type => ::Thrift::Types::STRUCT, :name => 'sw', :class => ::GeocodePoint}
|
120
|
+
}
|
121
|
+
|
122
|
+
def struct_fields; FIELDS; end
|
123
|
+
|
124
|
+
def validate
|
125
|
+
end
|
126
|
+
|
127
|
+
::Thrift::Struct.generate_accessors self
|
128
|
+
end
|
129
|
+
|
130
|
+
class FeatureId
|
131
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
132
|
+
SOURCE = 1
|
133
|
+
ID = 2
|
134
|
+
|
135
|
+
FIELDS = {
|
136
|
+
SOURCE => {:type => ::Thrift::Types::STRING, :name => 'source'},
|
137
|
+
ID => {:type => ::Thrift::Types::STRING, :name => 'id'}
|
138
|
+
}
|
139
|
+
|
140
|
+
def struct_fields; FIELDS; end
|
141
|
+
|
142
|
+
def validate
|
143
|
+
end
|
144
|
+
|
145
|
+
::Thrift::Struct.generate_accessors self
|
146
|
+
end
|
147
|
+
|
148
|
+
class FeatureName
|
149
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
150
|
+
NAME = 1
|
151
|
+
LANG = 2
|
152
|
+
FLAGS = 3
|
153
|
+
HIGHLIGHTEDNAME = 4
|
154
|
+
|
155
|
+
FIELDS = {
|
156
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
157
|
+
LANG => {:type => ::Thrift::Types::STRING, :name => 'lang'},
|
158
|
+
FLAGS => {:type => ::Thrift::Types::LIST, :name => 'flags', :default => [
|
159
|
+
], :element => {:type => ::Thrift::Types::I32, :enum_class => ::FeatureNameFlags}, :optional => true},
|
160
|
+
HIGHLIGHTEDNAME => {:type => ::Thrift::Types::STRING, :name => 'highlightedName', :optional => true}
|
161
|
+
}
|
162
|
+
|
163
|
+
def struct_fields; FIELDS; end
|
164
|
+
|
165
|
+
def validate
|
166
|
+
end
|
167
|
+
|
168
|
+
::Thrift::Struct.generate_accessors self
|
169
|
+
end
|
170
|
+
|
171
|
+
class FeatureGeometry
|
172
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
173
|
+
CENTER = 1
|
174
|
+
BOUNDS = 2
|
175
|
+
WKBGEOMETRY = 3
|
176
|
+
WKTGEOMETRY = 4
|
177
|
+
WKBGEOMETRYSIMPLIFIED = 5
|
178
|
+
WKTGEOMETRYSIMPLIFIED = 6
|
179
|
+
DISPLAYBOUNDS = 7
|
180
|
+
SOURCE = 8
|
181
|
+
S2COVERING = 9
|
182
|
+
|
183
|
+
FIELDS = {
|
184
|
+
CENTER => {:type => ::Thrift::Types::STRUCT, :name => 'center', :class => ::GeocodePoint},
|
185
|
+
BOUNDS => {:type => ::Thrift::Types::STRUCT, :name => 'bounds', :class => ::GeocodeBoundingBox, :optional => true},
|
186
|
+
WKBGEOMETRY => {:type => ::Thrift::Types::STRING, :name => 'wkbGeometry', :binary => true, :optional => true},
|
187
|
+
WKTGEOMETRY => {:type => ::Thrift::Types::STRING, :name => 'wktGeometry', :optional => true},
|
188
|
+
WKBGEOMETRYSIMPLIFIED => {:type => ::Thrift::Types::STRING, :name => 'wkbGeometrySimplified', :binary => true, :optional => true},
|
189
|
+
WKTGEOMETRYSIMPLIFIED => {:type => ::Thrift::Types::STRING, :name => 'wktGeometrySimplified', :optional => true},
|
190
|
+
DISPLAYBOUNDS => {:type => ::Thrift::Types::STRUCT, :name => 'displayBounds', :class => ::GeocodeBoundingBox, :optional => true},
|
191
|
+
SOURCE => {:type => ::Thrift::Types::STRING, :name => 'source', :optional => true},
|
192
|
+
S2COVERING => {:type => ::Thrift::Types::LIST, :name => 's2Covering', :element => {:type => ::Thrift::Types::I64}, :optional => true}
|
193
|
+
}
|
194
|
+
|
195
|
+
def struct_fields; FIELDS; end
|
196
|
+
|
197
|
+
def validate
|
198
|
+
end
|
199
|
+
|
200
|
+
::Thrift::Struct.generate_accessors self
|
201
|
+
end
|
202
|
+
|
203
|
+
class GeocodeRelation
|
204
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
205
|
+
RELATIONTYPE = 1
|
206
|
+
RELATEDID = 2
|
207
|
+
|
208
|
+
FIELDS = {
|
209
|
+
RELATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'relationType', :optional => true, :enum_class => ::GeocodeRelationType},
|
210
|
+
RELATEDID => {:type => ::Thrift::Types::STRING, :name => 'relatedId', :optional => true}
|
211
|
+
}
|
212
|
+
|
213
|
+
def struct_fields; FIELDS; end
|
214
|
+
|
215
|
+
def validate
|
216
|
+
unless @relationType.nil? || ::GeocodeRelationType::VALID_VALUES.include?(@relationType)
|
217
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field relationType!')
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
::Thrift::Struct.generate_accessors self
|
222
|
+
end
|
223
|
+
|
224
|
+
class GeocodeFeatureAttributes
|
225
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
226
|
+
ADM0CAP = 1
|
227
|
+
ADM1CAP = 2
|
228
|
+
SCALERANK = 3
|
229
|
+
LABELRANK = 4
|
230
|
+
NATSCALE = 5
|
231
|
+
POPULATION = 6
|
232
|
+
SOCIALLYRELEVANT = 7
|
233
|
+
NEIGHBORHOODTYPE = 8
|
234
|
+
URLS = 9
|
235
|
+
WORLDCITY = 10
|
236
|
+
|
237
|
+
FIELDS = {
|
238
|
+
ADM0CAP => {:type => ::Thrift::Types::BOOL, :name => 'adm0cap', :default => false, :optional => true},
|
239
|
+
ADM1CAP => {:type => ::Thrift::Types::BOOL, :name => 'adm1cap', :default => false, :optional => true},
|
240
|
+
SCALERANK => {:type => ::Thrift::Types::I32, :name => 'scalerank', :default => 20, :optional => true},
|
241
|
+
LABELRANK => {:type => ::Thrift::Types::I32, :name => 'labelrank', :default => 0, :optional => true},
|
242
|
+
NATSCALE => {:type => ::Thrift::Types::I32, :name => 'natscale', :default => 0, :optional => true},
|
243
|
+
POPULATION => {:type => ::Thrift::Types::I32, :name => 'population', :default => 0, :optional => true},
|
244
|
+
SOCIALLYRELEVANT => {:type => ::Thrift::Types::BOOL, :name => 'sociallyRelevant', :default => false, :optional => true},
|
245
|
+
NEIGHBORHOODTYPE => {:type => ::Thrift::Types::I32, :name => 'neighborhoodType', :optional => true, :enum_class => ::NeighborhoodType},
|
246
|
+
URLS => {:type => ::Thrift::Types::LIST, :name => 'urls', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
247
|
+
WORLDCITY => {:type => ::Thrift::Types::BOOL, :name => 'worldcity', :default => false, :optional => true}
|
248
|
+
}
|
249
|
+
|
250
|
+
def struct_fields; FIELDS; end
|
251
|
+
|
252
|
+
def validate
|
253
|
+
unless @neighborhoodType.nil? || ::NeighborhoodType::VALID_VALUES.include?(@neighborhoodType)
|
254
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field neighborhoodType!')
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
::Thrift::Struct.generate_accessors self
|
259
|
+
end
|
260
|
+
|
261
|
+
class ScoringFeatures
|
262
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
263
|
+
POPULATION = 1
|
264
|
+
BOOST = 2
|
265
|
+
PARENTIDS = 6
|
266
|
+
CANGEOCODE = 5
|
267
|
+
HASPOLY = 7
|
268
|
+
EXTRARELATIONIDS = 8
|
269
|
+
DEPRECATED_PARENTS = 3
|
270
|
+
|
271
|
+
FIELDS = {
|
272
|
+
POPULATION => {:type => ::Thrift::Types::I32, :name => 'population', :default => 0, :optional => true},
|
273
|
+
BOOST => {:type => ::Thrift::Types::I32, :name => 'boost', :default => 0, :optional => true},
|
274
|
+
PARENTIDS => {:type => ::Thrift::Types::LIST, :name => 'parentIds', :default => [
|
275
|
+
], :element => {:type => ::Thrift::Types::I64}, :optional => true},
|
276
|
+
CANGEOCODE => {:type => ::Thrift::Types::BOOL, :name => 'canGeocode', :default => true, :optional => true},
|
277
|
+
HASPOLY => {:type => ::Thrift::Types::BOOL, :name => 'hasPoly', :default => false, :optional => true},
|
278
|
+
EXTRARELATIONIDS => {:type => ::Thrift::Types::LIST, :name => 'extraRelationIds', :default => [
|
279
|
+
], :element => {:type => ::Thrift::Types::I64}, :optional => true},
|
280
|
+
DEPRECATED_PARENTS => {:type => ::Thrift::Types::LIST, :name => 'DEPRECATED_parents', :default => [
|
281
|
+
], :element => {:type => ::Thrift::Types::STRING}, :optional => true}
|
282
|
+
}
|
283
|
+
|
284
|
+
def struct_fields; FIELDS; end
|
285
|
+
|
286
|
+
def validate
|
287
|
+
end
|
288
|
+
|
289
|
+
::Thrift::Struct.generate_accessors self
|
290
|
+
end
|
291
|
+
|
292
|
+
class GeocodeFeature
|
293
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
294
|
+
CC = 1
|
295
|
+
GEOMETRY = 2
|
296
|
+
NAME = 3
|
297
|
+
DISPLAYNAME = 4
|
298
|
+
WOETYPE = 5
|
299
|
+
IDS = 6
|
300
|
+
NAMES = 7
|
301
|
+
ATTRIBUTION = 8
|
302
|
+
TIMEZONES = 9
|
303
|
+
HIGHLIGHTEDNAME = 11
|
304
|
+
MATCHEDNAME = 12
|
305
|
+
SLUG = 13
|
306
|
+
ID = 14
|
307
|
+
ATTRIBUTES = 15
|
308
|
+
LONGID = 16
|
309
|
+
LONGIDS = 17
|
310
|
+
PARENTIDS = 18
|
311
|
+
ROLE = 19
|
312
|
+
|
313
|
+
FIELDS = {
|
314
|
+
CC => {:type => ::Thrift::Types::STRING, :name => 'cc'},
|
315
|
+
GEOMETRY => {:type => ::Thrift::Types::STRUCT, :name => 'geometry', :class => ::FeatureGeometry},
|
316
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
|
317
|
+
DISPLAYNAME => {:type => ::Thrift::Types::STRING, :name => 'displayName', :optional => true},
|
318
|
+
WOETYPE => {:type => ::Thrift::Types::I32, :name => 'woeType', :default => 0, :optional => true, :enum_class => ::YahooWoeType},
|
319
|
+
IDS => {:type => ::Thrift::Types::LIST, :name => 'ids', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FeatureId}, :optional => true},
|
320
|
+
NAMES => {:type => ::Thrift::Types::LIST, :name => 'names', :element => {:type => ::Thrift::Types::STRUCT, :class => ::FeatureName}, :optional => true},
|
321
|
+
ATTRIBUTION => {:type => ::Thrift::Types::LIST, :name => 'attribution', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
322
|
+
TIMEZONES => {:type => ::Thrift::Types::LIST, :name => 'timezones', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
323
|
+
HIGHLIGHTEDNAME => {:type => ::Thrift::Types::STRING, :name => 'highlightedName', :optional => true},
|
324
|
+
MATCHEDNAME => {:type => ::Thrift::Types::STRING, :name => 'matchedName', :optional => true},
|
325
|
+
SLUG => {:type => ::Thrift::Types::STRING, :name => 'slug', :optional => true},
|
326
|
+
ID => {:type => ::Thrift::Types::STRING, :name => 'id', :optional => true},
|
327
|
+
ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => ::GeocodeFeatureAttributes, :optional => true},
|
328
|
+
LONGID => {:type => ::Thrift::Types::I64, :name => 'longId', :optional => true},
|
329
|
+
LONGIDS => {:type => ::Thrift::Types::LIST, :name => 'longIds', :element => {:type => ::Thrift::Types::I64}, :optional => true},
|
330
|
+
PARENTIDS => {:type => ::Thrift::Types::LIST, :name => 'parentIds', :element => {:type => ::Thrift::Types::I64}, :optional => true},
|
331
|
+
ROLE => {:type => ::Thrift::Types::I32, :name => 'role', :optional => true, :enum_class => ::YahooWoeType}
|
332
|
+
}
|
333
|
+
|
334
|
+
def struct_fields; FIELDS; end
|
335
|
+
|
336
|
+
def validate
|
337
|
+
unless @woeType.nil? || ::YahooWoeType::VALID_VALUES.include?(@woeType)
|
338
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field woeType!')
|
339
|
+
end
|
340
|
+
unless @role.nil? || ::YahooWoeType::VALID_VALUES.include?(@role)
|
341
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field role!')
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
::Thrift::Struct.generate_accessors self
|
346
|
+
end
|
347
|
+
|
348
|
+
class GeocodeFeatures
|
349
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
350
|
+
FEATURES = 1
|
351
|
+
|
352
|
+
FIELDS = {
|
353
|
+
FEATURES => {:type => ::Thrift::Types::LIST, :name => 'features', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeFeature}, :optional => true}
|
354
|
+
}
|
355
|
+
|
356
|
+
def struct_fields; FIELDS; end
|
357
|
+
|
358
|
+
def validate
|
359
|
+
end
|
360
|
+
|
361
|
+
::Thrift::Struct.generate_accessors self
|
362
|
+
end
|
363
|
+
|
364
|
+
class GeocodeServingFeature
|
365
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
366
|
+
LONGID = 5
|
367
|
+
SCORINGFEATURES = 2
|
368
|
+
FEATURE = 3
|
369
|
+
PARENTS = 4
|
370
|
+
DEPRECATED_ID = 1
|
371
|
+
|
372
|
+
FIELDS = {
|
373
|
+
LONGID => {:type => ::Thrift::Types::I64, :name => 'longId'},
|
374
|
+
SCORINGFEATURES => {:type => ::Thrift::Types::STRUCT, :name => 'scoringFeatures', :class => ::ScoringFeatures},
|
375
|
+
FEATURE => {:type => ::Thrift::Types::STRUCT, :name => 'feature', :class => ::GeocodeFeature},
|
376
|
+
PARENTS => {:type => ::Thrift::Types::LIST, :name => 'parents', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeFeature}, :optional => true},
|
377
|
+
DEPRECATED_ID => {:type => ::Thrift::Types::STRING, :name => 'DEPRECATED_id', :optional => true}
|
378
|
+
}
|
379
|
+
|
380
|
+
def struct_fields; FIELDS; end
|
381
|
+
|
382
|
+
def validate
|
383
|
+
end
|
384
|
+
|
385
|
+
::Thrift::Struct.generate_accessors self
|
386
|
+
end
|
387
|
+
|
388
|
+
class InterpretationScoringFeatures
|
389
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
390
|
+
PERCENTOFREQUESTCOVERED = 2
|
391
|
+
PERCENTOFFEATURECOVERED = 3
|
392
|
+
FEATURETOREQUESTCENTERDISTANCE = 4
|
393
|
+
|
394
|
+
FIELDS = {
|
395
|
+
PERCENTOFREQUESTCOVERED => {:type => ::Thrift::Types::DOUBLE, :name => 'percentOfRequestCovered', :default => 0, :optional => true},
|
396
|
+
PERCENTOFFEATURECOVERED => {:type => ::Thrift::Types::DOUBLE, :name => 'percentOfFeatureCovered', :default => 0, :optional => true},
|
397
|
+
FEATURETOREQUESTCENTERDISTANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'featureToRequestCenterDistance', :default => 0, :optional => true}
|
398
|
+
}
|
399
|
+
|
400
|
+
def struct_fields; FIELDS; end
|
401
|
+
|
402
|
+
def validate
|
403
|
+
end
|
404
|
+
|
405
|
+
::Thrift::Struct.generate_accessors self
|
406
|
+
end
|
407
|
+
|
408
|
+
class DebugScoreComponent
|
409
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
410
|
+
KEY = 1
|
411
|
+
VALUE = 2
|
412
|
+
|
413
|
+
FIELDS = {
|
414
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
415
|
+
VALUE => {:type => ::Thrift::Types::I32, :name => 'value'}
|
416
|
+
}
|
417
|
+
|
418
|
+
def struct_fields; FIELDS; end
|
419
|
+
|
420
|
+
def validate
|
421
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
|
422
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
|
423
|
+
end
|
424
|
+
|
425
|
+
::Thrift::Struct.generate_accessors self
|
426
|
+
end
|
427
|
+
|
428
|
+
class InterpretationDebugInfo
|
429
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
430
|
+
SCORECOMPONENTS = 1
|
431
|
+
FINALSCORE = 2
|
432
|
+
|
433
|
+
FIELDS = {
|
434
|
+
SCORECOMPONENTS => {:type => ::Thrift::Types::LIST, :name => 'scoreComponents', :element => {:type => ::Thrift::Types::STRUCT, :class => ::DebugScoreComponent}, :optional => true},
|
435
|
+
FINALSCORE => {:type => ::Thrift::Types::I32, :name => 'finalScore', :optional => true}
|
436
|
+
}
|
437
|
+
|
438
|
+
def struct_fields; FIELDS; end
|
439
|
+
|
440
|
+
def validate
|
441
|
+
end
|
442
|
+
|
443
|
+
::Thrift::Struct.generate_accessors self
|
444
|
+
end
|
445
|
+
|
446
|
+
class GeocodeInterpretation
|
447
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
448
|
+
WHAT = 1
|
449
|
+
WHERE = 2
|
450
|
+
FEATURE = 3
|
451
|
+
PARENTS = 4
|
452
|
+
SCORINGFEATURES_DEPRECATED = 5
|
453
|
+
SCORES = 6
|
454
|
+
DEBUGINFO = 7
|
455
|
+
PARENTLONGIDS = 8
|
456
|
+
|
457
|
+
FIELDS = {
|
458
|
+
WHAT => {:type => ::Thrift::Types::STRING, :name => 'what', :optional => true},
|
459
|
+
WHERE => {:type => ::Thrift::Types::STRING, :name => 'where', :optional => true},
|
460
|
+
FEATURE => {:type => ::Thrift::Types::STRUCT, :name => 'feature', :class => ::GeocodeFeature},
|
461
|
+
PARENTS => {:type => ::Thrift::Types::LIST, :name => 'parents', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeFeature}, :optional => true},
|
462
|
+
SCORINGFEATURES_DEPRECATED => {:type => ::Thrift::Types::STRUCT, :name => 'scoringFeatures_DEPRECATED', :class => ::ScoringFeatures, :optional => true},
|
463
|
+
SCORES => {:type => ::Thrift::Types::STRUCT, :name => 'scores', :class => ::InterpretationScoringFeatures, :optional => true},
|
464
|
+
DEBUGINFO => {:type => ::Thrift::Types::STRUCT, :name => 'debugInfo', :class => ::InterpretationDebugInfo, :optional => true},
|
465
|
+
PARENTLONGIDS => {:type => ::Thrift::Types::LIST, :name => 'parentLongIds', :element => {:type => ::Thrift::Types::I64}, :optional => true}
|
466
|
+
}
|
467
|
+
|
468
|
+
def struct_fields; FIELDS; end
|
469
|
+
|
470
|
+
def validate
|
471
|
+
end
|
472
|
+
|
473
|
+
::Thrift::Struct.generate_accessors self
|
474
|
+
end
|
475
|
+
|
476
|
+
class GeocodeResponse
|
477
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
478
|
+
INTERPRETATIONS = 1
|
479
|
+
DEBUGLINES = 2
|
480
|
+
REQUESTWKTGEOMETRY = 3
|
481
|
+
|
482
|
+
FIELDS = {
|
483
|
+
INTERPRETATIONS => {:type => ::Thrift::Types::LIST, :name => 'interpretations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeInterpretation}},
|
484
|
+
DEBUGLINES => {:type => ::Thrift::Types::LIST, :name => 'debugLines', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
485
|
+
REQUESTWKTGEOMETRY => {:type => ::Thrift::Types::STRING, :name => 'requestWktGeometry', :optional => true}
|
486
|
+
}
|
487
|
+
|
488
|
+
def struct_fields; FIELDS; end
|
489
|
+
|
490
|
+
def validate
|
491
|
+
end
|
492
|
+
|
493
|
+
::Thrift::Struct.generate_accessors self
|
494
|
+
end
|
495
|
+
|
496
|
+
class GeocodeRequest
|
497
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
498
|
+
QUERY = 1
|
499
|
+
CC = 2
|
500
|
+
LANG = 3
|
501
|
+
LL = 4
|
502
|
+
FULL_DEPRECATED = 5
|
503
|
+
DEBUG = 6
|
504
|
+
AUTOCOMPLETE = 7
|
505
|
+
WOEHINT = 8
|
506
|
+
WOERESTRICT = 9
|
507
|
+
BOUNDS = 10
|
508
|
+
SLUG = 11
|
509
|
+
INCLUDEPOLYGON_DEPRECATED = 12
|
510
|
+
RADIUS = 14
|
511
|
+
MAXINTERPRETATIONS = 16
|
512
|
+
ALLOWEDSOURCES = 17
|
513
|
+
RESPONSEINCLUDES = 18
|
514
|
+
STRICT = 19
|
515
|
+
AUTOCOMPLETEBIAS = 20
|
516
|
+
|
517
|
+
FIELDS = {
|
518
|
+
QUERY => {:type => ::Thrift::Types::STRING, :name => 'query', :optional => true},
|
519
|
+
CC => {:type => ::Thrift::Types::STRING, :name => 'cc', :optional => true},
|
520
|
+
LANG => {:type => ::Thrift::Types::STRING, :name => 'lang', :default => %q"en", :optional => true},
|
521
|
+
LL => {:type => ::Thrift::Types::STRUCT, :name => 'll', :class => ::GeocodePoint, :optional => true},
|
522
|
+
FULL_DEPRECATED => {:type => ::Thrift::Types::BOOL, :name => 'full_DEPRECATED', :default => false, :optional => true},
|
523
|
+
DEBUG => {:type => ::Thrift::Types::I32, :name => 'debug', :default => 0, :optional => true},
|
524
|
+
AUTOCOMPLETE => {:type => ::Thrift::Types::BOOL, :name => 'autocomplete', :default => false, :optional => true},
|
525
|
+
WOEHINT => {:type => ::Thrift::Types::LIST, :name => 'woeHint', :default => [
|
526
|
+
], :element => {:type => ::Thrift::Types::I32, :enum_class => ::YahooWoeType}, :optional => true},
|
527
|
+
WOERESTRICT => {:type => ::Thrift::Types::LIST, :name => 'woeRestrict', :default => [
|
528
|
+
], :element => {:type => ::Thrift::Types::I32, :enum_class => ::YahooWoeType}, :optional => true},
|
529
|
+
BOUNDS => {:type => ::Thrift::Types::STRUCT, :name => 'bounds', :class => ::GeocodeBoundingBox, :optional => true},
|
530
|
+
SLUG => {:type => ::Thrift::Types::STRING, :name => 'slug', :optional => true},
|
531
|
+
INCLUDEPOLYGON_DEPRECATED => {:type => ::Thrift::Types::BOOL, :name => 'includePolygon_DEPRECATED', :default => false, :optional => true},
|
532
|
+
RADIUS => {:type => ::Thrift::Types::I32, :name => 'radius', :default => 0, :optional => true},
|
533
|
+
MAXINTERPRETATIONS => {:type => ::Thrift::Types::I32, :name => 'maxInterpretations', :default => 0, :optional => true},
|
534
|
+
ALLOWEDSOURCES => {:type => ::Thrift::Types::LIST, :name => 'allowedSources', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
535
|
+
RESPONSEINCLUDES => {:type => ::Thrift::Types::LIST, :name => 'responseIncludes', :default => [
|
536
|
+
], :element => {:type => ::Thrift::Types::I32, :enum_class => ::ResponseIncludes}, :optional => true},
|
537
|
+
STRICT => {:type => ::Thrift::Types::BOOL, :name => 'strict', :default => false, :optional => true},
|
538
|
+
AUTOCOMPLETEBIAS => {:type => ::Thrift::Types::I32, :name => 'autocompleteBias', :default => 1, :optional => true, :enum_class => ::AutocompleteBias}
|
539
|
+
}
|
540
|
+
|
541
|
+
def struct_fields; FIELDS; end
|
542
|
+
|
543
|
+
def validate
|
544
|
+
unless @autocompleteBias.nil? || ::AutocompleteBias::VALID_VALUES.include?(@autocompleteBias)
|
545
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field autocompleteBias!')
|
546
|
+
end
|
547
|
+
end
|
548
|
+
|
549
|
+
::Thrift::Struct.generate_accessors self
|
550
|
+
end
|
551
|
+
|
552
|
+
class CommonGeocodeRequestParams
|
553
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
554
|
+
DEBUG = 1
|
555
|
+
WOEHINT = 2
|
556
|
+
WOERESTRICT = 3
|
557
|
+
CC = 4
|
558
|
+
LANG = 5
|
559
|
+
RESPONSEINCLUDES = 6
|
560
|
+
ALLOWEDSOURCES = 7
|
561
|
+
LLHINT = 8
|
562
|
+
BOUNDS = 9
|
563
|
+
MAXINTERPRETATIONS = 10
|
564
|
+
|
565
|
+
FIELDS = {
|
566
|
+
DEBUG => {:type => ::Thrift::Types::I32, :name => 'debug', :default => 0, :optional => true},
|
567
|
+
WOEHINT => {:type => ::Thrift::Types::LIST, :name => 'woeHint', :default => [
|
568
|
+
], :element => {:type => ::Thrift::Types::I32, :enum_class => ::YahooWoeType}, :optional => true},
|
569
|
+
WOERESTRICT => {:type => ::Thrift::Types::LIST, :name => 'woeRestrict', :default => [
|
570
|
+
], :element => {:type => ::Thrift::Types::I32, :enum_class => ::YahooWoeType}, :optional => true},
|
571
|
+
CC => {:type => ::Thrift::Types::STRING, :name => 'cc', :optional => true},
|
572
|
+
LANG => {:type => ::Thrift::Types::STRING, :name => 'lang', :default => %q"en", :optional => true},
|
573
|
+
RESPONSEINCLUDES => {:type => ::Thrift::Types::LIST, :name => 'responseIncludes', :default => [
|
574
|
+
], :element => {:type => ::Thrift::Types::I32, :enum_class => ::ResponseIncludes}, :optional => true},
|
575
|
+
ALLOWEDSOURCES => {:type => ::Thrift::Types::LIST, :name => 'allowedSources', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
576
|
+
LLHINT => {:type => ::Thrift::Types::STRUCT, :name => 'llHint', :class => ::GeocodePoint, :optional => true},
|
577
|
+
BOUNDS => {:type => ::Thrift::Types::STRUCT, :name => 'bounds', :class => ::GeocodeBoundingBox, :optional => true},
|
578
|
+
MAXINTERPRETATIONS => {:type => ::Thrift::Types::I32, :name => 'maxInterpretations', :default => 0, :optional => true}
|
579
|
+
}
|
580
|
+
|
581
|
+
def struct_fields; FIELDS; end
|
582
|
+
|
583
|
+
def validate
|
584
|
+
end
|
585
|
+
|
586
|
+
::Thrift::Struct.generate_accessors self
|
587
|
+
end
|
588
|
+
|
589
|
+
class BulkReverseGeocodeRequest
|
590
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
591
|
+
LATLNGS = 1
|
592
|
+
PARAMS = 2
|
593
|
+
|
594
|
+
FIELDS = {
|
595
|
+
LATLNGS => {:type => ::Thrift::Types::LIST, :name => 'latlngs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodePoint}, :optional => true},
|
596
|
+
PARAMS => {:type => ::Thrift::Types::STRUCT, :name => 'params', :class => ::CommonGeocodeRequestParams, :optional => true}
|
597
|
+
}
|
598
|
+
|
599
|
+
def struct_fields; FIELDS; end
|
600
|
+
|
601
|
+
def validate
|
602
|
+
end
|
603
|
+
|
604
|
+
::Thrift::Struct.generate_accessors self
|
605
|
+
end
|
606
|
+
|
607
|
+
class BulkReverseGeocodeResponse
|
608
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
609
|
+
DEPRECATED_INTERPRETATIONMAP = 1
|
610
|
+
INTERPRETATIONS = 3
|
611
|
+
INTERPRETATIONINDEXES = 4
|
612
|
+
PARENTFEATURES = 5
|
613
|
+
DEBUGLINES = 2
|
614
|
+
|
615
|
+
FIELDS = {
|
616
|
+
DEPRECATED_INTERPRETATIONMAP => {:type => ::Thrift::Types::MAP, :name => 'DEPRECATED_interpretationMap', :key => {:type => ::Thrift::Types::I32}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeInterpretation}}},
|
617
|
+
INTERPRETATIONS => {:type => ::Thrift::Types::LIST, :name => 'interpretations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeInterpretation}},
|
618
|
+
INTERPRETATIONINDEXES => {:type => ::Thrift::Types::LIST, :name => 'interpretationIndexes', :element => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::I32}}},
|
619
|
+
PARENTFEATURES => {:type => ::Thrift::Types::LIST, :name => 'parentFeatures', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeFeature}, :optional => true},
|
620
|
+
DEBUGLINES => {:type => ::Thrift::Types::LIST, :name => 'debugLines', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
|
621
|
+
}
|
622
|
+
|
623
|
+
def struct_fields; FIELDS; end
|
624
|
+
|
625
|
+
def validate
|
626
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field DEPRECATED_interpretationMap is unset!') unless @DEPRECATED_interpretationMap
|
627
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field interpretations is unset!') unless @interpretations
|
628
|
+
end
|
629
|
+
|
630
|
+
::Thrift::Struct.generate_accessors self
|
631
|
+
end
|
632
|
+
|
633
|
+
class BulkSlugLookupRequest
|
634
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
635
|
+
SLUGS = 1
|
636
|
+
PARAMS = 2
|
637
|
+
|
638
|
+
FIELDS = {
|
639
|
+
SLUGS => {:type => ::Thrift::Types::LIST, :name => 'slugs', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
640
|
+
PARAMS => {:type => ::Thrift::Types::STRUCT, :name => 'params', :class => ::CommonGeocodeRequestParams, :optional => true}
|
641
|
+
}
|
642
|
+
|
643
|
+
def struct_fields; FIELDS; end
|
644
|
+
|
645
|
+
def validate
|
646
|
+
end
|
647
|
+
|
648
|
+
::Thrift::Struct.generate_accessors self
|
649
|
+
end
|
650
|
+
|
651
|
+
class BulkSlugLookupResponse
|
652
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
653
|
+
INTERPRETATIONS = 1
|
654
|
+
INTERPRETATIONINDEXES = 2
|
655
|
+
PARENTFEATURES = 4
|
656
|
+
DEBUGLINES = 3
|
657
|
+
|
658
|
+
FIELDS = {
|
659
|
+
INTERPRETATIONS => {:type => ::Thrift::Types::LIST, :name => 'interpretations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeInterpretation}},
|
660
|
+
INTERPRETATIONINDEXES => {:type => ::Thrift::Types::LIST, :name => 'interpretationIndexes', :element => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::I32}}},
|
661
|
+
PARENTFEATURES => {:type => ::Thrift::Types::LIST, :name => 'parentFeatures', :element => {:type => ::Thrift::Types::STRUCT, :class => ::GeocodeFeature}, :optional => true},
|
662
|
+
DEBUGLINES => {:type => ::Thrift::Types::LIST, :name => 'debugLines', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
|
663
|
+
}
|
664
|
+
|
665
|
+
def struct_fields; FIELDS; end
|
666
|
+
|
667
|
+
def validate
|
668
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field interpretations is unset!') unless @interpretations
|
669
|
+
end
|
670
|
+
|
671
|
+
::Thrift::Struct.generate_accessors self
|
672
|
+
end
|
673
|
+
|
674
|
+
class RefreshStoreRequest
|
675
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
676
|
+
TOKEN = 1
|
677
|
+
|
678
|
+
FIELDS = {
|
679
|
+
TOKEN => {:type => ::Thrift::Types::STRING, :name => 'token', :optional => true}
|
680
|
+
}
|
681
|
+
|
682
|
+
def struct_fields; FIELDS; end
|
683
|
+
|
684
|
+
def validate
|
685
|
+
end
|
686
|
+
|
687
|
+
::Thrift::Struct.generate_accessors self
|
688
|
+
end
|
689
|
+
|
690
|
+
class RefreshStoreResponse
|
691
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
692
|
+
SUCCESS = 1
|
693
|
+
|
694
|
+
FIELDS = {
|
695
|
+
SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success', :optional => true}
|
696
|
+
}
|
697
|
+
|
698
|
+
def struct_fields; FIELDS; end
|
699
|
+
|
700
|
+
def validate
|
701
|
+
end
|
702
|
+
|
703
|
+
::Thrift::Struct.generate_accessors self
|
704
|
+
end
|
705
|
+
|
706
|
+
class S2CellInfoRequest
|
707
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
708
|
+
CELLIDSASSTRINGS = 1
|
709
|
+
|
710
|
+
FIELDS = {
|
711
|
+
CELLIDSASSTRINGS => {:type => ::Thrift::Types::LIST, :name => 'cellIdsAsStrings', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
|
712
|
+
}
|
713
|
+
|
714
|
+
def struct_fields; FIELDS; end
|
715
|
+
|
716
|
+
def validate
|
717
|
+
end
|
718
|
+
|
719
|
+
::Thrift::Struct.generate_accessors self
|
720
|
+
end
|
721
|
+
|
722
|
+
class S2CellIdInfo
|
723
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
724
|
+
ID = 1
|
725
|
+
LEVEL = 2
|
726
|
+
WKTGEOMETRY = 3
|
727
|
+
|
728
|
+
FIELDS = {
|
729
|
+
ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
|
730
|
+
LEVEL => {:type => ::Thrift::Types::I32, :name => 'level', :optional => true},
|
731
|
+
WKTGEOMETRY => {:type => ::Thrift::Types::STRING, :name => 'wktGeometry', :optional => true}
|
732
|
+
}
|
733
|
+
|
734
|
+
def struct_fields; FIELDS; end
|
735
|
+
|
736
|
+
def validate
|
737
|
+
end
|
738
|
+
|
739
|
+
::Thrift::Struct.generate_accessors self
|
740
|
+
end
|
741
|
+
|
742
|
+
class S2CellInfoResponse
|
743
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
744
|
+
CELLINFOS = 1
|
745
|
+
|
746
|
+
FIELDS = {
|
747
|
+
CELLINFOS => {:type => ::Thrift::Types::LIST, :name => 'cellInfos', :default => [
|
748
|
+
], :element => {:type => ::Thrift::Types::STRUCT, :class => ::S2CellIdInfo}, :optional => true}
|
749
|
+
}
|
750
|
+
|
751
|
+
def struct_fields; FIELDS; end
|
752
|
+
|
753
|
+
def validate
|
754
|
+
end
|
755
|
+
|
756
|
+
::Thrift::Struct.generate_accessors self
|
757
|
+
end
|