1package entitysearch
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"encoding/json"
22	"github.com/Azure/go-autorest/autorest"
23)
24
25// The package's fully qualified name.
26const fqdn = "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/entitysearch"
27
28// AnswerType enumerates the values for answer type.
29type AnswerType string
30
31const (
32	// AnswerTypeEntities ...
33	AnswerTypeEntities AnswerType = "Entities"
34	// AnswerTypePlaces ...
35	AnswerTypePlaces AnswerType = "Places"
36)
37
38// PossibleAnswerTypeValues returns an array of possible values for the AnswerType const type.
39func PossibleAnswerTypeValues() []AnswerType {
40	return []AnswerType{AnswerTypeEntities, AnswerTypePlaces}
41}
42
43// EntityQueryScenario enumerates the values for entity query scenario.
44type EntityQueryScenario string
45
46const (
47	// Disambiguation ...
48	Disambiguation EntityQueryScenario = "Disambiguation"
49	// DominantEntity ...
50	DominantEntity EntityQueryScenario = "DominantEntity"
51	// DominantEntityWithDisambiguation ...
52	DominantEntityWithDisambiguation EntityQueryScenario = "DominantEntityWithDisambiguation"
53	// List ...
54	List EntityQueryScenario = "List"
55	// ListWithPivot ...
56	ListWithPivot EntityQueryScenario = "ListWithPivot"
57)
58
59// PossibleEntityQueryScenarioValues returns an array of possible values for the EntityQueryScenario const type.
60func PossibleEntityQueryScenarioValues() []EntityQueryScenario {
61	return []EntityQueryScenario{Disambiguation, DominantEntity, DominantEntityWithDisambiguation, List, ListWithPivot}
62}
63
64// EntityScenario enumerates the values for entity scenario.
65type EntityScenario string
66
67const (
68	// EntityScenarioDisambiguationItem ...
69	EntityScenarioDisambiguationItem EntityScenario = "DisambiguationItem"
70	// EntityScenarioDominantEntity ...
71	EntityScenarioDominantEntity EntityScenario = "DominantEntity"
72	// EntityScenarioListItem ...
73	EntityScenarioListItem EntityScenario = "ListItem"
74)
75
76// PossibleEntityScenarioValues returns an array of possible values for the EntityScenario const type.
77func PossibleEntityScenarioValues() []EntityScenario {
78	return []EntityScenario{EntityScenarioDisambiguationItem, EntityScenarioDominantEntity, EntityScenarioListItem}
79}
80
81// EntityType enumerates the values for entity type.
82type EntityType string
83
84const (
85	// EntityTypeActor ...
86	EntityTypeActor EntityType = "Actor"
87	// EntityTypeAnimal ...
88	EntityTypeAnimal EntityType = "Animal"
89	// EntityTypeArtist ...
90	EntityTypeArtist EntityType = "Artist"
91	// EntityTypeAttorney ...
92	EntityTypeAttorney EntityType = "Attorney"
93	// EntityTypeAttraction ...
94	EntityTypeAttraction EntityType = "Attraction"
95	// EntityTypeBook ...
96	EntityTypeBook EntityType = "Book"
97	// EntityTypeCar ...
98	EntityTypeCar EntityType = "Car"
99	// EntityTypeCity ...
100	EntityTypeCity EntityType = "City"
101	// EntityTypeCollegeOrUniversity ...
102	EntityTypeCollegeOrUniversity EntityType = "CollegeOrUniversity"
103	// EntityTypeComposition ...
104	EntityTypeComposition EntityType = "Composition"
105	// EntityTypeContinent ...
106	EntityTypeContinent EntityType = "Continent"
107	// EntityTypeCountry ...
108	EntityTypeCountry EntityType = "Country"
109	// EntityTypeDrug ...
110	EntityTypeDrug EntityType = "Drug"
111	// EntityTypeEvent ...
112	EntityTypeEvent EntityType = "Event"
113	// EntityTypeFood ...
114	EntityTypeFood EntityType = "Food"
115	// EntityTypeGeneric ...
116	EntityTypeGeneric EntityType = "Generic"
117	// EntityTypeHotel ...
118	EntityTypeHotel EntityType = "Hotel"
119	// EntityTypeHouse ...
120	EntityTypeHouse EntityType = "House"
121	// EntityTypeLocalBusiness ...
122	EntityTypeLocalBusiness EntityType = "LocalBusiness"
123	// EntityTypeLocality ...
124	EntityTypeLocality EntityType = "Locality"
125	// EntityTypeMedia ...
126	EntityTypeMedia EntityType = "Media"
127	// EntityTypeMinorRegion ...
128	EntityTypeMinorRegion EntityType = "MinorRegion"
129	// EntityTypeMovie ...
130	EntityTypeMovie EntityType = "Movie"
131	// EntityTypeMusicAlbum ...
132	EntityTypeMusicAlbum EntityType = "MusicAlbum"
133	// EntityTypeMusicGroup ...
134	EntityTypeMusicGroup EntityType = "MusicGroup"
135	// EntityTypeMusicRecording ...
136	EntityTypeMusicRecording EntityType = "MusicRecording"
137	// EntityTypeNeighborhood ...
138	EntityTypeNeighborhood EntityType = "Neighborhood"
139	// EntityTypeOrganization ...
140	EntityTypeOrganization EntityType = "Organization"
141	// EntityTypeOther ...
142	EntityTypeOther EntityType = "Other"
143	// EntityTypePerson ...
144	EntityTypePerson EntityType = "Person"
145	// EntityTypePlace ...
146	EntityTypePlace EntityType = "Place"
147	// EntityTypePointOfInterest ...
148	EntityTypePointOfInterest EntityType = "PointOfInterest"
149	// EntityTypePostalCode ...
150	EntityTypePostalCode EntityType = "PostalCode"
151	// EntityTypeProduct ...
152	EntityTypeProduct EntityType = "Product"
153	// EntityTypeRadioStation ...
154	EntityTypeRadioStation EntityType = "RadioStation"
155	// EntityTypeRegion ...
156	EntityTypeRegion EntityType = "Region"
157	// EntityTypeRestaurant ...
158	EntityTypeRestaurant EntityType = "Restaurant"
159	// EntityTypeSchool ...
160	EntityTypeSchool EntityType = "School"
161	// EntityTypeSpeciality ...
162	EntityTypeSpeciality EntityType = "Speciality"
163	// EntityTypeSportsTeam ...
164	EntityTypeSportsTeam EntityType = "SportsTeam"
165	// EntityTypeState ...
166	EntityTypeState EntityType = "State"
167	// EntityTypeStreetAddress ...
168	EntityTypeStreetAddress EntityType = "StreetAddress"
169	// EntityTypeSubRegion ...
170	EntityTypeSubRegion EntityType = "SubRegion"
171	// EntityTypeTelevisionSeason ...
172	EntityTypeTelevisionSeason EntityType = "TelevisionSeason"
173	// EntityTypeTelevisionShow ...
174	EntityTypeTelevisionShow EntityType = "TelevisionShow"
175	// EntityTypeTheaterPlay ...
176	EntityTypeTheaterPlay EntityType = "TheaterPlay"
177	// EntityTypeTouristAttraction ...
178	EntityTypeTouristAttraction EntityType = "TouristAttraction"
179	// EntityTypeTravel ...
180	EntityTypeTravel EntityType = "Travel"
181	// EntityTypeVideoGame ...
182	EntityTypeVideoGame EntityType = "VideoGame"
183)
184
185// PossibleEntityTypeValues returns an array of possible values for the EntityType const type.
186func PossibleEntityTypeValues() []EntityType {
187	return []EntityType{EntityTypeActor, EntityTypeAnimal, EntityTypeArtist, EntityTypeAttorney, EntityTypeAttraction, EntityTypeBook, EntityTypeCar, EntityTypeCity, EntityTypeCollegeOrUniversity, EntityTypeComposition, EntityTypeContinent, EntityTypeCountry, EntityTypeDrug, EntityTypeEvent, EntityTypeFood, EntityTypeGeneric, EntityTypeHotel, EntityTypeHouse, EntityTypeLocalBusiness, EntityTypeLocality, EntityTypeMedia, EntityTypeMinorRegion, EntityTypeMovie, EntityTypeMusicAlbum, EntityTypeMusicGroup, EntityTypeMusicRecording, EntityTypeNeighborhood, EntityTypeOrganization, EntityTypeOther, EntityTypePerson, EntityTypePlace, EntityTypePointOfInterest, EntityTypePostalCode, EntityTypeProduct, EntityTypeRadioStation, EntityTypeRegion, EntityTypeRestaurant, EntityTypeSchool, EntityTypeSpeciality, EntityTypeSportsTeam, EntityTypeState, EntityTypeStreetAddress, EntityTypeSubRegion, EntityTypeTelevisionSeason, EntityTypeTelevisionShow, EntityTypeTheaterPlay, EntityTypeTouristAttraction, EntityTypeTravel, EntityTypeVideoGame}
188}
189
190// ErrorCode enumerates the values for error code.
191type ErrorCode string
192
193const (
194	// InsufficientAuthorization ...
195	InsufficientAuthorization ErrorCode = "InsufficientAuthorization"
196	// InvalidAuthorization ...
197	InvalidAuthorization ErrorCode = "InvalidAuthorization"
198	// InvalidRequest ...
199	InvalidRequest ErrorCode = "InvalidRequest"
200	// None ...
201	None ErrorCode = "None"
202	// RateLimitExceeded ...
203	RateLimitExceeded ErrorCode = "RateLimitExceeded"
204	// ServerError ...
205	ServerError ErrorCode = "ServerError"
206)
207
208// PossibleErrorCodeValues returns an array of possible values for the ErrorCode const type.
209func PossibleErrorCodeValues() []ErrorCode {
210	return []ErrorCode{InsufficientAuthorization, InvalidAuthorization, InvalidRequest, None, RateLimitExceeded, ServerError}
211}
212
213// ErrorSubCode enumerates the values for error sub code.
214type ErrorSubCode string
215
216const (
217	// AuthorizationDisabled ...
218	AuthorizationDisabled ErrorSubCode = "AuthorizationDisabled"
219	// AuthorizationExpired ...
220	AuthorizationExpired ErrorSubCode = "AuthorizationExpired"
221	// AuthorizationMissing ...
222	AuthorizationMissing ErrorSubCode = "AuthorizationMissing"
223	// AuthorizationRedundancy ...
224	AuthorizationRedundancy ErrorSubCode = "AuthorizationRedundancy"
225	// Blocked ...
226	Blocked ErrorSubCode = "Blocked"
227	// HTTPNotAllowed ...
228	HTTPNotAllowed ErrorSubCode = "HttpNotAllowed"
229	// NotImplemented ...
230	NotImplemented ErrorSubCode = "NotImplemented"
231	// ParameterInvalidValue ...
232	ParameterInvalidValue ErrorSubCode = "ParameterInvalidValue"
233	// ParameterMissing ...
234	ParameterMissing ErrorSubCode = "ParameterMissing"
235	// ResourceError ...
236	ResourceError ErrorSubCode = "ResourceError"
237	// UnexpectedError ...
238	UnexpectedError ErrorSubCode = "UnexpectedError"
239)
240
241// PossibleErrorSubCodeValues returns an array of possible values for the ErrorSubCode const type.
242func PossibleErrorSubCodeValues() []ErrorSubCode {
243	return []ErrorSubCode{AuthorizationDisabled, AuthorizationExpired, AuthorizationMissing, AuthorizationRedundancy, Blocked, HTTPNotAllowed, NotImplemented, ParameterInvalidValue, ParameterMissing, ResourceError, UnexpectedError}
244}
245
246// ResponseFormat enumerates the values for response format.
247type ResponseFormat string
248
249const (
250	// JSON ...
251	JSON ResponseFormat = "Json"
252	// JSONLd ...
253	JSONLd ResponseFormat = "JsonLd"
254)
255
256// PossibleResponseFormatValues returns an array of possible values for the ResponseFormat const type.
257func PossibleResponseFormatValues() []ResponseFormat {
258	return []ResponseFormat{JSON, JSONLd}
259}
260
261// SafeSearch enumerates the values for safe search.
262type SafeSearch string
263
264const (
265	// Moderate ...
266	Moderate SafeSearch = "Moderate"
267	// Off ...
268	Off SafeSearch = "Off"
269	// Strict ...
270	Strict SafeSearch = "Strict"
271)
272
273// PossibleSafeSearchValues returns an array of possible values for the SafeSearch const type.
274func PossibleSafeSearchValues() []SafeSearch {
275	return []SafeSearch{Moderate, Off, Strict}
276}
277
278// Type enumerates the values for type.
279type Type string
280
281const (
282	// TypeContractualRulesAttribution ...
283	TypeContractualRulesAttribution Type = "ContractualRules/Attribution"
284	// TypeContractualRulesContractualRule ...
285	TypeContractualRulesContractualRule Type = "ContractualRules/ContractualRule"
286	// TypeContractualRulesLicenseAttribution ...
287	TypeContractualRulesLicenseAttribution Type = "ContractualRules/LicenseAttribution"
288	// TypeContractualRulesLinkAttribution ...
289	TypeContractualRulesLinkAttribution Type = "ContractualRules/LinkAttribution"
290	// TypeContractualRulesMediaAttribution ...
291	TypeContractualRulesMediaAttribution Type = "ContractualRules/MediaAttribution"
292	// TypeContractualRulesTextAttribution ...
293	TypeContractualRulesTextAttribution Type = "ContractualRules/TextAttribution"
294)
295
296// PossibleTypeValues returns an array of possible values for the Type const type.
297func PossibleTypeValues() []Type {
298	return []Type{TypeContractualRulesAttribution, TypeContractualRulesContractualRule, TypeContractualRulesLicenseAttribution, TypeContractualRulesLinkAttribution, TypeContractualRulesMediaAttribution, TypeContractualRulesTextAttribution}
299}
300
301// TypeBasicResponseBase enumerates the values for type basic response base.
302type TypeBasicResponseBase string
303
304const (
305	// TypeAirport ...
306	TypeAirport TypeBasicResponseBase = "Airport"
307	// TypeAnswer ...
308	TypeAnswer TypeBasicResponseBase = "Answer"
309	// TypeCivicStructure ...
310	TypeCivicStructure TypeBasicResponseBase = "CivicStructure"
311	// TypeCreativeWork ...
312	TypeCreativeWork TypeBasicResponseBase = "CreativeWork"
313	// TypeEntertainmentBusiness ...
314	TypeEntertainmentBusiness TypeBasicResponseBase = "EntertainmentBusiness"
315	// TypeEntities ...
316	TypeEntities TypeBasicResponseBase = "Entities"
317	// TypeErrorResponse ...
318	TypeErrorResponse TypeBasicResponseBase = "ErrorResponse"
319	// TypeFoodEstablishment ...
320	TypeFoodEstablishment TypeBasicResponseBase = "FoodEstablishment"
321	// TypeHotel ...
322	TypeHotel TypeBasicResponseBase = "Hotel"
323	// TypeIdentifiable ...
324	TypeIdentifiable TypeBasicResponseBase = "Identifiable"
325	// TypeImageObject ...
326	TypeImageObject TypeBasicResponseBase = "ImageObject"
327	// TypeIntangible ...
328	TypeIntangible TypeBasicResponseBase = "Intangible"
329	// TypeLicense ...
330	TypeLicense TypeBasicResponseBase = "License"
331	// TypeLocalBusiness ...
332	TypeLocalBusiness TypeBasicResponseBase = "LocalBusiness"
333	// TypeLodgingBusiness ...
334	TypeLodgingBusiness TypeBasicResponseBase = "LodgingBusiness"
335	// TypeMediaObject ...
336	TypeMediaObject TypeBasicResponseBase = "MediaObject"
337	// TypeMovieTheater ...
338	TypeMovieTheater TypeBasicResponseBase = "MovieTheater"
339	// TypeOrganization ...
340	TypeOrganization TypeBasicResponseBase = "Organization"
341	// TypePlace ...
342	TypePlace TypeBasicResponseBase = "Place"
343	// TypePlaces ...
344	TypePlaces TypeBasicResponseBase = "Places"
345	// TypePostalAddress ...
346	TypePostalAddress TypeBasicResponseBase = "PostalAddress"
347	// TypeResponse ...
348	TypeResponse TypeBasicResponseBase = "Response"
349	// TypeResponseBase ...
350	TypeResponseBase TypeBasicResponseBase = "ResponseBase"
351	// TypeRestaurant ...
352	TypeRestaurant TypeBasicResponseBase = "Restaurant"
353	// TypeSearchResponse ...
354	TypeSearchResponse TypeBasicResponseBase = "SearchResponse"
355	// TypeSearchResultsAnswer ...
356	TypeSearchResultsAnswer TypeBasicResponseBase = "SearchResultsAnswer"
357	// TypeStructuredValue ...
358	TypeStructuredValue TypeBasicResponseBase = "StructuredValue"
359	// TypeThing ...
360	TypeThing TypeBasicResponseBase = "Thing"
361	// TypeTouristAttraction ...
362	TypeTouristAttraction TypeBasicResponseBase = "TouristAttraction"
363)
364
365// PossibleTypeBasicResponseBaseValues returns an array of possible values for the TypeBasicResponseBase const type.
366func PossibleTypeBasicResponseBaseValues() []TypeBasicResponseBase {
367	return []TypeBasicResponseBase{TypeAirport, TypeAnswer, TypeCivicStructure, TypeCreativeWork, TypeEntertainmentBusiness, TypeEntities, TypeErrorResponse, TypeFoodEstablishment, TypeHotel, TypeIdentifiable, TypeImageObject, TypeIntangible, TypeLicense, TypeLocalBusiness, TypeLodgingBusiness, TypeMediaObject, TypeMovieTheater, TypeOrganization, TypePlace, TypePlaces, TypePostalAddress, TypeResponse, TypeResponseBase, TypeRestaurant, TypeSearchResponse, TypeSearchResultsAnswer, TypeStructuredValue, TypeThing, TypeTouristAttraction}
368}
369
370// Airport ...
371type Airport struct {
372	// IataCode - READ-ONLY
373	IataCode *string `json:"iataCode,omitempty"`
374	// IcaoCode - READ-ONLY
375	IcaoCode *string `json:"icaoCode,omitempty"`
376	// Address - READ-ONLY; The postal address of where the entity is located
377	Address *PostalAddress `json:"address,omitempty"`
378	// Telephone - READ-ONLY; The entity's telephone number
379	Telephone *string `json:"telephone,omitempty"`
380	// Name - READ-ONLY; The name of the thing represented by this object.
381	Name *string `json:"name,omitempty"`
382	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
383	URL *string `json:"url,omitempty"`
384	// Image - READ-ONLY
385	Image *ImageObject `json:"image,omitempty"`
386	// Description - READ-ONLY; A short description of the item.
387	Description *string `json:"description,omitempty"`
388	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
389	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
390	// BingID - READ-ONLY; An ID that uniquely identifies this item.
391	BingID *string `json:"bingId,omitempty"`
392	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
393	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
394	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
395	WebSearchURL *string `json:"webSearchUrl,omitempty"`
396	// ID - READ-ONLY; A String identifier.
397	ID *string `json:"id,omitempty"`
398	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
399	Type TypeBasicResponseBase `json:"_type,omitempty"`
400}
401
402// MarshalJSON is the custom marshaler for Airport.
403func (a Airport) MarshalJSON() ([]byte, error) {
404	a.Type = TypeAirport
405	objectMap := make(map[string]interface{})
406	if a.Type != "" {
407		objectMap["_type"] = a.Type
408	}
409	return json.Marshal(objectMap)
410}
411
412// AsImageObject is the BasicResponseBase implementation for Airport.
413func (a Airport) AsImageObject() (*ImageObject, bool) {
414	return nil, false
415}
416
417// AsThing is the BasicResponseBase implementation for Airport.
418func (a Airport) AsThing() (*Thing, bool) {
419	return nil, false
420}
421
422// AsBasicThing is the BasicResponseBase implementation for Airport.
423func (a Airport) AsBasicThing() (BasicThing, bool) {
424	return &a, true
425}
426
427// AsEntities is the BasicResponseBase implementation for Airport.
428func (a Airport) AsEntities() (*Entities, bool) {
429	return nil, false
430}
431
432// AsPlaces is the BasicResponseBase implementation for Airport.
433func (a Airport) AsPlaces() (*Places, bool) {
434	return nil, false
435}
436
437// AsSearchResponse is the BasicResponseBase implementation for Airport.
438func (a Airport) AsSearchResponse() (*SearchResponse, bool) {
439	return nil, false
440}
441
442// AsResponse is the BasicResponseBase implementation for Airport.
443func (a Airport) AsResponse() (*Response, bool) {
444	return nil, false
445}
446
447// AsBasicResponse is the BasicResponseBase implementation for Airport.
448func (a Airport) AsBasicResponse() (BasicResponse, bool) {
449	return &a, true
450}
451
452// AsSearchResultsAnswer is the BasicResponseBase implementation for Airport.
453func (a Airport) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
454	return nil, false
455}
456
457// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Airport.
458func (a Airport) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
459	return nil, false
460}
461
462// AsIdentifiable is the BasicResponseBase implementation for Airport.
463func (a Airport) AsIdentifiable() (*Identifiable, bool) {
464	return nil, false
465}
466
467// AsBasicIdentifiable is the BasicResponseBase implementation for Airport.
468func (a Airport) AsBasicIdentifiable() (BasicIdentifiable, bool) {
469	return &a, true
470}
471
472// AsAnswer is the BasicResponseBase implementation for Airport.
473func (a Airport) AsAnswer() (*Answer, bool) {
474	return nil, false
475}
476
477// AsBasicAnswer is the BasicResponseBase implementation for Airport.
478func (a Airport) AsBasicAnswer() (BasicAnswer, bool) {
479	return nil, false
480}
481
482// AsErrorResponse is the BasicResponseBase implementation for Airport.
483func (a Airport) AsErrorResponse() (*ErrorResponse, bool) {
484	return nil, false
485}
486
487// AsPostalAddress is the BasicResponseBase implementation for Airport.
488func (a Airport) AsPostalAddress() (*PostalAddress, bool) {
489	return nil, false
490}
491
492// AsPlace is the BasicResponseBase implementation for Airport.
493func (a Airport) AsPlace() (*Place, bool) {
494	return nil, false
495}
496
497// AsBasicPlace is the BasicResponseBase implementation for Airport.
498func (a Airport) AsBasicPlace() (BasicPlace, bool) {
499	return &a, true
500}
501
502// AsOrganization is the BasicResponseBase implementation for Airport.
503func (a Airport) AsOrganization() (*Organization, bool) {
504	return nil, false
505}
506
507// AsCreativeWork is the BasicResponseBase implementation for Airport.
508func (a Airport) AsCreativeWork() (*CreativeWork, bool) {
509	return nil, false
510}
511
512// AsBasicCreativeWork is the BasicResponseBase implementation for Airport.
513func (a Airport) AsBasicCreativeWork() (BasicCreativeWork, bool) {
514	return nil, false
515}
516
517// AsIntangible is the BasicResponseBase implementation for Airport.
518func (a Airport) AsIntangible() (*Intangible, bool) {
519	return nil, false
520}
521
522// AsBasicIntangible is the BasicResponseBase implementation for Airport.
523func (a Airport) AsBasicIntangible() (BasicIntangible, bool) {
524	return nil, false
525}
526
527// AsMovieTheater is the BasicResponseBase implementation for Airport.
528func (a Airport) AsMovieTheater() (*MovieTheater, bool) {
529	return nil, false
530}
531
532// AsMediaObject is the BasicResponseBase implementation for Airport.
533func (a Airport) AsMediaObject() (*MediaObject, bool) {
534	return nil, false
535}
536
537// AsBasicMediaObject is the BasicResponseBase implementation for Airport.
538func (a Airport) AsBasicMediaObject() (BasicMediaObject, bool) {
539	return nil, false
540}
541
542// AsCivicStructure is the BasicResponseBase implementation for Airport.
543func (a Airport) AsCivicStructure() (*CivicStructure, bool) {
544	return nil, false
545}
546
547// AsBasicCivicStructure is the BasicResponseBase implementation for Airport.
548func (a Airport) AsBasicCivicStructure() (BasicCivicStructure, bool) {
549	return &a, true
550}
551
552// AsLocalBusiness is the BasicResponseBase implementation for Airport.
553func (a Airport) AsLocalBusiness() (*LocalBusiness, bool) {
554	return nil, false
555}
556
557// AsBasicLocalBusiness is the BasicResponseBase implementation for Airport.
558func (a Airport) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
559	return nil, false
560}
561
562// AsTouristAttraction is the BasicResponseBase implementation for Airport.
563func (a Airport) AsTouristAttraction() (*TouristAttraction, bool) {
564	return nil, false
565}
566
567// AsAirport is the BasicResponseBase implementation for Airport.
568func (a Airport) AsAirport() (*Airport, bool) {
569	return &a, true
570}
571
572// AsLicense is the BasicResponseBase implementation for Airport.
573func (a Airport) AsLicense() (*License, bool) {
574	return nil, false
575}
576
577// AsStructuredValue is the BasicResponseBase implementation for Airport.
578func (a Airport) AsStructuredValue() (*StructuredValue, bool) {
579	return nil, false
580}
581
582// AsBasicStructuredValue is the BasicResponseBase implementation for Airport.
583func (a Airport) AsBasicStructuredValue() (BasicStructuredValue, bool) {
584	return nil, false
585}
586
587// AsEntertainmentBusiness is the BasicResponseBase implementation for Airport.
588func (a Airport) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
589	return nil, false
590}
591
592// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Airport.
593func (a Airport) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
594	return nil, false
595}
596
597// AsFoodEstablishment is the BasicResponseBase implementation for Airport.
598func (a Airport) AsFoodEstablishment() (*FoodEstablishment, bool) {
599	return nil, false
600}
601
602// AsBasicFoodEstablishment is the BasicResponseBase implementation for Airport.
603func (a Airport) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
604	return nil, false
605}
606
607// AsLodgingBusiness is the BasicResponseBase implementation for Airport.
608func (a Airport) AsLodgingBusiness() (*LodgingBusiness, bool) {
609	return nil, false
610}
611
612// AsBasicLodgingBusiness is the BasicResponseBase implementation for Airport.
613func (a Airport) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
614	return nil, false
615}
616
617// AsRestaurant is the BasicResponseBase implementation for Airport.
618func (a Airport) AsRestaurant() (*Restaurant, bool) {
619	return nil, false
620}
621
622// AsHotel is the BasicResponseBase implementation for Airport.
623func (a Airport) AsHotel() (*Hotel, bool) {
624	return nil, false
625}
626
627// AsResponseBase is the BasicResponseBase implementation for Airport.
628func (a Airport) AsResponseBase() (*ResponseBase, bool) {
629	return nil, false
630}
631
632// AsBasicResponseBase is the BasicResponseBase implementation for Airport.
633func (a Airport) AsBasicResponseBase() (BasicResponseBase, bool) {
634	return &a, true
635}
636
637// UnmarshalJSON is the custom unmarshaler for Airport struct.
638func (a *Airport) UnmarshalJSON(body []byte) error {
639	var m map[string]*json.RawMessage
640	err := json.Unmarshal(body, &m)
641	if err != nil {
642		return err
643	}
644	for k, v := range m {
645		switch k {
646		case "iataCode":
647			if v != nil {
648				var iataCode string
649				err = json.Unmarshal(*v, &iataCode)
650				if err != nil {
651					return err
652				}
653				a.IataCode = &iataCode
654			}
655		case "icaoCode":
656			if v != nil {
657				var icaoCode string
658				err = json.Unmarshal(*v, &icaoCode)
659				if err != nil {
660					return err
661				}
662				a.IcaoCode = &icaoCode
663			}
664		case "address":
665			if v != nil {
666				var address PostalAddress
667				err = json.Unmarshal(*v, &address)
668				if err != nil {
669					return err
670				}
671				a.Address = &address
672			}
673		case "telephone":
674			if v != nil {
675				var telephone string
676				err = json.Unmarshal(*v, &telephone)
677				if err != nil {
678					return err
679				}
680				a.Telephone = &telephone
681			}
682		case "name":
683			if v != nil {
684				var name string
685				err = json.Unmarshal(*v, &name)
686				if err != nil {
687					return err
688				}
689				a.Name = &name
690			}
691		case "url":
692			if v != nil {
693				var URL string
694				err = json.Unmarshal(*v, &URL)
695				if err != nil {
696					return err
697				}
698				a.URL = &URL
699			}
700		case "image":
701			if v != nil {
702				var imageVar ImageObject
703				err = json.Unmarshal(*v, &imageVar)
704				if err != nil {
705					return err
706				}
707				a.Image = &imageVar
708			}
709		case "description":
710			if v != nil {
711				var description string
712				err = json.Unmarshal(*v, &description)
713				if err != nil {
714					return err
715				}
716				a.Description = &description
717			}
718		case "entityPresentationInfo":
719			if v != nil {
720				var entityPresentationInfo EntitiesEntityPresentationInfo
721				err = json.Unmarshal(*v, &entityPresentationInfo)
722				if err != nil {
723					return err
724				}
725				a.EntityPresentationInfo = &entityPresentationInfo
726			}
727		case "bingId":
728			if v != nil {
729				var bingID string
730				err = json.Unmarshal(*v, &bingID)
731				if err != nil {
732					return err
733				}
734				a.BingID = &bingID
735			}
736		case "contractualRules":
737			if v != nil {
738				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
739				if err != nil {
740					return err
741				}
742				a.ContractualRules = &contractualRules
743			}
744		case "webSearchUrl":
745			if v != nil {
746				var webSearchURL string
747				err = json.Unmarshal(*v, &webSearchURL)
748				if err != nil {
749					return err
750				}
751				a.WebSearchURL = &webSearchURL
752			}
753		case "id":
754			if v != nil {
755				var ID string
756				err = json.Unmarshal(*v, &ID)
757				if err != nil {
758					return err
759				}
760				a.ID = &ID
761			}
762		case "_type":
763			if v != nil {
764				var typeVar TypeBasicResponseBase
765				err = json.Unmarshal(*v, &typeVar)
766				if err != nil {
767					return err
768				}
769				a.Type = typeVar
770			}
771		}
772	}
773
774	return nil
775}
776
777// BasicAnswer ...
778type BasicAnswer interface {
779	AsEntities() (*Entities, bool)
780	AsPlaces() (*Places, bool)
781	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
782	AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
783	AsAnswer() (*Answer, bool)
784}
785
786// Answer ...
787type Answer struct {
788	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
789	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
790	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
791	WebSearchURL *string `json:"webSearchUrl,omitempty"`
792	// ID - READ-ONLY; A String identifier.
793	ID *string `json:"id,omitempty"`
794	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
795	Type TypeBasicResponseBase `json:"_type,omitempty"`
796}
797
798func unmarshalBasicAnswer(body []byte) (BasicAnswer, error) {
799	var m map[string]interface{}
800	err := json.Unmarshal(body, &m)
801	if err != nil {
802		return nil, err
803	}
804
805	switch m["_type"] {
806	case string(TypeEntities):
807		var e Entities
808		err := json.Unmarshal(body, &e)
809		return e, err
810	case string(TypePlaces):
811		var p Places
812		err := json.Unmarshal(body, &p)
813		return p, err
814	case string(TypeSearchResultsAnswer):
815		var sra SearchResultsAnswer
816		err := json.Unmarshal(body, &sra)
817		return sra, err
818	default:
819		var a Answer
820		err := json.Unmarshal(body, &a)
821		return a, err
822	}
823}
824func unmarshalBasicAnswerArray(body []byte) ([]BasicAnswer, error) {
825	var rawMessages []*json.RawMessage
826	err := json.Unmarshal(body, &rawMessages)
827	if err != nil {
828		return nil, err
829	}
830
831	aArray := make([]BasicAnswer, len(rawMessages))
832
833	for index, rawMessage := range rawMessages {
834		a, err := unmarshalBasicAnswer(*rawMessage)
835		if err != nil {
836			return nil, err
837		}
838		aArray[index] = a
839	}
840	return aArray, nil
841}
842
843// MarshalJSON is the custom marshaler for Answer.
844func (a Answer) MarshalJSON() ([]byte, error) {
845	a.Type = TypeAnswer
846	objectMap := make(map[string]interface{})
847	if a.Type != "" {
848		objectMap["_type"] = a.Type
849	}
850	return json.Marshal(objectMap)
851}
852
853// AsImageObject is the BasicResponseBase implementation for Answer.
854func (a Answer) AsImageObject() (*ImageObject, bool) {
855	return nil, false
856}
857
858// AsThing is the BasicResponseBase implementation for Answer.
859func (a Answer) AsThing() (*Thing, bool) {
860	return nil, false
861}
862
863// AsBasicThing is the BasicResponseBase implementation for Answer.
864func (a Answer) AsBasicThing() (BasicThing, bool) {
865	return nil, false
866}
867
868// AsEntities is the BasicResponseBase implementation for Answer.
869func (a Answer) AsEntities() (*Entities, bool) {
870	return nil, false
871}
872
873// AsPlaces is the BasicResponseBase implementation for Answer.
874func (a Answer) AsPlaces() (*Places, bool) {
875	return nil, false
876}
877
878// AsSearchResponse is the BasicResponseBase implementation for Answer.
879func (a Answer) AsSearchResponse() (*SearchResponse, bool) {
880	return nil, false
881}
882
883// AsResponse is the BasicResponseBase implementation for Answer.
884func (a Answer) AsResponse() (*Response, bool) {
885	return nil, false
886}
887
888// AsBasicResponse is the BasicResponseBase implementation for Answer.
889func (a Answer) AsBasicResponse() (BasicResponse, bool) {
890	return &a, true
891}
892
893// AsSearchResultsAnswer is the BasicResponseBase implementation for Answer.
894func (a Answer) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
895	return nil, false
896}
897
898// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Answer.
899func (a Answer) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
900	return nil, false
901}
902
903// AsIdentifiable is the BasicResponseBase implementation for Answer.
904func (a Answer) AsIdentifiable() (*Identifiable, bool) {
905	return nil, false
906}
907
908// AsBasicIdentifiable is the BasicResponseBase implementation for Answer.
909func (a Answer) AsBasicIdentifiable() (BasicIdentifiable, bool) {
910	return &a, true
911}
912
913// AsAnswer is the BasicResponseBase implementation for Answer.
914func (a Answer) AsAnswer() (*Answer, bool) {
915	return &a, true
916}
917
918// AsBasicAnswer is the BasicResponseBase implementation for Answer.
919func (a Answer) AsBasicAnswer() (BasicAnswer, bool) {
920	return &a, true
921}
922
923// AsErrorResponse is the BasicResponseBase implementation for Answer.
924func (a Answer) AsErrorResponse() (*ErrorResponse, bool) {
925	return nil, false
926}
927
928// AsPostalAddress is the BasicResponseBase implementation for Answer.
929func (a Answer) AsPostalAddress() (*PostalAddress, bool) {
930	return nil, false
931}
932
933// AsPlace is the BasicResponseBase implementation for Answer.
934func (a Answer) AsPlace() (*Place, bool) {
935	return nil, false
936}
937
938// AsBasicPlace is the BasicResponseBase implementation for Answer.
939func (a Answer) AsBasicPlace() (BasicPlace, bool) {
940	return nil, false
941}
942
943// AsOrganization is the BasicResponseBase implementation for Answer.
944func (a Answer) AsOrganization() (*Organization, bool) {
945	return nil, false
946}
947
948// AsCreativeWork is the BasicResponseBase implementation for Answer.
949func (a Answer) AsCreativeWork() (*CreativeWork, bool) {
950	return nil, false
951}
952
953// AsBasicCreativeWork is the BasicResponseBase implementation for Answer.
954func (a Answer) AsBasicCreativeWork() (BasicCreativeWork, bool) {
955	return nil, false
956}
957
958// AsIntangible is the BasicResponseBase implementation for Answer.
959func (a Answer) AsIntangible() (*Intangible, bool) {
960	return nil, false
961}
962
963// AsBasicIntangible is the BasicResponseBase implementation for Answer.
964func (a Answer) AsBasicIntangible() (BasicIntangible, bool) {
965	return nil, false
966}
967
968// AsMovieTheater is the BasicResponseBase implementation for Answer.
969func (a Answer) AsMovieTheater() (*MovieTheater, bool) {
970	return nil, false
971}
972
973// AsMediaObject is the BasicResponseBase implementation for Answer.
974func (a Answer) AsMediaObject() (*MediaObject, bool) {
975	return nil, false
976}
977
978// AsBasicMediaObject is the BasicResponseBase implementation for Answer.
979func (a Answer) AsBasicMediaObject() (BasicMediaObject, bool) {
980	return nil, false
981}
982
983// AsCivicStructure is the BasicResponseBase implementation for Answer.
984func (a Answer) AsCivicStructure() (*CivicStructure, bool) {
985	return nil, false
986}
987
988// AsBasicCivicStructure is the BasicResponseBase implementation for Answer.
989func (a Answer) AsBasicCivicStructure() (BasicCivicStructure, bool) {
990	return nil, false
991}
992
993// AsLocalBusiness is the BasicResponseBase implementation for Answer.
994func (a Answer) AsLocalBusiness() (*LocalBusiness, bool) {
995	return nil, false
996}
997
998// AsBasicLocalBusiness is the BasicResponseBase implementation for Answer.
999func (a Answer) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
1000	return nil, false
1001}
1002
1003// AsTouristAttraction is the BasicResponseBase implementation for Answer.
1004func (a Answer) AsTouristAttraction() (*TouristAttraction, bool) {
1005	return nil, false
1006}
1007
1008// AsAirport is the BasicResponseBase implementation for Answer.
1009func (a Answer) AsAirport() (*Airport, bool) {
1010	return nil, false
1011}
1012
1013// AsLicense is the BasicResponseBase implementation for Answer.
1014func (a Answer) AsLicense() (*License, bool) {
1015	return nil, false
1016}
1017
1018// AsStructuredValue is the BasicResponseBase implementation for Answer.
1019func (a Answer) AsStructuredValue() (*StructuredValue, bool) {
1020	return nil, false
1021}
1022
1023// AsBasicStructuredValue is the BasicResponseBase implementation for Answer.
1024func (a Answer) AsBasicStructuredValue() (BasicStructuredValue, bool) {
1025	return nil, false
1026}
1027
1028// AsEntertainmentBusiness is the BasicResponseBase implementation for Answer.
1029func (a Answer) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
1030	return nil, false
1031}
1032
1033// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Answer.
1034func (a Answer) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
1035	return nil, false
1036}
1037
1038// AsFoodEstablishment is the BasicResponseBase implementation for Answer.
1039func (a Answer) AsFoodEstablishment() (*FoodEstablishment, bool) {
1040	return nil, false
1041}
1042
1043// AsBasicFoodEstablishment is the BasicResponseBase implementation for Answer.
1044func (a Answer) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
1045	return nil, false
1046}
1047
1048// AsLodgingBusiness is the BasicResponseBase implementation for Answer.
1049func (a Answer) AsLodgingBusiness() (*LodgingBusiness, bool) {
1050	return nil, false
1051}
1052
1053// AsBasicLodgingBusiness is the BasicResponseBase implementation for Answer.
1054func (a Answer) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
1055	return nil, false
1056}
1057
1058// AsRestaurant is the BasicResponseBase implementation for Answer.
1059func (a Answer) AsRestaurant() (*Restaurant, bool) {
1060	return nil, false
1061}
1062
1063// AsHotel is the BasicResponseBase implementation for Answer.
1064func (a Answer) AsHotel() (*Hotel, bool) {
1065	return nil, false
1066}
1067
1068// AsResponseBase is the BasicResponseBase implementation for Answer.
1069func (a Answer) AsResponseBase() (*ResponseBase, bool) {
1070	return nil, false
1071}
1072
1073// AsBasicResponseBase is the BasicResponseBase implementation for Answer.
1074func (a Answer) AsBasicResponseBase() (BasicResponseBase, bool) {
1075	return &a, true
1076}
1077
1078// UnmarshalJSON is the custom unmarshaler for Answer struct.
1079func (a *Answer) UnmarshalJSON(body []byte) error {
1080	var m map[string]*json.RawMessage
1081	err := json.Unmarshal(body, &m)
1082	if err != nil {
1083		return err
1084	}
1085	for k, v := range m {
1086		switch k {
1087		case "contractualRules":
1088			if v != nil {
1089				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
1090				if err != nil {
1091					return err
1092				}
1093				a.ContractualRules = &contractualRules
1094			}
1095		case "webSearchUrl":
1096			if v != nil {
1097				var webSearchURL string
1098				err = json.Unmarshal(*v, &webSearchURL)
1099				if err != nil {
1100					return err
1101				}
1102				a.WebSearchURL = &webSearchURL
1103			}
1104		case "id":
1105			if v != nil {
1106				var ID string
1107				err = json.Unmarshal(*v, &ID)
1108				if err != nil {
1109					return err
1110				}
1111				a.ID = &ID
1112			}
1113		case "_type":
1114			if v != nil {
1115				var typeVar TypeBasicResponseBase
1116				err = json.Unmarshal(*v, &typeVar)
1117				if err != nil {
1118					return err
1119				}
1120				a.Type = typeVar
1121			}
1122		}
1123	}
1124
1125	return nil
1126}
1127
1128// BasicCivicStructure ...
1129type BasicCivicStructure interface {
1130	AsAirport() (*Airport, bool)
1131	AsCivicStructure() (*CivicStructure, bool)
1132}
1133
1134// CivicStructure ...
1135type CivicStructure struct {
1136	// Address - READ-ONLY; The postal address of where the entity is located
1137	Address *PostalAddress `json:"address,omitempty"`
1138	// Telephone - READ-ONLY; The entity's telephone number
1139	Telephone *string `json:"telephone,omitempty"`
1140	// Name - READ-ONLY; The name of the thing represented by this object.
1141	Name *string `json:"name,omitempty"`
1142	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
1143	URL *string `json:"url,omitempty"`
1144	// Image - READ-ONLY
1145	Image *ImageObject `json:"image,omitempty"`
1146	// Description - READ-ONLY; A short description of the item.
1147	Description *string `json:"description,omitempty"`
1148	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
1149	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
1150	// BingID - READ-ONLY; An ID that uniquely identifies this item.
1151	BingID *string `json:"bingId,omitempty"`
1152	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
1153	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
1154	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
1155	WebSearchURL *string `json:"webSearchUrl,omitempty"`
1156	// ID - READ-ONLY; A String identifier.
1157	ID *string `json:"id,omitempty"`
1158	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
1159	Type TypeBasicResponseBase `json:"_type,omitempty"`
1160}
1161
1162func unmarshalBasicCivicStructure(body []byte) (BasicCivicStructure, error) {
1163	var m map[string]interface{}
1164	err := json.Unmarshal(body, &m)
1165	if err != nil {
1166		return nil, err
1167	}
1168
1169	switch m["_type"] {
1170	case string(TypeAirport):
1171		var a Airport
1172		err := json.Unmarshal(body, &a)
1173		return a, err
1174	default:
1175		var cs CivicStructure
1176		err := json.Unmarshal(body, &cs)
1177		return cs, err
1178	}
1179}
1180func unmarshalBasicCivicStructureArray(body []byte) ([]BasicCivicStructure, error) {
1181	var rawMessages []*json.RawMessage
1182	err := json.Unmarshal(body, &rawMessages)
1183	if err != nil {
1184		return nil, err
1185	}
1186
1187	csArray := make([]BasicCivicStructure, len(rawMessages))
1188
1189	for index, rawMessage := range rawMessages {
1190		cs, err := unmarshalBasicCivicStructure(*rawMessage)
1191		if err != nil {
1192			return nil, err
1193		}
1194		csArray[index] = cs
1195	}
1196	return csArray, nil
1197}
1198
1199// MarshalJSON is the custom marshaler for CivicStructure.
1200func (cs CivicStructure) MarshalJSON() ([]byte, error) {
1201	cs.Type = TypeCivicStructure
1202	objectMap := make(map[string]interface{})
1203	if cs.Type != "" {
1204		objectMap["_type"] = cs.Type
1205	}
1206	return json.Marshal(objectMap)
1207}
1208
1209// AsImageObject is the BasicResponseBase implementation for CivicStructure.
1210func (cs CivicStructure) AsImageObject() (*ImageObject, bool) {
1211	return nil, false
1212}
1213
1214// AsThing is the BasicResponseBase implementation for CivicStructure.
1215func (cs CivicStructure) AsThing() (*Thing, bool) {
1216	return nil, false
1217}
1218
1219// AsBasicThing is the BasicResponseBase implementation for CivicStructure.
1220func (cs CivicStructure) AsBasicThing() (BasicThing, bool) {
1221	return &cs, true
1222}
1223
1224// AsEntities is the BasicResponseBase implementation for CivicStructure.
1225func (cs CivicStructure) AsEntities() (*Entities, bool) {
1226	return nil, false
1227}
1228
1229// AsPlaces is the BasicResponseBase implementation for CivicStructure.
1230func (cs CivicStructure) AsPlaces() (*Places, bool) {
1231	return nil, false
1232}
1233
1234// AsSearchResponse is the BasicResponseBase implementation for CivicStructure.
1235func (cs CivicStructure) AsSearchResponse() (*SearchResponse, bool) {
1236	return nil, false
1237}
1238
1239// AsResponse is the BasicResponseBase implementation for CivicStructure.
1240func (cs CivicStructure) AsResponse() (*Response, bool) {
1241	return nil, false
1242}
1243
1244// AsBasicResponse is the BasicResponseBase implementation for CivicStructure.
1245func (cs CivicStructure) AsBasicResponse() (BasicResponse, bool) {
1246	return &cs, true
1247}
1248
1249// AsSearchResultsAnswer is the BasicResponseBase implementation for CivicStructure.
1250func (cs CivicStructure) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
1251	return nil, false
1252}
1253
1254// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for CivicStructure.
1255func (cs CivicStructure) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
1256	return nil, false
1257}
1258
1259// AsIdentifiable is the BasicResponseBase implementation for CivicStructure.
1260func (cs CivicStructure) AsIdentifiable() (*Identifiable, bool) {
1261	return nil, false
1262}
1263
1264// AsBasicIdentifiable is the BasicResponseBase implementation for CivicStructure.
1265func (cs CivicStructure) AsBasicIdentifiable() (BasicIdentifiable, bool) {
1266	return &cs, true
1267}
1268
1269// AsAnswer is the BasicResponseBase implementation for CivicStructure.
1270func (cs CivicStructure) AsAnswer() (*Answer, bool) {
1271	return nil, false
1272}
1273
1274// AsBasicAnswer is the BasicResponseBase implementation for CivicStructure.
1275func (cs CivicStructure) AsBasicAnswer() (BasicAnswer, bool) {
1276	return nil, false
1277}
1278
1279// AsErrorResponse is the BasicResponseBase implementation for CivicStructure.
1280func (cs CivicStructure) AsErrorResponse() (*ErrorResponse, bool) {
1281	return nil, false
1282}
1283
1284// AsPostalAddress is the BasicResponseBase implementation for CivicStructure.
1285func (cs CivicStructure) AsPostalAddress() (*PostalAddress, bool) {
1286	return nil, false
1287}
1288
1289// AsPlace is the BasicResponseBase implementation for CivicStructure.
1290func (cs CivicStructure) AsPlace() (*Place, bool) {
1291	return nil, false
1292}
1293
1294// AsBasicPlace is the BasicResponseBase implementation for CivicStructure.
1295func (cs CivicStructure) AsBasicPlace() (BasicPlace, bool) {
1296	return &cs, true
1297}
1298
1299// AsOrganization is the BasicResponseBase implementation for CivicStructure.
1300func (cs CivicStructure) AsOrganization() (*Organization, bool) {
1301	return nil, false
1302}
1303
1304// AsCreativeWork is the BasicResponseBase implementation for CivicStructure.
1305func (cs CivicStructure) AsCreativeWork() (*CreativeWork, bool) {
1306	return nil, false
1307}
1308
1309// AsBasicCreativeWork is the BasicResponseBase implementation for CivicStructure.
1310func (cs CivicStructure) AsBasicCreativeWork() (BasicCreativeWork, bool) {
1311	return nil, false
1312}
1313
1314// AsIntangible is the BasicResponseBase implementation for CivicStructure.
1315func (cs CivicStructure) AsIntangible() (*Intangible, bool) {
1316	return nil, false
1317}
1318
1319// AsBasicIntangible is the BasicResponseBase implementation for CivicStructure.
1320func (cs CivicStructure) AsBasicIntangible() (BasicIntangible, bool) {
1321	return nil, false
1322}
1323
1324// AsMovieTheater is the BasicResponseBase implementation for CivicStructure.
1325func (cs CivicStructure) AsMovieTheater() (*MovieTheater, bool) {
1326	return nil, false
1327}
1328
1329// AsMediaObject is the BasicResponseBase implementation for CivicStructure.
1330func (cs CivicStructure) AsMediaObject() (*MediaObject, bool) {
1331	return nil, false
1332}
1333
1334// AsBasicMediaObject is the BasicResponseBase implementation for CivicStructure.
1335func (cs CivicStructure) AsBasicMediaObject() (BasicMediaObject, bool) {
1336	return nil, false
1337}
1338
1339// AsCivicStructure is the BasicResponseBase implementation for CivicStructure.
1340func (cs CivicStructure) AsCivicStructure() (*CivicStructure, bool) {
1341	return &cs, true
1342}
1343
1344// AsBasicCivicStructure is the BasicResponseBase implementation for CivicStructure.
1345func (cs CivicStructure) AsBasicCivicStructure() (BasicCivicStructure, bool) {
1346	return &cs, true
1347}
1348
1349// AsLocalBusiness is the BasicResponseBase implementation for CivicStructure.
1350func (cs CivicStructure) AsLocalBusiness() (*LocalBusiness, bool) {
1351	return nil, false
1352}
1353
1354// AsBasicLocalBusiness is the BasicResponseBase implementation for CivicStructure.
1355func (cs CivicStructure) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
1356	return nil, false
1357}
1358
1359// AsTouristAttraction is the BasicResponseBase implementation for CivicStructure.
1360func (cs CivicStructure) AsTouristAttraction() (*TouristAttraction, bool) {
1361	return nil, false
1362}
1363
1364// AsAirport is the BasicResponseBase implementation for CivicStructure.
1365func (cs CivicStructure) AsAirport() (*Airport, bool) {
1366	return nil, false
1367}
1368
1369// AsLicense is the BasicResponseBase implementation for CivicStructure.
1370func (cs CivicStructure) AsLicense() (*License, bool) {
1371	return nil, false
1372}
1373
1374// AsStructuredValue is the BasicResponseBase implementation for CivicStructure.
1375func (cs CivicStructure) AsStructuredValue() (*StructuredValue, bool) {
1376	return nil, false
1377}
1378
1379// AsBasicStructuredValue is the BasicResponseBase implementation for CivicStructure.
1380func (cs CivicStructure) AsBasicStructuredValue() (BasicStructuredValue, bool) {
1381	return nil, false
1382}
1383
1384// AsEntertainmentBusiness is the BasicResponseBase implementation for CivicStructure.
1385func (cs CivicStructure) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
1386	return nil, false
1387}
1388
1389// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for CivicStructure.
1390func (cs CivicStructure) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
1391	return nil, false
1392}
1393
1394// AsFoodEstablishment is the BasicResponseBase implementation for CivicStructure.
1395func (cs CivicStructure) AsFoodEstablishment() (*FoodEstablishment, bool) {
1396	return nil, false
1397}
1398
1399// AsBasicFoodEstablishment is the BasicResponseBase implementation for CivicStructure.
1400func (cs CivicStructure) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
1401	return nil, false
1402}
1403
1404// AsLodgingBusiness is the BasicResponseBase implementation for CivicStructure.
1405func (cs CivicStructure) AsLodgingBusiness() (*LodgingBusiness, bool) {
1406	return nil, false
1407}
1408
1409// AsBasicLodgingBusiness is the BasicResponseBase implementation for CivicStructure.
1410func (cs CivicStructure) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
1411	return nil, false
1412}
1413
1414// AsRestaurant is the BasicResponseBase implementation for CivicStructure.
1415func (cs CivicStructure) AsRestaurant() (*Restaurant, bool) {
1416	return nil, false
1417}
1418
1419// AsHotel is the BasicResponseBase implementation for CivicStructure.
1420func (cs CivicStructure) AsHotel() (*Hotel, bool) {
1421	return nil, false
1422}
1423
1424// AsResponseBase is the BasicResponseBase implementation for CivicStructure.
1425func (cs CivicStructure) AsResponseBase() (*ResponseBase, bool) {
1426	return nil, false
1427}
1428
1429// AsBasicResponseBase is the BasicResponseBase implementation for CivicStructure.
1430func (cs CivicStructure) AsBasicResponseBase() (BasicResponseBase, bool) {
1431	return &cs, true
1432}
1433
1434// UnmarshalJSON is the custom unmarshaler for CivicStructure struct.
1435func (cs *CivicStructure) UnmarshalJSON(body []byte) error {
1436	var m map[string]*json.RawMessage
1437	err := json.Unmarshal(body, &m)
1438	if err != nil {
1439		return err
1440	}
1441	for k, v := range m {
1442		switch k {
1443		case "address":
1444			if v != nil {
1445				var address PostalAddress
1446				err = json.Unmarshal(*v, &address)
1447				if err != nil {
1448					return err
1449				}
1450				cs.Address = &address
1451			}
1452		case "telephone":
1453			if v != nil {
1454				var telephone string
1455				err = json.Unmarshal(*v, &telephone)
1456				if err != nil {
1457					return err
1458				}
1459				cs.Telephone = &telephone
1460			}
1461		case "name":
1462			if v != nil {
1463				var name string
1464				err = json.Unmarshal(*v, &name)
1465				if err != nil {
1466					return err
1467				}
1468				cs.Name = &name
1469			}
1470		case "url":
1471			if v != nil {
1472				var URL string
1473				err = json.Unmarshal(*v, &URL)
1474				if err != nil {
1475					return err
1476				}
1477				cs.URL = &URL
1478			}
1479		case "image":
1480			if v != nil {
1481				var imageVar ImageObject
1482				err = json.Unmarshal(*v, &imageVar)
1483				if err != nil {
1484					return err
1485				}
1486				cs.Image = &imageVar
1487			}
1488		case "description":
1489			if v != nil {
1490				var description string
1491				err = json.Unmarshal(*v, &description)
1492				if err != nil {
1493					return err
1494				}
1495				cs.Description = &description
1496			}
1497		case "entityPresentationInfo":
1498			if v != nil {
1499				var entityPresentationInfo EntitiesEntityPresentationInfo
1500				err = json.Unmarshal(*v, &entityPresentationInfo)
1501				if err != nil {
1502					return err
1503				}
1504				cs.EntityPresentationInfo = &entityPresentationInfo
1505			}
1506		case "bingId":
1507			if v != nil {
1508				var bingID string
1509				err = json.Unmarshal(*v, &bingID)
1510				if err != nil {
1511					return err
1512				}
1513				cs.BingID = &bingID
1514			}
1515		case "contractualRules":
1516			if v != nil {
1517				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
1518				if err != nil {
1519					return err
1520				}
1521				cs.ContractualRules = &contractualRules
1522			}
1523		case "webSearchUrl":
1524			if v != nil {
1525				var webSearchURL string
1526				err = json.Unmarshal(*v, &webSearchURL)
1527				if err != nil {
1528					return err
1529				}
1530				cs.WebSearchURL = &webSearchURL
1531			}
1532		case "id":
1533			if v != nil {
1534				var ID string
1535				err = json.Unmarshal(*v, &ID)
1536				if err != nil {
1537					return err
1538				}
1539				cs.ID = &ID
1540			}
1541		case "_type":
1542			if v != nil {
1543				var typeVar TypeBasicResponseBase
1544				err = json.Unmarshal(*v, &typeVar)
1545				if err != nil {
1546					return err
1547				}
1548				cs.Type = typeVar
1549			}
1550		}
1551	}
1552
1553	return nil
1554}
1555
1556// BasicContractualRulesAttribution ...
1557type BasicContractualRulesAttribution interface {
1558	AsContractualRulesLicenseAttribution() (*ContractualRulesLicenseAttribution, bool)
1559	AsContractualRulesLinkAttribution() (*ContractualRulesLinkAttribution, bool)
1560	AsContractualRulesMediaAttribution() (*ContractualRulesMediaAttribution, bool)
1561	AsContractualRulesTextAttribution() (*ContractualRulesTextAttribution, bool)
1562	AsContractualRulesAttribution() (*ContractualRulesAttribution, bool)
1563}
1564
1565// ContractualRulesAttribution ...
1566type ContractualRulesAttribution struct {
1567	// MustBeCloseToContent - READ-ONLY; A Boolean value that determines whether the contents of the rule must be placed in close proximity to the field that the rule applies to. If true, the contents must be placed in close proximity. If false, or this field does not exist, the contents may be placed at the caller's discretion.
1568	MustBeCloseToContent *bool `json:"mustBeCloseToContent,omitempty"`
1569	// TargetPropertyName - READ-ONLY; The name of the field that the rule applies to.
1570	TargetPropertyName *string `json:"targetPropertyName,omitempty"`
1571	// Type - Possible values include: 'TypeContractualRulesContractualRule', 'TypeContractualRulesAttribution', 'TypeContractualRulesLicenseAttribution', 'TypeContractualRulesLinkAttribution', 'TypeContractualRulesMediaAttribution', 'TypeContractualRulesTextAttribution'
1572	Type Type `json:"_type,omitempty"`
1573}
1574
1575func unmarshalBasicContractualRulesAttribution(body []byte) (BasicContractualRulesAttribution, error) {
1576	var m map[string]interface{}
1577	err := json.Unmarshal(body, &m)
1578	if err != nil {
1579		return nil, err
1580	}
1581
1582	switch m["_type"] {
1583	case string(TypeContractualRulesLicenseAttribution):
1584		var crla ContractualRulesLicenseAttribution
1585		err := json.Unmarshal(body, &crla)
1586		return crla, err
1587	case string(TypeContractualRulesLinkAttribution):
1588		var crla ContractualRulesLinkAttribution
1589		err := json.Unmarshal(body, &crla)
1590		return crla, err
1591	case string(TypeContractualRulesMediaAttribution):
1592		var crma ContractualRulesMediaAttribution
1593		err := json.Unmarshal(body, &crma)
1594		return crma, err
1595	case string(TypeContractualRulesTextAttribution):
1596		var crta ContractualRulesTextAttribution
1597		err := json.Unmarshal(body, &crta)
1598		return crta, err
1599	default:
1600		var cra ContractualRulesAttribution
1601		err := json.Unmarshal(body, &cra)
1602		return cra, err
1603	}
1604}
1605func unmarshalBasicContractualRulesAttributionArray(body []byte) ([]BasicContractualRulesAttribution, error) {
1606	var rawMessages []*json.RawMessage
1607	err := json.Unmarshal(body, &rawMessages)
1608	if err != nil {
1609		return nil, err
1610	}
1611
1612	craArray := make([]BasicContractualRulesAttribution, len(rawMessages))
1613
1614	for index, rawMessage := range rawMessages {
1615		cra, err := unmarshalBasicContractualRulesAttribution(*rawMessage)
1616		if err != nil {
1617			return nil, err
1618		}
1619		craArray[index] = cra
1620	}
1621	return craArray, nil
1622}
1623
1624// MarshalJSON is the custom marshaler for ContractualRulesAttribution.
1625func (cra ContractualRulesAttribution) MarshalJSON() ([]byte, error) {
1626	cra.Type = TypeContractualRulesAttribution
1627	objectMap := make(map[string]interface{})
1628	if cra.Type != "" {
1629		objectMap["_type"] = cra.Type
1630	}
1631	return json.Marshal(objectMap)
1632}
1633
1634// AsContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesAttribution.
1635func (cra ContractualRulesAttribution) AsContractualRulesAttribution() (*ContractualRulesAttribution, bool) {
1636	return &cra, true
1637}
1638
1639// AsBasicContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesAttribution.
1640func (cra ContractualRulesAttribution) AsBasicContractualRulesAttribution() (BasicContractualRulesAttribution, bool) {
1641	return &cra, true
1642}
1643
1644// AsContractualRulesLicenseAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesAttribution.
1645func (cra ContractualRulesAttribution) AsContractualRulesLicenseAttribution() (*ContractualRulesLicenseAttribution, bool) {
1646	return nil, false
1647}
1648
1649// AsContractualRulesLinkAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesAttribution.
1650func (cra ContractualRulesAttribution) AsContractualRulesLinkAttribution() (*ContractualRulesLinkAttribution, bool) {
1651	return nil, false
1652}
1653
1654// AsContractualRulesMediaAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesAttribution.
1655func (cra ContractualRulesAttribution) AsContractualRulesMediaAttribution() (*ContractualRulesMediaAttribution, bool) {
1656	return nil, false
1657}
1658
1659// AsContractualRulesTextAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesAttribution.
1660func (cra ContractualRulesAttribution) AsContractualRulesTextAttribution() (*ContractualRulesTextAttribution, bool) {
1661	return nil, false
1662}
1663
1664// AsContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesAttribution.
1665func (cra ContractualRulesAttribution) AsContractualRulesContractualRule() (*ContractualRulesContractualRule, bool) {
1666	return nil, false
1667}
1668
1669// AsBasicContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesAttribution.
1670func (cra ContractualRulesAttribution) AsBasicContractualRulesContractualRule() (BasicContractualRulesContractualRule, bool) {
1671	return &cra, true
1672}
1673
1674// BasicContractualRulesContractualRule ...
1675type BasicContractualRulesContractualRule interface {
1676	AsContractualRulesAttribution() (*ContractualRulesAttribution, bool)
1677	AsBasicContractualRulesAttribution() (BasicContractualRulesAttribution, bool)
1678	AsContractualRulesLicenseAttribution() (*ContractualRulesLicenseAttribution, bool)
1679	AsContractualRulesLinkAttribution() (*ContractualRulesLinkAttribution, bool)
1680	AsContractualRulesMediaAttribution() (*ContractualRulesMediaAttribution, bool)
1681	AsContractualRulesTextAttribution() (*ContractualRulesTextAttribution, bool)
1682	AsContractualRulesContractualRule() (*ContractualRulesContractualRule, bool)
1683}
1684
1685// ContractualRulesContractualRule ...
1686type ContractualRulesContractualRule struct {
1687	// TargetPropertyName - READ-ONLY; The name of the field that the rule applies to.
1688	TargetPropertyName *string `json:"targetPropertyName,omitempty"`
1689	// Type - Possible values include: 'TypeContractualRulesContractualRule', 'TypeContractualRulesAttribution', 'TypeContractualRulesLicenseAttribution', 'TypeContractualRulesLinkAttribution', 'TypeContractualRulesMediaAttribution', 'TypeContractualRulesTextAttribution'
1690	Type Type `json:"_type,omitempty"`
1691}
1692
1693func unmarshalBasicContractualRulesContractualRule(body []byte) (BasicContractualRulesContractualRule, error) {
1694	var m map[string]interface{}
1695	err := json.Unmarshal(body, &m)
1696	if err != nil {
1697		return nil, err
1698	}
1699
1700	switch m["_type"] {
1701	case string(TypeContractualRulesAttribution):
1702		var cra ContractualRulesAttribution
1703		err := json.Unmarshal(body, &cra)
1704		return cra, err
1705	case string(TypeContractualRulesLicenseAttribution):
1706		var crla ContractualRulesLicenseAttribution
1707		err := json.Unmarshal(body, &crla)
1708		return crla, err
1709	case string(TypeContractualRulesLinkAttribution):
1710		var crla ContractualRulesLinkAttribution
1711		err := json.Unmarshal(body, &crla)
1712		return crla, err
1713	case string(TypeContractualRulesMediaAttribution):
1714		var crma ContractualRulesMediaAttribution
1715		err := json.Unmarshal(body, &crma)
1716		return crma, err
1717	case string(TypeContractualRulesTextAttribution):
1718		var crta ContractualRulesTextAttribution
1719		err := json.Unmarshal(body, &crta)
1720		return crta, err
1721	default:
1722		var crcr ContractualRulesContractualRule
1723		err := json.Unmarshal(body, &crcr)
1724		return crcr, err
1725	}
1726}
1727func unmarshalBasicContractualRulesContractualRuleArray(body []byte) ([]BasicContractualRulesContractualRule, error) {
1728	var rawMessages []*json.RawMessage
1729	err := json.Unmarshal(body, &rawMessages)
1730	if err != nil {
1731		return nil, err
1732	}
1733
1734	crcrArray := make([]BasicContractualRulesContractualRule, len(rawMessages))
1735
1736	for index, rawMessage := range rawMessages {
1737		crcr, err := unmarshalBasicContractualRulesContractualRule(*rawMessage)
1738		if err != nil {
1739			return nil, err
1740		}
1741		crcrArray[index] = crcr
1742	}
1743	return crcrArray, nil
1744}
1745
1746// MarshalJSON is the custom marshaler for ContractualRulesContractualRule.
1747func (crcr ContractualRulesContractualRule) MarshalJSON() ([]byte, error) {
1748	crcr.Type = TypeContractualRulesContractualRule
1749	objectMap := make(map[string]interface{})
1750	if crcr.Type != "" {
1751		objectMap["_type"] = crcr.Type
1752	}
1753	return json.Marshal(objectMap)
1754}
1755
1756// AsContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesContractualRule.
1757func (crcr ContractualRulesContractualRule) AsContractualRulesAttribution() (*ContractualRulesAttribution, bool) {
1758	return nil, false
1759}
1760
1761// AsBasicContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesContractualRule.
1762func (crcr ContractualRulesContractualRule) AsBasicContractualRulesAttribution() (BasicContractualRulesAttribution, bool) {
1763	return nil, false
1764}
1765
1766// AsContractualRulesLicenseAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesContractualRule.
1767func (crcr ContractualRulesContractualRule) AsContractualRulesLicenseAttribution() (*ContractualRulesLicenseAttribution, bool) {
1768	return nil, false
1769}
1770
1771// AsContractualRulesLinkAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesContractualRule.
1772func (crcr ContractualRulesContractualRule) AsContractualRulesLinkAttribution() (*ContractualRulesLinkAttribution, bool) {
1773	return nil, false
1774}
1775
1776// AsContractualRulesMediaAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesContractualRule.
1777func (crcr ContractualRulesContractualRule) AsContractualRulesMediaAttribution() (*ContractualRulesMediaAttribution, bool) {
1778	return nil, false
1779}
1780
1781// AsContractualRulesTextAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesContractualRule.
1782func (crcr ContractualRulesContractualRule) AsContractualRulesTextAttribution() (*ContractualRulesTextAttribution, bool) {
1783	return nil, false
1784}
1785
1786// AsContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesContractualRule.
1787func (crcr ContractualRulesContractualRule) AsContractualRulesContractualRule() (*ContractualRulesContractualRule, bool) {
1788	return &crcr, true
1789}
1790
1791// AsBasicContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesContractualRule.
1792func (crcr ContractualRulesContractualRule) AsBasicContractualRulesContractualRule() (BasicContractualRulesContractualRule, bool) {
1793	return &crcr, true
1794}
1795
1796// ContractualRulesLicenseAttribution defines a contractual rule for license attribution.
1797type ContractualRulesLicenseAttribution struct {
1798	// License - READ-ONLY; The license under which the content may be used.
1799	License *License `json:"license,omitempty"`
1800	// LicenseNotice - READ-ONLY; The license to display next to the targeted field.
1801	LicenseNotice *string `json:"licenseNotice,omitempty"`
1802	// MustBeCloseToContent - READ-ONLY; A Boolean value that determines whether the contents of the rule must be placed in close proximity to the field that the rule applies to. If true, the contents must be placed in close proximity. If false, or this field does not exist, the contents may be placed at the caller's discretion.
1803	MustBeCloseToContent *bool `json:"mustBeCloseToContent,omitempty"`
1804	// TargetPropertyName - READ-ONLY; The name of the field that the rule applies to.
1805	TargetPropertyName *string `json:"targetPropertyName,omitempty"`
1806	// Type - Possible values include: 'TypeContractualRulesContractualRule', 'TypeContractualRulesAttribution', 'TypeContractualRulesLicenseAttribution', 'TypeContractualRulesLinkAttribution', 'TypeContractualRulesMediaAttribution', 'TypeContractualRulesTextAttribution'
1807	Type Type `json:"_type,omitempty"`
1808}
1809
1810// MarshalJSON is the custom marshaler for ContractualRulesLicenseAttribution.
1811func (crla ContractualRulesLicenseAttribution) MarshalJSON() ([]byte, error) {
1812	crla.Type = TypeContractualRulesLicenseAttribution
1813	objectMap := make(map[string]interface{})
1814	if crla.Type != "" {
1815		objectMap["_type"] = crla.Type
1816	}
1817	return json.Marshal(objectMap)
1818}
1819
1820// AsContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLicenseAttribution.
1821func (crla ContractualRulesLicenseAttribution) AsContractualRulesAttribution() (*ContractualRulesAttribution, bool) {
1822	return nil, false
1823}
1824
1825// AsBasicContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLicenseAttribution.
1826func (crla ContractualRulesLicenseAttribution) AsBasicContractualRulesAttribution() (BasicContractualRulesAttribution, bool) {
1827	return &crla, true
1828}
1829
1830// AsContractualRulesLicenseAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLicenseAttribution.
1831func (crla ContractualRulesLicenseAttribution) AsContractualRulesLicenseAttribution() (*ContractualRulesLicenseAttribution, bool) {
1832	return &crla, true
1833}
1834
1835// AsContractualRulesLinkAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLicenseAttribution.
1836func (crla ContractualRulesLicenseAttribution) AsContractualRulesLinkAttribution() (*ContractualRulesLinkAttribution, bool) {
1837	return nil, false
1838}
1839
1840// AsContractualRulesMediaAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLicenseAttribution.
1841func (crla ContractualRulesLicenseAttribution) AsContractualRulesMediaAttribution() (*ContractualRulesMediaAttribution, bool) {
1842	return nil, false
1843}
1844
1845// AsContractualRulesTextAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLicenseAttribution.
1846func (crla ContractualRulesLicenseAttribution) AsContractualRulesTextAttribution() (*ContractualRulesTextAttribution, bool) {
1847	return nil, false
1848}
1849
1850// AsContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesLicenseAttribution.
1851func (crla ContractualRulesLicenseAttribution) AsContractualRulesContractualRule() (*ContractualRulesContractualRule, bool) {
1852	return nil, false
1853}
1854
1855// AsBasicContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesLicenseAttribution.
1856func (crla ContractualRulesLicenseAttribution) AsBasicContractualRulesContractualRule() (BasicContractualRulesContractualRule, bool) {
1857	return &crla, true
1858}
1859
1860// ContractualRulesLinkAttribution defines a contractual rule for link attribution.
1861type ContractualRulesLinkAttribution struct {
1862	// Text - The attribution text.
1863	Text *string `json:"text,omitempty"`
1864	// URL - The URL to the provider's website. Use text and URL to create the hyperlink.
1865	URL *string `json:"url,omitempty"`
1866	// OptionalForListDisplay - READ-ONLY; Indicates whether this provider's attribution is optional.
1867	OptionalForListDisplay *bool `json:"optionalForListDisplay,omitempty"`
1868	// MustBeCloseToContent - READ-ONLY; A Boolean value that determines whether the contents of the rule must be placed in close proximity to the field that the rule applies to. If true, the contents must be placed in close proximity. If false, or this field does not exist, the contents may be placed at the caller's discretion.
1869	MustBeCloseToContent *bool `json:"mustBeCloseToContent,omitempty"`
1870	// TargetPropertyName - READ-ONLY; The name of the field that the rule applies to.
1871	TargetPropertyName *string `json:"targetPropertyName,omitempty"`
1872	// Type - Possible values include: 'TypeContractualRulesContractualRule', 'TypeContractualRulesAttribution', 'TypeContractualRulesLicenseAttribution', 'TypeContractualRulesLinkAttribution', 'TypeContractualRulesMediaAttribution', 'TypeContractualRulesTextAttribution'
1873	Type Type `json:"_type,omitempty"`
1874}
1875
1876// MarshalJSON is the custom marshaler for ContractualRulesLinkAttribution.
1877func (crla ContractualRulesLinkAttribution) MarshalJSON() ([]byte, error) {
1878	crla.Type = TypeContractualRulesLinkAttribution
1879	objectMap := make(map[string]interface{})
1880	if crla.Text != nil {
1881		objectMap["text"] = crla.Text
1882	}
1883	if crla.URL != nil {
1884		objectMap["url"] = crla.URL
1885	}
1886	if crla.Type != "" {
1887		objectMap["_type"] = crla.Type
1888	}
1889	return json.Marshal(objectMap)
1890}
1891
1892// AsContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLinkAttribution.
1893func (crla ContractualRulesLinkAttribution) AsContractualRulesAttribution() (*ContractualRulesAttribution, bool) {
1894	return nil, false
1895}
1896
1897// AsBasicContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLinkAttribution.
1898func (crla ContractualRulesLinkAttribution) AsBasicContractualRulesAttribution() (BasicContractualRulesAttribution, bool) {
1899	return &crla, true
1900}
1901
1902// AsContractualRulesLicenseAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLinkAttribution.
1903func (crla ContractualRulesLinkAttribution) AsContractualRulesLicenseAttribution() (*ContractualRulesLicenseAttribution, bool) {
1904	return nil, false
1905}
1906
1907// AsContractualRulesLinkAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLinkAttribution.
1908func (crla ContractualRulesLinkAttribution) AsContractualRulesLinkAttribution() (*ContractualRulesLinkAttribution, bool) {
1909	return &crla, true
1910}
1911
1912// AsContractualRulesMediaAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLinkAttribution.
1913func (crla ContractualRulesLinkAttribution) AsContractualRulesMediaAttribution() (*ContractualRulesMediaAttribution, bool) {
1914	return nil, false
1915}
1916
1917// AsContractualRulesTextAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesLinkAttribution.
1918func (crla ContractualRulesLinkAttribution) AsContractualRulesTextAttribution() (*ContractualRulesTextAttribution, bool) {
1919	return nil, false
1920}
1921
1922// AsContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesLinkAttribution.
1923func (crla ContractualRulesLinkAttribution) AsContractualRulesContractualRule() (*ContractualRulesContractualRule, bool) {
1924	return nil, false
1925}
1926
1927// AsBasicContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesLinkAttribution.
1928func (crla ContractualRulesLinkAttribution) AsBasicContractualRulesContractualRule() (BasicContractualRulesContractualRule, bool) {
1929	return &crla, true
1930}
1931
1932// ContractualRulesMediaAttribution defines a contractual rule for media attribution.
1933type ContractualRulesMediaAttribution struct {
1934	// URL - READ-ONLY; The URL that you use to create of hyperlink of the media content. For example, if the target is an image, you would use the URL to make the image clickable.
1935	URL *string `json:"url,omitempty"`
1936	// MustBeCloseToContent - READ-ONLY; A Boolean value that determines whether the contents of the rule must be placed in close proximity to the field that the rule applies to. If true, the contents must be placed in close proximity. If false, or this field does not exist, the contents may be placed at the caller's discretion.
1937	MustBeCloseToContent *bool `json:"mustBeCloseToContent,omitempty"`
1938	// TargetPropertyName - READ-ONLY; The name of the field that the rule applies to.
1939	TargetPropertyName *string `json:"targetPropertyName,omitempty"`
1940	// Type - Possible values include: 'TypeContractualRulesContractualRule', 'TypeContractualRulesAttribution', 'TypeContractualRulesLicenseAttribution', 'TypeContractualRulesLinkAttribution', 'TypeContractualRulesMediaAttribution', 'TypeContractualRulesTextAttribution'
1941	Type Type `json:"_type,omitempty"`
1942}
1943
1944// MarshalJSON is the custom marshaler for ContractualRulesMediaAttribution.
1945func (crma ContractualRulesMediaAttribution) MarshalJSON() ([]byte, error) {
1946	crma.Type = TypeContractualRulesMediaAttribution
1947	objectMap := make(map[string]interface{})
1948	if crma.Type != "" {
1949		objectMap["_type"] = crma.Type
1950	}
1951	return json.Marshal(objectMap)
1952}
1953
1954// AsContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesMediaAttribution.
1955func (crma ContractualRulesMediaAttribution) AsContractualRulesAttribution() (*ContractualRulesAttribution, bool) {
1956	return nil, false
1957}
1958
1959// AsBasicContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesMediaAttribution.
1960func (crma ContractualRulesMediaAttribution) AsBasicContractualRulesAttribution() (BasicContractualRulesAttribution, bool) {
1961	return &crma, true
1962}
1963
1964// AsContractualRulesLicenseAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesMediaAttribution.
1965func (crma ContractualRulesMediaAttribution) AsContractualRulesLicenseAttribution() (*ContractualRulesLicenseAttribution, bool) {
1966	return nil, false
1967}
1968
1969// AsContractualRulesLinkAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesMediaAttribution.
1970func (crma ContractualRulesMediaAttribution) AsContractualRulesLinkAttribution() (*ContractualRulesLinkAttribution, bool) {
1971	return nil, false
1972}
1973
1974// AsContractualRulesMediaAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesMediaAttribution.
1975func (crma ContractualRulesMediaAttribution) AsContractualRulesMediaAttribution() (*ContractualRulesMediaAttribution, bool) {
1976	return &crma, true
1977}
1978
1979// AsContractualRulesTextAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesMediaAttribution.
1980func (crma ContractualRulesMediaAttribution) AsContractualRulesTextAttribution() (*ContractualRulesTextAttribution, bool) {
1981	return nil, false
1982}
1983
1984// AsContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesMediaAttribution.
1985func (crma ContractualRulesMediaAttribution) AsContractualRulesContractualRule() (*ContractualRulesContractualRule, bool) {
1986	return nil, false
1987}
1988
1989// AsBasicContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesMediaAttribution.
1990func (crma ContractualRulesMediaAttribution) AsBasicContractualRulesContractualRule() (BasicContractualRulesContractualRule, bool) {
1991	return &crma, true
1992}
1993
1994// ContractualRulesTextAttribution defines a contractual rule for text attribution.
1995type ContractualRulesTextAttribution struct {
1996	// Text - The attribution text. Text attribution applies to the entity as a whole and should be displayed immediately following the entity presentation. If there are multiple text or link attribution rules that do not specify a target, you should concatenate them and display them using a "Data from:" label.
1997	Text *string `json:"text,omitempty"`
1998	// OptionalForListDisplay - READ-ONLY; Indicates whether this provider's attribution is optional.
1999	OptionalForListDisplay *bool `json:"optionalForListDisplay,omitempty"`
2000	// MustBeCloseToContent - READ-ONLY; A Boolean value that determines whether the contents of the rule must be placed in close proximity to the field that the rule applies to. If true, the contents must be placed in close proximity. If false, or this field does not exist, the contents may be placed at the caller's discretion.
2001	MustBeCloseToContent *bool `json:"mustBeCloseToContent,omitempty"`
2002	// TargetPropertyName - READ-ONLY; The name of the field that the rule applies to.
2003	TargetPropertyName *string `json:"targetPropertyName,omitempty"`
2004	// Type - Possible values include: 'TypeContractualRulesContractualRule', 'TypeContractualRulesAttribution', 'TypeContractualRulesLicenseAttribution', 'TypeContractualRulesLinkAttribution', 'TypeContractualRulesMediaAttribution', 'TypeContractualRulesTextAttribution'
2005	Type Type `json:"_type,omitempty"`
2006}
2007
2008// MarshalJSON is the custom marshaler for ContractualRulesTextAttribution.
2009func (crta ContractualRulesTextAttribution) MarshalJSON() ([]byte, error) {
2010	crta.Type = TypeContractualRulesTextAttribution
2011	objectMap := make(map[string]interface{})
2012	if crta.Text != nil {
2013		objectMap["text"] = crta.Text
2014	}
2015	if crta.Type != "" {
2016		objectMap["_type"] = crta.Type
2017	}
2018	return json.Marshal(objectMap)
2019}
2020
2021// AsContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesTextAttribution.
2022func (crta ContractualRulesTextAttribution) AsContractualRulesAttribution() (*ContractualRulesAttribution, bool) {
2023	return nil, false
2024}
2025
2026// AsBasicContractualRulesAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesTextAttribution.
2027func (crta ContractualRulesTextAttribution) AsBasicContractualRulesAttribution() (BasicContractualRulesAttribution, bool) {
2028	return &crta, true
2029}
2030
2031// AsContractualRulesLicenseAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesTextAttribution.
2032func (crta ContractualRulesTextAttribution) AsContractualRulesLicenseAttribution() (*ContractualRulesLicenseAttribution, bool) {
2033	return nil, false
2034}
2035
2036// AsContractualRulesLinkAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesTextAttribution.
2037func (crta ContractualRulesTextAttribution) AsContractualRulesLinkAttribution() (*ContractualRulesLinkAttribution, bool) {
2038	return nil, false
2039}
2040
2041// AsContractualRulesMediaAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesTextAttribution.
2042func (crta ContractualRulesTextAttribution) AsContractualRulesMediaAttribution() (*ContractualRulesMediaAttribution, bool) {
2043	return nil, false
2044}
2045
2046// AsContractualRulesTextAttribution is the BasicContractualRulesContractualRule implementation for ContractualRulesTextAttribution.
2047func (crta ContractualRulesTextAttribution) AsContractualRulesTextAttribution() (*ContractualRulesTextAttribution, bool) {
2048	return &crta, true
2049}
2050
2051// AsContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesTextAttribution.
2052func (crta ContractualRulesTextAttribution) AsContractualRulesContractualRule() (*ContractualRulesContractualRule, bool) {
2053	return nil, false
2054}
2055
2056// AsBasicContractualRulesContractualRule is the BasicContractualRulesContractualRule implementation for ContractualRulesTextAttribution.
2057func (crta ContractualRulesTextAttribution) AsBasicContractualRulesContractualRule() (BasicContractualRulesContractualRule, bool) {
2058	return &crta, true
2059}
2060
2061// BasicCreativeWork ...
2062type BasicCreativeWork interface {
2063	AsImageObject() (*ImageObject, bool)
2064	AsMediaObject() (*MediaObject, bool)
2065	AsBasicMediaObject() (BasicMediaObject, bool)
2066	AsLicense() (*License, bool)
2067	AsCreativeWork() (*CreativeWork, bool)
2068}
2069
2070// CreativeWork ...
2071type CreativeWork struct {
2072	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
2073	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
2074	// Provider - READ-ONLY; The source of the creative work.
2075	Provider *[]BasicThing `json:"provider,omitempty"`
2076	// Text - READ-ONLY
2077	Text *string `json:"text,omitempty"`
2078	// Name - READ-ONLY; The name of the thing represented by this object.
2079	Name *string `json:"name,omitempty"`
2080	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
2081	URL *string `json:"url,omitempty"`
2082	// Image - READ-ONLY
2083	Image *ImageObject `json:"image,omitempty"`
2084	// Description - READ-ONLY; A short description of the item.
2085	Description *string `json:"description,omitempty"`
2086	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
2087	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
2088	// BingID - READ-ONLY; An ID that uniquely identifies this item.
2089	BingID *string `json:"bingId,omitempty"`
2090	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
2091	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
2092	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
2093	WebSearchURL *string `json:"webSearchUrl,omitempty"`
2094	// ID - READ-ONLY; A String identifier.
2095	ID *string `json:"id,omitempty"`
2096	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
2097	Type TypeBasicResponseBase `json:"_type,omitempty"`
2098}
2099
2100func unmarshalBasicCreativeWork(body []byte) (BasicCreativeWork, error) {
2101	var m map[string]interface{}
2102	err := json.Unmarshal(body, &m)
2103	if err != nil {
2104		return nil, err
2105	}
2106
2107	switch m["_type"] {
2108	case string(TypeImageObject):
2109		var ioVar ImageObject
2110		err := json.Unmarshal(body, &ioVar)
2111		return ioVar, err
2112	case string(TypeMediaObject):
2113		var mo MediaObject
2114		err := json.Unmarshal(body, &mo)
2115		return mo, err
2116	case string(TypeLicense):
2117		var l License
2118		err := json.Unmarshal(body, &l)
2119		return l, err
2120	default:
2121		var cw CreativeWork
2122		err := json.Unmarshal(body, &cw)
2123		return cw, err
2124	}
2125}
2126func unmarshalBasicCreativeWorkArray(body []byte) ([]BasicCreativeWork, error) {
2127	var rawMessages []*json.RawMessage
2128	err := json.Unmarshal(body, &rawMessages)
2129	if err != nil {
2130		return nil, err
2131	}
2132
2133	cwArray := make([]BasicCreativeWork, len(rawMessages))
2134
2135	for index, rawMessage := range rawMessages {
2136		cw, err := unmarshalBasicCreativeWork(*rawMessage)
2137		if err != nil {
2138			return nil, err
2139		}
2140		cwArray[index] = cw
2141	}
2142	return cwArray, nil
2143}
2144
2145// MarshalJSON is the custom marshaler for CreativeWork.
2146func (cw CreativeWork) MarshalJSON() ([]byte, error) {
2147	cw.Type = TypeCreativeWork
2148	objectMap := make(map[string]interface{})
2149	if cw.Type != "" {
2150		objectMap["_type"] = cw.Type
2151	}
2152	return json.Marshal(objectMap)
2153}
2154
2155// AsImageObject is the BasicResponseBase implementation for CreativeWork.
2156func (cw CreativeWork) AsImageObject() (*ImageObject, bool) {
2157	return nil, false
2158}
2159
2160// AsThing is the BasicResponseBase implementation for CreativeWork.
2161func (cw CreativeWork) AsThing() (*Thing, bool) {
2162	return nil, false
2163}
2164
2165// AsBasicThing is the BasicResponseBase implementation for CreativeWork.
2166func (cw CreativeWork) AsBasicThing() (BasicThing, bool) {
2167	return &cw, true
2168}
2169
2170// AsEntities is the BasicResponseBase implementation for CreativeWork.
2171func (cw CreativeWork) AsEntities() (*Entities, bool) {
2172	return nil, false
2173}
2174
2175// AsPlaces is the BasicResponseBase implementation for CreativeWork.
2176func (cw CreativeWork) AsPlaces() (*Places, bool) {
2177	return nil, false
2178}
2179
2180// AsSearchResponse is the BasicResponseBase implementation for CreativeWork.
2181func (cw CreativeWork) AsSearchResponse() (*SearchResponse, bool) {
2182	return nil, false
2183}
2184
2185// AsResponse is the BasicResponseBase implementation for CreativeWork.
2186func (cw CreativeWork) AsResponse() (*Response, bool) {
2187	return nil, false
2188}
2189
2190// AsBasicResponse is the BasicResponseBase implementation for CreativeWork.
2191func (cw CreativeWork) AsBasicResponse() (BasicResponse, bool) {
2192	return &cw, true
2193}
2194
2195// AsSearchResultsAnswer is the BasicResponseBase implementation for CreativeWork.
2196func (cw CreativeWork) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
2197	return nil, false
2198}
2199
2200// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for CreativeWork.
2201func (cw CreativeWork) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
2202	return nil, false
2203}
2204
2205// AsIdentifiable is the BasicResponseBase implementation for CreativeWork.
2206func (cw CreativeWork) AsIdentifiable() (*Identifiable, bool) {
2207	return nil, false
2208}
2209
2210// AsBasicIdentifiable is the BasicResponseBase implementation for CreativeWork.
2211func (cw CreativeWork) AsBasicIdentifiable() (BasicIdentifiable, bool) {
2212	return &cw, true
2213}
2214
2215// AsAnswer is the BasicResponseBase implementation for CreativeWork.
2216func (cw CreativeWork) AsAnswer() (*Answer, bool) {
2217	return nil, false
2218}
2219
2220// AsBasicAnswer is the BasicResponseBase implementation for CreativeWork.
2221func (cw CreativeWork) AsBasicAnswer() (BasicAnswer, bool) {
2222	return nil, false
2223}
2224
2225// AsErrorResponse is the BasicResponseBase implementation for CreativeWork.
2226func (cw CreativeWork) AsErrorResponse() (*ErrorResponse, bool) {
2227	return nil, false
2228}
2229
2230// AsPostalAddress is the BasicResponseBase implementation for CreativeWork.
2231func (cw CreativeWork) AsPostalAddress() (*PostalAddress, bool) {
2232	return nil, false
2233}
2234
2235// AsPlace is the BasicResponseBase implementation for CreativeWork.
2236func (cw CreativeWork) AsPlace() (*Place, bool) {
2237	return nil, false
2238}
2239
2240// AsBasicPlace is the BasicResponseBase implementation for CreativeWork.
2241func (cw CreativeWork) AsBasicPlace() (BasicPlace, bool) {
2242	return nil, false
2243}
2244
2245// AsOrganization is the BasicResponseBase implementation for CreativeWork.
2246func (cw CreativeWork) AsOrganization() (*Organization, bool) {
2247	return nil, false
2248}
2249
2250// AsCreativeWork is the BasicResponseBase implementation for CreativeWork.
2251func (cw CreativeWork) AsCreativeWork() (*CreativeWork, bool) {
2252	return &cw, true
2253}
2254
2255// AsBasicCreativeWork is the BasicResponseBase implementation for CreativeWork.
2256func (cw CreativeWork) AsBasicCreativeWork() (BasicCreativeWork, bool) {
2257	return &cw, true
2258}
2259
2260// AsIntangible is the BasicResponseBase implementation for CreativeWork.
2261func (cw CreativeWork) AsIntangible() (*Intangible, bool) {
2262	return nil, false
2263}
2264
2265// AsBasicIntangible is the BasicResponseBase implementation for CreativeWork.
2266func (cw CreativeWork) AsBasicIntangible() (BasicIntangible, bool) {
2267	return nil, false
2268}
2269
2270// AsMovieTheater is the BasicResponseBase implementation for CreativeWork.
2271func (cw CreativeWork) AsMovieTheater() (*MovieTheater, bool) {
2272	return nil, false
2273}
2274
2275// AsMediaObject is the BasicResponseBase implementation for CreativeWork.
2276func (cw CreativeWork) AsMediaObject() (*MediaObject, bool) {
2277	return nil, false
2278}
2279
2280// AsBasicMediaObject is the BasicResponseBase implementation for CreativeWork.
2281func (cw CreativeWork) AsBasicMediaObject() (BasicMediaObject, bool) {
2282	return nil, false
2283}
2284
2285// AsCivicStructure is the BasicResponseBase implementation for CreativeWork.
2286func (cw CreativeWork) AsCivicStructure() (*CivicStructure, bool) {
2287	return nil, false
2288}
2289
2290// AsBasicCivicStructure is the BasicResponseBase implementation for CreativeWork.
2291func (cw CreativeWork) AsBasicCivicStructure() (BasicCivicStructure, bool) {
2292	return nil, false
2293}
2294
2295// AsLocalBusiness is the BasicResponseBase implementation for CreativeWork.
2296func (cw CreativeWork) AsLocalBusiness() (*LocalBusiness, bool) {
2297	return nil, false
2298}
2299
2300// AsBasicLocalBusiness is the BasicResponseBase implementation for CreativeWork.
2301func (cw CreativeWork) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
2302	return nil, false
2303}
2304
2305// AsTouristAttraction is the BasicResponseBase implementation for CreativeWork.
2306func (cw CreativeWork) AsTouristAttraction() (*TouristAttraction, bool) {
2307	return nil, false
2308}
2309
2310// AsAirport is the BasicResponseBase implementation for CreativeWork.
2311func (cw CreativeWork) AsAirport() (*Airport, bool) {
2312	return nil, false
2313}
2314
2315// AsLicense is the BasicResponseBase implementation for CreativeWork.
2316func (cw CreativeWork) AsLicense() (*License, bool) {
2317	return nil, false
2318}
2319
2320// AsStructuredValue is the BasicResponseBase implementation for CreativeWork.
2321func (cw CreativeWork) AsStructuredValue() (*StructuredValue, bool) {
2322	return nil, false
2323}
2324
2325// AsBasicStructuredValue is the BasicResponseBase implementation for CreativeWork.
2326func (cw CreativeWork) AsBasicStructuredValue() (BasicStructuredValue, bool) {
2327	return nil, false
2328}
2329
2330// AsEntertainmentBusiness is the BasicResponseBase implementation for CreativeWork.
2331func (cw CreativeWork) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
2332	return nil, false
2333}
2334
2335// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for CreativeWork.
2336func (cw CreativeWork) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
2337	return nil, false
2338}
2339
2340// AsFoodEstablishment is the BasicResponseBase implementation for CreativeWork.
2341func (cw CreativeWork) AsFoodEstablishment() (*FoodEstablishment, bool) {
2342	return nil, false
2343}
2344
2345// AsBasicFoodEstablishment is the BasicResponseBase implementation for CreativeWork.
2346func (cw CreativeWork) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
2347	return nil, false
2348}
2349
2350// AsLodgingBusiness is the BasicResponseBase implementation for CreativeWork.
2351func (cw CreativeWork) AsLodgingBusiness() (*LodgingBusiness, bool) {
2352	return nil, false
2353}
2354
2355// AsBasicLodgingBusiness is the BasicResponseBase implementation for CreativeWork.
2356func (cw CreativeWork) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
2357	return nil, false
2358}
2359
2360// AsRestaurant is the BasicResponseBase implementation for CreativeWork.
2361func (cw CreativeWork) AsRestaurant() (*Restaurant, bool) {
2362	return nil, false
2363}
2364
2365// AsHotel is the BasicResponseBase implementation for CreativeWork.
2366func (cw CreativeWork) AsHotel() (*Hotel, bool) {
2367	return nil, false
2368}
2369
2370// AsResponseBase is the BasicResponseBase implementation for CreativeWork.
2371func (cw CreativeWork) AsResponseBase() (*ResponseBase, bool) {
2372	return nil, false
2373}
2374
2375// AsBasicResponseBase is the BasicResponseBase implementation for CreativeWork.
2376func (cw CreativeWork) AsBasicResponseBase() (BasicResponseBase, bool) {
2377	return &cw, true
2378}
2379
2380// UnmarshalJSON is the custom unmarshaler for CreativeWork struct.
2381func (cw *CreativeWork) UnmarshalJSON(body []byte) error {
2382	var m map[string]*json.RawMessage
2383	err := json.Unmarshal(body, &m)
2384	if err != nil {
2385		return err
2386	}
2387	for k, v := range m {
2388		switch k {
2389		case "thumbnailUrl":
2390			if v != nil {
2391				var thumbnailURL string
2392				err = json.Unmarshal(*v, &thumbnailURL)
2393				if err != nil {
2394					return err
2395				}
2396				cw.ThumbnailURL = &thumbnailURL
2397			}
2398		case "provider":
2399			if v != nil {
2400				provider, err := unmarshalBasicThingArray(*v)
2401				if err != nil {
2402					return err
2403				}
2404				cw.Provider = &provider
2405			}
2406		case "text":
2407			if v != nil {
2408				var textVar string
2409				err = json.Unmarshal(*v, &textVar)
2410				if err != nil {
2411					return err
2412				}
2413				cw.Text = &textVar
2414			}
2415		case "name":
2416			if v != nil {
2417				var name string
2418				err = json.Unmarshal(*v, &name)
2419				if err != nil {
2420					return err
2421				}
2422				cw.Name = &name
2423			}
2424		case "url":
2425			if v != nil {
2426				var URL string
2427				err = json.Unmarshal(*v, &URL)
2428				if err != nil {
2429					return err
2430				}
2431				cw.URL = &URL
2432			}
2433		case "image":
2434			if v != nil {
2435				var imageVar ImageObject
2436				err = json.Unmarshal(*v, &imageVar)
2437				if err != nil {
2438					return err
2439				}
2440				cw.Image = &imageVar
2441			}
2442		case "description":
2443			if v != nil {
2444				var description string
2445				err = json.Unmarshal(*v, &description)
2446				if err != nil {
2447					return err
2448				}
2449				cw.Description = &description
2450			}
2451		case "entityPresentationInfo":
2452			if v != nil {
2453				var entityPresentationInfo EntitiesEntityPresentationInfo
2454				err = json.Unmarshal(*v, &entityPresentationInfo)
2455				if err != nil {
2456					return err
2457				}
2458				cw.EntityPresentationInfo = &entityPresentationInfo
2459			}
2460		case "bingId":
2461			if v != nil {
2462				var bingID string
2463				err = json.Unmarshal(*v, &bingID)
2464				if err != nil {
2465					return err
2466				}
2467				cw.BingID = &bingID
2468			}
2469		case "contractualRules":
2470			if v != nil {
2471				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
2472				if err != nil {
2473					return err
2474				}
2475				cw.ContractualRules = &contractualRules
2476			}
2477		case "webSearchUrl":
2478			if v != nil {
2479				var webSearchURL string
2480				err = json.Unmarshal(*v, &webSearchURL)
2481				if err != nil {
2482					return err
2483				}
2484				cw.WebSearchURL = &webSearchURL
2485			}
2486		case "id":
2487			if v != nil {
2488				var ID string
2489				err = json.Unmarshal(*v, &ID)
2490				if err != nil {
2491					return err
2492				}
2493				cw.ID = &ID
2494			}
2495		case "_type":
2496			if v != nil {
2497				var typeVar TypeBasicResponseBase
2498				err = json.Unmarshal(*v, &typeVar)
2499				if err != nil {
2500					return err
2501				}
2502				cw.Type = typeVar
2503			}
2504		}
2505	}
2506
2507	return nil
2508}
2509
2510// BasicEntertainmentBusiness ...
2511type BasicEntertainmentBusiness interface {
2512	AsMovieTheater() (*MovieTheater, bool)
2513	AsEntertainmentBusiness() (*EntertainmentBusiness, bool)
2514}
2515
2516// EntertainmentBusiness ...
2517type EntertainmentBusiness struct {
2518	// PriceRange - READ-ONLY; $$.
2519	PriceRange *string `json:"priceRange,omitempty"`
2520	// Panoramas - READ-ONLY
2521	Panoramas *[]ImageObject `json:"panoramas,omitempty"`
2522	// IsPermanentlyClosed - READ-ONLY
2523	IsPermanentlyClosed *bool `json:"isPermanentlyClosed,omitempty"`
2524	// TagLine - READ-ONLY
2525	TagLine *string `json:"tagLine,omitempty"`
2526	// Address - READ-ONLY; The postal address of where the entity is located
2527	Address *PostalAddress `json:"address,omitempty"`
2528	// Telephone - READ-ONLY; The entity's telephone number
2529	Telephone *string `json:"telephone,omitempty"`
2530	// Name - READ-ONLY; The name of the thing represented by this object.
2531	Name *string `json:"name,omitempty"`
2532	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
2533	URL *string `json:"url,omitempty"`
2534	// Image - READ-ONLY
2535	Image *ImageObject `json:"image,omitempty"`
2536	// Description - READ-ONLY; A short description of the item.
2537	Description *string `json:"description,omitempty"`
2538	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
2539	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
2540	// BingID - READ-ONLY; An ID that uniquely identifies this item.
2541	BingID *string `json:"bingId,omitempty"`
2542	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
2543	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
2544	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
2545	WebSearchURL *string `json:"webSearchUrl,omitempty"`
2546	// ID - READ-ONLY; A String identifier.
2547	ID *string `json:"id,omitempty"`
2548	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
2549	Type TypeBasicResponseBase `json:"_type,omitempty"`
2550}
2551
2552func unmarshalBasicEntertainmentBusiness(body []byte) (BasicEntertainmentBusiness, error) {
2553	var m map[string]interface{}
2554	err := json.Unmarshal(body, &m)
2555	if err != nil {
2556		return nil, err
2557	}
2558
2559	switch m["_type"] {
2560	case string(TypeMovieTheater):
2561		var mt MovieTheater
2562		err := json.Unmarshal(body, &mt)
2563		return mt, err
2564	default:
2565		var eb EntertainmentBusiness
2566		err := json.Unmarshal(body, &eb)
2567		return eb, err
2568	}
2569}
2570func unmarshalBasicEntertainmentBusinessArray(body []byte) ([]BasicEntertainmentBusiness, error) {
2571	var rawMessages []*json.RawMessage
2572	err := json.Unmarshal(body, &rawMessages)
2573	if err != nil {
2574		return nil, err
2575	}
2576
2577	ebArray := make([]BasicEntertainmentBusiness, len(rawMessages))
2578
2579	for index, rawMessage := range rawMessages {
2580		eb, err := unmarshalBasicEntertainmentBusiness(*rawMessage)
2581		if err != nil {
2582			return nil, err
2583		}
2584		ebArray[index] = eb
2585	}
2586	return ebArray, nil
2587}
2588
2589// MarshalJSON is the custom marshaler for EntertainmentBusiness.
2590func (eb EntertainmentBusiness) MarshalJSON() ([]byte, error) {
2591	eb.Type = TypeEntertainmentBusiness
2592	objectMap := make(map[string]interface{})
2593	if eb.Type != "" {
2594		objectMap["_type"] = eb.Type
2595	}
2596	return json.Marshal(objectMap)
2597}
2598
2599// AsImageObject is the BasicResponseBase implementation for EntertainmentBusiness.
2600func (eb EntertainmentBusiness) AsImageObject() (*ImageObject, bool) {
2601	return nil, false
2602}
2603
2604// AsThing is the BasicResponseBase implementation for EntertainmentBusiness.
2605func (eb EntertainmentBusiness) AsThing() (*Thing, bool) {
2606	return nil, false
2607}
2608
2609// AsBasicThing is the BasicResponseBase implementation for EntertainmentBusiness.
2610func (eb EntertainmentBusiness) AsBasicThing() (BasicThing, bool) {
2611	return &eb, true
2612}
2613
2614// AsEntities is the BasicResponseBase implementation for EntertainmentBusiness.
2615func (eb EntertainmentBusiness) AsEntities() (*Entities, bool) {
2616	return nil, false
2617}
2618
2619// AsPlaces is the BasicResponseBase implementation for EntertainmentBusiness.
2620func (eb EntertainmentBusiness) AsPlaces() (*Places, bool) {
2621	return nil, false
2622}
2623
2624// AsSearchResponse is the BasicResponseBase implementation for EntertainmentBusiness.
2625func (eb EntertainmentBusiness) AsSearchResponse() (*SearchResponse, bool) {
2626	return nil, false
2627}
2628
2629// AsResponse is the BasicResponseBase implementation for EntertainmentBusiness.
2630func (eb EntertainmentBusiness) AsResponse() (*Response, bool) {
2631	return nil, false
2632}
2633
2634// AsBasicResponse is the BasicResponseBase implementation for EntertainmentBusiness.
2635func (eb EntertainmentBusiness) AsBasicResponse() (BasicResponse, bool) {
2636	return &eb, true
2637}
2638
2639// AsSearchResultsAnswer is the BasicResponseBase implementation for EntertainmentBusiness.
2640func (eb EntertainmentBusiness) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
2641	return nil, false
2642}
2643
2644// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for EntertainmentBusiness.
2645func (eb EntertainmentBusiness) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
2646	return nil, false
2647}
2648
2649// AsIdentifiable is the BasicResponseBase implementation for EntertainmentBusiness.
2650func (eb EntertainmentBusiness) AsIdentifiable() (*Identifiable, bool) {
2651	return nil, false
2652}
2653
2654// AsBasicIdentifiable is the BasicResponseBase implementation for EntertainmentBusiness.
2655func (eb EntertainmentBusiness) AsBasicIdentifiable() (BasicIdentifiable, bool) {
2656	return &eb, true
2657}
2658
2659// AsAnswer is the BasicResponseBase implementation for EntertainmentBusiness.
2660func (eb EntertainmentBusiness) AsAnswer() (*Answer, bool) {
2661	return nil, false
2662}
2663
2664// AsBasicAnswer is the BasicResponseBase implementation for EntertainmentBusiness.
2665func (eb EntertainmentBusiness) AsBasicAnswer() (BasicAnswer, bool) {
2666	return nil, false
2667}
2668
2669// AsErrorResponse is the BasicResponseBase implementation for EntertainmentBusiness.
2670func (eb EntertainmentBusiness) AsErrorResponse() (*ErrorResponse, bool) {
2671	return nil, false
2672}
2673
2674// AsPostalAddress is the BasicResponseBase implementation for EntertainmentBusiness.
2675func (eb EntertainmentBusiness) AsPostalAddress() (*PostalAddress, bool) {
2676	return nil, false
2677}
2678
2679// AsPlace is the BasicResponseBase implementation for EntertainmentBusiness.
2680func (eb EntertainmentBusiness) AsPlace() (*Place, bool) {
2681	return nil, false
2682}
2683
2684// AsBasicPlace is the BasicResponseBase implementation for EntertainmentBusiness.
2685func (eb EntertainmentBusiness) AsBasicPlace() (BasicPlace, bool) {
2686	return &eb, true
2687}
2688
2689// AsOrganization is the BasicResponseBase implementation for EntertainmentBusiness.
2690func (eb EntertainmentBusiness) AsOrganization() (*Organization, bool) {
2691	return nil, false
2692}
2693
2694// AsCreativeWork is the BasicResponseBase implementation for EntertainmentBusiness.
2695func (eb EntertainmentBusiness) AsCreativeWork() (*CreativeWork, bool) {
2696	return nil, false
2697}
2698
2699// AsBasicCreativeWork is the BasicResponseBase implementation for EntertainmentBusiness.
2700func (eb EntertainmentBusiness) AsBasicCreativeWork() (BasicCreativeWork, bool) {
2701	return nil, false
2702}
2703
2704// AsIntangible is the BasicResponseBase implementation for EntertainmentBusiness.
2705func (eb EntertainmentBusiness) AsIntangible() (*Intangible, bool) {
2706	return nil, false
2707}
2708
2709// AsBasicIntangible is the BasicResponseBase implementation for EntertainmentBusiness.
2710func (eb EntertainmentBusiness) AsBasicIntangible() (BasicIntangible, bool) {
2711	return nil, false
2712}
2713
2714// AsMovieTheater is the BasicResponseBase implementation for EntertainmentBusiness.
2715func (eb EntertainmentBusiness) AsMovieTheater() (*MovieTheater, bool) {
2716	return nil, false
2717}
2718
2719// AsMediaObject is the BasicResponseBase implementation for EntertainmentBusiness.
2720func (eb EntertainmentBusiness) AsMediaObject() (*MediaObject, bool) {
2721	return nil, false
2722}
2723
2724// AsBasicMediaObject is the BasicResponseBase implementation for EntertainmentBusiness.
2725func (eb EntertainmentBusiness) AsBasicMediaObject() (BasicMediaObject, bool) {
2726	return nil, false
2727}
2728
2729// AsCivicStructure is the BasicResponseBase implementation for EntertainmentBusiness.
2730func (eb EntertainmentBusiness) AsCivicStructure() (*CivicStructure, bool) {
2731	return nil, false
2732}
2733
2734// AsBasicCivicStructure is the BasicResponseBase implementation for EntertainmentBusiness.
2735func (eb EntertainmentBusiness) AsBasicCivicStructure() (BasicCivicStructure, bool) {
2736	return nil, false
2737}
2738
2739// AsLocalBusiness is the BasicResponseBase implementation for EntertainmentBusiness.
2740func (eb EntertainmentBusiness) AsLocalBusiness() (*LocalBusiness, bool) {
2741	return nil, false
2742}
2743
2744// AsBasicLocalBusiness is the BasicResponseBase implementation for EntertainmentBusiness.
2745func (eb EntertainmentBusiness) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
2746	return &eb, true
2747}
2748
2749// AsTouristAttraction is the BasicResponseBase implementation for EntertainmentBusiness.
2750func (eb EntertainmentBusiness) AsTouristAttraction() (*TouristAttraction, bool) {
2751	return nil, false
2752}
2753
2754// AsAirport is the BasicResponseBase implementation for EntertainmentBusiness.
2755func (eb EntertainmentBusiness) AsAirport() (*Airport, bool) {
2756	return nil, false
2757}
2758
2759// AsLicense is the BasicResponseBase implementation for EntertainmentBusiness.
2760func (eb EntertainmentBusiness) AsLicense() (*License, bool) {
2761	return nil, false
2762}
2763
2764// AsStructuredValue is the BasicResponseBase implementation for EntertainmentBusiness.
2765func (eb EntertainmentBusiness) AsStructuredValue() (*StructuredValue, bool) {
2766	return nil, false
2767}
2768
2769// AsBasicStructuredValue is the BasicResponseBase implementation for EntertainmentBusiness.
2770func (eb EntertainmentBusiness) AsBasicStructuredValue() (BasicStructuredValue, bool) {
2771	return nil, false
2772}
2773
2774// AsEntertainmentBusiness is the BasicResponseBase implementation for EntertainmentBusiness.
2775func (eb EntertainmentBusiness) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
2776	return &eb, true
2777}
2778
2779// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for EntertainmentBusiness.
2780func (eb EntertainmentBusiness) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
2781	return &eb, true
2782}
2783
2784// AsFoodEstablishment is the BasicResponseBase implementation for EntertainmentBusiness.
2785func (eb EntertainmentBusiness) AsFoodEstablishment() (*FoodEstablishment, bool) {
2786	return nil, false
2787}
2788
2789// AsBasicFoodEstablishment is the BasicResponseBase implementation for EntertainmentBusiness.
2790func (eb EntertainmentBusiness) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
2791	return nil, false
2792}
2793
2794// AsLodgingBusiness is the BasicResponseBase implementation for EntertainmentBusiness.
2795func (eb EntertainmentBusiness) AsLodgingBusiness() (*LodgingBusiness, bool) {
2796	return nil, false
2797}
2798
2799// AsBasicLodgingBusiness is the BasicResponseBase implementation for EntertainmentBusiness.
2800func (eb EntertainmentBusiness) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
2801	return nil, false
2802}
2803
2804// AsRestaurant is the BasicResponseBase implementation for EntertainmentBusiness.
2805func (eb EntertainmentBusiness) AsRestaurant() (*Restaurant, bool) {
2806	return nil, false
2807}
2808
2809// AsHotel is the BasicResponseBase implementation for EntertainmentBusiness.
2810func (eb EntertainmentBusiness) AsHotel() (*Hotel, bool) {
2811	return nil, false
2812}
2813
2814// AsResponseBase is the BasicResponseBase implementation for EntertainmentBusiness.
2815func (eb EntertainmentBusiness) AsResponseBase() (*ResponseBase, bool) {
2816	return nil, false
2817}
2818
2819// AsBasicResponseBase is the BasicResponseBase implementation for EntertainmentBusiness.
2820func (eb EntertainmentBusiness) AsBasicResponseBase() (BasicResponseBase, bool) {
2821	return &eb, true
2822}
2823
2824// UnmarshalJSON is the custom unmarshaler for EntertainmentBusiness struct.
2825func (eb *EntertainmentBusiness) UnmarshalJSON(body []byte) error {
2826	var m map[string]*json.RawMessage
2827	err := json.Unmarshal(body, &m)
2828	if err != nil {
2829		return err
2830	}
2831	for k, v := range m {
2832		switch k {
2833		case "priceRange":
2834			if v != nil {
2835				var priceRange string
2836				err = json.Unmarshal(*v, &priceRange)
2837				if err != nil {
2838					return err
2839				}
2840				eb.PriceRange = &priceRange
2841			}
2842		case "panoramas":
2843			if v != nil {
2844				var panoramas []ImageObject
2845				err = json.Unmarshal(*v, &panoramas)
2846				if err != nil {
2847					return err
2848				}
2849				eb.Panoramas = &panoramas
2850			}
2851		case "isPermanentlyClosed":
2852			if v != nil {
2853				var isPermanentlyClosed bool
2854				err = json.Unmarshal(*v, &isPermanentlyClosed)
2855				if err != nil {
2856					return err
2857				}
2858				eb.IsPermanentlyClosed = &isPermanentlyClosed
2859			}
2860		case "tagLine":
2861			if v != nil {
2862				var tagLine string
2863				err = json.Unmarshal(*v, &tagLine)
2864				if err != nil {
2865					return err
2866				}
2867				eb.TagLine = &tagLine
2868			}
2869		case "address":
2870			if v != nil {
2871				var address PostalAddress
2872				err = json.Unmarshal(*v, &address)
2873				if err != nil {
2874					return err
2875				}
2876				eb.Address = &address
2877			}
2878		case "telephone":
2879			if v != nil {
2880				var telephone string
2881				err = json.Unmarshal(*v, &telephone)
2882				if err != nil {
2883					return err
2884				}
2885				eb.Telephone = &telephone
2886			}
2887		case "name":
2888			if v != nil {
2889				var name string
2890				err = json.Unmarshal(*v, &name)
2891				if err != nil {
2892					return err
2893				}
2894				eb.Name = &name
2895			}
2896		case "url":
2897			if v != nil {
2898				var URL string
2899				err = json.Unmarshal(*v, &URL)
2900				if err != nil {
2901					return err
2902				}
2903				eb.URL = &URL
2904			}
2905		case "image":
2906			if v != nil {
2907				var imageVar ImageObject
2908				err = json.Unmarshal(*v, &imageVar)
2909				if err != nil {
2910					return err
2911				}
2912				eb.Image = &imageVar
2913			}
2914		case "description":
2915			if v != nil {
2916				var description string
2917				err = json.Unmarshal(*v, &description)
2918				if err != nil {
2919					return err
2920				}
2921				eb.Description = &description
2922			}
2923		case "entityPresentationInfo":
2924			if v != nil {
2925				var entityPresentationInfo EntitiesEntityPresentationInfo
2926				err = json.Unmarshal(*v, &entityPresentationInfo)
2927				if err != nil {
2928					return err
2929				}
2930				eb.EntityPresentationInfo = &entityPresentationInfo
2931			}
2932		case "bingId":
2933			if v != nil {
2934				var bingID string
2935				err = json.Unmarshal(*v, &bingID)
2936				if err != nil {
2937					return err
2938				}
2939				eb.BingID = &bingID
2940			}
2941		case "contractualRules":
2942			if v != nil {
2943				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
2944				if err != nil {
2945					return err
2946				}
2947				eb.ContractualRules = &contractualRules
2948			}
2949		case "webSearchUrl":
2950			if v != nil {
2951				var webSearchURL string
2952				err = json.Unmarshal(*v, &webSearchURL)
2953				if err != nil {
2954					return err
2955				}
2956				eb.WebSearchURL = &webSearchURL
2957			}
2958		case "id":
2959			if v != nil {
2960				var ID string
2961				err = json.Unmarshal(*v, &ID)
2962				if err != nil {
2963					return err
2964				}
2965				eb.ID = &ID
2966			}
2967		case "_type":
2968			if v != nil {
2969				var typeVar TypeBasicResponseBase
2970				err = json.Unmarshal(*v, &typeVar)
2971				if err != nil {
2972					return err
2973				}
2974				eb.Type = typeVar
2975			}
2976		}
2977	}
2978
2979	return nil
2980}
2981
2982// Entities defines an entity answer.
2983type Entities struct {
2984	// QueryScenario - READ-ONLY; The supported query scenario. This field is set to DominantEntity or DisambiguationItem. The field is set to DominantEntity if Bing determines that only a single entity satisfies the request. For example, a book, movie, person, or attraction. If multiple entities could satisfy the request, the field is set to DisambiguationItem. For example, if the request uses the generic title of a movie franchise, the entity's type would likely be DisambiguationItem. But, if the request specifies a specific title from the franchise, the entity's type would likely be DominantEntity. Possible values include: 'DominantEntity', 'DominantEntityWithDisambiguation', 'Disambiguation', 'List', 'ListWithPivot'
2985	QueryScenario EntityQueryScenario `json:"queryScenario,omitempty"`
2986	// Value - A list of entities.
2987	Value *[]BasicThing `json:"value,omitempty"`
2988	// QueryContext - READ-ONLY
2989	QueryContext *QueryContext `json:"queryContext,omitempty"`
2990	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
2991	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
2992	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
2993	WebSearchURL *string `json:"webSearchUrl,omitempty"`
2994	// ID - READ-ONLY; A String identifier.
2995	ID *string `json:"id,omitempty"`
2996	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
2997	Type TypeBasicResponseBase `json:"_type,omitempty"`
2998}
2999
3000// MarshalJSON is the custom marshaler for Entities.
3001func (e Entities) MarshalJSON() ([]byte, error) {
3002	e.Type = TypeEntities
3003	objectMap := make(map[string]interface{})
3004	if e.Value != nil {
3005		objectMap["value"] = e.Value
3006	}
3007	if e.Type != "" {
3008		objectMap["_type"] = e.Type
3009	}
3010	return json.Marshal(objectMap)
3011}
3012
3013// AsImageObject is the BasicResponseBase implementation for Entities.
3014func (e Entities) AsImageObject() (*ImageObject, bool) {
3015	return nil, false
3016}
3017
3018// AsThing is the BasicResponseBase implementation for Entities.
3019func (e Entities) AsThing() (*Thing, bool) {
3020	return nil, false
3021}
3022
3023// AsBasicThing is the BasicResponseBase implementation for Entities.
3024func (e Entities) AsBasicThing() (BasicThing, bool) {
3025	return nil, false
3026}
3027
3028// AsEntities is the BasicResponseBase implementation for Entities.
3029func (e Entities) AsEntities() (*Entities, bool) {
3030	return &e, true
3031}
3032
3033// AsPlaces is the BasicResponseBase implementation for Entities.
3034func (e Entities) AsPlaces() (*Places, bool) {
3035	return nil, false
3036}
3037
3038// AsSearchResponse is the BasicResponseBase implementation for Entities.
3039func (e Entities) AsSearchResponse() (*SearchResponse, bool) {
3040	return nil, false
3041}
3042
3043// AsResponse is the BasicResponseBase implementation for Entities.
3044func (e Entities) AsResponse() (*Response, bool) {
3045	return nil, false
3046}
3047
3048// AsBasicResponse is the BasicResponseBase implementation for Entities.
3049func (e Entities) AsBasicResponse() (BasicResponse, bool) {
3050	return &e, true
3051}
3052
3053// AsSearchResultsAnswer is the BasicResponseBase implementation for Entities.
3054func (e Entities) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
3055	return nil, false
3056}
3057
3058// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Entities.
3059func (e Entities) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
3060	return &e, true
3061}
3062
3063// AsIdentifiable is the BasicResponseBase implementation for Entities.
3064func (e Entities) AsIdentifiable() (*Identifiable, bool) {
3065	return nil, false
3066}
3067
3068// AsBasicIdentifiable is the BasicResponseBase implementation for Entities.
3069func (e Entities) AsBasicIdentifiable() (BasicIdentifiable, bool) {
3070	return &e, true
3071}
3072
3073// AsAnswer is the BasicResponseBase implementation for Entities.
3074func (e Entities) AsAnswer() (*Answer, bool) {
3075	return nil, false
3076}
3077
3078// AsBasicAnswer is the BasicResponseBase implementation for Entities.
3079func (e Entities) AsBasicAnswer() (BasicAnswer, bool) {
3080	return &e, true
3081}
3082
3083// AsErrorResponse is the BasicResponseBase implementation for Entities.
3084func (e Entities) AsErrorResponse() (*ErrorResponse, bool) {
3085	return nil, false
3086}
3087
3088// AsPostalAddress is the BasicResponseBase implementation for Entities.
3089func (e Entities) AsPostalAddress() (*PostalAddress, bool) {
3090	return nil, false
3091}
3092
3093// AsPlace is the BasicResponseBase implementation for Entities.
3094func (e Entities) AsPlace() (*Place, bool) {
3095	return nil, false
3096}
3097
3098// AsBasicPlace is the BasicResponseBase implementation for Entities.
3099func (e Entities) AsBasicPlace() (BasicPlace, bool) {
3100	return nil, false
3101}
3102
3103// AsOrganization is the BasicResponseBase implementation for Entities.
3104func (e Entities) AsOrganization() (*Organization, bool) {
3105	return nil, false
3106}
3107
3108// AsCreativeWork is the BasicResponseBase implementation for Entities.
3109func (e Entities) AsCreativeWork() (*CreativeWork, bool) {
3110	return nil, false
3111}
3112
3113// AsBasicCreativeWork is the BasicResponseBase implementation for Entities.
3114func (e Entities) AsBasicCreativeWork() (BasicCreativeWork, bool) {
3115	return nil, false
3116}
3117
3118// AsIntangible is the BasicResponseBase implementation for Entities.
3119func (e Entities) AsIntangible() (*Intangible, bool) {
3120	return nil, false
3121}
3122
3123// AsBasicIntangible is the BasicResponseBase implementation for Entities.
3124func (e Entities) AsBasicIntangible() (BasicIntangible, bool) {
3125	return nil, false
3126}
3127
3128// AsMovieTheater is the BasicResponseBase implementation for Entities.
3129func (e Entities) AsMovieTheater() (*MovieTheater, bool) {
3130	return nil, false
3131}
3132
3133// AsMediaObject is the BasicResponseBase implementation for Entities.
3134func (e Entities) AsMediaObject() (*MediaObject, bool) {
3135	return nil, false
3136}
3137
3138// AsBasicMediaObject is the BasicResponseBase implementation for Entities.
3139func (e Entities) AsBasicMediaObject() (BasicMediaObject, bool) {
3140	return nil, false
3141}
3142
3143// AsCivicStructure is the BasicResponseBase implementation for Entities.
3144func (e Entities) AsCivicStructure() (*CivicStructure, bool) {
3145	return nil, false
3146}
3147
3148// AsBasicCivicStructure is the BasicResponseBase implementation for Entities.
3149func (e Entities) AsBasicCivicStructure() (BasicCivicStructure, bool) {
3150	return nil, false
3151}
3152
3153// AsLocalBusiness is the BasicResponseBase implementation for Entities.
3154func (e Entities) AsLocalBusiness() (*LocalBusiness, bool) {
3155	return nil, false
3156}
3157
3158// AsBasicLocalBusiness is the BasicResponseBase implementation for Entities.
3159func (e Entities) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
3160	return nil, false
3161}
3162
3163// AsTouristAttraction is the BasicResponseBase implementation for Entities.
3164func (e Entities) AsTouristAttraction() (*TouristAttraction, bool) {
3165	return nil, false
3166}
3167
3168// AsAirport is the BasicResponseBase implementation for Entities.
3169func (e Entities) AsAirport() (*Airport, bool) {
3170	return nil, false
3171}
3172
3173// AsLicense is the BasicResponseBase implementation for Entities.
3174func (e Entities) AsLicense() (*License, bool) {
3175	return nil, false
3176}
3177
3178// AsStructuredValue is the BasicResponseBase implementation for Entities.
3179func (e Entities) AsStructuredValue() (*StructuredValue, bool) {
3180	return nil, false
3181}
3182
3183// AsBasicStructuredValue is the BasicResponseBase implementation for Entities.
3184func (e Entities) AsBasicStructuredValue() (BasicStructuredValue, bool) {
3185	return nil, false
3186}
3187
3188// AsEntertainmentBusiness is the BasicResponseBase implementation for Entities.
3189func (e Entities) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
3190	return nil, false
3191}
3192
3193// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Entities.
3194func (e Entities) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
3195	return nil, false
3196}
3197
3198// AsFoodEstablishment is the BasicResponseBase implementation for Entities.
3199func (e Entities) AsFoodEstablishment() (*FoodEstablishment, bool) {
3200	return nil, false
3201}
3202
3203// AsBasicFoodEstablishment is the BasicResponseBase implementation for Entities.
3204func (e Entities) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
3205	return nil, false
3206}
3207
3208// AsLodgingBusiness is the BasicResponseBase implementation for Entities.
3209func (e Entities) AsLodgingBusiness() (*LodgingBusiness, bool) {
3210	return nil, false
3211}
3212
3213// AsBasicLodgingBusiness is the BasicResponseBase implementation for Entities.
3214func (e Entities) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
3215	return nil, false
3216}
3217
3218// AsRestaurant is the BasicResponseBase implementation for Entities.
3219func (e Entities) AsRestaurant() (*Restaurant, bool) {
3220	return nil, false
3221}
3222
3223// AsHotel is the BasicResponseBase implementation for Entities.
3224func (e Entities) AsHotel() (*Hotel, bool) {
3225	return nil, false
3226}
3227
3228// AsResponseBase is the BasicResponseBase implementation for Entities.
3229func (e Entities) AsResponseBase() (*ResponseBase, bool) {
3230	return nil, false
3231}
3232
3233// AsBasicResponseBase is the BasicResponseBase implementation for Entities.
3234func (e Entities) AsBasicResponseBase() (BasicResponseBase, bool) {
3235	return &e, true
3236}
3237
3238// UnmarshalJSON is the custom unmarshaler for Entities struct.
3239func (e *Entities) UnmarshalJSON(body []byte) error {
3240	var m map[string]*json.RawMessage
3241	err := json.Unmarshal(body, &m)
3242	if err != nil {
3243		return err
3244	}
3245	for k, v := range m {
3246		switch k {
3247		case "queryScenario":
3248			if v != nil {
3249				var queryScenario EntityQueryScenario
3250				err = json.Unmarshal(*v, &queryScenario)
3251				if err != nil {
3252					return err
3253				}
3254				e.QueryScenario = queryScenario
3255			}
3256		case "value":
3257			if v != nil {
3258				value, err := unmarshalBasicThingArray(*v)
3259				if err != nil {
3260					return err
3261				}
3262				e.Value = &value
3263			}
3264		case "queryContext":
3265			if v != nil {
3266				var queryContext QueryContext
3267				err = json.Unmarshal(*v, &queryContext)
3268				if err != nil {
3269					return err
3270				}
3271				e.QueryContext = &queryContext
3272			}
3273		case "contractualRules":
3274			if v != nil {
3275				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
3276				if err != nil {
3277					return err
3278				}
3279				e.ContractualRules = &contractualRules
3280			}
3281		case "webSearchUrl":
3282			if v != nil {
3283				var webSearchURL string
3284				err = json.Unmarshal(*v, &webSearchURL)
3285				if err != nil {
3286					return err
3287				}
3288				e.WebSearchURL = &webSearchURL
3289			}
3290		case "id":
3291			if v != nil {
3292				var ID string
3293				err = json.Unmarshal(*v, &ID)
3294				if err != nil {
3295					return err
3296				}
3297				e.ID = &ID
3298			}
3299		case "_type":
3300			if v != nil {
3301				var typeVar TypeBasicResponseBase
3302				err = json.Unmarshal(*v, &typeVar)
3303				if err != nil {
3304					return err
3305				}
3306				e.Type = typeVar
3307			}
3308		}
3309	}
3310
3311	return nil
3312}
3313
3314// EntitiesEntityPresentationInfo defines additional information about an entity such as type hints.
3315type EntitiesEntityPresentationInfo struct {
3316	// EntityScenario - The supported scenario. Possible values include: 'EntityScenarioDominantEntity', 'EntityScenarioDisambiguationItem', 'EntityScenarioListItem'
3317	EntityScenario EntityScenario `json:"entityScenario,omitempty"`
3318	// EntityTypeHints - READ-ONLY; A list of hints that indicate the entity's type. The list could contain a single hint such as Movie or a list of hints such as Place, LocalBusiness, Restaurant. Each successive hint in the array narrows the entity's type.
3319	EntityTypeHints *[]EntityType `json:"entityTypeHints,omitempty"`
3320	// EntityTypeDisplayHint - READ-ONLY; A display version of the entity hint. For example, if entityTypeHints is Artist, this field may be set to American Singer.
3321	EntityTypeDisplayHint *string `json:"entityTypeDisplayHint,omitempty"`
3322}
3323
3324// Error defines the error that occurred.
3325type Error struct {
3326	// Code - The error code that identifies the category of error. Possible values include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'
3327	Code ErrorCode `json:"code,omitempty"`
3328	// SubCode - READ-ONLY; The error code that further helps to identify the error. Possible values include: 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', 'HTTPNotAllowed', 'Blocked', 'AuthorizationMissing', 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired'
3329	SubCode ErrorSubCode `json:"subCode,omitempty"`
3330	// Message - A description of the error.
3331	Message *string `json:"message,omitempty"`
3332	// MoreDetails - READ-ONLY; A description that provides additional information about the error.
3333	MoreDetails *string `json:"moreDetails,omitempty"`
3334	// Parameter - READ-ONLY; The parameter in the request that caused the error.
3335	Parameter *string `json:"parameter,omitempty"`
3336	// Value - READ-ONLY; The parameter's value in the request that was not valid.
3337	Value *string `json:"value,omitempty"`
3338}
3339
3340// ErrorResponse the top-level response that represents a failed request.
3341type ErrorResponse struct {
3342	// Errors - A list of errors that describe the reasons why the request failed.
3343	Errors *[]Error `json:"errors,omitempty"`
3344	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
3345	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
3346	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
3347	WebSearchURL *string `json:"webSearchUrl,omitempty"`
3348	// ID - READ-ONLY; A String identifier.
3349	ID *string `json:"id,omitempty"`
3350	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
3351	Type TypeBasicResponseBase `json:"_type,omitempty"`
3352}
3353
3354// MarshalJSON is the custom marshaler for ErrorResponse.
3355func (er ErrorResponse) MarshalJSON() ([]byte, error) {
3356	er.Type = TypeErrorResponse
3357	objectMap := make(map[string]interface{})
3358	if er.Errors != nil {
3359		objectMap["errors"] = er.Errors
3360	}
3361	if er.Type != "" {
3362		objectMap["_type"] = er.Type
3363	}
3364	return json.Marshal(objectMap)
3365}
3366
3367// AsImageObject is the BasicResponseBase implementation for ErrorResponse.
3368func (er ErrorResponse) AsImageObject() (*ImageObject, bool) {
3369	return nil, false
3370}
3371
3372// AsThing is the BasicResponseBase implementation for ErrorResponse.
3373func (er ErrorResponse) AsThing() (*Thing, bool) {
3374	return nil, false
3375}
3376
3377// AsBasicThing is the BasicResponseBase implementation for ErrorResponse.
3378func (er ErrorResponse) AsBasicThing() (BasicThing, bool) {
3379	return nil, false
3380}
3381
3382// AsEntities is the BasicResponseBase implementation for ErrorResponse.
3383func (er ErrorResponse) AsEntities() (*Entities, bool) {
3384	return nil, false
3385}
3386
3387// AsPlaces is the BasicResponseBase implementation for ErrorResponse.
3388func (er ErrorResponse) AsPlaces() (*Places, bool) {
3389	return nil, false
3390}
3391
3392// AsSearchResponse is the BasicResponseBase implementation for ErrorResponse.
3393func (er ErrorResponse) AsSearchResponse() (*SearchResponse, bool) {
3394	return nil, false
3395}
3396
3397// AsResponse is the BasicResponseBase implementation for ErrorResponse.
3398func (er ErrorResponse) AsResponse() (*Response, bool) {
3399	return nil, false
3400}
3401
3402// AsBasicResponse is the BasicResponseBase implementation for ErrorResponse.
3403func (er ErrorResponse) AsBasicResponse() (BasicResponse, bool) {
3404	return &er, true
3405}
3406
3407// AsSearchResultsAnswer is the BasicResponseBase implementation for ErrorResponse.
3408func (er ErrorResponse) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
3409	return nil, false
3410}
3411
3412// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for ErrorResponse.
3413func (er ErrorResponse) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
3414	return nil, false
3415}
3416
3417// AsIdentifiable is the BasicResponseBase implementation for ErrorResponse.
3418func (er ErrorResponse) AsIdentifiable() (*Identifiable, bool) {
3419	return nil, false
3420}
3421
3422// AsBasicIdentifiable is the BasicResponseBase implementation for ErrorResponse.
3423func (er ErrorResponse) AsBasicIdentifiable() (BasicIdentifiable, bool) {
3424	return &er, true
3425}
3426
3427// AsAnswer is the BasicResponseBase implementation for ErrorResponse.
3428func (er ErrorResponse) AsAnswer() (*Answer, bool) {
3429	return nil, false
3430}
3431
3432// AsBasicAnswer is the BasicResponseBase implementation for ErrorResponse.
3433func (er ErrorResponse) AsBasicAnswer() (BasicAnswer, bool) {
3434	return nil, false
3435}
3436
3437// AsErrorResponse is the BasicResponseBase implementation for ErrorResponse.
3438func (er ErrorResponse) AsErrorResponse() (*ErrorResponse, bool) {
3439	return &er, true
3440}
3441
3442// AsPostalAddress is the BasicResponseBase implementation for ErrorResponse.
3443func (er ErrorResponse) AsPostalAddress() (*PostalAddress, bool) {
3444	return nil, false
3445}
3446
3447// AsPlace is the BasicResponseBase implementation for ErrorResponse.
3448func (er ErrorResponse) AsPlace() (*Place, bool) {
3449	return nil, false
3450}
3451
3452// AsBasicPlace is the BasicResponseBase implementation for ErrorResponse.
3453func (er ErrorResponse) AsBasicPlace() (BasicPlace, bool) {
3454	return nil, false
3455}
3456
3457// AsOrganization is the BasicResponseBase implementation for ErrorResponse.
3458func (er ErrorResponse) AsOrganization() (*Organization, bool) {
3459	return nil, false
3460}
3461
3462// AsCreativeWork is the BasicResponseBase implementation for ErrorResponse.
3463func (er ErrorResponse) AsCreativeWork() (*CreativeWork, bool) {
3464	return nil, false
3465}
3466
3467// AsBasicCreativeWork is the BasicResponseBase implementation for ErrorResponse.
3468func (er ErrorResponse) AsBasicCreativeWork() (BasicCreativeWork, bool) {
3469	return nil, false
3470}
3471
3472// AsIntangible is the BasicResponseBase implementation for ErrorResponse.
3473func (er ErrorResponse) AsIntangible() (*Intangible, bool) {
3474	return nil, false
3475}
3476
3477// AsBasicIntangible is the BasicResponseBase implementation for ErrorResponse.
3478func (er ErrorResponse) AsBasicIntangible() (BasicIntangible, bool) {
3479	return nil, false
3480}
3481
3482// AsMovieTheater is the BasicResponseBase implementation for ErrorResponse.
3483func (er ErrorResponse) AsMovieTheater() (*MovieTheater, bool) {
3484	return nil, false
3485}
3486
3487// AsMediaObject is the BasicResponseBase implementation for ErrorResponse.
3488func (er ErrorResponse) AsMediaObject() (*MediaObject, bool) {
3489	return nil, false
3490}
3491
3492// AsBasicMediaObject is the BasicResponseBase implementation for ErrorResponse.
3493func (er ErrorResponse) AsBasicMediaObject() (BasicMediaObject, bool) {
3494	return nil, false
3495}
3496
3497// AsCivicStructure is the BasicResponseBase implementation for ErrorResponse.
3498func (er ErrorResponse) AsCivicStructure() (*CivicStructure, bool) {
3499	return nil, false
3500}
3501
3502// AsBasicCivicStructure is the BasicResponseBase implementation for ErrorResponse.
3503func (er ErrorResponse) AsBasicCivicStructure() (BasicCivicStructure, bool) {
3504	return nil, false
3505}
3506
3507// AsLocalBusiness is the BasicResponseBase implementation for ErrorResponse.
3508func (er ErrorResponse) AsLocalBusiness() (*LocalBusiness, bool) {
3509	return nil, false
3510}
3511
3512// AsBasicLocalBusiness is the BasicResponseBase implementation for ErrorResponse.
3513func (er ErrorResponse) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
3514	return nil, false
3515}
3516
3517// AsTouristAttraction is the BasicResponseBase implementation for ErrorResponse.
3518func (er ErrorResponse) AsTouristAttraction() (*TouristAttraction, bool) {
3519	return nil, false
3520}
3521
3522// AsAirport is the BasicResponseBase implementation for ErrorResponse.
3523func (er ErrorResponse) AsAirport() (*Airport, bool) {
3524	return nil, false
3525}
3526
3527// AsLicense is the BasicResponseBase implementation for ErrorResponse.
3528func (er ErrorResponse) AsLicense() (*License, bool) {
3529	return nil, false
3530}
3531
3532// AsStructuredValue is the BasicResponseBase implementation for ErrorResponse.
3533func (er ErrorResponse) AsStructuredValue() (*StructuredValue, bool) {
3534	return nil, false
3535}
3536
3537// AsBasicStructuredValue is the BasicResponseBase implementation for ErrorResponse.
3538func (er ErrorResponse) AsBasicStructuredValue() (BasicStructuredValue, bool) {
3539	return nil, false
3540}
3541
3542// AsEntertainmentBusiness is the BasicResponseBase implementation for ErrorResponse.
3543func (er ErrorResponse) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
3544	return nil, false
3545}
3546
3547// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for ErrorResponse.
3548func (er ErrorResponse) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
3549	return nil, false
3550}
3551
3552// AsFoodEstablishment is the BasicResponseBase implementation for ErrorResponse.
3553func (er ErrorResponse) AsFoodEstablishment() (*FoodEstablishment, bool) {
3554	return nil, false
3555}
3556
3557// AsBasicFoodEstablishment is the BasicResponseBase implementation for ErrorResponse.
3558func (er ErrorResponse) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
3559	return nil, false
3560}
3561
3562// AsLodgingBusiness is the BasicResponseBase implementation for ErrorResponse.
3563func (er ErrorResponse) AsLodgingBusiness() (*LodgingBusiness, bool) {
3564	return nil, false
3565}
3566
3567// AsBasicLodgingBusiness is the BasicResponseBase implementation for ErrorResponse.
3568func (er ErrorResponse) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
3569	return nil, false
3570}
3571
3572// AsRestaurant is the BasicResponseBase implementation for ErrorResponse.
3573func (er ErrorResponse) AsRestaurant() (*Restaurant, bool) {
3574	return nil, false
3575}
3576
3577// AsHotel is the BasicResponseBase implementation for ErrorResponse.
3578func (er ErrorResponse) AsHotel() (*Hotel, bool) {
3579	return nil, false
3580}
3581
3582// AsResponseBase is the BasicResponseBase implementation for ErrorResponse.
3583func (er ErrorResponse) AsResponseBase() (*ResponseBase, bool) {
3584	return nil, false
3585}
3586
3587// AsBasicResponseBase is the BasicResponseBase implementation for ErrorResponse.
3588func (er ErrorResponse) AsBasicResponseBase() (BasicResponseBase, bool) {
3589	return &er, true
3590}
3591
3592// UnmarshalJSON is the custom unmarshaler for ErrorResponse struct.
3593func (er *ErrorResponse) UnmarshalJSON(body []byte) error {
3594	var m map[string]*json.RawMessage
3595	err := json.Unmarshal(body, &m)
3596	if err != nil {
3597		return err
3598	}
3599	for k, v := range m {
3600		switch k {
3601		case "errors":
3602			if v != nil {
3603				var errorsVar []Error
3604				err = json.Unmarshal(*v, &errorsVar)
3605				if err != nil {
3606					return err
3607				}
3608				er.Errors = &errorsVar
3609			}
3610		case "contractualRules":
3611			if v != nil {
3612				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
3613				if err != nil {
3614					return err
3615				}
3616				er.ContractualRules = &contractualRules
3617			}
3618		case "webSearchUrl":
3619			if v != nil {
3620				var webSearchURL string
3621				err = json.Unmarshal(*v, &webSearchURL)
3622				if err != nil {
3623					return err
3624				}
3625				er.WebSearchURL = &webSearchURL
3626			}
3627		case "id":
3628			if v != nil {
3629				var ID string
3630				err = json.Unmarshal(*v, &ID)
3631				if err != nil {
3632					return err
3633				}
3634				er.ID = &ID
3635			}
3636		case "_type":
3637			if v != nil {
3638				var typeVar TypeBasicResponseBase
3639				err = json.Unmarshal(*v, &typeVar)
3640				if err != nil {
3641					return err
3642				}
3643				er.Type = typeVar
3644			}
3645		}
3646	}
3647
3648	return nil
3649}
3650
3651// BasicFoodEstablishment ...
3652type BasicFoodEstablishment interface {
3653	AsRestaurant() (*Restaurant, bool)
3654	AsFoodEstablishment() (*FoodEstablishment, bool)
3655}
3656
3657// FoodEstablishment ...
3658type FoodEstablishment struct {
3659	// PriceRange - READ-ONLY; $$.
3660	PriceRange *string `json:"priceRange,omitempty"`
3661	// Panoramas - READ-ONLY
3662	Panoramas *[]ImageObject `json:"panoramas,omitempty"`
3663	// IsPermanentlyClosed - READ-ONLY
3664	IsPermanentlyClosed *bool `json:"isPermanentlyClosed,omitempty"`
3665	// TagLine - READ-ONLY
3666	TagLine *string `json:"tagLine,omitempty"`
3667	// Address - READ-ONLY; The postal address of where the entity is located
3668	Address *PostalAddress `json:"address,omitempty"`
3669	// Telephone - READ-ONLY; The entity's telephone number
3670	Telephone *string `json:"telephone,omitempty"`
3671	// Name - READ-ONLY; The name of the thing represented by this object.
3672	Name *string `json:"name,omitempty"`
3673	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
3674	URL *string `json:"url,omitempty"`
3675	// Image - READ-ONLY
3676	Image *ImageObject `json:"image,omitempty"`
3677	// Description - READ-ONLY; A short description of the item.
3678	Description *string `json:"description,omitempty"`
3679	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
3680	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
3681	// BingID - READ-ONLY; An ID that uniquely identifies this item.
3682	BingID *string `json:"bingId,omitempty"`
3683	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
3684	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
3685	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
3686	WebSearchURL *string `json:"webSearchUrl,omitempty"`
3687	// ID - READ-ONLY; A String identifier.
3688	ID *string `json:"id,omitempty"`
3689	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
3690	Type TypeBasicResponseBase `json:"_type,omitempty"`
3691}
3692
3693func unmarshalBasicFoodEstablishment(body []byte) (BasicFoodEstablishment, error) {
3694	var m map[string]interface{}
3695	err := json.Unmarshal(body, &m)
3696	if err != nil {
3697		return nil, err
3698	}
3699
3700	switch m["_type"] {
3701	case string(TypeRestaurant):
3702		var r Restaurant
3703		err := json.Unmarshal(body, &r)
3704		return r, err
3705	default:
3706		var fe FoodEstablishment
3707		err := json.Unmarshal(body, &fe)
3708		return fe, err
3709	}
3710}
3711func unmarshalBasicFoodEstablishmentArray(body []byte) ([]BasicFoodEstablishment, error) {
3712	var rawMessages []*json.RawMessage
3713	err := json.Unmarshal(body, &rawMessages)
3714	if err != nil {
3715		return nil, err
3716	}
3717
3718	feArray := make([]BasicFoodEstablishment, len(rawMessages))
3719
3720	for index, rawMessage := range rawMessages {
3721		fe, err := unmarshalBasicFoodEstablishment(*rawMessage)
3722		if err != nil {
3723			return nil, err
3724		}
3725		feArray[index] = fe
3726	}
3727	return feArray, nil
3728}
3729
3730// MarshalJSON is the custom marshaler for FoodEstablishment.
3731func (fe FoodEstablishment) MarshalJSON() ([]byte, error) {
3732	fe.Type = TypeFoodEstablishment
3733	objectMap := make(map[string]interface{})
3734	if fe.Type != "" {
3735		objectMap["_type"] = fe.Type
3736	}
3737	return json.Marshal(objectMap)
3738}
3739
3740// AsImageObject is the BasicResponseBase implementation for FoodEstablishment.
3741func (fe FoodEstablishment) AsImageObject() (*ImageObject, bool) {
3742	return nil, false
3743}
3744
3745// AsThing is the BasicResponseBase implementation for FoodEstablishment.
3746func (fe FoodEstablishment) AsThing() (*Thing, bool) {
3747	return nil, false
3748}
3749
3750// AsBasicThing is the BasicResponseBase implementation for FoodEstablishment.
3751func (fe FoodEstablishment) AsBasicThing() (BasicThing, bool) {
3752	return &fe, true
3753}
3754
3755// AsEntities is the BasicResponseBase implementation for FoodEstablishment.
3756func (fe FoodEstablishment) AsEntities() (*Entities, bool) {
3757	return nil, false
3758}
3759
3760// AsPlaces is the BasicResponseBase implementation for FoodEstablishment.
3761func (fe FoodEstablishment) AsPlaces() (*Places, bool) {
3762	return nil, false
3763}
3764
3765// AsSearchResponse is the BasicResponseBase implementation for FoodEstablishment.
3766func (fe FoodEstablishment) AsSearchResponse() (*SearchResponse, bool) {
3767	return nil, false
3768}
3769
3770// AsResponse is the BasicResponseBase implementation for FoodEstablishment.
3771func (fe FoodEstablishment) AsResponse() (*Response, bool) {
3772	return nil, false
3773}
3774
3775// AsBasicResponse is the BasicResponseBase implementation for FoodEstablishment.
3776func (fe FoodEstablishment) AsBasicResponse() (BasicResponse, bool) {
3777	return &fe, true
3778}
3779
3780// AsSearchResultsAnswer is the BasicResponseBase implementation for FoodEstablishment.
3781func (fe FoodEstablishment) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
3782	return nil, false
3783}
3784
3785// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for FoodEstablishment.
3786func (fe FoodEstablishment) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
3787	return nil, false
3788}
3789
3790// AsIdentifiable is the BasicResponseBase implementation for FoodEstablishment.
3791func (fe FoodEstablishment) AsIdentifiable() (*Identifiable, bool) {
3792	return nil, false
3793}
3794
3795// AsBasicIdentifiable is the BasicResponseBase implementation for FoodEstablishment.
3796func (fe FoodEstablishment) AsBasicIdentifiable() (BasicIdentifiable, bool) {
3797	return &fe, true
3798}
3799
3800// AsAnswer is the BasicResponseBase implementation for FoodEstablishment.
3801func (fe FoodEstablishment) AsAnswer() (*Answer, bool) {
3802	return nil, false
3803}
3804
3805// AsBasicAnswer is the BasicResponseBase implementation for FoodEstablishment.
3806func (fe FoodEstablishment) AsBasicAnswer() (BasicAnswer, bool) {
3807	return nil, false
3808}
3809
3810// AsErrorResponse is the BasicResponseBase implementation for FoodEstablishment.
3811func (fe FoodEstablishment) AsErrorResponse() (*ErrorResponse, bool) {
3812	return nil, false
3813}
3814
3815// AsPostalAddress is the BasicResponseBase implementation for FoodEstablishment.
3816func (fe FoodEstablishment) AsPostalAddress() (*PostalAddress, bool) {
3817	return nil, false
3818}
3819
3820// AsPlace is the BasicResponseBase implementation for FoodEstablishment.
3821func (fe FoodEstablishment) AsPlace() (*Place, bool) {
3822	return nil, false
3823}
3824
3825// AsBasicPlace is the BasicResponseBase implementation for FoodEstablishment.
3826func (fe FoodEstablishment) AsBasicPlace() (BasicPlace, bool) {
3827	return &fe, true
3828}
3829
3830// AsOrganization is the BasicResponseBase implementation for FoodEstablishment.
3831func (fe FoodEstablishment) AsOrganization() (*Organization, bool) {
3832	return nil, false
3833}
3834
3835// AsCreativeWork is the BasicResponseBase implementation for FoodEstablishment.
3836func (fe FoodEstablishment) AsCreativeWork() (*CreativeWork, bool) {
3837	return nil, false
3838}
3839
3840// AsBasicCreativeWork is the BasicResponseBase implementation for FoodEstablishment.
3841func (fe FoodEstablishment) AsBasicCreativeWork() (BasicCreativeWork, bool) {
3842	return nil, false
3843}
3844
3845// AsIntangible is the BasicResponseBase implementation for FoodEstablishment.
3846func (fe FoodEstablishment) AsIntangible() (*Intangible, bool) {
3847	return nil, false
3848}
3849
3850// AsBasicIntangible is the BasicResponseBase implementation for FoodEstablishment.
3851func (fe FoodEstablishment) AsBasicIntangible() (BasicIntangible, bool) {
3852	return nil, false
3853}
3854
3855// AsMovieTheater is the BasicResponseBase implementation for FoodEstablishment.
3856func (fe FoodEstablishment) AsMovieTheater() (*MovieTheater, bool) {
3857	return nil, false
3858}
3859
3860// AsMediaObject is the BasicResponseBase implementation for FoodEstablishment.
3861func (fe FoodEstablishment) AsMediaObject() (*MediaObject, bool) {
3862	return nil, false
3863}
3864
3865// AsBasicMediaObject is the BasicResponseBase implementation for FoodEstablishment.
3866func (fe FoodEstablishment) AsBasicMediaObject() (BasicMediaObject, bool) {
3867	return nil, false
3868}
3869
3870// AsCivicStructure is the BasicResponseBase implementation for FoodEstablishment.
3871func (fe FoodEstablishment) AsCivicStructure() (*CivicStructure, bool) {
3872	return nil, false
3873}
3874
3875// AsBasicCivicStructure is the BasicResponseBase implementation for FoodEstablishment.
3876func (fe FoodEstablishment) AsBasicCivicStructure() (BasicCivicStructure, bool) {
3877	return nil, false
3878}
3879
3880// AsLocalBusiness is the BasicResponseBase implementation for FoodEstablishment.
3881func (fe FoodEstablishment) AsLocalBusiness() (*LocalBusiness, bool) {
3882	return nil, false
3883}
3884
3885// AsBasicLocalBusiness is the BasicResponseBase implementation for FoodEstablishment.
3886func (fe FoodEstablishment) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
3887	return &fe, true
3888}
3889
3890// AsTouristAttraction is the BasicResponseBase implementation for FoodEstablishment.
3891func (fe FoodEstablishment) AsTouristAttraction() (*TouristAttraction, bool) {
3892	return nil, false
3893}
3894
3895// AsAirport is the BasicResponseBase implementation for FoodEstablishment.
3896func (fe FoodEstablishment) AsAirport() (*Airport, bool) {
3897	return nil, false
3898}
3899
3900// AsLicense is the BasicResponseBase implementation for FoodEstablishment.
3901func (fe FoodEstablishment) AsLicense() (*License, bool) {
3902	return nil, false
3903}
3904
3905// AsStructuredValue is the BasicResponseBase implementation for FoodEstablishment.
3906func (fe FoodEstablishment) AsStructuredValue() (*StructuredValue, bool) {
3907	return nil, false
3908}
3909
3910// AsBasicStructuredValue is the BasicResponseBase implementation for FoodEstablishment.
3911func (fe FoodEstablishment) AsBasicStructuredValue() (BasicStructuredValue, bool) {
3912	return nil, false
3913}
3914
3915// AsEntertainmentBusiness is the BasicResponseBase implementation for FoodEstablishment.
3916func (fe FoodEstablishment) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
3917	return nil, false
3918}
3919
3920// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for FoodEstablishment.
3921func (fe FoodEstablishment) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
3922	return nil, false
3923}
3924
3925// AsFoodEstablishment is the BasicResponseBase implementation for FoodEstablishment.
3926func (fe FoodEstablishment) AsFoodEstablishment() (*FoodEstablishment, bool) {
3927	return &fe, true
3928}
3929
3930// AsBasicFoodEstablishment is the BasicResponseBase implementation for FoodEstablishment.
3931func (fe FoodEstablishment) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
3932	return &fe, true
3933}
3934
3935// AsLodgingBusiness is the BasicResponseBase implementation for FoodEstablishment.
3936func (fe FoodEstablishment) AsLodgingBusiness() (*LodgingBusiness, bool) {
3937	return nil, false
3938}
3939
3940// AsBasicLodgingBusiness is the BasicResponseBase implementation for FoodEstablishment.
3941func (fe FoodEstablishment) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
3942	return nil, false
3943}
3944
3945// AsRestaurant is the BasicResponseBase implementation for FoodEstablishment.
3946func (fe FoodEstablishment) AsRestaurant() (*Restaurant, bool) {
3947	return nil, false
3948}
3949
3950// AsHotel is the BasicResponseBase implementation for FoodEstablishment.
3951func (fe FoodEstablishment) AsHotel() (*Hotel, bool) {
3952	return nil, false
3953}
3954
3955// AsResponseBase is the BasicResponseBase implementation for FoodEstablishment.
3956func (fe FoodEstablishment) AsResponseBase() (*ResponseBase, bool) {
3957	return nil, false
3958}
3959
3960// AsBasicResponseBase is the BasicResponseBase implementation for FoodEstablishment.
3961func (fe FoodEstablishment) AsBasicResponseBase() (BasicResponseBase, bool) {
3962	return &fe, true
3963}
3964
3965// UnmarshalJSON is the custom unmarshaler for FoodEstablishment struct.
3966func (fe *FoodEstablishment) UnmarshalJSON(body []byte) error {
3967	var m map[string]*json.RawMessage
3968	err := json.Unmarshal(body, &m)
3969	if err != nil {
3970		return err
3971	}
3972	for k, v := range m {
3973		switch k {
3974		case "priceRange":
3975			if v != nil {
3976				var priceRange string
3977				err = json.Unmarshal(*v, &priceRange)
3978				if err != nil {
3979					return err
3980				}
3981				fe.PriceRange = &priceRange
3982			}
3983		case "panoramas":
3984			if v != nil {
3985				var panoramas []ImageObject
3986				err = json.Unmarshal(*v, &panoramas)
3987				if err != nil {
3988					return err
3989				}
3990				fe.Panoramas = &panoramas
3991			}
3992		case "isPermanentlyClosed":
3993			if v != nil {
3994				var isPermanentlyClosed bool
3995				err = json.Unmarshal(*v, &isPermanentlyClosed)
3996				if err != nil {
3997					return err
3998				}
3999				fe.IsPermanentlyClosed = &isPermanentlyClosed
4000			}
4001		case "tagLine":
4002			if v != nil {
4003				var tagLine string
4004				err = json.Unmarshal(*v, &tagLine)
4005				if err != nil {
4006					return err
4007				}
4008				fe.TagLine = &tagLine
4009			}
4010		case "address":
4011			if v != nil {
4012				var address PostalAddress
4013				err = json.Unmarshal(*v, &address)
4014				if err != nil {
4015					return err
4016				}
4017				fe.Address = &address
4018			}
4019		case "telephone":
4020			if v != nil {
4021				var telephone string
4022				err = json.Unmarshal(*v, &telephone)
4023				if err != nil {
4024					return err
4025				}
4026				fe.Telephone = &telephone
4027			}
4028		case "name":
4029			if v != nil {
4030				var name string
4031				err = json.Unmarshal(*v, &name)
4032				if err != nil {
4033					return err
4034				}
4035				fe.Name = &name
4036			}
4037		case "url":
4038			if v != nil {
4039				var URL string
4040				err = json.Unmarshal(*v, &URL)
4041				if err != nil {
4042					return err
4043				}
4044				fe.URL = &URL
4045			}
4046		case "image":
4047			if v != nil {
4048				var imageVar ImageObject
4049				err = json.Unmarshal(*v, &imageVar)
4050				if err != nil {
4051					return err
4052				}
4053				fe.Image = &imageVar
4054			}
4055		case "description":
4056			if v != nil {
4057				var description string
4058				err = json.Unmarshal(*v, &description)
4059				if err != nil {
4060					return err
4061				}
4062				fe.Description = &description
4063			}
4064		case "entityPresentationInfo":
4065			if v != nil {
4066				var entityPresentationInfo EntitiesEntityPresentationInfo
4067				err = json.Unmarshal(*v, &entityPresentationInfo)
4068				if err != nil {
4069					return err
4070				}
4071				fe.EntityPresentationInfo = &entityPresentationInfo
4072			}
4073		case "bingId":
4074			if v != nil {
4075				var bingID string
4076				err = json.Unmarshal(*v, &bingID)
4077				if err != nil {
4078					return err
4079				}
4080				fe.BingID = &bingID
4081			}
4082		case "contractualRules":
4083			if v != nil {
4084				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
4085				if err != nil {
4086					return err
4087				}
4088				fe.ContractualRules = &contractualRules
4089			}
4090		case "webSearchUrl":
4091			if v != nil {
4092				var webSearchURL string
4093				err = json.Unmarshal(*v, &webSearchURL)
4094				if err != nil {
4095					return err
4096				}
4097				fe.WebSearchURL = &webSearchURL
4098			}
4099		case "id":
4100			if v != nil {
4101				var ID string
4102				err = json.Unmarshal(*v, &ID)
4103				if err != nil {
4104					return err
4105				}
4106				fe.ID = &ID
4107			}
4108		case "_type":
4109			if v != nil {
4110				var typeVar TypeBasicResponseBase
4111				err = json.Unmarshal(*v, &typeVar)
4112				if err != nil {
4113					return err
4114				}
4115				fe.Type = typeVar
4116			}
4117		}
4118	}
4119
4120	return nil
4121}
4122
4123// Hotel ...
4124type Hotel struct {
4125	// HotelClass - READ-ONLY
4126	HotelClass *string `json:"hotelClass,omitempty"`
4127	// Amenities - READ-ONLY
4128	Amenities *[]string `json:"amenities,omitempty"`
4129	// PriceRange - READ-ONLY; $$.
4130	PriceRange *string `json:"priceRange,omitempty"`
4131	// Panoramas - READ-ONLY
4132	Panoramas *[]ImageObject `json:"panoramas,omitempty"`
4133	// IsPermanentlyClosed - READ-ONLY
4134	IsPermanentlyClosed *bool `json:"isPermanentlyClosed,omitempty"`
4135	// TagLine - READ-ONLY
4136	TagLine *string `json:"tagLine,omitempty"`
4137	// Address - READ-ONLY; The postal address of where the entity is located
4138	Address *PostalAddress `json:"address,omitempty"`
4139	// Telephone - READ-ONLY; The entity's telephone number
4140	Telephone *string `json:"telephone,omitempty"`
4141	// Name - READ-ONLY; The name of the thing represented by this object.
4142	Name *string `json:"name,omitempty"`
4143	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
4144	URL *string `json:"url,omitempty"`
4145	// Image - READ-ONLY
4146	Image *ImageObject `json:"image,omitempty"`
4147	// Description - READ-ONLY; A short description of the item.
4148	Description *string `json:"description,omitempty"`
4149	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
4150	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
4151	// BingID - READ-ONLY; An ID that uniquely identifies this item.
4152	BingID *string `json:"bingId,omitempty"`
4153	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
4154	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
4155	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
4156	WebSearchURL *string `json:"webSearchUrl,omitempty"`
4157	// ID - READ-ONLY; A String identifier.
4158	ID *string `json:"id,omitempty"`
4159	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
4160	Type TypeBasicResponseBase `json:"_type,omitempty"`
4161}
4162
4163// MarshalJSON is the custom marshaler for Hotel.
4164func (h Hotel) MarshalJSON() ([]byte, error) {
4165	h.Type = TypeHotel
4166	objectMap := make(map[string]interface{})
4167	if h.Type != "" {
4168		objectMap["_type"] = h.Type
4169	}
4170	return json.Marshal(objectMap)
4171}
4172
4173// AsImageObject is the BasicResponseBase implementation for Hotel.
4174func (h Hotel) AsImageObject() (*ImageObject, bool) {
4175	return nil, false
4176}
4177
4178// AsThing is the BasicResponseBase implementation for Hotel.
4179func (h Hotel) AsThing() (*Thing, bool) {
4180	return nil, false
4181}
4182
4183// AsBasicThing is the BasicResponseBase implementation for Hotel.
4184func (h Hotel) AsBasicThing() (BasicThing, bool) {
4185	return &h, true
4186}
4187
4188// AsEntities is the BasicResponseBase implementation for Hotel.
4189func (h Hotel) AsEntities() (*Entities, bool) {
4190	return nil, false
4191}
4192
4193// AsPlaces is the BasicResponseBase implementation for Hotel.
4194func (h Hotel) AsPlaces() (*Places, bool) {
4195	return nil, false
4196}
4197
4198// AsSearchResponse is the BasicResponseBase implementation for Hotel.
4199func (h Hotel) AsSearchResponse() (*SearchResponse, bool) {
4200	return nil, false
4201}
4202
4203// AsResponse is the BasicResponseBase implementation for Hotel.
4204func (h Hotel) AsResponse() (*Response, bool) {
4205	return nil, false
4206}
4207
4208// AsBasicResponse is the BasicResponseBase implementation for Hotel.
4209func (h Hotel) AsBasicResponse() (BasicResponse, bool) {
4210	return &h, true
4211}
4212
4213// AsSearchResultsAnswer is the BasicResponseBase implementation for Hotel.
4214func (h Hotel) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
4215	return nil, false
4216}
4217
4218// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Hotel.
4219func (h Hotel) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
4220	return nil, false
4221}
4222
4223// AsIdentifiable is the BasicResponseBase implementation for Hotel.
4224func (h Hotel) AsIdentifiable() (*Identifiable, bool) {
4225	return nil, false
4226}
4227
4228// AsBasicIdentifiable is the BasicResponseBase implementation for Hotel.
4229func (h Hotel) AsBasicIdentifiable() (BasicIdentifiable, bool) {
4230	return &h, true
4231}
4232
4233// AsAnswer is the BasicResponseBase implementation for Hotel.
4234func (h Hotel) AsAnswer() (*Answer, bool) {
4235	return nil, false
4236}
4237
4238// AsBasicAnswer is the BasicResponseBase implementation for Hotel.
4239func (h Hotel) AsBasicAnswer() (BasicAnswer, bool) {
4240	return nil, false
4241}
4242
4243// AsErrorResponse is the BasicResponseBase implementation for Hotel.
4244func (h Hotel) AsErrorResponse() (*ErrorResponse, bool) {
4245	return nil, false
4246}
4247
4248// AsPostalAddress is the BasicResponseBase implementation for Hotel.
4249func (h Hotel) AsPostalAddress() (*PostalAddress, bool) {
4250	return nil, false
4251}
4252
4253// AsPlace is the BasicResponseBase implementation for Hotel.
4254func (h Hotel) AsPlace() (*Place, bool) {
4255	return nil, false
4256}
4257
4258// AsBasicPlace is the BasicResponseBase implementation for Hotel.
4259func (h Hotel) AsBasicPlace() (BasicPlace, bool) {
4260	return &h, true
4261}
4262
4263// AsOrganization is the BasicResponseBase implementation for Hotel.
4264func (h Hotel) AsOrganization() (*Organization, bool) {
4265	return nil, false
4266}
4267
4268// AsCreativeWork is the BasicResponseBase implementation for Hotel.
4269func (h Hotel) AsCreativeWork() (*CreativeWork, bool) {
4270	return nil, false
4271}
4272
4273// AsBasicCreativeWork is the BasicResponseBase implementation for Hotel.
4274func (h Hotel) AsBasicCreativeWork() (BasicCreativeWork, bool) {
4275	return nil, false
4276}
4277
4278// AsIntangible is the BasicResponseBase implementation for Hotel.
4279func (h Hotel) AsIntangible() (*Intangible, bool) {
4280	return nil, false
4281}
4282
4283// AsBasicIntangible is the BasicResponseBase implementation for Hotel.
4284func (h Hotel) AsBasicIntangible() (BasicIntangible, bool) {
4285	return nil, false
4286}
4287
4288// AsMovieTheater is the BasicResponseBase implementation for Hotel.
4289func (h Hotel) AsMovieTheater() (*MovieTheater, bool) {
4290	return nil, false
4291}
4292
4293// AsMediaObject is the BasicResponseBase implementation for Hotel.
4294func (h Hotel) AsMediaObject() (*MediaObject, bool) {
4295	return nil, false
4296}
4297
4298// AsBasicMediaObject is the BasicResponseBase implementation for Hotel.
4299func (h Hotel) AsBasicMediaObject() (BasicMediaObject, bool) {
4300	return nil, false
4301}
4302
4303// AsCivicStructure is the BasicResponseBase implementation for Hotel.
4304func (h Hotel) AsCivicStructure() (*CivicStructure, bool) {
4305	return nil, false
4306}
4307
4308// AsBasicCivicStructure is the BasicResponseBase implementation for Hotel.
4309func (h Hotel) AsBasicCivicStructure() (BasicCivicStructure, bool) {
4310	return nil, false
4311}
4312
4313// AsLocalBusiness is the BasicResponseBase implementation for Hotel.
4314func (h Hotel) AsLocalBusiness() (*LocalBusiness, bool) {
4315	return nil, false
4316}
4317
4318// AsBasicLocalBusiness is the BasicResponseBase implementation for Hotel.
4319func (h Hotel) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
4320	return &h, true
4321}
4322
4323// AsTouristAttraction is the BasicResponseBase implementation for Hotel.
4324func (h Hotel) AsTouristAttraction() (*TouristAttraction, bool) {
4325	return nil, false
4326}
4327
4328// AsAirport is the BasicResponseBase implementation for Hotel.
4329func (h Hotel) AsAirport() (*Airport, bool) {
4330	return nil, false
4331}
4332
4333// AsLicense is the BasicResponseBase implementation for Hotel.
4334func (h Hotel) AsLicense() (*License, bool) {
4335	return nil, false
4336}
4337
4338// AsStructuredValue is the BasicResponseBase implementation for Hotel.
4339func (h Hotel) AsStructuredValue() (*StructuredValue, bool) {
4340	return nil, false
4341}
4342
4343// AsBasicStructuredValue is the BasicResponseBase implementation for Hotel.
4344func (h Hotel) AsBasicStructuredValue() (BasicStructuredValue, bool) {
4345	return nil, false
4346}
4347
4348// AsEntertainmentBusiness is the BasicResponseBase implementation for Hotel.
4349func (h Hotel) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
4350	return nil, false
4351}
4352
4353// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Hotel.
4354func (h Hotel) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
4355	return nil, false
4356}
4357
4358// AsFoodEstablishment is the BasicResponseBase implementation for Hotel.
4359func (h Hotel) AsFoodEstablishment() (*FoodEstablishment, bool) {
4360	return nil, false
4361}
4362
4363// AsBasicFoodEstablishment is the BasicResponseBase implementation for Hotel.
4364func (h Hotel) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
4365	return nil, false
4366}
4367
4368// AsLodgingBusiness is the BasicResponseBase implementation for Hotel.
4369func (h Hotel) AsLodgingBusiness() (*LodgingBusiness, bool) {
4370	return nil, false
4371}
4372
4373// AsBasicLodgingBusiness is the BasicResponseBase implementation for Hotel.
4374func (h Hotel) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
4375	return &h, true
4376}
4377
4378// AsRestaurant is the BasicResponseBase implementation for Hotel.
4379func (h Hotel) AsRestaurant() (*Restaurant, bool) {
4380	return nil, false
4381}
4382
4383// AsHotel is the BasicResponseBase implementation for Hotel.
4384func (h Hotel) AsHotel() (*Hotel, bool) {
4385	return &h, true
4386}
4387
4388// AsResponseBase is the BasicResponseBase implementation for Hotel.
4389func (h Hotel) AsResponseBase() (*ResponseBase, bool) {
4390	return nil, false
4391}
4392
4393// AsBasicResponseBase is the BasicResponseBase implementation for Hotel.
4394func (h Hotel) AsBasicResponseBase() (BasicResponseBase, bool) {
4395	return &h, true
4396}
4397
4398// UnmarshalJSON is the custom unmarshaler for Hotel struct.
4399func (h *Hotel) UnmarshalJSON(body []byte) error {
4400	var m map[string]*json.RawMessage
4401	err := json.Unmarshal(body, &m)
4402	if err != nil {
4403		return err
4404	}
4405	for k, v := range m {
4406		switch k {
4407		case "hotelClass":
4408			if v != nil {
4409				var hotelClass string
4410				err = json.Unmarshal(*v, &hotelClass)
4411				if err != nil {
4412					return err
4413				}
4414				h.HotelClass = &hotelClass
4415			}
4416		case "amenities":
4417			if v != nil {
4418				var amenities []string
4419				err = json.Unmarshal(*v, &amenities)
4420				if err != nil {
4421					return err
4422				}
4423				h.Amenities = &amenities
4424			}
4425		case "priceRange":
4426			if v != nil {
4427				var priceRange string
4428				err = json.Unmarshal(*v, &priceRange)
4429				if err != nil {
4430					return err
4431				}
4432				h.PriceRange = &priceRange
4433			}
4434		case "panoramas":
4435			if v != nil {
4436				var panoramas []ImageObject
4437				err = json.Unmarshal(*v, &panoramas)
4438				if err != nil {
4439					return err
4440				}
4441				h.Panoramas = &panoramas
4442			}
4443		case "isPermanentlyClosed":
4444			if v != nil {
4445				var isPermanentlyClosed bool
4446				err = json.Unmarshal(*v, &isPermanentlyClosed)
4447				if err != nil {
4448					return err
4449				}
4450				h.IsPermanentlyClosed = &isPermanentlyClosed
4451			}
4452		case "tagLine":
4453			if v != nil {
4454				var tagLine string
4455				err = json.Unmarshal(*v, &tagLine)
4456				if err != nil {
4457					return err
4458				}
4459				h.TagLine = &tagLine
4460			}
4461		case "address":
4462			if v != nil {
4463				var address PostalAddress
4464				err = json.Unmarshal(*v, &address)
4465				if err != nil {
4466					return err
4467				}
4468				h.Address = &address
4469			}
4470		case "telephone":
4471			if v != nil {
4472				var telephone string
4473				err = json.Unmarshal(*v, &telephone)
4474				if err != nil {
4475					return err
4476				}
4477				h.Telephone = &telephone
4478			}
4479		case "name":
4480			if v != nil {
4481				var name string
4482				err = json.Unmarshal(*v, &name)
4483				if err != nil {
4484					return err
4485				}
4486				h.Name = &name
4487			}
4488		case "url":
4489			if v != nil {
4490				var URL string
4491				err = json.Unmarshal(*v, &URL)
4492				if err != nil {
4493					return err
4494				}
4495				h.URL = &URL
4496			}
4497		case "image":
4498			if v != nil {
4499				var imageVar ImageObject
4500				err = json.Unmarshal(*v, &imageVar)
4501				if err != nil {
4502					return err
4503				}
4504				h.Image = &imageVar
4505			}
4506		case "description":
4507			if v != nil {
4508				var description string
4509				err = json.Unmarshal(*v, &description)
4510				if err != nil {
4511					return err
4512				}
4513				h.Description = &description
4514			}
4515		case "entityPresentationInfo":
4516			if v != nil {
4517				var entityPresentationInfo EntitiesEntityPresentationInfo
4518				err = json.Unmarshal(*v, &entityPresentationInfo)
4519				if err != nil {
4520					return err
4521				}
4522				h.EntityPresentationInfo = &entityPresentationInfo
4523			}
4524		case "bingId":
4525			if v != nil {
4526				var bingID string
4527				err = json.Unmarshal(*v, &bingID)
4528				if err != nil {
4529					return err
4530				}
4531				h.BingID = &bingID
4532			}
4533		case "contractualRules":
4534			if v != nil {
4535				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
4536				if err != nil {
4537					return err
4538				}
4539				h.ContractualRules = &contractualRules
4540			}
4541		case "webSearchUrl":
4542			if v != nil {
4543				var webSearchURL string
4544				err = json.Unmarshal(*v, &webSearchURL)
4545				if err != nil {
4546					return err
4547				}
4548				h.WebSearchURL = &webSearchURL
4549			}
4550		case "id":
4551			if v != nil {
4552				var ID string
4553				err = json.Unmarshal(*v, &ID)
4554				if err != nil {
4555					return err
4556				}
4557				h.ID = &ID
4558			}
4559		case "_type":
4560			if v != nil {
4561				var typeVar TypeBasicResponseBase
4562				err = json.Unmarshal(*v, &typeVar)
4563				if err != nil {
4564					return err
4565				}
4566				h.Type = typeVar
4567			}
4568		}
4569	}
4570
4571	return nil
4572}
4573
4574// BasicIdentifiable defines the identity of a resource.
4575type BasicIdentifiable interface {
4576	AsImageObject() (*ImageObject, bool)
4577	AsThing() (*Thing, bool)
4578	AsBasicThing() (BasicThing, bool)
4579	AsEntities() (*Entities, bool)
4580	AsPlaces() (*Places, bool)
4581	AsSearchResponse() (*SearchResponse, bool)
4582	AsResponse() (*Response, bool)
4583	AsBasicResponse() (BasicResponse, bool)
4584	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
4585	AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
4586	AsAnswer() (*Answer, bool)
4587	AsBasicAnswer() (BasicAnswer, bool)
4588	AsErrorResponse() (*ErrorResponse, bool)
4589	AsPostalAddress() (*PostalAddress, bool)
4590	AsPlace() (*Place, bool)
4591	AsBasicPlace() (BasicPlace, bool)
4592	AsOrganization() (*Organization, bool)
4593	AsCreativeWork() (*CreativeWork, bool)
4594	AsBasicCreativeWork() (BasicCreativeWork, bool)
4595	AsIntangible() (*Intangible, bool)
4596	AsBasicIntangible() (BasicIntangible, bool)
4597	AsMovieTheater() (*MovieTheater, bool)
4598	AsMediaObject() (*MediaObject, bool)
4599	AsBasicMediaObject() (BasicMediaObject, bool)
4600	AsCivicStructure() (*CivicStructure, bool)
4601	AsBasicCivicStructure() (BasicCivicStructure, bool)
4602	AsLocalBusiness() (*LocalBusiness, bool)
4603	AsBasicLocalBusiness() (BasicLocalBusiness, bool)
4604	AsTouristAttraction() (*TouristAttraction, bool)
4605	AsAirport() (*Airport, bool)
4606	AsLicense() (*License, bool)
4607	AsStructuredValue() (*StructuredValue, bool)
4608	AsBasicStructuredValue() (BasicStructuredValue, bool)
4609	AsEntertainmentBusiness() (*EntertainmentBusiness, bool)
4610	AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool)
4611	AsFoodEstablishment() (*FoodEstablishment, bool)
4612	AsBasicFoodEstablishment() (BasicFoodEstablishment, bool)
4613	AsLodgingBusiness() (*LodgingBusiness, bool)
4614	AsBasicLodgingBusiness() (BasicLodgingBusiness, bool)
4615	AsRestaurant() (*Restaurant, bool)
4616	AsHotel() (*Hotel, bool)
4617	AsIdentifiable() (*Identifiable, bool)
4618}
4619
4620// Identifiable defines the identity of a resource.
4621type Identifiable struct {
4622	// ID - READ-ONLY; A String identifier.
4623	ID *string `json:"id,omitempty"`
4624	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
4625	Type TypeBasicResponseBase `json:"_type,omitempty"`
4626}
4627
4628func unmarshalBasicIdentifiable(body []byte) (BasicIdentifiable, error) {
4629	var m map[string]interface{}
4630	err := json.Unmarshal(body, &m)
4631	if err != nil {
4632		return nil, err
4633	}
4634
4635	switch m["_type"] {
4636	case string(TypeImageObject):
4637		var ioVar ImageObject
4638		err := json.Unmarshal(body, &ioVar)
4639		return ioVar, err
4640	case string(TypeThing):
4641		var t Thing
4642		err := json.Unmarshal(body, &t)
4643		return t, err
4644	case string(TypeEntities):
4645		var e Entities
4646		err := json.Unmarshal(body, &e)
4647		return e, err
4648	case string(TypePlaces):
4649		var p Places
4650		err := json.Unmarshal(body, &p)
4651		return p, err
4652	case string(TypeSearchResponse):
4653		var sr SearchResponse
4654		err := json.Unmarshal(body, &sr)
4655		return sr, err
4656	case string(TypeResponse):
4657		var r Response
4658		err := json.Unmarshal(body, &r)
4659		return r, err
4660	case string(TypeSearchResultsAnswer):
4661		var sra SearchResultsAnswer
4662		err := json.Unmarshal(body, &sra)
4663		return sra, err
4664	case string(TypeAnswer):
4665		var a Answer
4666		err := json.Unmarshal(body, &a)
4667		return a, err
4668	case string(TypeErrorResponse):
4669		var er ErrorResponse
4670		err := json.Unmarshal(body, &er)
4671		return er, err
4672	case string(TypePostalAddress):
4673		var pa PostalAddress
4674		err := json.Unmarshal(body, &pa)
4675		return pa, err
4676	case string(TypePlace):
4677		var p Place
4678		err := json.Unmarshal(body, &p)
4679		return p, err
4680	case string(TypeOrganization):
4681		var o Organization
4682		err := json.Unmarshal(body, &o)
4683		return o, err
4684	case string(TypeCreativeWork):
4685		var cw CreativeWork
4686		err := json.Unmarshal(body, &cw)
4687		return cw, err
4688	case string(TypeIntangible):
4689		var i Intangible
4690		err := json.Unmarshal(body, &i)
4691		return i, err
4692	case string(TypeMovieTheater):
4693		var mt MovieTheater
4694		err := json.Unmarshal(body, &mt)
4695		return mt, err
4696	case string(TypeMediaObject):
4697		var mo MediaObject
4698		err := json.Unmarshal(body, &mo)
4699		return mo, err
4700	case string(TypeCivicStructure):
4701		var cs CivicStructure
4702		err := json.Unmarshal(body, &cs)
4703		return cs, err
4704	case string(TypeLocalBusiness):
4705		var lb LocalBusiness
4706		err := json.Unmarshal(body, &lb)
4707		return lb, err
4708	case string(TypeTouristAttraction):
4709		var ta TouristAttraction
4710		err := json.Unmarshal(body, &ta)
4711		return ta, err
4712	case string(TypeAirport):
4713		var a Airport
4714		err := json.Unmarshal(body, &a)
4715		return a, err
4716	case string(TypeLicense):
4717		var l License
4718		err := json.Unmarshal(body, &l)
4719		return l, err
4720	case string(TypeStructuredValue):
4721		var sv StructuredValue
4722		err := json.Unmarshal(body, &sv)
4723		return sv, err
4724	case string(TypeEntertainmentBusiness):
4725		var eb EntertainmentBusiness
4726		err := json.Unmarshal(body, &eb)
4727		return eb, err
4728	case string(TypeFoodEstablishment):
4729		var fe FoodEstablishment
4730		err := json.Unmarshal(body, &fe)
4731		return fe, err
4732	case string(TypeLodgingBusiness):
4733		var lb LodgingBusiness
4734		err := json.Unmarshal(body, &lb)
4735		return lb, err
4736	case string(TypeRestaurant):
4737		var r Restaurant
4738		err := json.Unmarshal(body, &r)
4739		return r, err
4740	case string(TypeHotel):
4741		var h Hotel
4742		err := json.Unmarshal(body, &h)
4743		return h, err
4744	default:
4745		var i Identifiable
4746		err := json.Unmarshal(body, &i)
4747		return i, err
4748	}
4749}
4750func unmarshalBasicIdentifiableArray(body []byte) ([]BasicIdentifiable, error) {
4751	var rawMessages []*json.RawMessage
4752	err := json.Unmarshal(body, &rawMessages)
4753	if err != nil {
4754		return nil, err
4755	}
4756
4757	iArray := make([]BasicIdentifiable, len(rawMessages))
4758
4759	for index, rawMessage := range rawMessages {
4760		i, err := unmarshalBasicIdentifiable(*rawMessage)
4761		if err != nil {
4762			return nil, err
4763		}
4764		iArray[index] = i
4765	}
4766	return iArray, nil
4767}
4768
4769// MarshalJSON is the custom marshaler for Identifiable.
4770func (i Identifiable) MarshalJSON() ([]byte, error) {
4771	i.Type = TypeIdentifiable
4772	objectMap := make(map[string]interface{})
4773	if i.Type != "" {
4774		objectMap["_type"] = i.Type
4775	}
4776	return json.Marshal(objectMap)
4777}
4778
4779// AsImageObject is the BasicResponseBase implementation for Identifiable.
4780func (i Identifiable) AsImageObject() (*ImageObject, bool) {
4781	return nil, false
4782}
4783
4784// AsThing is the BasicResponseBase implementation for Identifiable.
4785func (i Identifiable) AsThing() (*Thing, bool) {
4786	return nil, false
4787}
4788
4789// AsBasicThing is the BasicResponseBase implementation for Identifiable.
4790func (i Identifiable) AsBasicThing() (BasicThing, bool) {
4791	return nil, false
4792}
4793
4794// AsEntities is the BasicResponseBase implementation for Identifiable.
4795func (i Identifiable) AsEntities() (*Entities, bool) {
4796	return nil, false
4797}
4798
4799// AsPlaces is the BasicResponseBase implementation for Identifiable.
4800func (i Identifiable) AsPlaces() (*Places, bool) {
4801	return nil, false
4802}
4803
4804// AsSearchResponse is the BasicResponseBase implementation for Identifiable.
4805func (i Identifiable) AsSearchResponse() (*SearchResponse, bool) {
4806	return nil, false
4807}
4808
4809// AsResponse is the BasicResponseBase implementation for Identifiable.
4810func (i Identifiable) AsResponse() (*Response, bool) {
4811	return nil, false
4812}
4813
4814// AsBasicResponse is the BasicResponseBase implementation for Identifiable.
4815func (i Identifiable) AsBasicResponse() (BasicResponse, bool) {
4816	return nil, false
4817}
4818
4819// AsSearchResultsAnswer is the BasicResponseBase implementation for Identifiable.
4820func (i Identifiable) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
4821	return nil, false
4822}
4823
4824// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Identifiable.
4825func (i Identifiable) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
4826	return nil, false
4827}
4828
4829// AsIdentifiable is the BasicResponseBase implementation for Identifiable.
4830func (i Identifiable) AsIdentifiable() (*Identifiable, bool) {
4831	return &i, true
4832}
4833
4834// AsBasicIdentifiable is the BasicResponseBase implementation for Identifiable.
4835func (i Identifiable) AsBasicIdentifiable() (BasicIdentifiable, bool) {
4836	return &i, true
4837}
4838
4839// AsAnswer is the BasicResponseBase implementation for Identifiable.
4840func (i Identifiable) AsAnswer() (*Answer, bool) {
4841	return nil, false
4842}
4843
4844// AsBasicAnswer is the BasicResponseBase implementation for Identifiable.
4845func (i Identifiable) AsBasicAnswer() (BasicAnswer, bool) {
4846	return nil, false
4847}
4848
4849// AsErrorResponse is the BasicResponseBase implementation for Identifiable.
4850func (i Identifiable) AsErrorResponse() (*ErrorResponse, bool) {
4851	return nil, false
4852}
4853
4854// AsPostalAddress is the BasicResponseBase implementation for Identifiable.
4855func (i Identifiable) AsPostalAddress() (*PostalAddress, bool) {
4856	return nil, false
4857}
4858
4859// AsPlace is the BasicResponseBase implementation for Identifiable.
4860func (i Identifiable) AsPlace() (*Place, bool) {
4861	return nil, false
4862}
4863
4864// AsBasicPlace is the BasicResponseBase implementation for Identifiable.
4865func (i Identifiable) AsBasicPlace() (BasicPlace, bool) {
4866	return nil, false
4867}
4868
4869// AsOrganization is the BasicResponseBase implementation for Identifiable.
4870func (i Identifiable) AsOrganization() (*Organization, bool) {
4871	return nil, false
4872}
4873
4874// AsCreativeWork is the BasicResponseBase implementation for Identifiable.
4875func (i Identifiable) AsCreativeWork() (*CreativeWork, bool) {
4876	return nil, false
4877}
4878
4879// AsBasicCreativeWork is the BasicResponseBase implementation for Identifiable.
4880func (i Identifiable) AsBasicCreativeWork() (BasicCreativeWork, bool) {
4881	return nil, false
4882}
4883
4884// AsIntangible is the BasicResponseBase implementation for Identifiable.
4885func (i Identifiable) AsIntangible() (*Intangible, bool) {
4886	return nil, false
4887}
4888
4889// AsBasicIntangible is the BasicResponseBase implementation for Identifiable.
4890func (i Identifiable) AsBasicIntangible() (BasicIntangible, bool) {
4891	return nil, false
4892}
4893
4894// AsMovieTheater is the BasicResponseBase implementation for Identifiable.
4895func (i Identifiable) AsMovieTheater() (*MovieTheater, bool) {
4896	return nil, false
4897}
4898
4899// AsMediaObject is the BasicResponseBase implementation for Identifiable.
4900func (i Identifiable) AsMediaObject() (*MediaObject, bool) {
4901	return nil, false
4902}
4903
4904// AsBasicMediaObject is the BasicResponseBase implementation for Identifiable.
4905func (i Identifiable) AsBasicMediaObject() (BasicMediaObject, bool) {
4906	return nil, false
4907}
4908
4909// AsCivicStructure is the BasicResponseBase implementation for Identifiable.
4910func (i Identifiable) AsCivicStructure() (*CivicStructure, bool) {
4911	return nil, false
4912}
4913
4914// AsBasicCivicStructure is the BasicResponseBase implementation for Identifiable.
4915func (i Identifiable) AsBasicCivicStructure() (BasicCivicStructure, bool) {
4916	return nil, false
4917}
4918
4919// AsLocalBusiness is the BasicResponseBase implementation for Identifiable.
4920func (i Identifiable) AsLocalBusiness() (*LocalBusiness, bool) {
4921	return nil, false
4922}
4923
4924// AsBasicLocalBusiness is the BasicResponseBase implementation for Identifiable.
4925func (i Identifiable) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
4926	return nil, false
4927}
4928
4929// AsTouristAttraction is the BasicResponseBase implementation for Identifiable.
4930func (i Identifiable) AsTouristAttraction() (*TouristAttraction, bool) {
4931	return nil, false
4932}
4933
4934// AsAirport is the BasicResponseBase implementation for Identifiable.
4935func (i Identifiable) AsAirport() (*Airport, bool) {
4936	return nil, false
4937}
4938
4939// AsLicense is the BasicResponseBase implementation for Identifiable.
4940func (i Identifiable) AsLicense() (*License, bool) {
4941	return nil, false
4942}
4943
4944// AsStructuredValue is the BasicResponseBase implementation for Identifiable.
4945func (i Identifiable) AsStructuredValue() (*StructuredValue, bool) {
4946	return nil, false
4947}
4948
4949// AsBasicStructuredValue is the BasicResponseBase implementation for Identifiable.
4950func (i Identifiable) AsBasicStructuredValue() (BasicStructuredValue, bool) {
4951	return nil, false
4952}
4953
4954// AsEntertainmentBusiness is the BasicResponseBase implementation for Identifiable.
4955func (i Identifiable) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
4956	return nil, false
4957}
4958
4959// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Identifiable.
4960func (i Identifiable) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
4961	return nil, false
4962}
4963
4964// AsFoodEstablishment is the BasicResponseBase implementation for Identifiable.
4965func (i Identifiable) AsFoodEstablishment() (*FoodEstablishment, bool) {
4966	return nil, false
4967}
4968
4969// AsBasicFoodEstablishment is the BasicResponseBase implementation for Identifiable.
4970func (i Identifiable) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
4971	return nil, false
4972}
4973
4974// AsLodgingBusiness is the BasicResponseBase implementation for Identifiable.
4975func (i Identifiable) AsLodgingBusiness() (*LodgingBusiness, bool) {
4976	return nil, false
4977}
4978
4979// AsBasicLodgingBusiness is the BasicResponseBase implementation for Identifiable.
4980func (i Identifiable) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
4981	return nil, false
4982}
4983
4984// AsRestaurant is the BasicResponseBase implementation for Identifiable.
4985func (i Identifiable) AsRestaurant() (*Restaurant, bool) {
4986	return nil, false
4987}
4988
4989// AsHotel is the BasicResponseBase implementation for Identifiable.
4990func (i Identifiable) AsHotel() (*Hotel, bool) {
4991	return nil, false
4992}
4993
4994// AsResponseBase is the BasicResponseBase implementation for Identifiable.
4995func (i Identifiable) AsResponseBase() (*ResponseBase, bool) {
4996	return nil, false
4997}
4998
4999// AsBasicResponseBase is the BasicResponseBase implementation for Identifiable.
5000func (i Identifiable) AsBasicResponseBase() (BasicResponseBase, bool) {
5001	return &i, true
5002}
5003
5004// ImageObject defines an image
5005type ImageObject struct {
5006	// Thumbnail - READ-ONLY; The URL to a thumbnail of the image
5007	Thumbnail *ImageObject `json:"thumbnail,omitempty"`
5008	// ContentURL - READ-ONLY; Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).
5009	ContentURL *string `json:"contentUrl,omitempty"`
5010	// HostPageURL - READ-ONLY; URL of the page that hosts the media object.
5011	HostPageURL *string `json:"hostPageUrl,omitempty"`
5012	// Width - READ-ONLY; The width of the source media object, in pixels.
5013	Width *int32 `json:"width,omitempty"`
5014	// Height - READ-ONLY; The height of the source media object, in pixels.
5015	Height *int32 `json:"height,omitempty"`
5016	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
5017	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
5018	// Provider - READ-ONLY; The source of the creative work.
5019	Provider *[]BasicThing `json:"provider,omitempty"`
5020	// Text - READ-ONLY
5021	Text *string `json:"text,omitempty"`
5022	// Name - READ-ONLY; The name of the thing represented by this object.
5023	Name *string `json:"name,omitempty"`
5024	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
5025	URL *string `json:"url,omitempty"`
5026	// Image - READ-ONLY
5027	Image *ImageObject `json:"image,omitempty"`
5028	// Description - READ-ONLY; A short description of the item.
5029	Description *string `json:"description,omitempty"`
5030	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
5031	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
5032	// BingID - READ-ONLY; An ID that uniquely identifies this item.
5033	BingID *string `json:"bingId,omitempty"`
5034	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
5035	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
5036	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
5037	WebSearchURL *string `json:"webSearchUrl,omitempty"`
5038	// ID - READ-ONLY; A String identifier.
5039	ID *string `json:"id,omitempty"`
5040	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
5041	Type TypeBasicResponseBase `json:"_type,omitempty"`
5042}
5043
5044// MarshalJSON is the custom marshaler for ImageObject.
5045func (ioVar ImageObject) MarshalJSON() ([]byte, error) {
5046	ioVar.Type = TypeImageObject
5047	objectMap := make(map[string]interface{})
5048	if ioVar.Type != "" {
5049		objectMap["_type"] = ioVar.Type
5050	}
5051	return json.Marshal(objectMap)
5052}
5053
5054// AsImageObject is the BasicResponseBase implementation for ImageObject.
5055func (ioVar ImageObject) AsImageObject() (*ImageObject, bool) {
5056	return &ioVar, true
5057}
5058
5059// AsThing is the BasicResponseBase implementation for ImageObject.
5060func (ioVar ImageObject) AsThing() (*Thing, bool) {
5061	return nil, false
5062}
5063
5064// AsBasicThing is the BasicResponseBase implementation for ImageObject.
5065func (ioVar ImageObject) AsBasicThing() (BasicThing, bool) {
5066	return &ioVar, true
5067}
5068
5069// AsEntities is the BasicResponseBase implementation for ImageObject.
5070func (ioVar ImageObject) AsEntities() (*Entities, bool) {
5071	return nil, false
5072}
5073
5074// AsPlaces is the BasicResponseBase implementation for ImageObject.
5075func (ioVar ImageObject) AsPlaces() (*Places, bool) {
5076	return nil, false
5077}
5078
5079// AsSearchResponse is the BasicResponseBase implementation for ImageObject.
5080func (ioVar ImageObject) AsSearchResponse() (*SearchResponse, bool) {
5081	return nil, false
5082}
5083
5084// AsResponse is the BasicResponseBase implementation for ImageObject.
5085func (ioVar ImageObject) AsResponse() (*Response, bool) {
5086	return nil, false
5087}
5088
5089// AsBasicResponse is the BasicResponseBase implementation for ImageObject.
5090func (ioVar ImageObject) AsBasicResponse() (BasicResponse, bool) {
5091	return &ioVar, true
5092}
5093
5094// AsSearchResultsAnswer is the BasicResponseBase implementation for ImageObject.
5095func (ioVar ImageObject) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
5096	return nil, false
5097}
5098
5099// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for ImageObject.
5100func (ioVar ImageObject) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
5101	return nil, false
5102}
5103
5104// AsIdentifiable is the BasicResponseBase implementation for ImageObject.
5105func (ioVar ImageObject) AsIdentifiable() (*Identifiable, bool) {
5106	return nil, false
5107}
5108
5109// AsBasicIdentifiable is the BasicResponseBase implementation for ImageObject.
5110func (ioVar ImageObject) AsBasicIdentifiable() (BasicIdentifiable, bool) {
5111	return &ioVar, true
5112}
5113
5114// AsAnswer is the BasicResponseBase implementation for ImageObject.
5115func (ioVar ImageObject) AsAnswer() (*Answer, bool) {
5116	return nil, false
5117}
5118
5119// AsBasicAnswer is the BasicResponseBase implementation for ImageObject.
5120func (ioVar ImageObject) AsBasicAnswer() (BasicAnswer, bool) {
5121	return nil, false
5122}
5123
5124// AsErrorResponse is the BasicResponseBase implementation for ImageObject.
5125func (ioVar ImageObject) AsErrorResponse() (*ErrorResponse, bool) {
5126	return nil, false
5127}
5128
5129// AsPostalAddress is the BasicResponseBase implementation for ImageObject.
5130func (ioVar ImageObject) AsPostalAddress() (*PostalAddress, bool) {
5131	return nil, false
5132}
5133
5134// AsPlace is the BasicResponseBase implementation for ImageObject.
5135func (ioVar ImageObject) AsPlace() (*Place, bool) {
5136	return nil, false
5137}
5138
5139// AsBasicPlace is the BasicResponseBase implementation for ImageObject.
5140func (ioVar ImageObject) AsBasicPlace() (BasicPlace, bool) {
5141	return nil, false
5142}
5143
5144// AsOrganization is the BasicResponseBase implementation for ImageObject.
5145func (ioVar ImageObject) AsOrganization() (*Organization, bool) {
5146	return nil, false
5147}
5148
5149// AsCreativeWork is the BasicResponseBase implementation for ImageObject.
5150func (ioVar ImageObject) AsCreativeWork() (*CreativeWork, bool) {
5151	return nil, false
5152}
5153
5154// AsBasicCreativeWork is the BasicResponseBase implementation for ImageObject.
5155func (ioVar ImageObject) AsBasicCreativeWork() (BasicCreativeWork, bool) {
5156	return &ioVar, true
5157}
5158
5159// AsIntangible is the BasicResponseBase implementation for ImageObject.
5160func (ioVar ImageObject) AsIntangible() (*Intangible, bool) {
5161	return nil, false
5162}
5163
5164// AsBasicIntangible is the BasicResponseBase implementation for ImageObject.
5165func (ioVar ImageObject) AsBasicIntangible() (BasicIntangible, bool) {
5166	return nil, false
5167}
5168
5169// AsMovieTheater is the BasicResponseBase implementation for ImageObject.
5170func (ioVar ImageObject) AsMovieTheater() (*MovieTheater, bool) {
5171	return nil, false
5172}
5173
5174// AsMediaObject is the BasicResponseBase implementation for ImageObject.
5175func (ioVar ImageObject) AsMediaObject() (*MediaObject, bool) {
5176	return nil, false
5177}
5178
5179// AsBasicMediaObject is the BasicResponseBase implementation for ImageObject.
5180func (ioVar ImageObject) AsBasicMediaObject() (BasicMediaObject, bool) {
5181	return &ioVar, true
5182}
5183
5184// AsCivicStructure is the BasicResponseBase implementation for ImageObject.
5185func (ioVar ImageObject) AsCivicStructure() (*CivicStructure, bool) {
5186	return nil, false
5187}
5188
5189// AsBasicCivicStructure is the BasicResponseBase implementation for ImageObject.
5190func (ioVar ImageObject) AsBasicCivicStructure() (BasicCivicStructure, bool) {
5191	return nil, false
5192}
5193
5194// AsLocalBusiness is the BasicResponseBase implementation for ImageObject.
5195func (ioVar ImageObject) AsLocalBusiness() (*LocalBusiness, bool) {
5196	return nil, false
5197}
5198
5199// AsBasicLocalBusiness is the BasicResponseBase implementation for ImageObject.
5200func (ioVar ImageObject) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
5201	return nil, false
5202}
5203
5204// AsTouristAttraction is the BasicResponseBase implementation for ImageObject.
5205func (ioVar ImageObject) AsTouristAttraction() (*TouristAttraction, bool) {
5206	return nil, false
5207}
5208
5209// AsAirport is the BasicResponseBase implementation for ImageObject.
5210func (ioVar ImageObject) AsAirport() (*Airport, bool) {
5211	return nil, false
5212}
5213
5214// AsLicense is the BasicResponseBase implementation for ImageObject.
5215func (ioVar ImageObject) AsLicense() (*License, bool) {
5216	return nil, false
5217}
5218
5219// AsStructuredValue is the BasicResponseBase implementation for ImageObject.
5220func (ioVar ImageObject) AsStructuredValue() (*StructuredValue, bool) {
5221	return nil, false
5222}
5223
5224// AsBasicStructuredValue is the BasicResponseBase implementation for ImageObject.
5225func (ioVar ImageObject) AsBasicStructuredValue() (BasicStructuredValue, bool) {
5226	return nil, false
5227}
5228
5229// AsEntertainmentBusiness is the BasicResponseBase implementation for ImageObject.
5230func (ioVar ImageObject) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
5231	return nil, false
5232}
5233
5234// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for ImageObject.
5235func (ioVar ImageObject) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
5236	return nil, false
5237}
5238
5239// AsFoodEstablishment is the BasicResponseBase implementation for ImageObject.
5240func (ioVar ImageObject) AsFoodEstablishment() (*FoodEstablishment, bool) {
5241	return nil, false
5242}
5243
5244// AsBasicFoodEstablishment is the BasicResponseBase implementation for ImageObject.
5245func (ioVar ImageObject) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
5246	return nil, false
5247}
5248
5249// AsLodgingBusiness is the BasicResponseBase implementation for ImageObject.
5250func (ioVar ImageObject) AsLodgingBusiness() (*LodgingBusiness, bool) {
5251	return nil, false
5252}
5253
5254// AsBasicLodgingBusiness is the BasicResponseBase implementation for ImageObject.
5255func (ioVar ImageObject) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
5256	return nil, false
5257}
5258
5259// AsRestaurant is the BasicResponseBase implementation for ImageObject.
5260func (ioVar ImageObject) AsRestaurant() (*Restaurant, bool) {
5261	return nil, false
5262}
5263
5264// AsHotel is the BasicResponseBase implementation for ImageObject.
5265func (ioVar ImageObject) AsHotel() (*Hotel, bool) {
5266	return nil, false
5267}
5268
5269// AsResponseBase is the BasicResponseBase implementation for ImageObject.
5270func (ioVar ImageObject) AsResponseBase() (*ResponseBase, bool) {
5271	return nil, false
5272}
5273
5274// AsBasicResponseBase is the BasicResponseBase implementation for ImageObject.
5275func (ioVar ImageObject) AsBasicResponseBase() (BasicResponseBase, bool) {
5276	return &ioVar, true
5277}
5278
5279// UnmarshalJSON is the custom unmarshaler for ImageObject struct.
5280func (ioVar *ImageObject) UnmarshalJSON(body []byte) error {
5281	var m map[string]*json.RawMessage
5282	err := json.Unmarshal(body, &m)
5283	if err != nil {
5284		return err
5285	}
5286	for k, v := range m {
5287		switch k {
5288		case "thumbnail":
5289			if v != nil {
5290				var thumbnail ImageObject
5291				err = json.Unmarshal(*v, &thumbnail)
5292				if err != nil {
5293					return err
5294				}
5295				ioVar.Thumbnail = &thumbnail
5296			}
5297		case "contentUrl":
5298			if v != nil {
5299				var contentURL string
5300				err = json.Unmarshal(*v, &contentURL)
5301				if err != nil {
5302					return err
5303				}
5304				ioVar.ContentURL = &contentURL
5305			}
5306		case "hostPageUrl":
5307			if v != nil {
5308				var hostPageURL string
5309				err = json.Unmarshal(*v, &hostPageURL)
5310				if err != nil {
5311					return err
5312				}
5313				ioVar.HostPageURL = &hostPageURL
5314			}
5315		case "width":
5316			if v != nil {
5317				var width int32
5318				err = json.Unmarshal(*v, &width)
5319				if err != nil {
5320					return err
5321				}
5322				ioVar.Width = &width
5323			}
5324		case "height":
5325			if v != nil {
5326				var height int32
5327				err = json.Unmarshal(*v, &height)
5328				if err != nil {
5329					return err
5330				}
5331				ioVar.Height = &height
5332			}
5333		case "thumbnailUrl":
5334			if v != nil {
5335				var thumbnailURL string
5336				err = json.Unmarshal(*v, &thumbnailURL)
5337				if err != nil {
5338					return err
5339				}
5340				ioVar.ThumbnailURL = &thumbnailURL
5341			}
5342		case "provider":
5343			if v != nil {
5344				provider, err := unmarshalBasicThingArray(*v)
5345				if err != nil {
5346					return err
5347				}
5348				ioVar.Provider = &provider
5349			}
5350		case "text":
5351			if v != nil {
5352				var textVar string
5353				err = json.Unmarshal(*v, &textVar)
5354				if err != nil {
5355					return err
5356				}
5357				ioVar.Text = &textVar
5358			}
5359		case "name":
5360			if v != nil {
5361				var name string
5362				err = json.Unmarshal(*v, &name)
5363				if err != nil {
5364					return err
5365				}
5366				ioVar.Name = &name
5367			}
5368		case "url":
5369			if v != nil {
5370				var URL string
5371				err = json.Unmarshal(*v, &URL)
5372				if err != nil {
5373					return err
5374				}
5375				ioVar.URL = &URL
5376			}
5377		case "image":
5378			if v != nil {
5379				var imageVar ImageObject
5380				err = json.Unmarshal(*v, &imageVar)
5381				if err != nil {
5382					return err
5383				}
5384				ioVar.Image = &imageVar
5385			}
5386		case "description":
5387			if v != nil {
5388				var description string
5389				err = json.Unmarshal(*v, &description)
5390				if err != nil {
5391					return err
5392				}
5393				ioVar.Description = &description
5394			}
5395		case "entityPresentationInfo":
5396			if v != nil {
5397				var entityPresentationInfo EntitiesEntityPresentationInfo
5398				err = json.Unmarshal(*v, &entityPresentationInfo)
5399				if err != nil {
5400					return err
5401				}
5402				ioVar.EntityPresentationInfo = &entityPresentationInfo
5403			}
5404		case "bingId":
5405			if v != nil {
5406				var bingID string
5407				err = json.Unmarshal(*v, &bingID)
5408				if err != nil {
5409					return err
5410				}
5411				ioVar.BingID = &bingID
5412			}
5413		case "contractualRules":
5414			if v != nil {
5415				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
5416				if err != nil {
5417					return err
5418				}
5419				ioVar.ContractualRules = &contractualRules
5420			}
5421		case "webSearchUrl":
5422			if v != nil {
5423				var webSearchURL string
5424				err = json.Unmarshal(*v, &webSearchURL)
5425				if err != nil {
5426					return err
5427				}
5428				ioVar.WebSearchURL = &webSearchURL
5429			}
5430		case "id":
5431			if v != nil {
5432				var ID string
5433				err = json.Unmarshal(*v, &ID)
5434				if err != nil {
5435					return err
5436				}
5437				ioVar.ID = &ID
5438			}
5439		case "_type":
5440			if v != nil {
5441				var typeVar TypeBasicResponseBase
5442				err = json.Unmarshal(*v, &typeVar)
5443				if err != nil {
5444					return err
5445				}
5446				ioVar.Type = typeVar
5447			}
5448		}
5449	}
5450
5451	return nil
5452}
5453
5454// BasicIntangible ...
5455type BasicIntangible interface {
5456	AsPostalAddress() (*PostalAddress, bool)
5457	AsStructuredValue() (*StructuredValue, bool)
5458	AsBasicStructuredValue() (BasicStructuredValue, bool)
5459	AsIntangible() (*Intangible, bool)
5460}
5461
5462// Intangible ...
5463type Intangible struct {
5464	// Name - READ-ONLY; The name of the thing represented by this object.
5465	Name *string `json:"name,omitempty"`
5466	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
5467	URL *string `json:"url,omitempty"`
5468	// Image - READ-ONLY
5469	Image *ImageObject `json:"image,omitempty"`
5470	// Description - READ-ONLY; A short description of the item.
5471	Description *string `json:"description,omitempty"`
5472	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
5473	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
5474	// BingID - READ-ONLY; An ID that uniquely identifies this item.
5475	BingID *string `json:"bingId,omitempty"`
5476	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
5477	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
5478	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
5479	WebSearchURL *string `json:"webSearchUrl,omitempty"`
5480	// ID - READ-ONLY; A String identifier.
5481	ID *string `json:"id,omitempty"`
5482	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
5483	Type TypeBasicResponseBase `json:"_type,omitempty"`
5484}
5485
5486func unmarshalBasicIntangible(body []byte) (BasicIntangible, error) {
5487	var m map[string]interface{}
5488	err := json.Unmarshal(body, &m)
5489	if err != nil {
5490		return nil, err
5491	}
5492
5493	switch m["_type"] {
5494	case string(TypePostalAddress):
5495		var pa PostalAddress
5496		err := json.Unmarshal(body, &pa)
5497		return pa, err
5498	case string(TypeStructuredValue):
5499		var sv StructuredValue
5500		err := json.Unmarshal(body, &sv)
5501		return sv, err
5502	default:
5503		var i Intangible
5504		err := json.Unmarshal(body, &i)
5505		return i, err
5506	}
5507}
5508func unmarshalBasicIntangibleArray(body []byte) ([]BasicIntangible, error) {
5509	var rawMessages []*json.RawMessage
5510	err := json.Unmarshal(body, &rawMessages)
5511	if err != nil {
5512		return nil, err
5513	}
5514
5515	iArray := make([]BasicIntangible, len(rawMessages))
5516
5517	for index, rawMessage := range rawMessages {
5518		i, err := unmarshalBasicIntangible(*rawMessage)
5519		if err != nil {
5520			return nil, err
5521		}
5522		iArray[index] = i
5523	}
5524	return iArray, nil
5525}
5526
5527// MarshalJSON is the custom marshaler for Intangible.
5528func (i Intangible) MarshalJSON() ([]byte, error) {
5529	i.Type = TypeIntangible
5530	objectMap := make(map[string]interface{})
5531	if i.Type != "" {
5532		objectMap["_type"] = i.Type
5533	}
5534	return json.Marshal(objectMap)
5535}
5536
5537// AsImageObject is the BasicResponseBase implementation for Intangible.
5538func (i Intangible) AsImageObject() (*ImageObject, bool) {
5539	return nil, false
5540}
5541
5542// AsThing is the BasicResponseBase implementation for Intangible.
5543func (i Intangible) AsThing() (*Thing, bool) {
5544	return nil, false
5545}
5546
5547// AsBasicThing is the BasicResponseBase implementation for Intangible.
5548func (i Intangible) AsBasicThing() (BasicThing, bool) {
5549	return &i, true
5550}
5551
5552// AsEntities is the BasicResponseBase implementation for Intangible.
5553func (i Intangible) AsEntities() (*Entities, bool) {
5554	return nil, false
5555}
5556
5557// AsPlaces is the BasicResponseBase implementation for Intangible.
5558func (i Intangible) AsPlaces() (*Places, bool) {
5559	return nil, false
5560}
5561
5562// AsSearchResponse is the BasicResponseBase implementation for Intangible.
5563func (i Intangible) AsSearchResponse() (*SearchResponse, bool) {
5564	return nil, false
5565}
5566
5567// AsResponse is the BasicResponseBase implementation for Intangible.
5568func (i Intangible) AsResponse() (*Response, bool) {
5569	return nil, false
5570}
5571
5572// AsBasicResponse is the BasicResponseBase implementation for Intangible.
5573func (i Intangible) AsBasicResponse() (BasicResponse, bool) {
5574	return &i, true
5575}
5576
5577// AsSearchResultsAnswer is the BasicResponseBase implementation for Intangible.
5578func (i Intangible) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
5579	return nil, false
5580}
5581
5582// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Intangible.
5583func (i Intangible) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
5584	return nil, false
5585}
5586
5587// AsIdentifiable is the BasicResponseBase implementation for Intangible.
5588func (i Intangible) AsIdentifiable() (*Identifiable, bool) {
5589	return nil, false
5590}
5591
5592// AsBasicIdentifiable is the BasicResponseBase implementation for Intangible.
5593func (i Intangible) AsBasicIdentifiable() (BasicIdentifiable, bool) {
5594	return &i, true
5595}
5596
5597// AsAnswer is the BasicResponseBase implementation for Intangible.
5598func (i Intangible) AsAnswer() (*Answer, bool) {
5599	return nil, false
5600}
5601
5602// AsBasicAnswer is the BasicResponseBase implementation for Intangible.
5603func (i Intangible) AsBasicAnswer() (BasicAnswer, bool) {
5604	return nil, false
5605}
5606
5607// AsErrorResponse is the BasicResponseBase implementation for Intangible.
5608func (i Intangible) AsErrorResponse() (*ErrorResponse, bool) {
5609	return nil, false
5610}
5611
5612// AsPostalAddress is the BasicResponseBase implementation for Intangible.
5613func (i Intangible) AsPostalAddress() (*PostalAddress, bool) {
5614	return nil, false
5615}
5616
5617// AsPlace is the BasicResponseBase implementation for Intangible.
5618func (i Intangible) AsPlace() (*Place, bool) {
5619	return nil, false
5620}
5621
5622// AsBasicPlace is the BasicResponseBase implementation for Intangible.
5623func (i Intangible) AsBasicPlace() (BasicPlace, bool) {
5624	return nil, false
5625}
5626
5627// AsOrganization is the BasicResponseBase implementation for Intangible.
5628func (i Intangible) AsOrganization() (*Organization, bool) {
5629	return nil, false
5630}
5631
5632// AsCreativeWork is the BasicResponseBase implementation for Intangible.
5633func (i Intangible) AsCreativeWork() (*CreativeWork, bool) {
5634	return nil, false
5635}
5636
5637// AsBasicCreativeWork is the BasicResponseBase implementation for Intangible.
5638func (i Intangible) AsBasicCreativeWork() (BasicCreativeWork, bool) {
5639	return nil, false
5640}
5641
5642// AsIntangible is the BasicResponseBase implementation for Intangible.
5643func (i Intangible) AsIntangible() (*Intangible, bool) {
5644	return &i, true
5645}
5646
5647// AsBasicIntangible is the BasicResponseBase implementation for Intangible.
5648func (i Intangible) AsBasicIntangible() (BasicIntangible, bool) {
5649	return &i, true
5650}
5651
5652// AsMovieTheater is the BasicResponseBase implementation for Intangible.
5653func (i Intangible) AsMovieTheater() (*MovieTheater, bool) {
5654	return nil, false
5655}
5656
5657// AsMediaObject is the BasicResponseBase implementation for Intangible.
5658func (i Intangible) AsMediaObject() (*MediaObject, bool) {
5659	return nil, false
5660}
5661
5662// AsBasicMediaObject is the BasicResponseBase implementation for Intangible.
5663func (i Intangible) AsBasicMediaObject() (BasicMediaObject, bool) {
5664	return nil, false
5665}
5666
5667// AsCivicStructure is the BasicResponseBase implementation for Intangible.
5668func (i Intangible) AsCivicStructure() (*CivicStructure, bool) {
5669	return nil, false
5670}
5671
5672// AsBasicCivicStructure is the BasicResponseBase implementation for Intangible.
5673func (i Intangible) AsBasicCivicStructure() (BasicCivicStructure, bool) {
5674	return nil, false
5675}
5676
5677// AsLocalBusiness is the BasicResponseBase implementation for Intangible.
5678func (i Intangible) AsLocalBusiness() (*LocalBusiness, bool) {
5679	return nil, false
5680}
5681
5682// AsBasicLocalBusiness is the BasicResponseBase implementation for Intangible.
5683func (i Intangible) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
5684	return nil, false
5685}
5686
5687// AsTouristAttraction is the BasicResponseBase implementation for Intangible.
5688func (i Intangible) AsTouristAttraction() (*TouristAttraction, bool) {
5689	return nil, false
5690}
5691
5692// AsAirport is the BasicResponseBase implementation for Intangible.
5693func (i Intangible) AsAirport() (*Airport, bool) {
5694	return nil, false
5695}
5696
5697// AsLicense is the BasicResponseBase implementation for Intangible.
5698func (i Intangible) AsLicense() (*License, bool) {
5699	return nil, false
5700}
5701
5702// AsStructuredValue is the BasicResponseBase implementation for Intangible.
5703func (i Intangible) AsStructuredValue() (*StructuredValue, bool) {
5704	return nil, false
5705}
5706
5707// AsBasicStructuredValue is the BasicResponseBase implementation for Intangible.
5708func (i Intangible) AsBasicStructuredValue() (BasicStructuredValue, bool) {
5709	return nil, false
5710}
5711
5712// AsEntertainmentBusiness is the BasicResponseBase implementation for Intangible.
5713func (i Intangible) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
5714	return nil, false
5715}
5716
5717// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Intangible.
5718func (i Intangible) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
5719	return nil, false
5720}
5721
5722// AsFoodEstablishment is the BasicResponseBase implementation for Intangible.
5723func (i Intangible) AsFoodEstablishment() (*FoodEstablishment, bool) {
5724	return nil, false
5725}
5726
5727// AsBasicFoodEstablishment is the BasicResponseBase implementation for Intangible.
5728func (i Intangible) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
5729	return nil, false
5730}
5731
5732// AsLodgingBusiness is the BasicResponseBase implementation for Intangible.
5733func (i Intangible) AsLodgingBusiness() (*LodgingBusiness, bool) {
5734	return nil, false
5735}
5736
5737// AsBasicLodgingBusiness is the BasicResponseBase implementation for Intangible.
5738func (i Intangible) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
5739	return nil, false
5740}
5741
5742// AsRestaurant is the BasicResponseBase implementation for Intangible.
5743func (i Intangible) AsRestaurant() (*Restaurant, bool) {
5744	return nil, false
5745}
5746
5747// AsHotel is the BasicResponseBase implementation for Intangible.
5748func (i Intangible) AsHotel() (*Hotel, bool) {
5749	return nil, false
5750}
5751
5752// AsResponseBase is the BasicResponseBase implementation for Intangible.
5753func (i Intangible) AsResponseBase() (*ResponseBase, bool) {
5754	return nil, false
5755}
5756
5757// AsBasicResponseBase is the BasicResponseBase implementation for Intangible.
5758func (i Intangible) AsBasicResponseBase() (BasicResponseBase, bool) {
5759	return &i, true
5760}
5761
5762// UnmarshalJSON is the custom unmarshaler for Intangible struct.
5763func (i *Intangible) UnmarshalJSON(body []byte) error {
5764	var m map[string]*json.RawMessage
5765	err := json.Unmarshal(body, &m)
5766	if err != nil {
5767		return err
5768	}
5769	for k, v := range m {
5770		switch k {
5771		case "name":
5772			if v != nil {
5773				var name string
5774				err = json.Unmarshal(*v, &name)
5775				if err != nil {
5776					return err
5777				}
5778				i.Name = &name
5779			}
5780		case "url":
5781			if v != nil {
5782				var URL string
5783				err = json.Unmarshal(*v, &URL)
5784				if err != nil {
5785					return err
5786				}
5787				i.URL = &URL
5788			}
5789		case "image":
5790			if v != nil {
5791				var imageVar ImageObject
5792				err = json.Unmarshal(*v, &imageVar)
5793				if err != nil {
5794					return err
5795				}
5796				i.Image = &imageVar
5797			}
5798		case "description":
5799			if v != nil {
5800				var description string
5801				err = json.Unmarshal(*v, &description)
5802				if err != nil {
5803					return err
5804				}
5805				i.Description = &description
5806			}
5807		case "entityPresentationInfo":
5808			if v != nil {
5809				var entityPresentationInfo EntitiesEntityPresentationInfo
5810				err = json.Unmarshal(*v, &entityPresentationInfo)
5811				if err != nil {
5812					return err
5813				}
5814				i.EntityPresentationInfo = &entityPresentationInfo
5815			}
5816		case "bingId":
5817			if v != nil {
5818				var bingID string
5819				err = json.Unmarshal(*v, &bingID)
5820				if err != nil {
5821					return err
5822				}
5823				i.BingID = &bingID
5824			}
5825		case "contractualRules":
5826			if v != nil {
5827				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
5828				if err != nil {
5829					return err
5830				}
5831				i.ContractualRules = &contractualRules
5832			}
5833		case "webSearchUrl":
5834			if v != nil {
5835				var webSearchURL string
5836				err = json.Unmarshal(*v, &webSearchURL)
5837				if err != nil {
5838					return err
5839				}
5840				i.WebSearchURL = &webSearchURL
5841			}
5842		case "id":
5843			if v != nil {
5844				var ID string
5845				err = json.Unmarshal(*v, &ID)
5846				if err != nil {
5847					return err
5848				}
5849				i.ID = &ID
5850			}
5851		case "_type":
5852			if v != nil {
5853				var typeVar TypeBasicResponseBase
5854				err = json.Unmarshal(*v, &typeVar)
5855				if err != nil {
5856					return err
5857				}
5858				i.Type = typeVar
5859			}
5860		}
5861	}
5862
5863	return nil
5864}
5865
5866// License defines the license under which the text or photo may be used.
5867type License struct {
5868	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
5869	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
5870	// Provider - READ-ONLY; The source of the creative work.
5871	Provider *[]BasicThing `json:"provider,omitempty"`
5872	// Text - READ-ONLY
5873	Text *string `json:"text,omitempty"`
5874	// Name - READ-ONLY; The name of the thing represented by this object.
5875	Name *string `json:"name,omitempty"`
5876	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
5877	URL *string `json:"url,omitempty"`
5878	// Image - READ-ONLY
5879	Image *ImageObject `json:"image,omitempty"`
5880	// Description - READ-ONLY; A short description of the item.
5881	Description *string `json:"description,omitempty"`
5882	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
5883	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
5884	// BingID - READ-ONLY; An ID that uniquely identifies this item.
5885	BingID *string `json:"bingId,omitempty"`
5886	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
5887	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
5888	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
5889	WebSearchURL *string `json:"webSearchUrl,omitempty"`
5890	// ID - READ-ONLY; A String identifier.
5891	ID *string `json:"id,omitempty"`
5892	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
5893	Type TypeBasicResponseBase `json:"_type,omitempty"`
5894}
5895
5896// MarshalJSON is the custom marshaler for License.
5897func (l License) MarshalJSON() ([]byte, error) {
5898	l.Type = TypeLicense
5899	objectMap := make(map[string]interface{})
5900	if l.Type != "" {
5901		objectMap["_type"] = l.Type
5902	}
5903	return json.Marshal(objectMap)
5904}
5905
5906// AsImageObject is the BasicResponseBase implementation for License.
5907func (l License) AsImageObject() (*ImageObject, bool) {
5908	return nil, false
5909}
5910
5911// AsThing is the BasicResponseBase implementation for License.
5912func (l License) AsThing() (*Thing, bool) {
5913	return nil, false
5914}
5915
5916// AsBasicThing is the BasicResponseBase implementation for License.
5917func (l License) AsBasicThing() (BasicThing, bool) {
5918	return &l, true
5919}
5920
5921// AsEntities is the BasicResponseBase implementation for License.
5922func (l License) AsEntities() (*Entities, bool) {
5923	return nil, false
5924}
5925
5926// AsPlaces is the BasicResponseBase implementation for License.
5927func (l License) AsPlaces() (*Places, bool) {
5928	return nil, false
5929}
5930
5931// AsSearchResponse is the BasicResponseBase implementation for License.
5932func (l License) AsSearchResponse() (*SearchResponse, bool) {
5933	return nil, false
5934}
5935
5936// AsResponse is the BasicResponseBase implementation for License.
5937func (l License) AsResponse() (*Response, bool) {
5938	return nil, false
5939}
5940
5941// AsBasicResponse is the BasicResponseBase implementation for License.
5942func (l License) AsBasicResponse() (BasicResponse, bool) {
5943	return &l, true
5944}
5945
5946// AsSearchResultsAnswer is the BasicResponseBase implementation for License.
5947func (l License) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
5948	return nil, false
5949}
5950
5951// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for License.
5952func (l License) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
5953	return nil, false
5954}
5955
5956// AsIdentifiable is the BasicResponseBase implementation for License.
5957func (l License) AsIdentifiable() (*Identifiable, bool) {
5958	return nil, false
5959}
5960
5961// AsBasicIdentifiable is the BasicResponseBase implementation for License.
5962func (l License) AsBasicIdentifiable() (BasicIdentifiable, bool) {
5963	return &l, true
5964}
5965
5966// AsAnswer is the BasicResponseBase implementation for License.
5967func (l License) AsAnswer() (*Answer, bool) {
5968	return nil, false
5969}
5970
5971// AsBasicAnswer is the BasicResponseBase implementation for License.
5972func (l License) AsBasicAnswer() (BasicAnswer, bool) {
5973	return nil, false
5974}
5975
5976// AsErrorResponse is the BasicResponseBase implementation for License.
5977func (l License) AsErrorResponse() (*ErrorResponse, bool) {
5978	return nil, false
5979}
5980
5981// AsPostalAddress is the BasicResponseBase implementation for License.
5982func (l License) AsPostalAddress() (*PostalAddress, bool) {
5983	return nil, false
5984}
5985
5986// AsPlace is the BasicResponseBase implementation for License.
5987func (l License) AsPlace() (*Place, bool) {
5988	return nil, false
5989}
5990
5991// AsBasicPlace is the BasicResponseBase implementation for License.
5992func (l License) AsBasicPlace() (BasicPlace, bool) {
5993	return nil, false
5994}
5995
5996// AsOrganization is the BasicResponseBase implementation for License.
5997func (l License) AsOrganization() (*Organization, bool) {
5998	return nil, false
5999}
6000
6001// AsCreativeWork is the BasicResponseBase implementation for License.
6002func (l License) AsCreativeWork() (*CreativeWork, bool) {
6003	return nil, false
6004}
6005
6006// AsBasicCreativeWork is the BasicResponseBase implementation for License.
6007func (l License) AsBasicCreativeWork() (BasicCreativeWork, bool) {
6008	return &l, true
6009}
6010
6011// AsIntangible is the BasicResponseBase implementation for License.
6012func (l License) AsIntangible() (*Intangible, bool) {
6013	return nil, false
6014}
6015
6016// AsBasicIntangible is the BasicResponseBase implementation for License.
6017func (l License) AsBasicIntangible() (BasicIntangible, bool) {
6018	return nil, false
6019}
6020
6021// AsMovieTheater is the BasicResponseBase implementation for License.
6022func (l License) AsMovieTheater() (*MovieTheater, bool) {
6023	return nil, false
6024}
6025
6026// AsMediaObject is the BasicResponseBase implementation for License.
6027func (l License) AsMediaObject() (*MediaObject, bool) {
6028	return nil, false
6029}
6030
6031// AsBasicMediaObject is the BasicResponseBase implementation for License.
6032func (l License) AsBasicMediaObject() (BasicMediaObject, bool) {
6033	return nil, false
6034}
6035
6036// AsCivicStructure is the BasicResponseBase implementation for License.
6037func (l License) AsCivicStructure() (*CivicStructure, bool) {
6038	return nil, false
6039}
6040
6041// AsBasicCivicStructure is the BasicResponseBase implementation for License.
6042func (l License) AsBasicCivicStructure() (BasicCivicStructure, bool) {
6043	return nil, false
6044}
6045
6046// AsLocalBusiness is the BasicResponseBase implementation for License.
6047func (l License) AsLocalBusiness() (*LocalBusiness, bool) {
6048	return nil, false
6049}
6050
6051// AsBasicLocalBusiness is the BasicResponseBase implementation for License.
6052func (l License) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
6053	return nil, false
6054}
6055
6056// AsTouristAttraction is the BasicResponseBase implementation for License.
6057func (l License) AsTouristAttraction() (*TouristAttraction, bool) {
6058	return nil, false
6059}
6060
6061// AsAirport is the BasicResponseBase implementation for License.
6062func (l License) AsAirport() (*Airport, bool) {
6063	return nil, false
6064}
6065
6066// AsLicense is the BasicResponseBase implementation for License.
6067func (l License) AsLicense() (*License, bool) {
6068	return &l, true
6069}
6070
6071// AsStructuredValue is the BasicResponseBase implementation for License.
6072func (l License) AsStructuredValue() (*StructuredValue, bool) {
6073	return nil, false
6074}
6075
6076// AsBasicStructuredValue is the BasicResponseBase implementation for License.
6077func (l License) AsBasicStructuredValue() (BasicStructuredValue, bool) {
6078	return nil, false
6079}
6080
6081// AsEntertainmentBusiness is the BasicResponseBase implementation for License.
6082func (l License) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
6083	return nil, false
6084}
6085
6086// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for License.
6087func (l License) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
6088	return nil, false
6089}
6090
6091// AsFoodEstablishment is the BasicResponseBase implementation for License.
6092func (l License) AsFoodEstablishment() (*FoodEstablishment, bool) {
6093	return nil, false
6094}
6095
6096// AsBasicFoodEstablishment is the BasicResponseBase implementation for License.
6097func (l License) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
6098	return nil, false
6099}
6100
6101// AsLodgingBusiness is the BasicResponseBase implementation for License.
6102func (l License) AsLodgingBusiness() (*LodgingBusiness, bool) {
6103	return nil, false
6104}
6105
6106// AsBasicLodgingBusiness is the BasicResponseBase implementation for License.
6107func (l License) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
6108	return nil, false
6109}
6110
6111// AsRestaurant is the BasicResponseBase implementation for License.
6112func (l License) AsRestaurant() (*Restaurant, bool) {
6113	return nil, false
6114}
6115
6116// AsHotel is the BasicResponseBase implementation for License.
6117func (l License) AsHotel() (*Hotel, bool) {
6118	return nil, false
6119}
6120
6121// AsResponseBase is the BasicResponseBase implementation for License.
6122func (l License) AsResponseBase() (*ResponseBase, bool) {
6123	return nil, false
6124}
6125
6126// AsBasicResponseBase is the BasicResponseBase implementation for License.
6127func (l License) AsBasicResponseBase() (BasicResponseBase, bool) {
6128	return &l, true
6129}
6130
6131// UnmarshalJSON is the custom unmarshaler for License struct.
6132func (l *License) UnmarshalJSON(body []byte) error {
6133	var m map[string]*json.RawMessage
6134	err := json.Unmarshal(body, &m)
6135	if err != nil {
6136		return err
6137	}
6138	for k, v := range m {
6139		switch k {
6140		case "thumbnailUrl":
6141			if v != nil {
6142				var thumbnailURL string
6143				err = json.Unmarshal(*v, &thumbnailURL)
6144				if err != nil {
6145					return err
6146				}
6147				l.ThumbnailURL = &thumbnailURL
6148			}
6149		case "provider":
6150			if v != nil {
6151				provider, err := unmarshalBasicThingArray(*v)
6152				if err != nil {
6153					return err
6154				}
6155				l.Provider = &provider
6156			}
6157		case "text":
6158			if v != nil {
6159				var textVar string
6160				err = json.Unmarshal(*v, &textVar)
6161				if err != nil {
6162					return err
6163				}
6164				l.Text = &textVar
6165			}
6166		case "name":
6167			if v != nil {
6168				var name string
6169				err = json.Unmarshal(*v, &name)
6170				if err != nil {
6171					return err
6172				}
6173				l.Name = &name
6174			}
6175		case "url":
6176			if v != nil {
6177				var URL string
6178				err = json.Unmarshal(*v, &URL)
6179				if err != nil {
6180					return err
6181				}
6182				l.URL = &URL
6183			}
6184		case "image":
6185			if v != nil {
6186				var imageVar ImageObject
6187				err = json.Unmarshal(*v, &imageVar)
6188				if err != nil {
6189					return err
6190				}
6191				l.Image = &imageVar
6192			}
6193		case "description":
6194			if v != nil {
6195				var description string
6196				err = json.Unmarshal(*v, &description)
6197				if err != nil {
6198					return err
6199				}
6200				l.Description = &description
6201			}
6202		case "entityPresentationInfo":
6203			if v != nil {
6204				var entityPresentationInfo EntitiesEntityPresentationInfo
6205				err = json.Unmarshal(*v, &entityPresentationInfo)
6206				if err != nil {
6207					return err
6208				}
6209				l.EntityPresentationInfo = &entityPresentationInfo
6210			}
6211		case "bingId":
6212			if v != nil {
6213				var bingID string
6214				err = json.Unmarshal(*v, &bingID)
6215				if err != nil {
6216					return err
6217				}
6218				l.BingID = &bingID
6219			}
6220		case "contractualRules":
6221			if v != nil {
6222				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
6223				if err != nil {
6224					return err
6225				}
6226				l.ContractualRules = &contractualRules
6227			}
6228		case "webSearchUrl":
6229			if v != nil {
6230				var webSearchURL string
6231				err = json.Unmarshal(*v, &webSearchURL)
6232				if err != nil {
6233					return err
6234				}
6235				l.WebSearchURL = &webSearchURL
6236			}
6237		case "id":
6238			if v != nil {
6239				var ID string
6240				err = json.Unmarshal(*v, &ID)
6241				if err != nil {
6242					return err
6243				}
6244				l.ID = &ID
6245			}
6246		case "_type":
6247			if v != nil {
6248				var typeVar TypeBasicResponseBase
6249				err = json.Unmarshal(*v, &typeVar)
6250				if err != nil {
6251					return err
6252				}
6253				l.Type = typeVar
6254			}
6255		}
6256	}
6257
6258	return nil
6259}
6260
6261// BasicLocalBusiness ...
6262type BasicLocalBusiness interface {
6263	AsMovieTheater() (*MovieTheater, bool)
6264	AsEntertainmentBusiness() (*EntertainmentBusiness, bool)
6265	AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool)
6266	AsFoodEstablishment() (*FoodEstablishment, bool)
6267	AsBasicFoodEstablishment() (BasicFoodEstablishment, bool)
6268	AsLodgingBusiness() (*LodgingBusiness, bool)
6269	AsBasicLodgingBusiness() (BasicLodgingBusiness, bool)
6270	AsRestaurant() (*Restaurant, bool)
6271	AsHotel() (*Hotel, bool)
6272	AsLocalBusiness() (*LocalBusiness, bool)
6273}
6274
6275// LocalBusiness ...
6276type LocalBusiness struct {
6277	// PriceRange - READ-ONLY; $$.
6278	PriceRange *string `json:"priceRange,omitempty"`
6279	// Panoramas - READ-ONLY
6280	Panoramas *[]ImageObject `json:"panoramas,omitempty"`
6281	// IsPermanentlyClosed - READ-ONLY
6282	IsPermanentlyClosed *bool `json:"isPermanentlyClosed,omitempty"`
6283	// TagLine - READ-ONLY
6284	TagLine *string `json:"tagLine,omitempty"`
6285	// Address - READ-ONLY; The postal address of where the entity is located
6286	Address *PostalAddress `json:"address,omitempty"`
6287	// Telephone - READ-ONLY; The entity's telephone number
6288	Telephone *string `json:"telephone,omitempty"`
6289	// Name - READ-ONLY; The name of the thing represented by this object.
6290	Name *string `json:"name,omitempty"`
6291	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
6292	URL *string `json:"url,omitempty"`
6293	// Image - READ-ONLY
6294	Image *ImageObject `json:"image,omitempty"`
6295	// Description - READ-ONLY; A short description of the item.
6296	Description *string `json:"description,omitempty"`
6297	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
6298	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
6299	// BingID - READ-ONLY; An ID that uniquely identifies this item.
6300	BingID *string `json:"bingId,omitempty"`
6301	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
6302	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
6303	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
6304	WebSearchURL *string `json:"webSearchUrl,omitempty"`
6305	// ID - READ-ONLY; A String identifier.
6306	ID *string `json:"id,omitempty"`
6307	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
6308	Type TypeBasicResponseBase `json:"_type,omitempty"`
6309}
6310
6311func unmarshalBasicLocalBusiness(body []byte) (BasicLocalBusiness, error) {
6312	var m map[string]interface{}
6313	err := json.Unmarshal(body, &m)
6314	if err != nil {
6315		return nil, err
6316	}
6317
6318	switch m["_type"] {
6319	case string(TypeMovieTheater):
6320		var mt MovieTheater
6321		err := json.Unmarshal(body, &mt)
6322		return mt, err
6323	case string(TypeEntertainmentBusiness):
6324		var eb EntertainmentBusiness
6325		err := json.Unmarshal(body, &eb)
6326		return eb, err
6327	case string(TypeFoodEstablishment):
6328		var fe FoodEstablishment
6329		err := json.Unmarshal(body, &fe)
6330		return fe, err
6331	case string(TypeLodgingBusiness):
6332		var lb LodgingBusiness
6333		err := json.Unmarshal(body, &lb)
6334		return lb, err
6335	case string(TypeRestaurant):
6336		var r Restaurant
6337		err := json.Unmarshal(body, &r)
6338		return r, err
6339	case string(TypeHotel):
6340		var h Hotel
6341		err := json.Unmarshal(body, &h)
6342		return h, err
6343	default:
6344		var lb LocalBusiness
6345		err := json.Unmarshal(body, &lb)
6346		return lb, err
6347	}
6348}
6349func unmarshalBasicLocalBusinessArray(body []byte) ([]BasicLocalBusiness, error) {
6350	var rawMessages []*json.RawMessage
6351	err := json.Unmarshal(body, &rawMessages)
6352	if err != nil {
6353		return nil, err
6354	}
6355
6356	lbArray := make([]BasicLocalBusiness, len(rawMessages))
6357
6358	for index, rawMessage := range rawMessages {
6359		lb, err := unmarshalBasicLocalBusiness(*rawMessage)
6360		if err != nil {
6361			return nil, err
6362		}
6363		lbArray[index] = lb
6364	}
6365	return lbArray, nil
6366}
6367
6368// MarshalJSON is the custom marshaler for LocalBusiness.
6369func (lb LocalBusiness) MarshalJSON() ([]byte, error) {
6370	lb.Type = TypeLocalBusiness
6371	objectMap := make(map[string]interface{})
6372	if lb.Type != "" {
6373		objectMap["_type"] = lb.Type
6374	}
6375	return json.Marshal(objectMap)
6376}
6377
6378// AsImageObject is the BasicResponseBase implementation for LocalBusiness.
6379func (lb LocalBusiness) AsImageObject() (*ImageObject, bool) {
6380	return nil, false
6381}
6382
6383// AsThing is the BasicResponseBase implementation for LocalBusiness.
6384func (lb LocalBusiness) AsThing() (*Thing, bool) {
6385	return nil, false
6386}
6387
6388// AsBasicThing is the BasicResponseBase implementation for LocalBusiness.
6389func (lb LocalBusiness) AsBasicThing() (BasicThing, bool) {
6390	return &lb, true
6391}
6392
6393// AsEntities is the BasicResponseBase implementation for LocalBusiness.
6394func (lb LocalBusiness) AsEntities() (*Entities, bool) {
6395	return nil, false
6396}
6397
6398// AsPlaces is the BasicResponseBase implementation for LocalBusiness.
6399func (lb LocalBusiness) AsPlaces() (*Places, bool) {
6400	return nil, false
6401}
6402
6403// AsSearchResponse is the BasicResponseBase implementation for LocalBusiness.
6404func (lb LocalBusiness) AsSearchResponse() (*SearchResponse, bool) {
6405	return nil, false
6406}
6407
6408// AsResponse is the BasicResponseBase implementation for LocalBusiness.
6409func (lb LocalBusiness) AsResponse() (*Response, bool) {
6410	return nil, false
6411}
6412
6413// AsBasicResponse is the BasicResponseBase implementation for LocalBusiness.
6414func (lb LocalBusiness) AsBasicResponse() (BasicResponse, bool) {
6415	return &lb, true
6416}
6417
6418// AsSearchResultsAnswer is the BasicResponseBase implementation for LocalBusiness.
6419func (lb LocalBusiness) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
6420	return nil, false
6421}
6422
6423// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for LocalBusiness.
6424func (lb LocalBusiness) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
6425	return nil, false
6426}
6427
6428// AsIdentifiable is the BasicResponseBase implementation for LocalBusiness.
6429func (lb LocalBusiness) AsIdentifiable() (*Identifiable, bool) {
6430	return nil, false
6431}
6432
6433// AsBasicIdentifiable is the BasicResponseBase implementation for LocalBusiness.
6434func (lb LocalBusiness) AsBasicIdentifiable() (BasicIdentifiable, bool) {
6435	return &lb, true
6436}
6437
6438// AsAnswer is the BasicResponseBase implementation for LocalBusiness.
6439func (lb LocalBusiness) AsAnswer() (*Answer, bool) {
6440	return nil, false
6441}
6442
6443// AsBasicAnswer is the BasicResponseBase implementation for LocalBusiness.
6444func (lb LocalBusiness) AsBasicAnswer() (BasicAnswer, bool) {
6445	return nil, false
6446}
6447
6448// AsErrorResponse is the BasicResponseBase implementation for LocalBusiness.
6449func (lb LocalBusiness) AsErrorResponse() (*ErrorResponse, bool) {
6450	return nil, false
6451}
6452
6453// AsPostalAddress is the BasicResponseBase implementation for LocalBusiness.
6454func (lb LocalBusiness) AsPostalAddress() (*PostalAddress, bool) {
6455	return nil, false
6456}
6457
6458// AsPlace is the BasicResponseBase implementation for LocalBusiness.
6459func (lb LocalBusiness) AsPlace() (*Place, bool) {
6460	return nil, false
6461}
6462
6463// AsBasicPlace is the BasicResponseBase implementation for LocalBusiness.
6464func (lb LocalBusiness) AsBasicPlace() (BasicPlace, bool) {
6465	return &lb, true
6466}
6467
6468// AsOrganization is the BasicResponseBase implementation for LocalBusiness.
6469func (lb LocalBusiness) AsOrganization() (*Organization, bool) {
6470	return nil, false
6471}
6472
6473// AsCreativeWork is the BasicResponseBase implementation for LocalBusiness.
6474func (lb LocalBusiness) AsCreativeWork() (*CreativeWork, bool) {
6475	return nil, false
6476}
6477
6478// AsBasicCreativeWork is the BasicResponseBase implementation for LocalBusiness.
6479func (lb LocalBusiness) AsBasicCreativeWork() (BasicCreativeWork, bool) {
6480	return nil, false
6481}
6482
6483// AsIntangible is the BasicResponseBase implementation for LocalBusiness.
6484func (lb LocalBusiness) AsIntangible() (*Intangible, bool) {
6485	return nil, false
6486}
6487
6488// AsBasicIntangible is the BasicResponseBase implementation for LocalBusiness.
6489func (lb LocalBusiness) AsBasicIntangible() (BasicIntangible, bool) {
6490	return nil, false
6491}
6492
6493// AsMovieTheater is the BasicResponseBase implementation for LocalBusiness.
6494func (lb LocalBusiness) AsMovieTheater() (*MovieTheater, bool) {
6495	return nil, false
6496}
6497
6498// AsMediaObject is the BasicResponseBase implementation for LocalBusiness.
6499func (lb LocalBusiness) AsMediaObject() (*MediaObject, bool) {
6500	return nil, false
6501}
6502
6503// AsBasicMediaObject is the BasicResponseBase implementation for LocalBusiness.
6504func (lb LocalBusiness) AsBasicMediaObject() (BasicMediaObject, bool) {
6505	return nil, false
6506}
6507
6508// AsCivicStructure is the BasicResponseBase implementation for LocalBusiness.
6509func (lb LocalBusiness) AsCivicStructure() (*CivicStructure, bool) {
6510	return nil, false
6511}
6512
6513// AsBasicCivicStructure is the BasicResponseBase implementation for LocalBusiness.
6514func (lb LocalBusiness) AsBasicCivicStructure() (BasicCivicStructure, bool) {
6515	return nil, false
6516}
6517
6518// AsLocalBusiness is the BasicResponseBase implementation for LocalBusiness.
6519func (lb LocalBusiness) AsLocalBusiness() (*LocalBusiness, bool) {
6520	return &lb, true
6521}
6522
6523// AsBasicLocalBusiness is the BasicResponseBase implementation for LocalBusiness.
6524func (lb LocalBusiness) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
6525	return &lb, true
6526}
6527
6528// AsTouristAttraction is the BasicResponseBase implementation for LocalBusiness.
6529func (lb LocalBusiness) AsTouristAttraction() (*TouristAttraction, bool) {
6530	return nil, false
6531}
6532
6533// AsAirport is the BasicResponseBase implementation for LocalBusiness.
6534func (lb LocalBusiness) AsAirport() (*Airport, bool) {
6535	return nil, false
6536}
6537
6538// AsLicense is the BasicResponseBase implementation for LocalBusiness.
6539func (lb LocalBusiness) AsLicense() (*License, bool) {
6540	return nil, false
6541}
6542
6543// AsStructuredValue is the BasicResponseBase implementation for LocalBusiness.
6544func (lb LocalBusiness) AsStructuredValue() (*StructuredValue, bool) {
6545	return nil, false
6546}
6547
6548// AsBasicStructuredValue is the BasicResponseBase implementation for LocalBusiness.
6549func (lb LocalBusiness) AsBasicStructuredValue() (BasicStructuredValue, bool) {
6550	return nil, false
6551}
6552
6553// AsEntertainmentBusiness is the BasicResponseBase implementation for LocalBusiness.
6554func (lb LocalBusiness) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
6555	return nil, false
6556}
6557
6558// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for LocalBusiness.
6559func (lb LocalBusiness) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
6560	return nil, false
6561}
6562
6563// AsFoodEstablishment is the BasicResponseBase implementation for LocalBusiness.
6564func (lb LocalBusiness) AsFoodEstablishment() (*FoodEstablishment, bool) {
6565	return nil, false
6566}
6567
6568// AsBasicFoodEstablishment is the BasicResponseBase implementation for LocalBusiness.
6569func (lb LocalBusiness) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
6570	return nil, false
6571}
6572
6573// AsLodgingBusiness is the BasicResponseBase implementation for LocalBusiness.
6574func (lb LocalBusiness) AsLodgingBusiness() (*LodgingBusiness, bool) {
6575	return nil, false
6576}
6577
6578// AsBasicLodgingBusiness is the BasicResponseBase implementation for LocalBusiness.
6579func (lb LocalBusiness) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
6580	return nil, false
6581}
6582
6583// AsRestaurant is the BasicResponseBase implementation for LocalBusiness.
6584func (lb LocalBusiness) AsRestaurant() (*Restaurant, bool) {
6585	return nil, false
6586}
6587
6588// AsHotel is the BasicResponseBase implementation for LocalBusiness.
6589func (lb LocalBusiness) AsHotel() (*Hotel, bool) {
6590	return nil, false
6591}
6592
6593// AsResponseBase is the BasicResponseBase implementation for LocalBusiness.
6594func (lb LocalBusiness) AsResponseBase() (*ResponseBase, bool) {
6595	return nil, false
6596}
6597
6598// AsBasicResponseBase is the BasicResponseBase implementation for LocalBusiness.
6599func (lb LocalBusiness) AsBasicResponseBase() (BasicResponseBase, bool) {
6600	return &lb, true
6601}
6602
6603// UnmarshalJSON is the custom unmarshaler for LocalBusiness struct.
6604func (lb *LocalBusiness) UnmarshalJSON(body []byte) error {
6605	var m map[string]*json.RawMessage
6606	err := json.Unmarshal(body, &m)
6607	if err != nil {
6608		return err
6609	}
6610	for k, v := range m {
6611		switch k {
6612		case "priceRange":
6613			if v != nil {
6614				var priceRange string
6615				err = json.Unmarshal(*v, &priceRange)
6616				if err != nil {
6617					return err
6618				}
6619				lb.PriceRange = &priceRange
6620			}
6621		case "panoramas":
6622			if v != nil {
6623				var panoramas []ImageObject
6624				err = json.Unmarshal(*v, &panoramas)
6625				if err != nil {
6626					return err
6627				}
6628				lb.Panoramas = &panoramas
6629			}
6630		case "isPermanentlyClosed":
6631			if v != nil {
6632				var isPermanentlyClosed bool
6633				err = json.Unmarshal(*v, &isPermanentlyClosed)
6634				if err != nil {
6635					return err
6636				}
6637				lb.IsPermanentlyClosed = &isPermanentlyClosed
6638			}
6639		case "tagLine":
6640			if v != nil {
6641				var tagLine string
6642				err = json.Unmarshal(*v, &tagLine)
6643				if err != nil {
6644					return err
6645				}
6646				lb.TagLine = &tagLine
6647			}
6648		case "address":
6649			if v != nil {
6650				var address PostalAddress
6651				err = json.Unmarshal(*v, &address)
6652				if err != nil {
6653					return err
6654				}
6655				lb.Address = &address
6656			}
6657		case "telephone":
6658			if v != nil {
6659				var telephone string
6660				err = json.Unmarshal(*v, &telephone)
6661				if err != nil {
6662					return err
6663				}
6664				lb.Telephone = &telephone
6665			}
6666		case "name":
6667			if v != nil {
6668				var name string
6669				err = json.Unmarshal(*v, &name)
6670				if err != nil {
6671					return err
6672				}
6673				lb.Name = &name
6674			}
6675		case "url":
6676			if v != nil {
6677				var URL string
6678				err = json.Unmarshal(*v, &URL)
6679				if err != nil {
6680					return err
6681				}
6682				lb.URL = &URL
6683			}
6684		case "image":
6685			if v != nil {
6686				var imageVar ImageObject
6687				err = json.Unmarshal(*v, &imageVar)
6688				if err != nil {
6689					return err
6690				}
6691				lb.Image = &imageVar
6692			}
6693		case "description":
6694			if v != nil {
6695				var description string
6696				err = json.Unmarshal(*v, &description)
6697				if err != nil {
6698					return err
6699				}
6700				lb.Description = &description
6701			}
6702		case "entityPresentationInfo":
6703			if v != nil {
6704				var entityPresentationInfo EntitiesEntityPresentationInfo
6705				err = json.Unmarshal(*v, &entityPresentationInfo)
6706				if err != nil {
6707					return err
6708				}
6709				lb.EntityPresentationInfo = &entityPresentationInfo
6710			}
6711		case "bingId":
6712			if v != nil {
6713				var bingID string
6714				err = json.Unmarshal(*v, &bingID)
6715				if err != nil {
6716					return err
6717				}
6718				lb.BingID = &bingID
6719			}
6720		case "contractualRules":
6721			if v != nil {
6722				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
6723				if err != nil {
6724					return err
6725				}
6726				lb.ContractualRules = &contractualRules
6727			}
6728		case "webSearchUrl":
6729			if v != nil {
6730				var webSearchURL string
6731				err = json.Unmarshal(*v, &webSearchURL)
6732				if err != nil {
6733					return err
6734				}
6735				lb.WebSearchURL = &webSearchURL
6736			}
6737		case "id":
6738			if v != nil {
6739				var ID string
6740				err = json.Unmarshal(*v, &ID)
6741				if err != nil {
6742					return err
6743				}
6744				lb.ID = &ID
6745			}
6746		case "_type":
6747			if v != nil {
6748				var typeVar TypeBasicResponseBase
6749				err = json.Unmarshal(*v, &typeVar)
6750				if err != nil {
6751					return err
6752				}
6753				lb.Type = typeVar
6754			}
6755		}
6756	}
6757
6758	return nil
6759}
6760
6761// BasicLodgingBusiness ...
6762type BasicLodgingBusiness interface {
6763	AsHotel() (*Hotel, bool)
6764	AsLodgingBusiness() (*LodgingBusiness, bool)
6765}
6766
6767// LodgingBusiness ...
6768type LodgingBusiness struct {
6769	// PriceRange - READ-ONLY; $$.
6770	PriceRange *string `json:"priceRange,omitempty"`
6771	// Panoramas - READ-ONLY
6772	Panoramas *[]ImageObject `json:"panoramas,omitempty"`
6773	// IsPermanentlyClosed - READ-ONLY
6774	IsPermanentlyClosed *bool `json:"isPermanentlyClosed,omitempty"`
6775	// TagLine - READ-ONLY
6776	TagLine *string `json:"tagLine,omitempty"`
6777	// Address - READ-ONLY; The postal address of where the entity is located
6778	Address *PostalAddress `json:"address,omitempty"`
6779	// Telephone - READ-ONLY; The entity's telephone number
6780	Telephone *string `json:"telephone,omitempty"`
6781	// Name - READ-ONLY; The name of the thing represented by this object.
6782	Name *string `json:"name,omitempty"`
6783	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
6784	URL *string `json:"url,omitempty"`
6785	// Image - READ-ONLY
6786	Image *ImageObject `json:"image,omitempty"`
6787	// Description - READ-ONLY; A short description of the item.
6788	Description *string `json:"description,omitempty"`
6789	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
6790	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
6791	// BingID - READ-ONLY; An ID that uniquely identifies this item.
6792	BingID *string `json:"bingId,omitempty"`
6793	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
6794	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
6795	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
6796	WebSearchURL *string `json:"webSearchUrl,omitempty"`
6797	// ID - READ-ONLY; A String identifier.
6798	ID *string `json:"id,omitempty"`
6799	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
6800	Type TypeBasicResponseBase `json:"_type,omitempty"`
6801}
6802
6803func unmarshalBasicLodgingBusiness(body []byte) (BasicLodgingBusiness, error) {
6804	var m map[string]interface{}
6805	err := json.Unmarshal(body, &m)
6806	if err != nil {
6807		return nil, err
6808	}
6809
6810	switch m["_type"] {
6811	case string(TypeHotel):
6812		var h Hotel
6813		err := json.Unmarshal(body, &h)
6814		return h, err
6815	default:
6816		var lb LodgingBusiness
6817		err := json.Unmarshal(body, &lb)
6818		return lb, err
6819	}
6820}
6821func unmarshalBasicLodgingBusinessArray(body []byte) ([]BasicLodgingBusiness, error) {
6822	var rawMessages []*json.RawMessage
6823	err := json.Unmarshal(body, &rawMessages)
6824	if err != nil {
6825		return nil, err
6826	}
6827
6828	lbArray := make([]BasicLodgingBusiness, len(rawMessages))
6829
6830	for index, rawMessage := range rawMessages {
6831		lb, err := unmarshalBasicLodgingBusiness(*rawMessage)
6832		if err != nil {
6833			return nil, err
6834		}
6835		lbArray[index] = lb
6836	}
6837	return lbArray, nil
6838}
6839
6840// MarshalJSON is the custom marshaler for LodgingBusiness.
6841func (lb LodgingBusiness) MarshalJSON() ([]byte, error) {
6842	lb.Type = TypeLodgingBusiness
6843	objectMap := make(map[string]interface{})
6844	if lb.Type != "" {
6845		objectMap["_type"] = lb.Type
6846	}
6847	return json.Marshal(objectMap)
6848}
6849
6850// AsImageObject is the BasicResponseBase implementation for LodgingBusiness.
6851func (lb LodgingBusiness) AsImageObject() (*ImageObject, bool) {
6852	return nil, false
6853}
6854
6855// AsThing is the BasicResponseBase implementation for LodgingBusiness.
6856func (lb LodgingBusiness) AsThing() (*Thing, bool) {
6857	return nil, false
6858}
6859
6860// AsBasicThing is the BasicResponseBase implementation for LodgingBusiness.
6861func (lb LodgingBusiness) AsBasicThing() (BasicThing, bool) {
6862	return &lb, true
6863}
6864
6865// AsEntities is the BasicResponseBase implementation for LodgingBusiness.
6866func (lb LodgingBusiness) AsEntities() (*Entities, bool) {
6867	return nil, false
6868}
6869
6870// AsPlaces is the BasicResponseBase implementation for LodgingBusiness.
6871func (lb LodgingBusiness) AsPlaces() (*Places, bool) {
6872	return nil, false
6873}
6874
6875// AsSearchResponse is the BasicResponseBase implementation for LodgingBusiness.
6876func (lb LodgingBusiness) AsSearchResponse() (*SearchResponse, bool) {
6877	return nil, false
6878}
6879
6880// AsResponse is the BasicResponseBase implementation for LodgingBusiness.
6881func (lb LodgingBusiness) AsResponse() (*Response, bool) {
6882	return nil, false
6883}
6884
6885// AsBasicResponse is the BasicResponseBase implementation for LodgingBusiness.
6886func (lb LodgingBusiness) AsBasicResponse() (BasicResponse, bool) {
6887	return &lb, true
6888}
6889
6890// AsSearchResultsAnswer is the BasicResponseBase implementation for LodgingBusiness.
6891func (lb LodgingBusiness) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
6892	return nil, false
6893}
6894
6895// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for LodgingBusiness.
6896func (lb LodgingBusiness) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
6897	return nil, false
6898}
6899
6900// AsIdentifiable is the BasicResponseBase implementation for LodgingBusiness.
6901func (lb LodgingBusiness) AsIdentifiable() (*Identifiable, bool) {
6902	return nil, false
6903}
6904
6905// AsBasicIdentifiable is the BasicResponseBase implementation for LodgingBusiness.
6906func (lb LodgingBusiness) AsBasicIdentifiable() (BasicIdentifiable, bool) {
6907	return &lb, true
6908}
6909
6910// AsAnswer is the BasicResponseBase implementation for LodgingBusiness.
6911func (lb LodgingBusiness) AsAnswer() (*Answer, bool) {
6912	return nil, false
6913}
6914
6915// AsBasicAnswer is the BasicResponseBase implementation for LodgingBusiness.
6916func (lb LodgingBusiness) AsBasicAnswer() (BasicAnswer, bool) {
6917	return nil, false
6918}
6919
6920// AsErrorResponse is the BasicResponseBase implementation for LodgingBusiness.
6921func (lb LodgingBusiness) AsErrorResponse() (*ErrorResponse, bool) {
6922	return nil, false
6923}
6924
6925// AsPostalAddress is the BasicResponseBase implementation for LodgingBusiness.
6926func (lb LodgingBusiness) AsPostalAddress() (*PostalAddress, bool) {
6927	return nil, false
6928}
6929
6930// AsPlace is the BasicResponseBase implementation for LodgingBusiness.
6931func (lb LodgingBusiness) AsPlace() (*Place, bool) {
6932	return nil, false
6933}
6934
6935// AsBasicPlace is the BasicResponseBase implementation for LodgingBusiness.
6936func (lb LodgingBusiness) AsBasicPlace() (BasicPlace, bool) {
6937	return &lb, true
6938}
6939
6940// AsOrganization is the BasicResponseBase implementation for LodgingBusiness.
6941func (lb LodgingBusiness) AsOrganization() (*Organization, bool) {
6942	return nil, false
6943}
6944
6945// AsCreativeWork is the BasicResponseBase implementation for LodgingBusiness.
6946func (lb LodgingBusiness) AsCreativeWork() (*CreativeWork, bool) {
6947	return nil, false
6948}
6949
6950// AsBasicCreativeWork is the BasicResponseBase implementation for LodgingBusiness.
6951func (lb LodgingBusiness) AsBasicCreativeWork() (BasicCreativeWork, bool) {
6952	return nil, false
6953}
6954
6955// AsIntangible is the BasicResponseBase implementation for LodgingBusiness.
6956func (lb LodgingBusiness) AsIntangible() (*Intangible, bool) {
6957	return nil, false
6958}
6959
6960// AsBasicIntangible is the BasicResponseBase implementation for LodgingBusiness.
6961func (lb LodgingBusiness) AsBasicIntangible() (BasicIntangible, bool) {
6962	return nil, false
6963}
6964
6965// AsMovieTheater is the BasicResponseBase implementation for LodgingBusiness.
6966func (lb LodgingBusiness) AsMovieTheater() (*MovieTheater, bool) {
6967	return nil, false
6968}
6969
6970// AsMediaObject is the BasicResponseBase implementation for LodgingBusiness.
6971func (lb LodgingBusiness) AsMediaObject() (*MediaObject, bool) {
6972	return nil, false
6973}
6974
6975// AsBasicMediaObject is the BasicResponseBase implementation for LodgingBusiness.
6976func (lb LodgingBusiness) AsBasicMediaObject() (BasicMediaObject, bool) {
6977	return nil, false
6978}
6979
6980// AsCivicStructure is the BasicResponseBase implementation for LodgingBusiness.
6981func (lb LodgingBusiness) AsCivicStructure() (*CivicStructure, bool) {
6982	return nil, false
6983}
6984
6985// AsBasicCivicStructure is the BasicResponseBase implementation for LodgingBusiness.
6986func (lb LodgingBusiness) AsBasicCivicStructure() (BasicCivicStructure, bool) {
6987	return nil, false
6988}
6989
6990// AsLocalBusiness is the BasicResponseBase implementation for LodgingBusiness.
6991func (lb LodgingBusiness) AsLocalBusiness() (*LocalBusiness, bool) {
6992	return nil, false
6993}
6994
6995// AsBasicLocalBusiness is the BasicResponseBase implementation for LodgingBusiness.
6996func (lb LodgingBusiness) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
6997	return &lb, true
6998}
6999
7000// AsTouristAttraction is the BasicResponseBase implementation for LodgingBusiness.
7001func (lb LodgingBusiness) AsTouristAttraction() (*TouristAttraction, bool) {
7002	return nil, false
7003}
7004
7005// AsAirport is the BasicResponseBase implementation for LodgingBusiness.
7006func (lb LodgingBusiness) AsAirport() (*Airport, bool) {
7007	return nil, false
7008}
7009
7010// AsLicense is the BasicResponseBase implementation for LodgingBusiness.
7011func (lb LodgingBusiness) AsLicense() (*License, bool) {
7012	return nil, false
7013}
7014
7015// AsStructuredValue is the BasicResponseBase implementation for LodgingBusiness.
7016func (lb LodgingBusiness) AsStructuredValue() (*StructuredValue, bool) {
7017	return nil, false
7018}
7019
7020// AsBasicStructuredValue is the BasicResponseBase implementation for LodgingBusiness.
7021func (lb LodgingBusiness) AsBasicStructuredValue() (BasicStructuredValue, bool) {
7022	return nil, false
7023}
7024
7025// AsEntertainmentBusiness is the BasicResponseBase implementation for LodgingBusiness.
7026func (lb LodgingBusiness) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
7027	return nil, false
7028}
7029
7030// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for LodgingBusiness.
7031func (lb LodgingBusiness) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
7032	return nil, false
7033}
7034
7035// AsFoodEstablishment is the BasicResponseBase implementation for LodgingBusiness.
7036func (lb LodgingBusiness) AsFoodEstablishment() (*FoodEstablishment, bool) {
7037	return nil, false
7038}
7039
7040// AsBasicFoodEstablishment is the BasicResponseBase implementation for LodgingBusiness.
7041func (lb LodgingBusiness) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
7042	return nil, false
7043}
7044
7045// AsLodgingBusiness is the BasicResponseBase implementation for LodgingBusiness.
7046func (lb LodgingBusiness) AsLodgingBusiness() (*LodgingBusiness, bool) {
7047	return &lb, true
7048}
7049
7050// AsBasicLodgingBusiness is the BasicResponseBase implementation for LodgingBusiness.
7051func (lb LodgingBusiness) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
7052	return &lb, true
7053}
7054
7055// AsRestaurant is the BasicResponseBase implementation for LodgingBusiness.
7056func (lb LodgingBusiness) AsRestaurant() (*Restaurant, bool) {
7057	return nil, false
7058}
7059
7060// AsHotel is the BasicResponseBase implementation for LodgingBusiness.
7061func (lb LodgingBusiness) AsHotel() (*Hotel, bool) {
7062	return nil, false
7063}
7064
7065// AsResponseBase is the BasicResponseBase implementation for LodgingBusiness.
7066func (lb LodgingBusiness) AsResponseBase() (*ResponseBase, bool) {
7067	return nil, false
7068}
7069
7070// AsBasicResponseBase is the BasicResponseBase implementation for LodgingBusiness.
7071func (lb LodgingBusiness) AsBasicResponseBase() (BasicResponseBase, bool) {
7072	return &lb, true
7073}
7074
7075// UnmarshalJSON is the custom unmarshaler for LodgingBusiness struct.
7076func (lb *LodgingBusiness) UnmarshalJSON(body []byte) error {
7077	var m map[string]*json.RawMessage
7078	err := json.Unmarshal(body, &m)
7079	if err != nil {
7080		return err
7081	}
7082	for k, v := range m {
7083		switch k {
7084		case "priceRange":
7085			if v != nil {
7086				var priceRange string
7087				err = json.Unmarshal(*v, &priceRange)
7088				if err != nil {
7089					return err
7090				}
7091				lb.PriceRange = &priceRange
7092			}
7093		case "panoramas":
7094			if v != nil {
7095				var panoramas []ImageObject
7096				err = json.Unmarshal(*v, &panoramas)
7097				if err != nil {
7098					return err
7099				}
7100				lb.Panoramas = &panoramas
7101			}
7102		case "isPermanentlyClosed":
7103			if v != nil {
7104				var isPermanentlyClosed bool
7105				err = json.Unmarshal(*v, &isPermanentlyClosed)
7106				if err != nil {
7107					return err
7108				}
7109				lb.IsPermanentlyClosed = &isPermanentlyClosed
7110			}
7111		case "tagLine":
7112			if v != nil {
7113				var tagLine string
7114				err = json.Unmarshal(*v, &tagLine)
7115				if err != nil {
7116					return err
7117				}
7118				lb.TagLine = &tagLine
7119			}
7120		case "address":
7121			if v != nil {
7122				var address PostalAddress
7123				err = json.Unmarshal(*v, &address)
7124				if err != nil {
7125					return err
7126				}
7127				lb.Address = &address
7128			}
7129		case "telephone":
7130			if v != nil {
7131				var telephone string
7132				err = json.Unmarshal(*v, &telephone)
7133				if err != nil {
7134					return err
7135				}
7136				lb.Telephone = &telephone
7137			}
7138		case "name":
7139			if v != nil {
7140				var name string
7141				err = json.Unmarshal(*v, &name)
7142				if err != nil {
7143					return err
7144				}
7145				lb.Name = &name
7146			}
7147		case "url":
7148			if v != nil {
7149				var URL string
7150				err = json.Unmarshal(*v, &URL)
7151				if err != nil {
7152					return err
7153				}
7154				lb.URL = &URL
7155			}
7156		case "image":
7157			if v != nil {
7158				var imageVar ImageObject
7159				err = json.Unmarshal(*v, &imageVar)
7160				if err != nil {
7161					return err
7162				}
7163				lb.Image = &imageVar
7164			}
7165		case "description":
7166			if v != nil {
7167				var description string
7168				err = json.Unmarshal(*v, &description)
7169				if err != nil {
7170					return err
7171				}
7172				lb.Description = &description
7173			}
7174		case "entityPresentationInfo":
7175			if v != nil {
7176				var entityPresentationInfo EntitiesEntityPresentationInfo
7177				err = json.Unmarshal(*v, &entityPresentationInfo)
7178				if err != nil {
7179					return err
7180				}
7181				lb.EntityPresentationInfo = &entityPresentationInfo
7182			}
7183		case "bingId":
7184			if v != nil {
7185				var bingID string
7186				err = json.Unmarshal(*v, &bingID)
7187				if err != nil {
7188					return err
7189				}
7190				lb.BingID = &bingID
7191			}
7192		case "contractualRules":
7193			if v != nil {
7194				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
7195				if err != nil {
7196					return err
7197				}
7198				lb.ContractualRules = &contractualRules
7199			}
7200		case "webSearchUrl":
7201			if v != nil {
7202				var webSearchURL string
7203				err = json.Unmarshal(*v, &webSearchURL)
7204				if err != nil {
7205					return err
7206				}
7207				lb.WebSearchURL = &webSearchURL
7208			}
7209		case "id":
7210			if v != nil {
7211				var ID string
7212				err = json.Unmarshal(*v, &ID)
7213				if err != nil {
7214					return err
7215				}
7216				lb.ID = &ID
7217			}
7218		case "_type":
7219			if v != nil {
7220				var typeVar TypeBasicResponseBase
7221				err = json.Unmarshal(*v, &typeVar)
7222				if err != nil {
7223					return err
7224				}
7225				lb.Type = typeVar
7226			}
7227		}
7228	}
7229
7230	return nil
7231}
7232
7233// BasicMediaObject ...
7234type BasicMediaObject interface {
7235	AsImageObject() (*ImageObject, bool)
7236	AsMediaObject() (*MediaObject, bool)
7237}
7238
7239// MediaObject ...
7240type MediaObject struct {
7241	// ContentURL - READ-ONLY; Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).
7242	ContentURL *string `json:"contentUrl,omitempty"`
7243	// HostPageURL - READ-ONLY; URL of the page that hosts the media object.
7244	HostPageURL *string `json:"hostPageUrl,omitempty"`
7245	// Width - READ-ONLY; The width of the source media object, in pixels.
7246	Width *int32 `json:"width,omitempty"`
7247	// Height - READ-ONLY; The height of the source media object, in pixels.
7248	Height *int32 `json:"height,omitempty"`
7249	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
7250	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
7251	// Provider - READ-ONLY; The source of the creative work.
7252	Provider *[]BasicThing `json:"provider,omitempty"`
7253	// Text - READ-ONLY
7254	Text *string `json:"text,omitempty"`
7255	// Name - READ-ONLY; The name of the thing represented by this object.
7256	Name *string `json:"name,omitempty"`
7257	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
7258	URL *string `json:"url,omitempty"`
7259	// Image - READ-ONLY
7260	Image *ImageObject `json:"image,omitempty"`
7261	// Description - READ-ONLY; A short description of the item.
7262	Description *string `json:"description,omitempty"`
7263	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
7264	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
7265	// BingID - READ-ONLY; An ID that uniquely identifies this item.
7266	BingID *string `json:"bingId,omitempty"`
7267	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
7268	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
7269	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
7270	WebSearchURL *string `json:"webSearchUrl,omitempty"`
7271	// ID - READ-ONLY; A String identifier.
7272	ID *string `json:"id,omitempty"`
7273	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
7274	Type TypeBasicResponseBase `json:"_type,omitempty"`
7275}
7276
7277func unmarshalBasicMediaObject(body []byte) (BasicMediaObject, error) {
7278	var m map[string]interface{}
7279	err := json.Unmarshal(body, &m)
7280	if err != nil {
7281		return nil, err
7282	}
7283
7284	switch m["_type"] {
7285	case string(TypeImageObject):
7286		var ioVar ImageObject
7287		err := json.Unmarshal(body, &ioVar)
7288		return ioVar, err
7289	default:
7290		var mo MediaObject
7291		err := json.Unmarshal(body, &mo)
7292		return mo, err
7293	}
7294}
7295func unmarshalBasicMediaObjectArray(body []byte) ([]BasicMediaObject, error) {
7296	var rawMessages []*json.RawMessage
7297	err := json.Unmarshal(body, &rawMessages)
7298	if err != nil {
7299		return nil, err
7300	}
7301
7302	moArray := make([]BasicMediaObject, len(rawMessages))
7303
7304	for index, rawMessage := range rawMessages {
7305		mo, err := unmarshalBasicMediaObject(*rawMessage)
7306		if err != nil {
7307			return nil, err
7308		}
7309		moArray[index] = mo
7310	}
7311	return moArray, nil
7312}
7313
7314// MarshalJSON is the custom marshaler for MediaObject.
7315func (mo MediaObject) MarshalJSON() ([]byte, error) {
7316	mo.Type = TypeMediaObject
7317	objectMap := make(map[string]interface{})
7318	if mo.Type != "" {
7319		objectMap["_type"] = mo.Type
7320	}
7321	return json.Marshal(objectMap)
7322}
7323
7324// AsImageObject is the BasicResponseBase implementation for MediaObject.
7325func (mo MediaObject) AsImageObject() (*ImageObject, bool) {
7326	return nil, false
7327}
7328
7329// AsThing is the BasicResponseBase implementation for MediaObject.
7330func (mo MediaObject) AsThing() (*Thing, bool) {
7331	return nil, false
7332}
7333
7334// AsBasicThing is the BasicResponseBase implementation for MediaObject.
7335func (mo MediaObject) AsBasicThing() (BasicThing, bool) {
7336	return &mo, true
7337}
7338
7339// AsEntities is the BasicResponseBase implementation for MediaObject.
7340func (mo MediaObject) AsEntities() (*Entities, bool) {
7341	return nil, false
7342}
7343
7344// AsPlaces is the BasicResponseBase implementation for MediaObject.
7345func (mo MediaObject) AsPlaces() (*Places, bool) {
7346	return nil, false
7347}
7348
7349// AsSearchResponse is the BasicResponseBase implementation for MediaObject.
7350func (mo MediaObject) AsSearchResponse() (*SearchResponse, bool) {
7351	return nil, false
7352}
7353
7354// AsResponse is the BasicResponseBase implementation for MediaObject.
7355func (mo MediaObject) AsResponse() (*Response, bool) {
7356	return nil, false
7357}
7358
7359// AsBasicResponse is the BasicResponseBase implementation for MediaObject.
7360func (mo MediaObject) AsBasicResponse() (BasicResponse, bool) {
7361	return &mo, true
7362}
7363
7364// AsSearchResultsAnswer is the BasicResponseBase implementation for MediaObject.
7365func (mo MediaObject) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
7366	return nil, false
7367}
7368
7369// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for MediaObject.
7370func (mo MediaObject) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
7371	return nil, false
7372}
7373
7374// AsIdentifiable is the BasicResponseBase implementation for MediaObject.
7375func (mo MediaObject) AsIdentifiable() (*Identifiable, bool) {
7376	return nil, false
7377}
7378
7379// AsBasicIdentifiable is the BasicResponseBase implementation for MediaObject.
7380func (mo MediaObject) AsBasicIdentifiable() (BasicIdentifiable, bool) {
7381	return &mo, true
7382}
7383
7384// AsAnswer is the BasicResponseBase implementation for MediaObject.
7385func (mo MediaObject) AsAnswer() (*Answer, bool) {
7386	return nil, false
7387}
7388
7389// AsBasicAnswer is the BasicResponseBase implementation for MediaObject.
7390func (mo MediaObject) AsBasicAnswer() (BasicAnswer, bool) {
7391	return nil, false
7392}
7393
7394// AsErrorResponse is the BasicResponseBase implementation for MediaObject.
7395func (mo MediaObject) AsErrorResponse() (*ErrorResponse, bool) {
7396	return nil, false
7397}
7398
7399// AsPostalAddress is the BasicResponseBase implementation for MediaObject.
7400func (mo MediaObject) AsPostalAddress() (*PostalAddress, bool) {
7401	return nil, false
7402}
7403
7404// AsPlace is the BasicResponseBase implementation for MediaObject.
7405func (mo MediaObject) AsPlace() (*Place, bool) {
7406	return nil, false
7407}
7408
7409// AsBasicPlace is the BasicResponseBase implementation for MediaObject.
7410func (mo MediaObject) AsBasicPlace() (BasicPlace, bool) {
7411	return nil, false
7412}
7413
7414// AsOrganization is the BasicResponseBase implementation for MediaObject.
7415func (mo MediaObject) AsOrganization() (*Organization, bool) {
7416	return nil, false
7417}
7418
7419// AsCreativeWork is the BasicResponseBase implementation for MediaObject.
7420func (mo MediaObject) AsCreativeWork() (*CreativeWork, bool) {
7421	return nil, false
7422}
7423
7424// AsBasicCreativeWork is the BasicResponseBase implementation for MediaObject.
7425func (mo MediaObject) AsBasicCreativeWork() (BasicCreativeWork, bool) {
7426	return &mo, true
7427}
7428
7429// AsIntangible is the BasicResponseBase implementation for MediaObject.
7430func (mo MediaObject) AsIntangible() (*Intangible, bool) {
7431	return nil, false
7432}
7433
7434// AsBasicIntangible is the BasicResponseBase implementation for MediaObject.
7435func (mo MediaObject) AsBasicIntangible() (BasicIntangible, bool) {
7436	return nil, false
7437}
7438
7439// AsMovieTheater is the BasicResponseBase implementation for MediaObject.
7440func (mo MediaObject) AsMovieTheater() (*MovieTheater, bool) {
7441	return nil, false
7442}
7443
7444// AsMediaObject is the BasicResponseBase implementation for MediaObject.
7445func (mo MediaObject) AsMediaObject() (*MediaObject, bool) {
7446	return &mo, true
7447}
7448
7449// AsBasicMediaObject is the BasicResponseBase implementation for MediaObject.
7450func (mo MediaObject) AsBasicMediaObject() (BasicMediaObject, bool) {
7451	return &mo, true
7452}
7453
7454// AsCivicStructure is the BasicResponseBase implementation for MediaObject.
7455func (mo MediaObject) AsCivicStructure() (*CivicStructure, bool) {
7456	return nil, false
7457}
7458
7459// AsBasicCivicStructure is the BasicResponseBase implementation for MediaObject.
7460func (mo MediaObject) AsBasicCivicStructure() (BasicCivicStructure, bool) {
7461	return nil, false
7462}
7463
7464// AsLocalBusiness is the BasicResponseBase implementation for MediaObject.
7465func (mo MediaObject) AsLocalBusiness() (*LocalBusiness, bool) {
7466	return nil, false
7467}
7468
7469// AsBasicLocalBusiness is the BasicResponseBase implementation for MediaObject.
7470func (mo MediaObject) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
7471	return nil, false
7472}
7473
7474// AsTouristAttraction is the BasicResponseBase implementation for MediaObject.
7475func (mo MediaObject) AsTouristAttraction() (*TouristAttraction, bool) {
7476	return nil, false
7477}
7478
7479// AsAirport is the BasicResponseBase implementation for MediaObject.
7480func (mo MediaObject) AsAirport() (*Airport, bool) {
7481	return nil, false
7482}
7483
7484// AsLicense is the BasicResponseBase implementation for MediaObject.
7485func (mo MediaObject) AsLicense() (*License, bool) {
7486	return nil, false
7487}
7488
7489// AsStructuredValue is the BasicResponseBase implementation for MediaObject.
7490func (mo MediaObject) AsStructuredValue() (*StructuredValue, bool) {
7491	return nil, false
7492}
7493
7494// AsBasicStructuredValue is the BasicResponseBase implementation for MediaObject.
7495func (mo MediaObject) AsBasicStructuredValue() (BasicStructuredValue, bool) {
7496	return nil, false
7497}
7498
7499// AsEntertainmentBusiness is the BasicResponseBase implementation for MediaObject.
7500func (mo MediaObject) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
7501	return nil, false
7502}
7503
7504// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for MediaObject.
7505func (mo MediaObject) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
7506	return nil, false
7507}
7508
7509// AsFoodEstablishment is the BasicResponseBase implementation for MediaObject.
7510func (mo MediaObject) AsFoodEstablishment() (*FoodEstablishment, bool) {
7511	return nil, false
7512}
7513
7514// AsBasicFoodEstablishment is the BasicResponseBase implementation for MediaObject.
7515func (mo MediaObject) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
7516	return nil, false
7517}
7518
7519// AsLodgingBusiness is the BasicResponseBase implementation for MediaObject.
7520func (mo MediaObject) AsLodgingBusiness() (*LodgingBusiness, bool) {
7521	return nil, false
7522}
7523
7524// AsBasicLodgingBusiness is the BasicResponseBase implementation for MediaObject.
7525func (mo MediaObject) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
7526	return nil, false
7527}
7528
7529// AsRestaurant is the BasicResponseBase implementation for MediaObject.
7530func (mo MediaObject) AsRestaurant() (*Restaurant, bool) {
7531	return nil, false
7532}
7533
7534// AsHotel is the BasicResponseBase implementation for MediaObject.
7535func (mo MediaObject) AsHotel() (*Hotel, bool) {
7536	return nil, false
7537}
7538
7539// AsResponseBase is the BasicResponseBase implementation for MediaObject.
7540func (mo MediaObject) AsResponseBase() (*ResponseBase, bool) {
7541	return nil, false
7542}
7543
7544// AsBasicResponseBase is the BasicResponseBase implementation for MediaObject.
7545func (mo MediaObject) AsBasicResponseBase() (BasicResponseBase, bool) {
7546	return &mo, true
7547}
7548
7549// UnmarshalJSON is the custom unmarshaler for MediaObject struct.
7550func (mo *MediaObject) UnmarshalJSON(body []byte) error {
7551	var m map[string]*json.RawMessage
7552	err := json.Unmarshal(body, &m)
7553	if err != nil {
7554		return err
7555	}
7556	for k, v := range m {
7557		switch k {
7558		case "contentUrl":
7559			if v != nil {
7560				var contentURL string
7561				err = json.Unmarshal(*v, &contentURL)
7562				if err != nil {
7563					return err
7564				}
7565				mo.ContentURL = &contentURL
7566			}
7567		case "hostPageUrl":
7568			if v != nil {
7569				var hostPageURL string
7570				err = json.Unmarshal(*v, &hostPageURL)
7571				if err != nil {
7572					return err
7573				}
7574				mo.HostPageURL = &hostPageURL
7575			}
7576		case "width":
7577			if v != nil {
7578				var width int32
7579				err = json.Unmarshal(*v, &width)
7580				if err != nil {
7581					return err
7582				}
7583				mo.Width = &width
7584			}
7585		case "height":
7586			if v != nil {
7587				var height int32
7588				err = json.Unmarshal(*v, &height)
7589				if err != nil {
7590					return err
7591				}
7592				mo.Height = &height
7593			}
7594		case "thumbnailUrl":
7595			if v != nil {
7596				var thumbnailURL string
7597				err = json.Unmarshal(*v, &thumbnailURL)
7598				if err != nil {
7599					return err
7600				}
7601				mo.ThumbnailURL = &thumbnailURL
7602			}
7603		case "provider":
7604			if v != nil {
7605				provider, err := unmarshalBasicThingArray(*v)
7606				if err != nil {
7607					return err
7608				}
7609				mo.Provider = &provider
7610			}
7611		case "text":
7612			if v != nil {
7613				var textVar string
7614				err = json.Unmarshal(*v, &textVar)
7615				if err != nil {
7616					return err
7617				}
7618				mo.Text = &textVar
7619			}
7620		case "name":
7621			if v != nil {
7622				var name string
7623				err = json.Unmarshal(*v, &name)
7624				if err != nil {
7625					return err
7626				}
7627				mo.Name = &name
7628			}
7629		case "url":
7630			if v != nil {
7631				var URL string
7632				err = json.Unmarshal(*v, &URL)
7633				if err != nil {
7634					return err
7635				}
7636				mo.URL = &URL
7637			}
7638		case "image":
7639			if v != nil {
7640				var imageVar ImageObject
7641				err = json.Unmarshal(*v, &imageVar)
7642				if err != nil {
7643					return err
7644				}
7645				mo.Image = &imageVar
7646			}
7647		case "description":
7648			if v != nil {
7649				var description string
7650				err = json.Unmarshal(*v, &description)
7651				if err != nil {
7652					return err
7653				}
7654				mo.Description = &description
7655			}
7656		case "entityPresentationInfo":
7657			if v != nil {
7658				var entityPresentationInfo EntitiesEntityPresentationInfo
7659				err = json.Unmarshal(*v, &entityPresentationInfo)
7660				if err != nil {
7661					return err
7662				}
7663				mo.EntityPresentationInfo = &entityPresentationInfo
7664			}
7665		case "bingId":
7666			if v != nil {
7667				var bingID string
7668				err = json.Unmarshal(*v, &bingID)
7669				if err != nil {
7670					return err
7671				}
7672				mo.BingID = &bingID
7673			}
7674		case "contractualRules":
7675			if v != nil {
7676				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
7677				if err != nil {
7678					return err
7679				}
7680				mo.ContractualRules = &contractualRules
7681			}
7682		case "webSearchUrl":
7683			if v != nil {
7684				var webSearchURL string
7685				err = json.Unmarshal(*v, &webSearchURL)
7686				if err != nil {
7687					return err
7688				}
7689				mo.WebSearchURL = &webSearchURL
7690			}
7691		case "id":
7692			if v != nil {
7693				var ID string
7694				err = json.Unmarshal(*v, &ID)
7695				if err != nil {
7696					return err
7697				}
7698				mo.ID = &ID
7699			}
7700		case "_type":
7701			if v != nil {
7702				var typeVar TypeBasicResponseBase
7703				err = json.Unmarshal(*v, &typeVar)
7704				if err != nil {
7705					return err
7706				}
7707				mo.Type = typeVar
7708			}
7709		}
7710	}
7711
7712	return nil
7713}
7714
7715// MovieTheater ...
7716type MovieTheater struct {
7717	// ScreenCount - READ-ONLY
7718	ScreenCount *int32 `json:"screenCount,omitempty"`
7719	// PriceRange - READ-ONLY; $$.
7720	PriceRange *string `json:"priceRange,omitempty"`
7721	// Panoramas - READ-ONLY
7722	Panoramas *[]ImageObject `json:"panoramas,omitempty"`
7723	// IsPermanentlyClosed - READ-ONLY
7724	IsPermanentlyClosed *bool `json:"isPermanentlyClosed,omitempty"`
7725	// TagLine - READ-ONLY
7726	TagLine *string `json:"tagLine,omitempty"`
7727	// Address - READ-ONLY; The postal address of where the entity is located
7728	Address *PostalAddress `json:"address,omitempty"`
7729	// Telephone - READ-ONLY; The entity's telephone number
7730	Telephone *string `json:"telephone,omitempty"`
7731	// Name - READ-ONLY; The name of the thing represented by this object.
7732	Name *string `json:"name,omitempty"`
7733	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
7734	URL *string `json:"url,omitempty"`
7735	// Image - READ-ONLY
7736	Image *ImageObject `json:"image,omitempty"`
7737	// Description - READ-ONLY; A short description of the item.
7738	Description *string `json:"description,omitempty"`
7739	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
7740	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
7741	// BingID - READ-ONLY; An ID that uniquely identifies this item.
7742	BingID *string `json:"bingId,omitempty"`
7743	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
7744	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
7745	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
7746	WebSearchURL *string `json:"webSearchUrl,omitempty"`
7747	// ID - READ-ONLY; A String identifier.
7748	ID *string `json:"id,omitempty"`
7749	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
7750	Type TypeBasicResponseBase `json:"_type,omitempty"`
7751}
7752
7753// MarshalJSON is the custom marshaler for MovieTheater.
7754func (mt MovieTheater) MarshalJSON() ([]byte, error) {
7755	mt.Type = TypeMovieTheater
7756	objectMap := make(map[string]interface{})
7757	if mt.Type != "" {
7758		objectMap["_type"] = mt.Type
7759	}
7760	return json.Marshal(objectMap)
7761}
7762
7763// AsImageObject is the BasicResponseBase implementation for MovieTheater.
7764func (mt MovieTheater) AsImageObject() (*ImageObject, bool) {
7765	return nil, false
7766}
7767
7768// AsThing is the BasicResponseBase implementation for MovieTheater.
7769func (mt MovieTheater) AsThing() (*Thing, bool) {
7770	return nil, false
7771}
7772
7773// AsBasicThing is the BasicResponseBase implementation for MovieTheater.
7774func (mt MovieTheater) AsBasicThing() (BasicThing, bool) {
7775	return &mt, true
7776}
7777
7778// AsEntities is the BasicResponseBase implementation for MovieTheater.
7779func (mt MovieTheater) AsEntities() (*Entities, bool) {
7780	return nil, false
7781}
7782
7783// AsPlaces is the BasicResponseBase implementation for MovieTheater.
7784func (mt MovieTheater) AsPlaces() (*Places, bool) {
7785	return nil, false
7786}
7787
7788// AsSearchResponse is the BasicResponseBase implementation for MovieTheater.
7789func (mt MovieTheater) AsSearchResponse() (*SearchResponse, bool) {
7790	return nil, false
7791}
7792
7793// AsResponse is the BasicResponseBase implementation for MovieTheater.
7794func (mt MovieTheater) AsResponse() (*Response, bool) {
7795	return nil, false
7796}
7797
7798// AsBasicResponse is the BasicResponseBase implementation for MovieTheater.
7799func (mt MovieTheater) AsBasicResponse() (BasicResponse, bool) {
7800	return &mt, true
7801}
7802
7803// AsSearchResultsAnswer is the BasicResponseBase implementation for MovieTheater.
7804func (mt MovieTheater) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
7805	return nil, false
7806}
7807
7808// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for MovieTheater.
7809func (mt MovieTheater) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
7810	return nil, false
7811}
7812
7813// AsIdentifiable is the BasicResponseBase implementation for MovieTheater.
7814func (mt MovieTheater) AsIdentifiable() (*Identifiable, bool) {
7815	return nil, false
7816}
7817
7818// AsBasicIdentifiable is the BasicResponseBase implementation for MovieTheater.
7819func (mt MovieTheater) AsBasicIdentifiable() (BasicIdentifiable, bool) {
7820	return &mt, true
7821}
7822
7823// AsAnswer is the BasicResponseBase implementation for MovieTheater.
7824func (mt MovieTheater) AsAnswer() (*Answer, bool) {
7825	return nil, false
7826}
7827
7828// AsBasicAnswer is the BasicResponseBase implementation for MovieTheater.
7829func (mt MovieTheater) AsBasicAnswer() (BasicAnswer, bool) {
7830	return nil, false
7831}
7832
7833// AsErrorResponse is the BasicResponseBase implementation for MovieTheater.
7834func (mt MovieTheater) AsErrorResponse() (*ErrorResponse, bool) {
7835	return nil, false
7836}
7837
7838// AsPostalAddress is the BasicResponseBase implementation for MovieTheater.
7839func (mt MovieTheater) AsPostalAddress() (*PostalAddress, bool) {
7840	return nil, false
7841}
7842
7843// AsPlace is the BasicResponseBase implementation for MovieTheater.
7844func (mt MovieTheater) AsPlace() (*Place, bool) {
7845	return nil, false
7846}
7847
7848// AsBasicPlace is the BasicResponseBase implementation for MovieTheater.
7849func (mt MovieTheater) AsBasicPlace() (BasicPlace, bool) {
7850	return &mt, true
7851}
7852
7853// AsOrganization is the BasicResponseBase implementation for MovieTheater.
7854func (mt MovieTheater) AsOrganization() (*Organization, bool) {
7855	return nil, false
7856}
7857
7858// AsCreativeWork is the BasicResponseBase implementation for MovieTheater.
7859func (mt MovieTheater) AsCreativeWork() (*CreativeWork, bool) {
7860	return nil, false
7861}
7862
7863// AsBasicCreativeWork is the BasicResponseBase implementation for MovieTheater.
7864func (mt MovieTheater) AsBasicCreativeWork() (BasicCreativeWork, bool) {
7865	return nil, false
7866}
7867
7868// AsIntangible is the BasicResponseBase implementation for MovieTheater.
7869func (mt MovieTheater) AsIntangible() (*Intangible, bool) {
7870	return nil, false
7871}
7872
7873// AsBasicIntangible is the BasicResponseBase implementation for MovieTheater.
7874func (mt MovieTheater) AsBasicIntangible() (BasicIntangible, bool) {
7875	return nil, false
7876}
7877
7878// AsMovieTheater is the BasicResponseBase implementation for MovieTheater.
7879func (mt MovieTheater) AsMovieTheater() (*MovieTheater, bool) {
7880	return &mt, true
7881}
7882
7883// AsMediaObject is the BasicResponseBase implementation for MovieTheater.
7884func (mt MovieTheater) AsMediaObject() (*MediaObject, bool) {
7885	return nil, false
7886}
7887
7888// AsBasicMediaObject is the BasicResponseBase implementation for MovieTheater.
7889func (mt MovieTheater) AsBasicMediaObject() (BasicMediaObject, bool) {
7890	return nil, false
7891}
7892
7893// AsCivicStructure is the BasicResponseBase implementation for MovieTheater.
7894func (mt MovieTheater) AsCivicStructure() (*CivicStructure, bool) {
7895	return nil, false
7896}
7897
7898// AsBasicCivicStructure is the BasicResponseBase implementation for MovieTheater.
7899func (mt MovieTheater) AsBasicCivicStructure() (BasicCivicStructure, bool) {
7900	return nil, false
7901}
7902
7903// AsLocalBusiness is the BasicResponseBase implementation for MovieTheater.
7904func (mt MovieTheater) AsLocalBusiness() (*LocalBusiness, bool) {
7905	return nil, false
7906}
7907
7908// AsBasicLocalBusiness is the BasicResponseBase implementation for MovieTheater.
7909func (mt MovieTheater) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
7910	return &mt, true
7911}
7912
7913// AsTouristAttraction is the BasicResponseBase implementation for MovieTheater.
7914func (mt MovieTheater) AsTouristAttraction() (*TouristAttraction, bool) {
7915	return nil, false
7916}
7917
7918// AsAirport is the BasicResponseBase implementation for MovieTheater.
7919func (mt MovieTheater) AsAirport() (*Airport, bool) {
7920	return nil, false
7921}
7922
7923// AsLicense is the BasicResponseBase implementation for MovieTheater.
7924func (mt MovieTheater) AsLicense() (*License, bool) {
7925	return nil, false
7926}
7927
7928// AsStructuredValue is the BasicResponseBase implementation for MovieTheater.
7929func (mt MovieTheater) AsStructuredValue() (*StructuredValue, bool) {
7930	return nil, false
7931}
7932
7933// AsBasicStructuredValue is the BasicResponseBase implementation for MovieTheater.
7934func (mt MovieTheater) AsBasicStructuredValue() (BasicStructuredValue, bool) {
7935	return nil, false
7936}
7937
7938// AsEntertainmentBusiness is the BasicResponseBase implementation for MovieTheater.
7939func (mt MovieTheater) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
7940	return nil, false
7941}
7942
7943// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for MovieTheater.
7944func (mt MovieTheater) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
7945	return &mt, true
7946}
7947
7948// AsFoodEstablishment is the BasicResponseBase implementation for MovieTheater.
7949func (mt MovieTheater) AsFoodEstablishment() (*FoodEstablishment, bool) {
7950	return nil, false
7951}
7952
7953// AsBasicFoodEstablishment is the BasicResponseBase implementation for MovieTheater.
7954func (mt MovieTheater) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
7955	return nil, false
7956}
7957
7958// AsLodgingBusiness is the BasicResponseBase implementation for MovieTheater.
7959func (mt MovieTheater) AsLodgingBusiness() (*LodgingBusiness, bool) {
7960	return nil, false
7961}
7962
7963// AsBasicLodgingBusiness is the BasicResponseBase implementation for MovieTheater.
7964func (mt MovieTheater) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
7965	return nil, false
7966}
7967
7968// AsRestaurant is the BasicResponseBase implementation for MovieTheater.
7969func (mt MovieTheater) AsRestaurant() (*Restaurant, bool) {
7970	return nil, false
7971}
7972
7973// AsHotel is the BasicResponseBase implementation for MovieTheater.
7974func (mt MovieTheater) AsHotel() (*Hotel, bool) {
7975	return nil, false
7976}
7977
7978// AsResponseBase is the BasicResponseBase implementation for MovieTheater.
7979func (mt MovieTheater) AsResponseBase() (*ResponseBase, bool) {
7980	return nil, false
7981}
7982
7983// AsBasicResponseBase is the BasicResponseBase implementation for MovieTheater.
7984func (mt MovieTheater) AsBasicResponseBase() (BasicResponseBase, bool) {
7985	return &mt, true
7986}
7987
7988// UnmarshalJSON is the custom unmarshaler for MovieTheater struct.
7989func (mt *MovieTheater) UnmarshalJSON(body []byte) error {
7990	var m map[string]*json.RawMessage
7991	err := json.Unmarshal(body, &m)
7992	if err != nil {
7993		return err
7994	}
7995	for k, v := range m {
7996		switch k {
7997		case "screenCount":
7998			if v != nil {
7999				var screenCount int32
8000				err = json.Unmarshal(*v, &screenCount)
8001				if err != nil {
8002					return err
8003				}
8004				mt.ScreenCount = &screenCount
8005			}
8006		case "priceRange":
8007			if v != nil {
8008				var priceRange string
8009				err = json.Unmarshal(*v, &priceRange)
8010				if err != nil {
8011					return err
8012				}
8013				mt.PriceRange = &priceRange
8014			}
8015		case "panoramas":
8016			if v != nil {
8017				var panoramas []ImageObject
8018				err = json.Unmarshal(*v, &panoramas)
8019				if err != nil {
8020					return err
8021				}
8022				mt.Panoramas = &panoramas
8023			}
8024		case "isPermanentlyClosed":
8025			if v != nil {
8026				var isPermanentlyClosed bool
8027				err = json.Unmarshal(*v, &isPermanentlyClosed)
8028				if err != nil {
8029					return err
8030				}
8031				mt.IsPermanentlyClosed = &isPermanentlyClosed
8032			}
8033		case "tagLine":
8034			if v != nil {
8035				var tagLine string
8036				err = json.Unmarshal(*v, &tagLine)
8037				if err != nil {
8038					return err
8039				}
8040				mt.TagLine = &tagLine
8041			}
8042		case "address":
8043			if v != nil {
8044				var address PostalAddress
8045				err = json.Unmarshal(*v, &address)
8046				if err != nil {
8047					return err
8048				}
8049				mt.Address = &address
8050			}
8051		case "telephone":
8052			if v != nil {
8053				var telephone string
8054				err = json.Unmarshal(*v, &telephone)
8055				if err != nil {
8056					return err
8057				}
8058				mt.Telephone = &telephone
8059			}
8060		case "name":
8061			if v != nil {
8062				var name string
8063				err = json.Unmarshal(*v, &name)
8064				if err != nil {
8065					return err
8066				}
8067				mt.Name = &name
8068			}
8069		case "url":
8070			if v != nil {
8071				var URL string
8072				err = json.Unmarshal(*v, &URL)
8073				if err != nil {
8074					return err
8075				}
8076				mt.URL = &URL
8077			}
8078		case "image":
8079			if v != nil {
8080				var imageVar ImageObject
8081				err = json.Unmarshal(*v, &imageVar)
8082				if err != nil {
8083					return err
8084				}
8085				mt.Image = &imageVar
8086			}
8087		case "description":
8088			if v != nil {
8089				var description string
8090				err = json.Unmarshal(*v, &description)
8091				if err != nil {
8092					return err
8093				}
8094				mt.Description = &description
8095			}
8096		case "entityPresentationInfo":
8097			if v != nil {
8098				var entityPresentationInfo EntitiesEntityPresentationInfo
8099				err = json.Unmarshal(*v, &entityPresentationInfo)
8100				if err != nil {
8101					return err
8102				}
8103				mt.EntityPresentationInfo = &entityPresentationInfo
8104			}
8105		case "bingId":
8106			if v != nil {
8107				var bingID string
8108				err = json.Unmarshal(*v, &bingID)
8109				if err != nil {
8110					return err
8111				}
8112				mt.BingID = &bingID
8113			}
8114		case "contractualRules":
8115			if v != nil {
8116				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
8117				if err != nil {
8118					return err
8119				}
8120				mt.ContractualRules = &contractualRules
8121			}
8122		case "webSearchUrl":
8123			if v != nil {
8124				var webSearchURL string
8125				err = json.Unmarshal(*v, &webSearchURL)
8126				if err != nil {
8127					return err
8128				}
8129				mt.WebSearchURL = &webSearchURL
8130			}
8131		case "id":
8132			if v != nil {
8133				var ID string
8134				err = json.Unmarshal(*v, &ID)
8135				if err != nil {
8136					return err
8137				}
8138				mt.ID = &ID
8139			}
8140		case "_type":
8141			if v != nil {
8142				var typeVar TypeBasicResponseBase
8143				err = json.Unmarshal(*v, &typeVar)
8144				if err != nil {
8145					return err
8146				}
8147				mt.Type = typeVar
8148			}
8149		}
8150	}
8151
8152	return nil
8153}
8154
8155// Organization defines an organization.
8156type Organization struct {
8157	// Name - READ-ONLY; The name of the thing represented by this object.
8158	Name *string `json:"name,omitempty"`
8159	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
8160	URL *string `json:"url,omitempty"`
8161	// Image - READ-ONLY
8162	Image *ImageObject `json:"image,omitempty"`
8163	// Description - READ-ONLY; A short description of the item.
8164	Description *string `json:"description,omitempty"`
8165	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
8166	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
8167	// BingID - READ-ONLY; An ID that uniquely identifies this item.
8168	BingID *string `json:"bingId,omitempty"`
8169	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
8170	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
8171	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
8172	WebSearchURL *string `json:"webSearchUrl,omitempty"`
8173	// ID - READ-ONLY; A String identifier.
8174	ID *string `json:"id,omitempty"`
8175	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
8176	Type TypeBasicResponseBase `json:"_type,omitempty"`
8177}
8178
8179// MarshalJSON is the custom marshaler for Organization.
8180func (o Organization) MarshalJSON() ([]byte, error) {
8181	o.Type = TypeOrganization
8182	objectMap := make(map[string]interface{})
8183	if o.Type != "" {
8184		objectMap["_type"] = o.Type
8185	}
8186	return json.Marshal(objectMap)
8187}
8188
8189// AsImageObject is the BasicResponseBase implementation for Organization.
8190func (o Organization) AsImageObject() (*ImageObject, bool) {
8191	return nil, false
8192}
8193
8194// AsThing is the BasicResponseBase implementation for Organization.
8195func (o Organization) AsThing() (*Thing, bool) {
8196	return nil, false
8197}
8198
8199// AsBasicThing is the BasicResponseBase implementation for Organization.
8200func (o Organization) AsBasicThing() (BasicThing, bool) {
8201	return &o, true
8202}
8203
8204// AsEntities is the BasicResponseBase implementation for Organization.
8205func (o Organization) AsEntities() (*Entities, bool) {
8206	return nil, false
8207}
8208
8209// AsPlaces is the BasicResponseBase implementation for Organization.
8210func (o Organization) AsPlaces() (*Places, bool) {
8211	return nil, false
8212}
8213
8214// AsSearchResponse is the BasicResponseBase implementation for Organization.
8215func (o Organization) AsSearchResponse() (*SearchResponse, bool) {
8216	return nil, false
8217}
8218
8219// AsResponse is the BasicResponseBase implementation for Organization.
8220func (o Organization) AsResponse() (*Response, bool) {
8221	return nil, false
8222}
8223
8224// AsBasicResponse is the BasicResponseBase implementation for Organization.
8225func (o Organization) AsBasicResponse() (BasicResponse, bool) {
8226	return &o, true
8227}
8228
8229// AsSearchResultsAnswer is the BasicResponseBase implementation for Organization.
8230func (o Organization) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
8231	return nil, false
8232}
8233
8234// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Organization.
8235func (o Organization) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
8236	return nil, false
8237}
8238
8239// AsIdentifiable is the BasicResponseBase implementation for Organization.
8240func (o Organization) AsIdentifiable() (*Identifiable, bool) {
8241	return nil, false
8242}
8243
8244// AsBasicIdentifiable is the BasicResponseBase implementation for Organization.
8245func (o Organization) AsBasicIdentifiable() (BasicIdentifiable, bool) {
8246	return &o, true
8247}
8248
8249// AsAnswer is the BasicResponseBase implementation for Organization.
8250func (o Organization) AsAnswer() (*Answer, bool) {
8251	return nil, false
8252}
8253
8254// AsBasicAnswer is the BasicResponseBase implementation for Organization.
8255func (o Organization) AsBasicAnswer() (BasicAnswer, bool) {
8256	return nil, false
8257}
8258
8259// AsErrorResponse is the BasicResponseBase implementation for Organization.
8260func (o Organization) AsErrorResponse() (*ErrorResponse, bool) {
8261	return nil, false
8262}
8263
8264// AsPostalAddress is the BasicResponseBase implementation for Organization.
8265func (o Organization) AsPostalAddress() (*PostalAddress, bool) {
8266	return nil, false
8267}
8268
8269// AsPlace is the BasicResponseBase implementation for Organization.
8270func (o Organization) AsPlace() (*Place, bool) {
8271	return nil, false
8272}
8273
8274// AsBasicPlace is the BasicResponseBase implementation for Organization.
8275func (o Organization) AsBasicPlace() (BasicPlace, bool) {
8276	return nil, false
8277}
8278
8279// AsOrganization is the BasicResponseBase implementation for Organization.
8280func (o Organization) AsOrganization() (*Organization, bool) {
8281	return &o, true
8282}
8283
8284// AsCreativeWork is the BasicResponseBase implementation for Organization.
8285func (o Organization) AsCreativeWork() (*CreativeWork, bool) {
8286	return nil, false
8287}
8288
8289// AsBasicCreativeWork is the BasicResponseBase implementation for Organization.
8290func (o Organization) AsBasicCreativeWork() (BasicCreativeWork, bool) {
8291	return nil, false
8292}
8293
8294// AsIntangible is the BasicResponseBase implementation for Organization.
8295func (o Organization) AsIntangible() (*Intangible, bool) {
8296	return nil, false
8297}
8298
8299// AsBasicIntangible is the BasicResponseBase implementation for Organization.
8300func (o Organization) AsBasicIntangible() (BasicIntangible, bool) {
8301	return nil, false
8302}
8303
8304// AsMovieTheater is the BasicResponseBase implementation for Organization.
8305func (o Organization) AsMovieTheater() (*MovieTheater, bool) {
8306	return nil, false
8307}
8308
8309// AsMediaObject is the BasicResponseBase implementation for Organization.
8310func (o Organization) AsMediaObject() (*MediaObject, bool) {
8311	return nil, false
8312}
8313
8314// AsBasicMediaObject is the BasicResponseBase implementation for Organization.
8315func (o Organization) AsBasicMediaObject() (BasicMediaObject, bool) {
8316	return nil, false
8317}
8318
8319// AsCivicStructure is the BasicResponseBase implementation for Organization.
8320func (o Organization) AsCivicStructure() (*CivicStructure, bool) {
8321	return nil, false
8322}
8323
8324// AsBasicCivicStructure is the BasicResponseBase implementation for Organization.
8325func (o Organization) AsBasicCivicStructure() (BasicCivicStructure, bool) {
8326	return nil, false
8327}
8328
8329// AsLocalBusiness is the BasicResponseBase implementation for Organization.
8330func (o Organization) AsLocalBusiness() (*LocalBusiness, bool) {
8331	return nil, false
8332}
8333
8334// AsBasicLocalBusiness is the BasicResponseBase implementation for Organization.
8335func (o Organization) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
8336	return nil, false
8337}
8338
8339// AsTouristAttraction is the BasicResponseBase implementation for Organization.
8340func (o Organization) AsTouristAttraction() (*TouristAttraction, bool) {
8341	return nil, false
8342}
8343
8344// AsAirport is the BasicResponseBase implementation for Organization.
8345func (o Organization) AsAirport() (*Airport, bool) {
8346	return nil, false
8347}
8348
8349// AsLicense is the BasicResponseBase implementation for Organization.
8350func (o Organization) AsLicense() (*License, bool) {
8351	return nil, false
8352}
8353
8354// AsStructuredValue is the BasicResponseBase implementation for Organization.
8355func (o Organization) AsStructuredValue() (*StructuredValue, bool) {
8356	return nil, false
8357}
8358
8359// AsBasicStructuredValue is the BasicResponseBase implementation for Organization.
8360func (o Organization) AsBasicStructuredValue() (BasicStructuredValue, bool) {
8361	return nil, false
8362}
8363
8364// AsEntertainmentBusiness is the BasicResponseBase implementation for Organization.
8365func (o Organization) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
8366	return nil, false
8367}
8368
8369// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Organization.
8370func (o Organization) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
8371	return nil, false
8372}
8373
8374// AsFoodEstablishment is the BasicResponseBase implementation for Organization.
8375func (o Organization) AsFoodEstablishment() (*FoodEstablishment, bool) {
8376	return nil, false
8377}
8378
8379// AsBasicFoodEstablishment is the BasicResponseBase implementation for Organization.
8380func (o Organization) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
8381	return nil, false
8382}
8383
8384// AsLodgingBusiness is the BasicResponseBase implementation for Organization.
8385func (o Organization) AsLodgingBusiness() (*LodgingBusiness, bool) {
8386	return nil, false
8387}
8388
8389// AsBasicLodgingBusiness is the BasicResponseBase implementation for Organization.
8390func (o Organization) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
8391	return nil, false
8392}
8393
8394// AsRestaurant is the BasicResponseBase implementation for Organization.
8395func (o Organization) AsRestaurant() (*Restaurant, bool) {
8396	return nil, false
8397}
8398
8399// AsHotel is the BasicResponseBase implementation for Organization.
8400func (o Organization) AsHotel() (*Hotel, bool) {
8401	return nil, false
8402}
8403
8404// AsResponseBase is the BasicResponseBase implementation for Organization.
8405func (o Organization) AsResponseBase() (*ResponseBase, bool) {
8406	return nil, false
8407}
8408
8409// AsBasicResponseBase is the BasicResponseBase implementation for Organization.
8410func (o Organization) AsBasicResponseBase() (BasicResponseBase, bool) {
8411	return &o, true
8412}
8413
8414// UnmarshalJSON is the custom unmarshaler for Organization struct.
8415func (o *Organization) UnmarshalJSON(body []byte) error {
8416	var m map[string]*json.RawMessage
8417	err := json.Unmarshal(body, &m)
8418	if err != nil {
8419		return err
8420	}
8421	for k, v := range m {
8422		switch k {
8423		case "name":
8424			if v != nil {
8425				var name string
8426				err = json.Unmarshal(*v, &name)
8427				if err != nil {
8428					return err
8429				}
8430				o.Name = &name
8431			}
8432		case "url":
8433			if v != nil {
8434				var URL string
8435				err = json.Unmarshal(*v, &URL)
8436				if err != nil {
8437					return err
8438				}
8439				o.URL = &URL
8440			}
8441		case "image":
8442			if v != nil {
8443				var imageVar ImageObject
8444				err = json.Unmarshal(*v, &imageVar)
8445				if err != nil {
8446					return err
8447				}
8448				o.Image = &imageVar
8449			}
8450		case "description":
8451			if v != nil {
8452				var description string
8453				err = json.Unmarshal(*v, &description)
8454				if err != nil {
8455					return err
8456				}
8457				o.Description = &description
8458			}
8459		case "entityPresentationInfo":
8460			if v != nil {
8461				var entityPresentationInfo EntitiesEntityPresentationInfo
8462				err = json.Unmarshal(*v, &entityPresentationInfo)
8463				if err != nil {
8464					return err
8465				}
8466				o.EntityPresentationInfo = &entityPresentationInfo
8467			}
8468		case "bingId":
8469			if v != nil {
8470				var bingID string
8471				err = json.Unmarshal(*v, &bingID)
8472				if err != nil {
8473					return err
8474				}
8475				o.BingID = &bingID
8476			}
8477		case "contractualRules":
8478			if v != nil {
8479				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
8480				if err != nil {
8481					return err
8482				}
8483				o.ContractualRules = &contractualRules
8484			}
8485		case "webSearchUrl":
8486			if v != nil {
8487				var webSearchURL string
8488				err = json.Unmarshal(*v, &webSearchURL)
8489				if err != nil {
8490					return err
8491				}
8492				o.WebSearchURL = &webSearchURL
8493			}
8494		case "id":
8495			if v != nil {
8496				var ID string
8497				err = json.Unmarshal(*v, &ID)
8498				if err != nil {
8499					return err
8500				}
8501				o.ID = &ID
8502			}
8503		case "_type":
8504			if v != nil {
8505				var typeVar TypeBasicResponseBase
8506				err = json.Unmarshal(*v, &typeVar)
8507				if err != nil {
8508					return err
8509				}
8510				o.Type = typeVar
8511			}
8512		}
8513	}
8514
8515	return nil
8516}
8517
8518// BasicPlace defines information about a local entity, such as a restaurant or hotel.
8519type BasicPlace interface {
8520	AsMovieTheater() (*MovieTheater, bool)
8521	AsCivicStructure() (*CivicStructure, bool)
8522	AsBasicCivicStructure() (BasicCivicStructure, bool)
8523	AsLocalBusiness() (*LocalBusiness, bool)
8524	AsBasicLocalBusiness() (BasicLocalBusiness, bool)
8525	AsTouristAttraction() (*TouristAttraction, bool)
8526	AsAirport() (*Airport, bool)
8527	AsEntertainmentBusiness() (*EntertainmentBusiness, bool)
8528	AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool)
8529	AsFoodEstablishment() (*FoodEstablishment, bool)
8530	AsBasicFoodEstablishment() (BasicFoodEstablishment, bool)
8531	AsLodgingBusiness() (*LodgingBusiness, bool)
8532	AsBasicLodgingBusiness() (BasicLodgingBusiness, bool)
8533	AsRestaurant() (*Restaurant, bool)
8534	AsHotel() (*Hotel, bool)
8535	AsPlace() (*Place, bool)
8536}
8537
8538// Place defines information about a local entity, such as a restaurant or hotel.
8539type Place struct {
8540	// Address - READ-ONLY; The postal address of where the entity is located
8541	Address *PostalAddress `json:"address,omitempty"`
8542	// Telephone - READ-ONLY; The entity's telephone number
8543	Telephone *string `json:"telephone,omitempty"`
8544	// Name - READ-ONLY; The name of the thing represented by this object.
8545	Name *string `json:"name,omitempty"`
8546	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
8547	URL *string `json:"url,omitempty"`
8548	// Image - READ-ONLY
8549	Image *ImageObject `json:"image,omitempty"`
8550	// Description - READ-ONLY; A short description of the item.
8551	Description *string `json:"description,omitempty"`
8552	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
8553	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
8554	// BingID - READ-ONLY; An ID that uniquely identifies this item.
8555	BingID *string `json:"bingId,omitempty"`
8556	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
8557	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
8558	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
8559	WebSearchURL *string `json:"webSearchUrl,omitempty"`
8560	// ID - READ-ONLY; A String identifier.
8561	ID *string `json:"id,omitempty"`
8562	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
8563	Type TypeBasicResponseBase `json:"_type,omitempty"`
8564}
8565
8566func unmarshalBasicPlace(body []byte) (BasicPlace, error) {
8567	var m map[string]interface{}
8568	err := json.Unmarshal(body, &m)
8569	if err != nil {
8570		return nil, err
8571	}
8572
8573	switch m["_type"] {
8574	case string(TypeMovieTheater):
8575		var mt MovieTheater
8576		err := json.Unmarshal(body, &mt)
8577		return mt, err
8578	case string(TypeCivicStructure):
8579		var cs CivicStructure
8580		err := json.Unmarshal(body, &cs)
8581		return cs, err
8582	case string(TypeLocalBusiness):
8583		var lb LocalBusiness
8584		err := json.Unmarshal(body, &lb)
8585		return lb, err
8586	case string(TypeTouristAttraction):
8587		var ta TouristAttraction
8588		err := json.Unmarshal(body, &ta)
8589		return ta, err
8590	case string(TypeAirport):
8591		var a Airport
8592		err := json.Unmarshal(body, &a)
8593		return a, err
8594	case string(TypeEntertainmentBusiness):
8595		var eb EntertainmentBusiness
8596		err := json.Unmarshal(body, &eb)
8597		return eb, err
8598	case string(TypeFoodEstablishment):
8599		var fe FoodEstablishment
8600		err := json.Unmarshal(body, &fe)
8601		return fe, err
8602	case string(TypeLodgingBusiness):
8603		var lb LodgingBusiness
8604		err := json.Unmarshal(body, &lb)
8605		return lb, err
8606	case string(TypeRestaurant):
8607		var r Restaurant
8608		err := json.Unmarshal(body, &r)
8609		return r, err
8610	case string(TypeHotel):
8611		var h Hotel
8612		err := json.Unmarshal(body, &h)
8613		return h, err
8614	default:
8615		var p Place
8616		err := json.Unmarshal(body, &p)
8617		return p, err
8618	}
8619}
8620func unmarshalBasicPlaceArray(body []byte) ([]BasicPlace, error) {
8621	var rawMessages []*json.RawMessage
8622	err := json.Unmarshal(body, &rawMessages)
8623	if err != nil {
8624		return nil, err
8625	}
8626
8627	pArray := make([]BasicPlace, len(rawMessages))
8628
8629	for index, rawMessage := range rawMessages {
8630		p, err := unmarshalBasicPlace(*rawMessage)
8631		if err != nil {
8632			return nil, err
8633		}
8634		pArray[index] = p
8635	}
8636	return pArray, nil
8637}
8638
8639// MarshalJSON is the custom marshaler for Place.
8640func (p Place) MarshalJSON() ([]byte, error) {
8641	p.Type = TypePlace
8642	objectMap := make(map[string]interface{})
8643	if p.Type != "" {
8644		objectMap["_type"] = p.Type
8645	}
8646	return json.Marshal(objectMap)
8647}
8648
8649// AsImageObject is the BasicResponseBase implementation for Place.
8650func (p Place) AsImageObject() (*ImageObject, bool) {
8651	return nil, false
8652}
8653
8654// AsThing is the BasicResponseBase implementation for Place.
8655func (p Place) AsThing() (*Thing, bool) {
8656	return nil, false
8657}
8658
8659// AsBasicThing is the BasicResponseBase implementation for Place.
8660func (p Place) AsBasicThing() (BasicThing, bool) {
8661	return &p, true
8662}
8663
8664// AsEntities is the BasicResponseBase implementation for Place.
8665func (p Place) AsEntities() (*Entities, bool) {
8666	return nil, false
8667}
8668
8669// AsPlaces is the BasicResponseBase implementation for Place.
8670func (p Place) AsPlaces() (*Places, bool) {
8671	return nil, false
8672}
8673
8674// AsSearchResponse is the BasicResponseBase implementation for Place.
8675func (p Place) AsSearchResponse() (*SearchResponse, bool) {
8676	return nil, false
8677}
8678
8679// AsResponse is the BasicResponseBase implementation for Place.
8680func (p Place) AsResponse() (*Response, bool) {
8681	return nil, false
8682}
8683
8684// AsBasicResponse is the BasicResponseBase implementation for Place.
8685func (p Place) AsBasicResponse() (BasicResponse, bool) {
8686	return &p, true
8687}
8688
8689// AsSearchResultsAnswer is the BasicResponseBase implementation for Place.
8690func (p Place) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
8691	return nil, false
8692}
8693
8694// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Place.
8695func (p Place) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
8696	return nil, false
8697}
8698
8699// AsIdentifiable is the BasicResponseBase implementation for Place.
8700func (p Place) AsIdentifiable() (*Identifiable, bool) {
8701	return nil, false
8702}
8703
8704// AsBasicIdentifiable is the BasicResponseBase implementation for Place.
8705func (p Place) AsBasicIdentifiable() (BasicIdentifiable, bool) {
8706	return &p, true
8707}
8708
8709// AsAnswer is the BasicResponseBase implementation for Place.
8710func (p Place) AsAnswer() (*Answer, bool) {
8711	return nil, false
8712}
8713
8714// AsBasicAnswer is the BasicResponseBase implementation for Place.
8715func (p Place) AsBasicAnswer() (BasicAnswer, bool) {
8716	return nil, false
8717}
8718
8719// AsErrorResponse is the BasicResponseBase implementation for Place.
8720func (p Place) AsErrorResponse() (*ErrorResponse, bool) {
8721	return nil, false
8722}
8723
8724// AsPostalAddress is the BasicResponseBase implementation for Place.
8725func (p Place) AsPostalAddress() (*PostalAddress, bool) {
8726	return nil, false
8727}
8728
8729// AsPlace is the BasicResponseBase implementation for Place.
8730func (p Place) AsPlace() (*Place, bool) {
8731	return &p, true
8732}
8733
8734// AsBasicPlace is the BasicResponseBase implementation for Place.
8735func (p Place) AsBasicPlace() (BasicPlace, bool) {
8736	return &p, true
8737}
8738
8739// AsOrganization is the BasicResponseBase implementation for Place.
8740func (p Place) AsOrganization() (*Organization, bool) {
8741	return nil, false
8742}
8743
8744// AsCreativeWork is the BasicResponseBase implementation for Place.
8745func (p Place) AsCreativeWork() (*CreativeWork, bool) {
8746	return nil, false
8747}
8748
8749// AsBasicCreativeWork is the BasicResponseBase implementation for Place.
8750func (p Place) AsBasicCreativeWork() (BasicCreativeWork, bool) {
8751	return nil, false
8752}
8753
8754// AsIntangible is the BasicResponseBase implementation for Place.
8755func (p Place) AsIntangible() (*Intangible, bool) {
8756	return nil, false
8757}
8758
8759// AsBasicIntangible is the BasicResponseBase implementation for Place.
8760func (p Place) AsBasicIntangible() (BasicIntangible, bool) {
8761	return nil, false
8762}
8763
8764// AsMovieTheater is the BasicResponseBase implementation for Place.
8765func (p Place) AsMovieTheater() (*MovieTheater, bool) {
8766	return nil, false
8767}
8768
8769// AsMediaObject is the BasicResponseBase implementation for Place.
8770func (p Place) AsMediaObject() (*MediaObject, bool) {
8771	return nil, false
8772}
8773
8774// AsBasicMediaObject is the BasicResponseBase implementation for Place.
8775func (p Place) AsBasicMediaObject() (BasicMediaObject, bool) {
8776	return nil, false
8777}
8778
8779// AsCivicStructure is the BasicResponseBase implementation for Place.
8780func (p Place) AsCivicStructure() (*CivicStructure, bool) {
8781	return nil, false
8782}
8783
8784// AsBasicCivicStructure is the BasicResponseBase implementation for Place.
8785func (p Place) AsBasicCivicStructure() (BasicCivicStructure, bool) {
8786	return nil, false
8787}
8788
8789// AsLocalBusiness is the BasicResponseBase implementation for Place.
8790func (p Place) AsLocalBusiness() (*LocalBusiness, bool) {
8791	return nil, false
8792}
8793
8794// AsBasicLocalBusiness is the BasicResponseBase implementation for Place.
8795func (p Place) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
8796	return nil, false
8797}
8798
8799// AsTouristAttraction is the BasicResponseBase implementation for Place.
8800func (p Place) AsTouristAttraction() (*TouristAttraction, bool) {
8801	return nil, false
8802}
8803
8804// AsAirport is the BasicResponseBase implementation for Place.
8805func (p Place) AsAirport() (*Airport, bool) {
8806	return nil, false
8807}
8808
8809// AsLicense is the BasicResponseBase implementation for Place.
8810func (p Place) AsLicense() (*License, bool) {
8811	return nil, false
8812}
8813
8814// AsStructuredValue is the BasicResponseBase implementation for Place.
8815func (p Place) AsStructuredValue() (*StructuredValue, bool) {
8816	return nil, false
8817}
8818
8819// AsBasicStructuredValue is the BasicResponseBase implementation for Place.
8820func (p Place) AsBasicStructuredValue() (BasicStructuredValue, bool) {
8821	return nil, false
8822}
8823
8824// AsEntertainmentBusiness is the BasicResponseBase implementation for Place.
8825func (p Place) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
8826	return nil, false
8827}
8828
8829// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Place.
8830func (p Place) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
8831	return nil, false
8832}
8833
8834// AsFoodEstablishment is the BasicResponseBase implementation for Place.
8835func (p Place) AsFoodEstablishment() (*FoodEstablishment, bool) {
8836	return nil, false
8837}
8838
8839// AsBasicFoodEstablishment is the BasicResponseBase implementation for Place.
8840func (p Place) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
8841	return nil, false
8842}
8843
8844// AsLodgingBusiness is the BasicResponseBase implementation for Place.
8845func (p Place) AsLodgingBusiness() (*LodgingBusiness, bool) {
8846	return nil, false
8847}
8848
8849// AsBasicLodgingBusiness is the BasicResponseBase implementation for Place.
8850func (p Place) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
8851	return nil, false
8852}
8853
8854// AsRestaurant is the BasicResponseBase implementation for Place.
8855func (p Place) AsRestaurant() (*Restaurant, bool) {
8856	return nil, false
8857}
8858
8859// AsHotel is the BasicResponseBase implementation for Place.
8860func (p Place) AsHotel() (*Hotel, bool) {
8861	return nil, false
8862}
8863
8864// AsResponseBase is the BasicResponseBase implementation for Place.
8865func (p Place) AsResponseBase() (*ResponseBase, bool) {
8866	return nil, false
8867}
8868
8869// AsBasicResponseBase is the BasicResponseBase implementation for Place.
8870func (p Place) AsBasicResponseBase() (BasicResponseBase, bool) {
8871	return &p, true
8872}
8873
8874// UnmarshalJSON is the custom unmarshaler for Place struct.
8875func (p *Place) UnmarshalJSON(body []byte) error {
8876	var m map[string]*json.RawMessage
8877	err := json.Unmarshal(body, &m)
8878	if err != nil {
8879		return err
8880	}
8881	for k, v := range m {
8882		switch k {
8883		case "address":
8884			if v != nil {
8885				var address PostalAddress
8886				err = json.Unmarshal(*v, &address)
8887				if err != nil {
8888					return err
8889				}
8890				p.Address = &address
8891			}
8892		case "telephone":
8893			if v != nil {
8894				var telephone string
8895				err = json.Unmarshal(*v, &telephone)
8896				if err != nil {
8897					return err
8898				}
8899				p.Telephone = &telephone
8900			}
8901		case "name":
8902			if v != nil {
8903				var name string
8904				err = json.Unmarshal(*v, &name)
8905				if err != nil {
8906					return err
8907				}
8908				p.Name = &name
8909			}
8910		case "url":
8911			if v != nil {
8912				var URL string
8913				err = json.Unmarshal(*v, &URL)
8914				if err != nil {
8915					return err
8916				}
8917				p.URL = &URL
8918			}
8919		case "image":
8920			if v != nil {
8921				var imageVar ImageObject
8922				err = json.Unmarshal(*v, &imageVar)
8923				if err != nil {
8924					return err
8925				}
8926				p.Image = &imageVar
8927			}
8928		case "description":
8929			if v != nil {
8930				var description string
8931				err = json.Unmarshal(*v, &description)
8932				if err != nil {
8933					return err
8934				}
8935				p.Description = &description
8936			}
8937		case "entityPresentationInfo":
8938			if v != nil {
8939				var entityPresentationInfo EntitiesEntityPresentationInfo
8940				err = json.Unmarshal(*v, &entityPresentationInfo)
8941				if err != nil {
8942					return err
8943				}
8944				p.EntityPresentationInfo = &entityPresentationInfo
8945			}
8946		case "bingId":
8947			if v != nil {
8948				var bingID string
8949				err = json.Unmarshal(*v, &bingID)
8950				if err != nil {
8951					return err
8952				}
8953				p.BingID = &bingID
8954			}
8955		case "contractualRules":
8956			if v != nil {
8957				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
8958				if err != nil {
8959					return err
8960				}
8961				p.ContractualRules = &contractualRules
8962			}
8963		case "webSearchUrl":
8964			if v != nil {
8965				var webSearchURL string
8966				err = json.Unmarshal(*v, &webSearchURL)
8967				if err != nil {
8968					return err
8969				}
8970				p.WebSearchURL = &webSearchURL
8971			}
8972		case "id":
8973			if v != nil {
8974				var ID string
8975				err = json.Unmarshal(*v, &ID)
8976				if err != nil {
8977					return err
8978				}
8979				p.ID = &ID
8980			}
8981		case "_type":
8982			if v != nil {
8983				var typeVar TypeBasicResponseBase
8984				err = json.Unmarshal(*v, &typeVar)
8985				if err != nil {
8986					return err
8987				}
8988				p.Type = typeVar
8989			}
8990		}
8991	}
8992
8993	return nil
8994}
8995
8996// Places defines a local entity answer.
8997type Places struct {
8998	// Value - A list of local entities, such as restaurants or hotels.
8999	Value *[]BasicThing `json:"value,omitempty"`
9000	// QueryContext - READ-ONLY
9001	QueryContext *QueryContext `json:"queryContext,omitempty"`
9002	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
9003	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
9004	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
9005	WebSearchURL *string `json:"webSearchUrl,omitempty"`
9006	// ID - READ-ONLY; A String identifier.
9007	ID *string `json:"id,omitempty"`
9008	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
9009	Type TypeBasicResponseBase `json:"_type,omitempty"`
9010}
9011
9012// MarshalJSON is the custom marshaler for Places.
9013func (p Places) MarshalJSON() ([]byte, error) {
9014	p.Type = TypePlaces
9015	objectMap := make(map[string]interface{})
9016	if p.Value != nil {
9017		objectMap["value"] = p.Value
9018	}
9019	if p.Type != "" {
9020		objectMap["_type"] = p.Type
9021	}
9022	return json.Marshal(objectMap)
9023}
9024
9025// AsImageObject is the BasicResponseBase implementation for Places.
9026func (p Places) AsImageObject() (*ImageObject, bool) {
9027	return nil, false
9028}
9029
9030// AsThing is the BasicResponseBase implementation for Places.
9031func (p Places) AsThing() (*Thing, bool) {
9032	return nil, false
9033}
9034
9035// AsBasicThing is the BasicResponseBase implementation for Places.
9036func (p Places) AsBasicThing() (BasicThing, bool) {
9037	return nil, false
9038}
9039
9040// AsEntities is the BasicResponseBase implementation for Places.
9041func (p Places) AsEntities() (*Entities, bool) {
9042	return nil, false
9043}
9044
9045// AsPlaces is the BasicResponseBase implementation for Places.
9046func (p Places) AsPlaces() (*Places, bool) {
9047	return &p, true
9048}
9049
9050// AsSearchResponse is the BasicResponseBase implementation for Places.
9051func (p Places) AsSearchResponse() (*SearchResponse, bool) {
9052	return nil, false
9053}
9054
9055// AsResponse is the BasicResponseBase implementation for Places.
9056func (p Places) AsResponse() (*Response, bool) {
9057	return nil, false
9058}
9059
9060// AsBasicResponse is the BasicResponseBase implementation for Places.
9061func (p Places) AsBasicResponse() (BasicResponse, bool) {
9062	return &p, true
9063}
9064
9065// AsSearchResultsAnswer is the BasicResponseBase implementation for Places.
9066func (p Places) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
9067	return nil, false
9068}
9069
9070// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Places.
9071func (p Places) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
9072	return &p, true
9073}
9074
9075// AsIdentifiable is the BasicResponseBase implementation for Places.
9076func (p Places) AsIdentifiable() (*Identifiable, bool) {
9077	return nil, false
9078}
9079
9080// AsBasicIdentifiable is the BasicResponseBase implementation for Places.
9081func (p Places) AsBasicIdentifiable() (BasicIdentifiable, bool) {
9082	return &p, true
9083}
9084
9085// AsAnswer is the BasicResponseBase implementation for Places.
9086func (p Places) AsAnswer() (*Answer, bool) {
9087	return nil, false
9088}
9089
9090// AsBasicAnswer is the BasicResponseBase implementation for Places.
9091func (p Places) AsBasicAnswer() (BasicAnswer, bool) {
9092	return &p, true
9093}
9094
9095// AsErrorResponse is the BasicResponseBase implementation for Places.
9096func (p Places) AsErrorResponse() (*ErrorResponse, bool) {
9097	return nil, false
9098}
9099
9100// AsPostalAddress is the BasicResponseBase implementation for Places.
9101func (p Places) AsPostalAddress() (*PostalAddress, bool) {
9102	return nil, false
9103}
9104
9105// AsPlace is the BasicResponseBase implementation for Places.
9106func (p Places) AsPlace() (*Place, bool) {
9107	return nil, false
9108}
9109
9110// AsBasicPlace is the BasicResponseBase implementation for Places.
9111func (p Places) AsBasicPlace() (BasicPlace, bool) {
9112	return nil, false
9113}
9114
9115// AsOrganization is the BasicResponseBase implementation for Places.
9116func (p Places) AsOrganization() (*Organization, bool) {
9117	return nil, false
9118}
9119
9120// AsCreativeWork is the BasicResponseBase implementation for Places.
9121func (p Places) AsCreativeWork() (*CreativeWork, bool) {
9122	return nil, false
9123}
9124
9125// AsBasicCreativeWork is the BasicResponseBase implementation for Places.
9126func (p Places) AsBasicCreativeWork() (BasicCreativeWork, bool) {
9127	return nil, false
9128}
9129
9130// AsIntangible is the BasicResponseBase implementation for Places.
9131func (p Places) AsIntangible() (*Intangible, bool) {
9132	return nil, false
9133}
9134
9135// AsBasicIntangible is the BasicResponseBase implementation for Places.
9136func (p Places) AsBasicIntangible() (BasicIntangible, bool) {
9137	return nil, false
9138}
9139
9140// AsMovieTheater is the BasicResponseBase implementation for Places.
9141func (p Places) AsMovieTheater() (*MovieTheater, bool) {
9142	return nil, false
9143}
9144
9145// AsMediaObject is the BasicResponseBase implementation for Places.
9146func (p Places) AsMediaObject() (*MediaObject, bool) {
9147	return nil, false
9148}
9149
9150// AsBasicMediaObject is the BasicResponseBase implementation for Places.
9151func (p Places) AsBasicMediaObject() (BasicMediaObject, bool) {
9152	return nil, false
9153}
9154
9155// AsCivicStructure is the BasicResponseBase implementation for Places.
9156func (p Places) AsCivicStructure() (*CivicStructure, bool) {
9157	return nil, false
9158}
9159
9160// AsBasicCivicStructure is the BasicResponseBase implementation for Places.
9161func (p Places) AsBasicCivicStructure() (BasicCivicStructure, bool) {
9162	return nil, false
9163}
9164
9165// AsLocalBusiness is the BasicResponseBase implementation for Places.
9166func (p Places) AsLocalBusiness() (*LocalBusiness, bool) {
9167	return nil, false
9168}
9169
9170// AsBasicLocalBusiness is the BasicResponseBase implementation for Places.
9171func (p Places) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
9172	return nil, false
9173}
9174
9175// AsTouristAttraction is the BasicResponseBase implementation for Places.
9176func (p Places) AsTouristAttraction() (*TouristAttraction, bool) {
9177	return nil, false
9178}
9179
9180// AsAirport is the BasicResponseBase implementation for Places.
9181func (p Places) AsAirport() (*Airport, bool) {
9182	return nil, false
9183}
9184
9185// AsLicense is the BasicResponseBase implementation for Places.
9186func (p Places) AsLicense() (*License, bool) {
9187	return nil, false
9188}
9189
9190// AsStructuredValue is the BasicResponseBase implementation for Places.
9191func (p Places) AsStructuredValue() (*StructuredValue, bool) {
9192	return nil, false
9193}
9194
9195// AsBasicStructuredValue is the BasicResponseBase implementation for Places.
9196func (p Places) AsBasicStructuredValue() (BasicStructuredValue, bool) {
9197	return nil, false
9198}
9199
9200// AsEntertainmentBusiness is the BasicResponseBase implementation for Places.
9201func (p Places) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
9202	return nil, false
9203}
9204
9205// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Places.
9206func (p Places) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
9207	return nil, false
9208}
9209
9210// AsFoodEstablishment is the BasicResponseBase implementation for Places.
9211func (p Places) AsFoodEstablishment() (*FoodEstablishment, bool) {
9212	return nil, false
9213}
9214
9215// AsBasicFoodEstablishment is the BasicResponseBase implementation for Places.
9216func (p Places) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
9217	return nil, false
9218}
9219
9220// AsLodgingBusiness is the BasicResponseBase implementation for Places.
9221func (p Places) AsLodgingBusiness() (*LodgingBusiness, bool) {
9222	return nil, false
9223}
9224
9225// AsBasicLodgingBusiness is the BasicResponseBase implementation for Places.
9226func (p Places) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
9227	return nil, false
9228}
9229
9230// AsRestaurant is the BasicResponseBase implementation for Places.
9231func (p Places) AsRestaurant() (*Restaurant, bool) {
9232	return nil, false
9233}
9234
9235// AsHotel is the BasicResponseBase implementation for Places.
9236func (p Places) AsHotel() (*Hotel, bool) {
9237	return nil, false
9238}
9239
9240// AsResponseBase is the BasicResponseBase implementation for Places.
9241func (p Places) AsResponseBase() (*ResponseBase, bool) {
9242	return nil, false
9243}
9244
9245// AsBasicResponseBase is the BasicResponseBase implementation for Places.
9246func (p Places) AsBasicResponseBase() (BasicResponseBase, bool) {
9247	return &p, true
9248}
9249
9250// UnmarshalJSON is the custom unmarshaler for Places struct.
9251func (p *Places) UnmarshalJSON(body []byte) error {
9252	var m map[string]*json.RawMessage
9253	err := json.Unmarshal(body, &m)
9254	if err != nil {
9255		return err
9256	}
9257	for k, v := range m {
9258		switch k {
9259		case "value":
9260			if v != nil {
9261				value, err := unmarshalBasicThingArray(*v)
9262				if err != nil {
9263					return err
9264				}
9265				p.Value = &value
9266			}
9267		case "queryContext":
9268			if v != nil {
9269				var queryContext QueryContext
9270				err = json.Unmarshal(*v, &queryContext)
9271				if err != nil {
9272					return err
9273				}
9274				p.QueryContext = &queryContext
9275			}
9276		case "contractualRules":
9277			if v != nil {
9278				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
9279				if err != nil {
9280					return err
9281				}
9282				p.ContractualRules = &contractualRules
9283			}
9284		case "webSearchUrl":
9285			if v != nil {
9286				var webSearchURL string
9287				err = json.Unmarshal(*v, &webSearchURL)
9288				if err != nil {
9289					return err
9290				}
9291				p.WebSearchURL = &webSearchURL
9292			}
9293		case "id":
9294			if v != nil {
9295				var ID string
9296				err = json.Unmarshal(*v, &ID)
9297				if err != nil {
9298					return err
9299				}
9300				p.ID = &ID
9301			}
9302		case "_type":
9303			if v != nil {
9304				var typeVar TypeBasicResponseBase
9305				err = json.Unmarshal(*v, &typeVar)
9306				if err != nil {
9307					return err
9308				}
9309				p.Type = typeVar
9310			}
9311		}
9312	}
9313
9314	return nil
9315}
9316
9317// PostalAddress defines a postal address.
9318type PostalAddress struct {
9319	// StreetAddress - READ-ONLY
9320	StreetAddress *string `json:"streetAddress,omitempty"`
9321	// AddressLocality - READ-ONLY; The city where the street address is located. For example, Seattle.
9322	AddressLocality *string `json:"addressLocality,omitempty"`
9323	// AddressSubregion - READ-ONLY
9324	AddressSubregion *string `json:"addressSubregion,omitempty"`
9325	// AddressRegion - READ-ONLY; The state or province code where the street address is located. This could be the two-letter code. For example, WA, or the full name , Washington.
9326	AddressRegion *string `json:"addressRegion,omitempty"`
9327	// PostalCode - READ-ONLY; The zip code or postal code where the street address is located. For example, 98052.
9328	PostalCode *string `json:"postalCode,omitempty"`
9329	// PostOfficeBoxNumber - READ-ONLY
9330	PostOfficeBoxNumber *string `json:"postOfficeBoxNumber,omitempty"`
9331	// AddressCountry - READ-ONLY; The country/region where the street address is located. This could be the two-letter ISO code. For example, US, or the full name, United States.
9332	AddressCountry *string `json:"addressCountry,omitempty"`
9333	// CountryIso - READ-ONLY; The two letter ISO code of this country. For example, US.
9334	CountryIso *string `json:"countryIso,omitempty"`
9335	// Neighborhood - READ-ONLY; The neighborhood where the street address is located. For example, Westlake.
9336	Neighborhood *string `json:"neighborhood,omitempty"`
9337	// AddressRegionAbbreviation - READ-ONLY; Region Abbreviation. For example, WA.
9338	AddressRegionAbbreviation *string `json:"addressRegionAbbreviation,omitempty"`
9339	// Text - READ-ONLY; The complete address. For example, 2100 Westlake Ave N, Bellevue, WA 98052.
9340	Text *string `json:"text,omitempty"`
9341	// Name - READ-ONLY; The name of the thing represented by this object.
9342	Name *string `json:"name,omitempty"`
9343	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
9344	URL *string `json:"url,omitempty"`
9345	// Image - READ-ONLY
9346	Image *ImageObject `json:"image,omitempty"`
9347	// Description - READ-ONLY; A short description of the item.
9348	Description *string `json:"description,omitempty"`
9349	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
9350	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
9351	// BingID - READ-ONLY; An ID that uniquely identifies this item.
9352	BingID *string `json:"bingId,omitempty"`
9353	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
9354	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
9355	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
9356	WebSearchURL *string `json:"webSearchUrl,omitempty"`
9357	// ID - READ-ONLY; A String identifier.
9358	ID *string `json:"id,omitempty"`
9359	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
9360	Type TypeBasicResponseBase `json:"_type,omitempty"`
9361}
9362
9363// MarshalJSON is the custom marshaler for PostalAddress.
9364func (pa PostalAddress) MarshalJSON() ([]byte, error) {
9365	pa.Type = TypePostalAddress
9366	objectMap := make(map[string]interface{})
9367	if pa.Type != "" {
9368		objectMap["_type"] = pa.Type
9369	}
9370	return json.Marshal(objectMap)
9371}
9372
9373// AsImageObject is the BasicResponseBase implementation for PostalAddress.
9374func (pa PostalAddress) AsImageObject() (*ImageObject, bool) {
9375	return nil, false
9376}
9377
9378// AsThing is the BasicResponseBase implementation for PostalAddress.
9379func (pa PostalAddress) AsThing() (*Thing, bool) {
9380	return nil, false
9381}
9382
9383// AsBasicThing is the BasicResponseBase implementation for PostalAddress.
9384func (pa PostalAddress) AsBasicThing() (BasicThing, bool) {
9385	return &pa, true
9386}
9387
9388// AsEntities is the BasicResponseBase implementation for PostalAddress.
9389func (pa PostalAddress) AsEntities() (*Entities, bool) {
9390	return nil, false
9391}
9392
9393// AsPlaces is the BasicResponseBase implementation for PostalAddress.
9394func (pa PostalAddress) AsPlaces() (*Places, bool) {
9395	return nil, false
9396}
9397
9398// AsSearchResponse is the BasicResponseBase implementation for PostalAddress.
9399func (pa PostalAddress) AsSearchResponse() (*SearchResponse, bool) {
9400	return nil, false
9401}
9402
9403// AsResponse is the BasicResponseBase implementation for PostalAddress.
9404func (pa PostalAddress) AsResponse() (*Response, bool) {
9405	return nil, false
9406}
9407
9408// AsBasicResponse is the BasicResponseBase implementation for PostalAddress.
9409func (pa PostalAddress) AsBasicResponse() (BasicResponse, bool) {
9410	return &pa, true
9411}
9412
9413// AsSearchResultsAnswer is the BasicResponseBase implementation for PostalAddress.
9414func (pa PostalAddress) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
9415	return nil, false
9416}
9417
9418// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for PostalAddress.
9419func (pa PostalAddress) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
9420	return nil, false
9421}
9422
9423// AsIdentifiable is the BasicResponseBase implementation for PostalAddress.
9424func (pa PostalAddress) AsIdentifiable() (*Identifiable, bool) {
9425	return nil, false
9426}
9427
9428// AsBasicIdentifiable is the BasicResponseBase implementation for PostalAddress.
9429func (pa PostalAddress) AsBasicIdentifiable() (BasicIdentifiable, bool) {
9430	return &pa, true
9431}
9432
9433// AsAnswer is the BasicResponseBase implementation for PostalAddress.
9434func (pa PostalAddress) AsAnswer() (*Answer, bool) {
9435	return nil, false
9436}
9437
9438// AsBasicAnswer is the BasicResponseBase implementation for PostalAddress.
9439func (pa PostalAddress) AsBasicAnswer() (BasicAnswer, bool) {
9440	return nil, false
9441}
9442
9443// AsErrorResponse is the BasicResponseBase implementation for PostalAddress.
9444func (pa PostalAddress) AsErrorResponse() (*ErrorResponse, bool) {
9445	return nil, false
9446}
9447
9448// AsPostalAddress is the BasicResponseBase implementation for PostalAddress.
9449func (pa PostalAddress) AsPostalAddress() (*PostalAddress, bool) {
9450	return &pa, true
9451}
9452
9453// AsPlace is the BasicResponseBase implementation for PostalAddress.
9454func (pa PostalAddress) AsPlace() (*Place, bool) {
9455	return nil, false
9456}
9457
9458// AsBasicPlace is the BasicResponseBase implementation for PostalAddress.
9459func (pa PostalAddress) AsBasicPlace() (BasicPlace, bool) {
9460	return nil, false
9461}
9462
9463// AsOrganization is the BasicResponseBase implementation for PostalAddress.
9464func (pa PostalAddress) AsOrganization() (*Organization, bool) {
9465	return nil, false
9466}
9467
9468// AsCreativeWork is the BasicResponseBase implementation for PostalAddress.
9469func (pa PostalAddress) AsCreativeWork() (*CreativeWork, bool) {
9470	return nil, false
9471}
9472
9473// AsBasicCreativeWork is the BasicResponseBase implementation for PostalAddress.
9474func (pa PostalAddress) AsBasicCreativeWork() (BasicCreativeWork, bool) {
9475	return nil, false
9476}
9477
9478// AsIntangible is the BasicResponseBase implementation for PostalAddress.
9479func (pa PostalAddress) AsIntangible() (*Intangible, bool) {
9480	return nil, false
9481}
9482
9483// AsBasicIntangible is the BasicResponseBase implementation for PostalAddress.
9484func (pa PostalAddress) AsBasicIntangible() (BasicIntangible, bool) {
9485	return &pa, true
9486}
9487
9488// AsMovieTheater is the BasicResponseBase implementation for PostalAddress.
9489func (pa PostalAddress) AsMovieTheater() (*MovieTheater, bool) {
9490	return nil, false
9491}
9492
9493// AsMediaObject is the BasicResponseBase implementation for PostalAddress.
9494func (pa PostalAddress) AsMediaObject() (*MediaObject, bool) {
9495	return nil, false
9496}
9497
9498// AsBasicMediaObject is the BasicResponseBase implementation for PostalAddress.
9499func (pa PostalAddress) AsBasicMediaObject() (BasicMediaObject, bool) {
9500	return nil, false
9501}
9502
9503// AsCivicStructure is the BasicResponseBase implementation for PostalAddress.
9504func (pa PostalAddress) AsCivicStructure() (*CivicStructure, bool) {
9505	return nil, false
9506}
9507
9508// AsBasicCivicStructure is the BasicResponseBase implementation for PostalAddress.
9509func (pa PostalAddress) AsBasicCivicStructure() (BasicCivicStructure, bool) {
9510	return nil, false
9511}
9512
9513// AsLocalBusiness is the BasicResponseBase implementation for PostalAddress.
9514func (pa PostalAddress) AsLocalBusiness() (*LocalBusiness, bool) {
9515	return nil, false
9516}
9517
9518// AsBasicLocalBusiness is the BasicResponseBase implementation for PostalAddress.
9519func (pa PostalAddress) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
9520	return nil, false
9521}
9522
9523// AsTouristAttraction is the BasicResponseBase implementation for PostalAddress.
9524func (pa PostalAddress) AsTouristAttraction() (*TouristAttraction, bool) {
9525	return nil, false
9526}
9527
9528// AsAirport is the BasicResponseBase implementation for PostalAddress.
9529func (pa PostalAddress) AsAirport() (*Airport, bool) {
9530	return nil, false
9531}
9532
9533// AsLicense is the BasicResponseBase implementation for PostalAddress.
9534func (pa PostalAddress) AsLicense() (*License, bool) {
9535	return nil, false
9536}
9537
9538// AsStructuredValue is the BasicResponseBase implementation for PostalAddress.
9539func (pa PostalAddress) AsStructuredValue() (*StructuredValue, bool) {
9540	return nil, false
9541}
9542
9543// AsBasicStructuredValue is the BasicResponseBase implementation for PostalAddress.
9544func (pa PostalAddress) AsBasicStructuredValue() (BasicStructuredValue, bool) {
9545	return &pa, true
9546}
9547
9548// AsEntertainmentBusiness is the BasicResponseBase implementation for PostalAddress.
9549func (pa PostalAddress) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
9550	return nil, false
9551}
9552
9553// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for PostalAddress.
9554func (pa PostalAddress) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
9555	return nil, false
9556}
9557
9558// AsFoodEstablishment is the BasicResponseBase implementation for PostalAddress.
9559func (pa PostalAddress) AsFoodEstablishment() (*FoodEstablishment, bool) {
9560	return nil, false
9561}
9562
9563// AsBasicFoodEstablishment is the BasicResponseBase implementation for PostalAddress.
9564func (pa PostalAddress) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
9565	return nil, false
9566}
9567
9568// AsLodgingBusiness is the BasicResponseBase implementation for PostalAddress.
9569func (pa PostalAddress) AsLodgingBusiness() (*LodgingBusiness, bool) {
9570	return nil, false
9571}
9572
9573// AsBasicLodgingBusiness is the BasicResponseBase implementation for PostalAddress.
9574func (pa PostalAddress) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
9575	return nil, false
9576}
9577
9578// AsRestaurant is the BasicResponseBase implementation for PostalAddress.
9579func (pa PostalAddress) AsRestaurant() (*Restaurant, bool) {
9580	return nil, false
9581}
9582
9583// AsHotel is the BasicResponseBase implementation for PostalAddress.
9584func (pa PostalAddress) AsHotel() (*Hotel, bool) {
9585	return nil, false
9586}
9587
9588// AsResponseBase is the BasicResponseBase implementation for PostalAddress.
9589func (pa PostalAddress) AsResponseBase() (*ResponseBase, bool) {
9590	return nil, false
9591}
9592
9593// AsBasicResponseBase is the BasicResponseBase implementation for PostalAddress.
9594func (pa PostalAddress) AsBasicResponseBase() (BasicResponseBase, bool) {
9595	return &pa, true
9596}
9597
9598// UnmarshalJSON is the custom unmarshaler for PostalAddress struct.
9599func (pa *PostalAddress) UnmarshalJSON(body []byte) error {
9600	var m map[string]*json.RawMessage
9601	err := json.Unmarshal(body, &m)
9602	if err != nil {
9603		return err
9604	}
9605	for k, v := range m {
9606		switch k {
9607		case "streetAddress":
9608			if v != nil {
9609				var streetAddress string
9610				err = json.Unmarshal(*v, &streetAddress)
9611				if err != nil {
9612					return err
9613				}
9614				pa.StreetAddress = &streetAddress
9615			}
9616		case "addressLocality":
9617			if v != nil {
9618				var addressLocality string
9619				err = json.Unmarshal(*v, &addressLocality)
9620				if err != nil {
9621					return err
9622				}
9623				pa.AddressLocality = &addressLocality
9624			}
9625		case "addressSubregion":
9626			if v != nil {
9627				var addressSubregion string
9628				err = json.Unmarshal(*v, &addressSubregion)
9629				if err != nil {
9630					return err
9631				}
9632				pa.AddressSubregion = &addressSubregion
9633			}
9634		case "addressRegion":
9635			if v != nil {
9636				var addressRegion string
9637				err = json.Unmarshal(*v, &addressRegion)
9638				if err != nil {
9639					return err
9640				}
9641				pa.AddressRegion = &addressRegion
9642			}
9643		case "postalCode":
9644			if v != nil {
9645				var postalCode string
9646				err = json.Unmarshal(*v, &postalCode)
9647				if err != nil {
9648					return err
9649				}
9650				pa.PostalCode = &postalCode
9651			}
9652		case "postOfficeBoxNumber":
9653			if v != nil {
9654				var postOfficeBoxNumber string
9655				err = json.Unmarshal(*v, &postOfficeBoxNumber)
9656				if err != nil {
9657					return err
9658				}
9659				pa.PostOfficeBoxNumber = &postOfficeBoxNumber
9660			}
9661		case "addressCountry":
9662			if v != nil {
9663				var addressCountry string
9664				err = json.Unmarshal(*v, &addressCountry)
9665				if err != nil {
9666					return err
9667				}
9668				pa.AddressCountry = &addressCountry
9669			}
9670		case "countryIso":
9671			if v != nil {
9672				var countryIso string
9673				err = json.Unmarshal(*v, &countryIso)
9674				if err != nil {
9675					return err
9676				}
9677				pa.CountryIso = &countryIso
9678			}
9679		case "neighborhood":
9680			if v != nil {
9681				var neighborhood string
9682				err = json.Unmarshal(*v, &neighborhood)
9683				if err != nil {
9684					return err
9685				}
9686				pa.Neighborhood = &neighborhood
9687			}
9688		case "addressRegionAbbreviation":
9689			if v != nil {
9690				var addressRegionAbbreviation string
9691				err = json.Unmarshal(*v, &addressRegionAbbreviation)
9692				if err != nil {
9693					return err
9694				}
9695				pa.AddressRegionAbbreviation = &addressRegionAbbreviation
9696			}
9697		case "text":
9698			if v != nil {
9699				var textVar string
9700				err = json.Unmarshal(*v, &textVar)
9701				if err != nil {
9702					return err
9703				}
9704				pa.Text = &textVar
9705			}
9706		case "name":
9707			if v != nil {
9708				var name string
9709				err = json.Unmarshal(*v, &name)
9710				if err != nil {
9711					return err
9712				}
9713				pa.Name = &name
9714			}
9715		case "url":
9716			if v != nil {
9717				var URL string
9718				err = json.Unmarshal(*v, &URL)
9719				if err != nil {
9720					return err
9721				}
9722				pa.URL = &URL
9723			}
9724		case "image":
9725			if v != nil {
9726				var imageVar ImageObject
9727				err = json.Unmarshal(*v, &imageVar)
9728				if err != nil {
9729					return err
9730				}
9731				pa.Image = &imageVar
9732			}
9733		case "description":
9734			if v != nil {
9735				var description string
9736				err = json.Unmarshal(*v, &description)
9737				if err != nil {
9738					return err
9739				}
9740				pa.Description = &description
9741			}
9742		case "entityPresentationInfo":
9743			if v != nil {
9744				var entityPresentationInfo EntitiesEntityPresentationInfo
9745				err = json.Unmarshal(*v, &entityPresentationInfo)
9746				if err != nil {
9747					return err
9748				}
9749				pa.EntityPresentationInfo = &entityPresentationInfo
9750			}
9751		case "bingId":
9752			if v != nil {
9753				var bingID string
9754				err = json.Unmarshal(*v, &bingID)
9755				if err != nil {
9756					return err
9757				}
9758				pa.BingID = &bingID
9759			}
9760		case "contractualRules":
9761			if v != nil {
9762				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
9763				if err != nil {
9764					return err
9765				}
9766				pa.ContractualRules = &contractualRules
9767			}
9768		case "webSearchUrl":
9769			if v != nil {
9770				var webSearchURL string
9771				err = json.Unmarshal(*v, &webSearchURL)
9772				if err != nil {
9773					return err
9774				}
9775				pa.WebSearchURL = &webSearchURL
9776			}
9777		case "id":
9778			if v != nil {
9779				var ID string
9780				err = json.Unmarshal(*v, &ID)
9781				if err != nil {
9782					return err
9783				}
9784				pa.ID = &ID
9785			}
9786		case "_type":
9787			if v != nil {
9788				var typeVar TypeBasicResponseBase
9789				err = json.Unmarshal(*v, &typeVar)
9790				if err != nil {
9791					return err
9792				}
9793				pa.Type = typeVar
9794			}
9795		}
9796	}
9797
9798	return nil
9799}
9800
9801// QueryContext defines the query context that Bing used for the request.
9802type QueryContext struct {
9803	// OriginalQuery - The query string as specified in the request.
9804	OriginalQuery *string `json:"originalQuery,omitempty"`
9805	// AlteredQuery - READ-ONLY; The query string used by Bing to perform the query. Bing uses the altered query string if the original query string contained spelling mistakes. For example, if the query string is "saling downwind", the altered query string will be "sailing downwind". This field is included only if the original query string contains a spelling mistake.
9806	AlteredQuery *string `json:"alteredQuery,omitempty"`
9807	// AlterationOverrideQuery - READ-ONLY; The query string to use to force Bing to use the original string. For example, if the query string is "saling downwind", the override query string will be "+saling downwind". Remember to encode the query string which results in "%2Bsaling+downwind". This field is included only if the original query string contains a spelling mistake.
9808	AlterationOverrideQuery *string `json:"alterationOverrideQuery,omitempty"`
9809	// AdultIntent - READ-ONLY; A Boolean value that indicates whether the specified query has adult intent. The value is true if the query has adult intent; otherwise, false.
9810	AdultIntent *bool `json:"adultIntent,omitempty"`
9811	// AskUserForLocation - READ-ONLY; A Boolean value that indicates whether Bing requires the user's location to provide accurate results. If you specified the user's location by using the X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this field. For location aware queries, such as "today's weather" or "restaurants near me" that need the user's location to provide accurate results, this field is set to true. For location aware queries that include the location (for example, "Seattle weather"), this field is set to false. This field is also set to false for queries that are not location aware, such as "best sellers".
9812	AskUserForLocation *bool `json:"askUserForLocation,omitempty"`
9813}
9814
9815// BasicResponse defines a response. All schemas that could be returned at the root of a response should inherit from
9816// this
9817type BasicResponse interface {
9818	AsImageObject() (*ImageObject, bool)
9819	AsThing() (*Thing, bool)
9820	AsBasicThing() (BasicThing, bool)
9821	AsEntities() (*Entities, bool)
9822	AsPlaces() (*Places, bool)
9823	AsSearchResponse() (*SearchResponse, bool)
9824	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
9825	AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
9826	AsAnswer() (*Answer, bool)
9827	AsBasicAnswer() (BasicAnswer, bool)
9828	AsErrorResponse() (*ErrorResponse, bool)
9829	AsPostalAddress() (*PostalAddress, bool)
9830	AsPlace() (*Place, bool)
9831	AsBasicPlace() (BasicPlace, bool)
9832	AsOrganization() (*Organization, bool)
9833	AsCreativeWork() (*CreativeWork, bool)
9834	AsBasicCreativeWork() (BasicCreativeWork, bool)
9835	AsIntangible() (*Intangible, bool)
9836	AsBasicIntangible() (BasicIntangible, bool)
9837	AsMovieTheater() (*MovieTheater, bool)
9838	AsMediaObject() (*MediaObject, bool)
9839	AsBasicMediaObject() (BasicMediaObject, bool)
9840	AsCivicStructure() (*CivicStructure, bool)
9841	AsBasicCivicStructure() (BasicCivicStructure, bool)
9842	AsLocalBusiness() (*LocalBusiness, bool)
9843	AsBasicLocalBusiness() (BasicLocalBusiness, bool)
9844	AsTouristAttraction() (*TouristAttraction, bool)
9845	AsAirport() (*Airport, bool)
9846	AsLicense() (*License, bool)
9847	AsStructuredValue() (*StructuredValue, bool)
9848	AsBasicStructuredValue() (BasicStructuredValue, bool)
9849	AsEntertainmentBusiness() (*EntertainmentBusiness, bool)
9850	AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool)
9851	AsFoodEstablishment() (*FoodEstablishment, bool)
9852	AsBasicFoodEstablishment() (BasicFoodEstablishment, bool)
9853	AsLodgingBusiness() (*LodgingBusiness, bool)
9854	AsBasicLodgingBusiness() (BasicLodgingBusiness, bool)
9855	AsRestaurant() (*Restaurant, bool)
9856	AsHotel() (*Hotel, bool)
9857	AsResponse() (*Response, bool)
9858}
9859
9860// Response defines a response. All schemas that could be returned at the root of a response should inherit
9861// from this
9862type Response struct {
9863	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
9864	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
9865	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
9866	WebSearchURL *string `json:"webSearchUrl,omitempty"`
9867	// ID - READ-ONLY; A String identifier.
9868	ID *string `json:"id,omitempty"`
9869	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
9870	Type TypeBasicResponseBase `json:"_type,omitempty"`
9871}
9872
9873func unmarshalBasicResponse(body []byte) (BasicResponse, error) {
9874	var m map[string]interface{}
9875	err := json.Unmarshal(body, &m)
9876	if err != nil {
9877		return nil, err
9878	}
9879
9880	switch m["_type"] {
9881	case string(TypeImageObject):
9882		var ioVar ImageObject
9883		err := json.Unmarshal(body, &ioVar)
9884		return ioVar, err
9885	case string(TypeThing):
9886		var t Thing
9887		err := json.Unmarshal(body, &t)
9888		return t, err
9889	case string(TypeEntities):
9890		var e Entities
9891		err := json.Unmarshal(body, &e)
9892		return e, err
9893	case string(TypePlaces):
9894		var p Places
9895		err := json.Unmarshal(body, &p)
9896		return p, err
9897	case string(TypeSearchResponse):
9898		var sr SearchResponse
9899		err := json.Unmarshal(body, &sr)
9900		return sr, err
9901	case string(TypeSearchResultsAnswer):
9902		var sra SearchResultsAnswer
9903		err := json.Unmarshal(body, &sra)
9904		return sra, err
9905	case string(TypeAnswer):
9906		var a Answer
9907		err := json.Unmarshal(body, &a)
9908		return a, err
9909	case string(TypeErrorResponse):
9910		var er ErrorResponse
9911		err := json.Unmarshal(body, &er)
9912		return er, err
9913	case string(TypePostalAddress):
9914		var pa PostalAddress
9915		err := json.Unmarshal(body, &pa)
9916		return pa, err
9917	case string(TypePlace):
9918		var p Place
9919		err := json.Unmarshal(body, &p)
9920		return p, err
9921	case string(TypeOrganization):
9922		var o Organization
9923		err := json.Unmarshal(body, &o)
9924		return o, err
9925	case string(TypeCreativeWork):
9926		var cw CreativeWork
9927		err := json.Unmarshal(body, &cw)
9928		return cw, err
9929	case string(TypeIntangible):
9930		var i Intangible
9931		err := json.Unmarshal(body, &i)
9932		return i, err
9933	case string(TypeMovieTheater):
9934		var mt MovieTheater
9935		err := json.Unmarshal(body, &mt)
9936		return mt, err
9937	case string(TypeMediaObject):
9938		var mo MediaObject
9939		err := json.Unmarshal(body, &mo)
9940		return mo, err
9941	case string(TypeCivicStructure):
9942		var cs CivicStructure
9943		err := json.Unmarshal(body, &cs)
9944		return cs, err
9945	case string(TypeLocalBusiness):
9946		var lb LocalBusiness
9947		err := json.Unmarshal(body, &lb)
9948		return lb, err
9949	case string(TypeTouristAttraction):
9950		var ta TouristAttraction
9951		err := json.Unmarshal(body, &ta)
9952		return ta, err
9953	case string(TypeAirport):
9954		var a Airport
9955		err := json.Unmarshal(body, &a)
9956		return a, err
9957	case string(TypeLicense):
9958		var l License
9959		err := json.Unmarshal(body, &l)
9960		return l, err
9961	case string(TypeStructuredValue):
9962		var sv StructuredValue
9963		err := json.Unmarshal(body, &sv)
9964		return sv, err
9965	case string(TypeEntertainmentBusiness):
9966		var eb EntertainmentBusiness
9967		err := json.Unmarshal(body, &eb)
9968		return eb, err
9969	case string(TypeFoodEstablishment):
9970		var fe FoodEstablishment
9971		err := json.Unmarshal(body, &fe)
9972		return fe, err
9973	case string(TypeLodgingBusiness):
9974		var lb LodgingBusiness
9975		err := json.Unmarshal(body, &lb)
9976		return lb, err
9977	case string(TypeRestaurant):
9978		var r Restaurant
9979		err := json.Unmarshal(body, &r)
9980		return r, err
9981	case string(TypeHotel):
9982		var h Hotel
9983		err := json.Unmarshal(body, &h)
9984		return h, err
9985	default:
9986		var r Response
9987		err := json.Unmarshal(body, &r)
9988		return r, err
9989	}
9990}
9991func unmarshalBasicResponseArray(body []byte) ([]BasicResponse, error) {
9992	var rawMessages []*json.RawMessage
9993	err := json.Unmarshal(body, &rawMessages)
9994	if err != nil {
9995		return nil, err
9996	}
9997
9998	rArray := make([]BasicResponse, len(rawMessages))
9999
10000	for index, rawMessage := range rawMessages {
10001		r, err := unmarshalBasicResponse(*rawMessage)
10002		if err != nil {
10003			return nil, err
10004		}
10005		rArray[index] = r
10006	}
10007	return rArray, nil
10008}
10009
10010// MarshalJSON is the custom marshaler for Response.
10011func (r Response) MarshalJSON() ([]byte, error) {
10012	r.Type = TypeResponse
10013	objectMap := make(map[string]interface{})
10014	if r.Type != "" {
10015		objectMap["_type"] = r.Type
10016	}
10017	return json.Marshal(objectMap)
10018}
10019
10020// AsImageObject is the BasicResponseBase implementation for Response.
10021func (r Response) AsImageObject() (*ImageObject, bool) {
10022	return nil, false
10023}
10024
10025// AsThing is the BasicResponseBase implementation for Response.
10026func (r Response) AsThing() (*Thing, bool) {
10027	return nil, false
10028}
10029
10030// AsBasicThing is the BasicResponseBase implementation for Response.
10031func (r Response) AsBasicThing() (BasicThing, bool) {
10032	return nil, false
10033}
10034
10035// AsEntities is the BasicResponseBase implementation for Response.
10036func (r Response) AsEntities() (*Entities, bool) {
10037	return nil, false
10038}
10039
10040// AsPlaces is the BasicResponseBase implementation for Response.
10041func (r Response) AsPlaces() (*Places, bool) {
10042	return nil, false
10043}
10044
10045// AsSearchResponse is the BasicResponseBase implementation for Response.
10046func (r Response) AsSearchResponse() (*SearchResponse, bool) {
10047	return nil, false
10048}
10049
10050// AsResponse is the BasicResponseBase implementation for Response.
10051func (r Response) AsResponse() (*Response, bool) {
10052	return &r, true
10053}
10054
10055// AsBasicResponse is the BasicResponseBase implementation for Response.
10056func (r Response) AsBasicResponse() (BasicResponse, bool) {
10057	return &r, true
10058}
10059
10060// AsSearchResultsAnswer is the BasicResponseBase implementation for Response.
10061func (r Response) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
10062	return nil, false
10063}
10064
10065// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Response.
10066func (r Response) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
10067	return nil, false
10068}
10069
10070// AsIdentifiable is the BasicResponseBase implementation for Response.
10071func (r Response) AsIdentifiable() (*Identifiable, bool) {
10072	return nil, false
10073}
10074
10075// AsBasicIdentifiable is the BasicResponseBase implementation for Response.
10076func (r Response) AsBasicIdentifiable() (BasicIdentifiable, bool) {
10077	return &r, true
10078}
10079
10080// AsAnswer is the BasicResponseBase implementation for Response.
10081func (r Response) AsAnswer() (*Answer, bool) {
10082	return nil, false
10083}
10084
10085// AsBasicAnswer is the BasicResponseBase implementation for Response.
10086func (r Response) AsBasicAnswer() (BasicAnswer, bool) {
10087	return nil, false
10088}
10089
10090// AsErrorResponse is the BasicResponseBase implementation for Response.
10091func (r Response) AsErrorResponse() (*ErrorResponse, bool) {
10092	return nil, false
10093}
10094
10095// AsPostalAddress is the BasicResponseBase implementation for Response.
10096func (r Response) AsPostalAddress() (*PostalAddress, bool) {
10097	return nil, false
10098}
10099
10100// AsPlace is the BasicResponseBase implementation for Response.
10101func (r Response) AsPlace() (*Place, bool) {
10102	return nil, false
10103}
10104
10105// AsBasicPlace is the BasicResponseBase implementation for Response.
10106func (r Response) AsBasicPlace() (BasicPlace, bool) {
10107	return nil, false
10108}
10109
10110// AsOrganization is the BasicResponseBase implementation for Response.
10111func (r Response) AsOrganization() (*Organization, bool) {
10112	return nil, false
10113}
10114
10115// AsCreativeWork is the BasicResponseBase implementation for Response.
10116func (r Response) AsCreativeWork() (*CreativeWork, bool) {
10117	return nil, false
10118}
10119
10120// AsBasicCreativeWork is the BasicResponseBase implementation for Response.
10121func (r Response) AsBasicCreativeWork() (BasicCreativeWork, bool) {
10122	return nil, false
10123}
10124
10125// AsIntangible is the BasicResponseBase implementation for Response.
10126func (r Response) AsIntangible() (*Intangible, bool) {
10127	return nil, false
10128}
10129
10130// AsBasicIntangible is the BasicResponseBase implementation for Response.
10131func (r Response) AsBasicIntangible() (BasicIntangible, bool) {
10132	return nil, false
10133}
10134
10135// AsMovieTheater is the BasicResponseBase implementation for Response.
10136func (r Response) AsMovieTheater() (*MovieTheater, bool) {
10137	return nil, false
10138}
10139
10140// AsMediaObject is the BasicResponseBase implementation for Response.
10141func (r Response) AsMediaObject() (*MediaObject, bool) {
10142	return nil, false
10143}
10144
10145// AsBasicMediaObject is the BasicResponseBase implementation for Response.
10146func (r Response) AsBasicMediaObject() (BasicMediaObject, bool) {
10147	return nil, false
10148}
10149
10150// AsCivicStructure is the BasicResponseBase implementation for Response.
10151func (r Response) AsCivicStructure() (*CivicStructure, bool) {
10152	return nil, false
10153}
10154
10155// AsBasicCivicStructure is the BasicResponseBase implementation for Response.
10156func (r Response) AsBasicCivicStructure() (BasicCivicStructure, bool) {
10157	return nil, false
10158}
10159
10160// AsLocalBusiness is the BasicResponseBase implementation for Response.
10161func (r Response) AsLocalBusiness() (*LocalBusiness, bool) {
10162	return nil, false
10163}
10164
10165// AsBasicLocalBusiness is the BasicResponseBase implementation for Response.
10166func (r Response) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
10167	return nil, false
10168}
10169
10170// AsTouristAttraction is the BasicResponseBase implementation for Response.
10171func (r Response) AsTouristAttraction() (*TouristAttraction, bool) {
10172	return nil, false
10173}
10174
10175// AsAirport is the BasicResponseBase implementation for Response.
10176func (r Response) AsAirport() (*Airport, bool) {
10177	return nil, false
10178}
10179
10180// AsLicense is the BasicResponseBase implementation for Response.
10181func (r Response) AsLicense() (*License, bool) {
10182	return nil, false
10183}
10184
10185// AsStructuredValue is the BasicResponseBase implementation for Response.
10186func (r Response) AsStructuredValue() (*StructuredValue, bool) {
10187	return nil, false
10188}
10189
10190// AsBasicStructuredValue is the BasicResponseBase implementation for Response.
10191func (r Response) AsBasicStructuredValue() (BasicStructuredValue, bool) {
10192	return nil, false
10193}
10194
10195// AsEntertainmentBusiness is the BasicResponseBase implementation for Response.
10196func (r Response) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
10197	return nil, false
10198}
10199
10200// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Response.
10201func (r Response) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
10202	return nil, false
10203}
10204
10205// AsFoodEstablishment is the BasicResponseBase implementation for Response.
10206func (r Response) AsFoodEstablishment() (*FoodEstablishment, bool) {
10207	return nil, false
10208}
10209
10210// AsBasicFoodEstablishment is the BasicResponseBase implementation for Response.
10211func (r Response) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
10212	return nil, false
10213}
10214
10215// AsLodgingBusiness is the BasicResponseBase implementation for Response.
10216func (r Response) AsLodgingBusiness() (*LodgingBusiness, bool) {
10217	return nil, false
10218}
10219
10220// AsBasicLodgingBusiness is the BasicResponseBase implementation for Response.
10221func (r Response) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
10222	return nil, false
10223}
10224
10225// AsRestaurant is the BasicResponseBase implementation for Response.
10226func (r Response) AsRestaurant() (*Restaurant, bool) {
10227	return nil, false
10228}
10229
10230// AsHotel is the BasicResponseBase implementation for Response.
10231func (r Response) AsHotel() (*Hotel, bool) {
10232	return nil, false
10233}
10234
10235// AsResponseBase is the BasicResponseBase implementation for Response.
10236func (r Response) AsResponseBase() (*ResponseBase, bool) {
10237	return nil, false
10238}
10239
10240// AsBasicResponseBase is the BasicResponseBase implementation for Response.
10241func (r Response) AsBasicResponseBase() (BasicResponseBase, bool) {
10242	return &r, true
10243}
10244
10245// UnmarshalJSON is the custom unmarshaler for Response struct.
10246func (r *Response) UnmarshalJSON(body []byte) error {
10247	var m map[string]*json.RawMessage
10248	err := json.Unmarshal(body, &m)
10249	if err != nil {
10250		return err
10251	}
10252	for k, v := range m {
10253		switch k {
10254		case "contractualRules":
10255			if v != nil {
10256				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
10257				if err != nil {
10258					return err
10259				}
10260				r.ContractualRules = &contractualRules
10261			}
10262		case "webSearchUrl":
10263			if v != nil {
10264				var webSearchURL string
10265				err = json.Unmarshal(*v, &webSearchURL)
10266				if err != nil {
10267					return err
10268				}
10269				r.WebSearchURL = &webSearchURL
10270			}
10271		case "id":
10272			if v != nil {
10273				var ID string
10274				err = json.Unmarshal(*v, &ID)
10275				if err != nil {
10276					return err
10277				}
10278				r.ID = &ID
10279			}
10280		case "_type":
10281			if v != nil {
10282				var typeVar TypeBasicResponseBase
10283				err = json.Unmarshal(*v, &typeVar)
10284				if err != nil {
10285					return err
10286				}
10287				r.Type = typeVar
10288			}
10289		}
10290	}
10291
10292	return nil
10293}
10294
10295// BasicResponseBase ...
10296type BasicResponseBase interface {
10297	AsImageObject() (*ImageObject, bool)
10298	AsThing() (*Thing, bool)
10299	AsBasicThing() (BasicThing, bool)
10300	AsEntities() (*Entities, bool)
10301	AsPlaces() (*Places, bool)
10302	AsSearchResponse() (*SearchResponse, bool)
10303	AsResponse() (*Response, bool)
10304	AsBasicResponse() (BasicResponse, bool)
10305	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
10306	AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool)
10307	AsIdentifiable() (*Identifiable, bool)
10308	AsBasicIdentifiable() (BasicIdentifiable, bool)
10309	AsAnswer() (*Answer, bool)
10310	AsBasicAnswer() (BasicAnswer, bool)
10311	AsErrorResponse() (*ErrorResponse, bool)
10312	AsPostalAddress() (*PostalAddress, bool)
10313	AsPlace() (*Place, bool)
10314	AsBasicPlace() (BasicPlace, bool)
10315	AsOrganization() (*Organization, bool)
10316	AsCreativeWork() (*CreativeWork, bool)
10317	AsBasicCreativeWork() (BasicCreativeWork, bool)
10318	AsIntangible() (*Intangible, bool)
10319	AsBasicIntangible() (BasicIntangible, bool)
10320	AsMovieTheater() (*MovieTheater, bool)
10321	AsMediaObject() (*MediaObject, bool)
10322	AsBasicMediaObject() (BasicMediaObject, bool)
10323	AsCivicStructure() (*CivicStructure, bool)
10324	AsBasicCivicStructure() (BasicCivicStructure, bool)
10325	AsLocalBusiness() (*LocalBusiness, bool)
10326	AsBasicLocalBusiness() (BasicLocalBusiness, bool)
10327	AsTouristAttraction() (*TouristAttraction, bool)
10328	AsAirport() (*Airport, bool)
10329	AsLicense() (*License, bool)
10330	AsStructuredValue() (*StructuredValue, bool)
10331	AsBasicStructuredValue() (BasicStructuredValue, bool)
10332	AsEntertainmentBusiness() (*EntertainmentBusiness, bool)
10333	AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool)
10334	AsFoodEstablishment() (*FoodEstablishment, bool)
10335	AsBasicFoodEstablishment() (BasicFoodEstablishment, bool)
10336	AsLodgingBusiness() (*LodgingBusiness, bool)
10337	AsBasicLodgingBusiness() (BasicLodgingBusiness, bool)
10338	AsRestaurant() (*Restaurant, bool)
10339	AsHotel() (*Hotel, bool)
10340	AsResponseBase() (*ResponseBase, bool)
10341}
10342
10343// ResponseBase ...
10344type ResponseBase struct {
10345	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
10346	Type TypeBasicResponseBase `json:"_type,omitempty"`
10347}
10348
10349func unmarshalBasicResponseBase(body []byte) (BasicResponseBase, error) {
10350	var m map[string]interface{}
10351	err := json.Unmarshal(body, &m)
10352	if err != nil {
10353		return nil, err
10354	}
10355
10356	switch m["_type"] {
10357	case string(TypeImageObject):
10358		var ioVar ImageObject
10359		err := json.Unmarshal(body, &ioVar)
10360		return ioVar, err
10361	case string(TypeThing):
10362		var t Thing
10363		err := json.Unmarshal(body, &t)
10364		return t, err
10365	case string(TypeEntities):
10366		var e Entities
10367		err := json.Unmarshal(body, &e)
10368		return e, err
10369	case string(TypePlaces):
10370		var p Places
10371		err := json.Unmarshal(body, &p)
10372		return p, err
10373	case string(TypeSearchResponse):
10374		var sr SearchResponse
10375		err := json.Unmarshal(body, &sr)
10376		return sr, err
10377	case string(TypeResponse):
10378		var r Response
10379		err := json.Unmarshal(body, &r)
10380		return r, err
10381	case string(TypeSearchResultsAnswer):
10382		var sra SearchResultsAnswer
10383		err := json.Unmarshal(body, &sra)
10384		return sra, err
10385	case string(TypeIdentifiable):
10386		var i Identifiable
10387		err := json.Unmarshal(body, &i)
10388		return i, err
10389	case string(TypeAnswer):
10390		var a Answer
10391		err := json.Unmarshal(body, &a)
10392		return a, err
10393	case string(TypeErrorResponse):
10394		var er ErrorResponse
10395		err := json.Unmarshal(body, &er)
10396		return er, err
10397	case string(TypePostalAddress):
10398		var pa PostalAddress
10399		err := json.Unmarshal(body, &pa)
10400		return pa, err
10401	case string(TypePlace):
10402		var p Place
10403		err := json.Unmarshal(body, &p)
10404		return p, err
10405	case string(TypeOrganization):
10406		var o Organization
10407		err := json.Unmarshal(body, &o)
10408		return o, err
10409	case string(TypeCreativeWork):
10410		var cw CreativeWork
10411		err := json.Unmarshal(body, &cw)
10412		return cw, err
10413	case string(TypeIntangible):
10414		var i Intangible
10415		err := json.Unmarshal(body, &i)
10416		return i, err
10417	case string(TypeMovieTheater):
10418		var mt MovieTheater
10419		err := json.Unmarshal(body, &mt)
10420		return mt, err
10421	case string(TypeMediaObject):
10422		var mo MediaObject
10423		err := json.Unmarshal(body, &mo)
10424		return mo, err
10425	case string(TypeCivicStructure):
10426		var cs CivicStructure
10427		err := json.Unmarshal(body, &cs)
10428		return cs, err
10429	case string(TypeLocalBusiness):
10430		var lb LocalBusiness
10431		err := json.Unmarshal(body, &lb)
10432		return lb, err
10433	case string(TypeTouristAttraction):
10434		var ta TouristAttraction
10435		err := json.Unmarshal(body, &ta)
10436		return ta, err
10437	case string(TypeAirport):
10438		var a Airport
10439		err := json.Unmarshal(body, &a)
10440		return a, err
10441	case string(TypeLicense):
10442		var l License
10443		err := json.Unmarshal(body, &l)
10444		return l, err
10445	case string(TypeStructuredValue):
10446		var sv StructuredValue
10447		err := json.Unmarshal(body, &sv)
10448		return sv, err
10449	case string(TypeEntertainmentBusiness):
10450		var eb EntertainmentBusiness
10451		err := json.Unmarshal(body, &eb)
10452		return eb, err
10453	case string(TypeFoodEstablishment):
10454		var fe FoodEstablishment
10455		err := json.Unmarshal(body, &fe)
10456		return fe, err
10457	case string(TypeLodgingBusiness):
10458		var lb LodgingBusiness
10459		err := json.Unmarshal(body, &lb)
10460		return lb, err
10461	case string(TypeRestaurant):
10462		var r Restaurant
10463		err := json.Unmarshal(body, &r)
10464		return r, err
10465	case string(TypeHotel):
10466		var h Hotel
10467		err := json.Unmarshal(body, &h)
10468		return h, err
10469	default:
10470		var rb ResponseBase
10471		err := json.Unmarshal(body, &rb)
10472		return rb, err
10473	}
10474}
10475func unmarshalBasicResponseBaseArray(body []byte) ([]BasicResponseBase, error) {
10476	var rawMessages []*json.RawMessage
10477	err := json.Unmarshal(body, &rawMessages)
10478	if err != nil {
10479		return nil, err
10480	}
10481
10482	rbArray := make([]BasicResponseBase, len(rawMessages))
10483
10484	for index, rawMessage := range rawMessages {
10485		rb, err := unmarshalBasicResponseBase(*rawMessage)
10486		if err != nil {
10487			return nil, err
10488		}
10489		rbArray[index] = rb
10490	}
10491	return rbArray, nil
10492}
10493
10494// MarshalJSON is the custom marshaler for ResponseBase.
10495func (rb ResponseBase) MarshalJSON() ([]byte, error) {
10496	rb.Type = TypeResponseBase
10497	objectMap := make(map[string]interface{})
10498	if rb.Type != "" {
10499		objectMap["_type"] = rb.Type
10500	}
10501	return json.Marshal(objectMap)
10502}
10503
10504// AsImageObject is the BasicResponseBase implementation for ResponseBase.
10505func (rb ResponseBase) AsImageObject() (*ImageObject, bool) {
10506	return nil, false
10507}
10508
10509// AsThing is the BasicResponseBase implementation for ResponseBase.
10510func (rb ResponseBase) AsThing() (*Thing, bool) {
10511	return nil, false
10512}
10513
10514// AsBasicThing is the BasicResponseBase implementation for ResponseBase.
10515func (rb ResponseBase) AsBasicThing() (BasicThing, bool) {
10516	return nil, false
10517}
10518
10519// AsEntities is the BasicResponseBase implementation for ResponseBase.
10520func (rb ResponseBase) AsEntities() (*Entities, bool) {
10521	return nil, false
10522}
10523
10524// AsPlaces is the BasicResponseBase implementation for ResponseBase.
10525func (rb ResponseBase) AsPlaces() (*Places, bool) {
10526	return nil, false
10527}
10528
10529// AsSearchResponse is the BasicResponseBase implementation for ResponseBase.
10530func (rb ResponseBase) AsSearchResponse() (*SearchResponse, bool) {
10531	return nil, false
10532}
10533
10534// AsResponse is the BasicResponseBase implementation for ResponseBase.
10535func (rb ResponseBase) AsResponse() (*Response, bool) {
10536	return nil, false
10537}
10538
10539// AsBasicResponse is the BasicResponseBase implementation for ResponseBase.
10540func (rb ResponseBase) AsBasicResponse() (BasicResponse, bool) {
10541	return nil, false
10542}
10543
10544// AsSearchResultsAnswer is the BasicResponseBase implementation for ResponseBase.
10545func (rb ResponseBase) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
10546	return nil, false
10547}
10548
10549// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for ResponseBase.
10550func (rb ResponseBase) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
10551	return nil, false
10552}
10553
10554// AsIdentifiable is the BasicResponseBase implementation for ResponseBase.
10555func (rb ResponseBase) AsIdentifiable() (*Identifiable, bool) {
10556	return nil, false
10557}
10558
10559// AsBasicIdentifiable is the BasicResponseBase implementation for ResponseBase.
10560func (rb ResponseBase) AsBasicIdentifiable() (BasicIdentifiable, bool) {
10561	return nil, false
10562}
10563
10564// AsAnswer is the BasicResponseBase implementation for ResponseBase.
10565func (rb ResponseBase) AsAnswer() (*Answer, bool) {
10566	return nil, false
10567}
10568
10569// AsBasicAnswer is the BasicResponseBase implementation for ResponseBase.
10570func (rb ResponseBase) AsBasicAnswer() (BasicAnswer, bool) {
10571	return nil, false
10572}
10573
10574// AsErrorResponse is the BasicResponseBase implementation for ResponseBase.
10575func (rb ResponseBase) AsErrorResponse() (*ErrorResponse, bool) {
10576	return nil, false
10577}
10578
10579// AsPostalAddress is the BasicResponseBase implementation for ResponseBase.
10580func (rb ResponseBase) AsPostalAddress() (*PostalAddress, bool) {
10581	return nil, false
10582}
10583
10584// AsPlace is the BasicResponseBase implementation for ResponseBase.
10585func (rb ResponseBase) AsPlace() (*Place, bool) {
10586	return nil, false
10587}
10588
10589// AsBasicPlace is the BasicResponseBase implementation for ResponseBase.
10590func (rb ResponseBase) AsBasicPlace() (BasicPlace, bool) {
10591	return nil, false
10592}
10593
10594// AsOrganization is the BasicResponseBase implementation for ResponseBase.
10595func (rb ResponseBase) AsOrganization() (*Organization, bool) {
10596	return nil, false
10597}
10598
10599// AsCreativeWork is the BasicResponseBase implementation for ResponseBase.
10600func (rb ResponseBase) AsCreativeWork() (*CreativeWork, bool) {
10601	return nil, false
10602}
10603
10604// AsBasicCreativeWork is the BasicResponseBase implementation for ResponseBase.
10605func (rb ResponseBase) AsBasicCreativeWork() (BasicCreativeWork, bool) {
10606	return nil, false
10607}
10608
10609// AsIntangible is the BasicResponseBase implementation for ResponseBase.
10610func (rb ResponseBase) AsIntangible() (*Intangible, bool) {
10611	return nil, false
10612}
10613
10614// AsBasicIntangible is the BasicResponseBase implementation for ResponseBase.
10615func (rb ResponseBase) AsBasicIntangible() (BasicIntangible, bool) {
10616	return nil, false
10617}
10618
10619// AsMovieTheater is the BasicResponseBase implementation for ResponseBase.
10620func (rb ResponseBase) AsMovieTheater() (*MovieTheater, bool) {
10621	return nil, false
10622}
10623
10624// AsMediaObject is the BasicResponseBase implementation for ResponseBase.
10625func (rb ResponseBase) AsMediaObject() (*MediaObject, bool) {
10626	return nil, false
10627}
10628
10629// AsBasicMediaObject is the BasicResponseBase implementation for ResponseBase.
10630func (rb ResponseBase) AsBasicMediaObject() (BasicMediaObject, bool) {
10631	return nil, false
10632}
10633
10634// AsCivicStructure is the BasicResponseBase implementation for ResponseBase.
10635func (rb ResponseBase) AsCivicStructure() (*CivicStructure, bool) {
10636	return nil, false
10637}
10638
10639// AsBasicCivicStructure is the BasicResponseBase implementation for ResponseBase.
10640func (rb ResponseBase) AsBasicCivicStructure() (BasicCivicStructure, bool) {
10641	return nil, false
10642}
10643
10644// AsLocalBusiness is the BasicResponseBase implementation for ResponseBase.
10645func (rb ResponseBase) AsLocalBusiness() (*LocalBusiness, bool) {
10646	return nil, false
10647}
10648
10649// AsBasicLocalBusiness is the BasicResponseBase implementation for ResponseBase.
10650func (rb ResponseBase) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
10651	return nil, false
10652}
10653
10654// AsTouristAttraction is the BasicResponseBase implementation for ResponseBase.
10655func (rb ResponseBase) AsTouristAttraction() (*TouristAttraction, bool) {
10656	return nil, false
10657}
10658
10659// AsAirport is the BasicResponseBase implementation for ResponseBase.
10660func (rb ResponseBase) AsAirport() (*Airport, bool) {
10661	return nil, false
10662}
10663
10664// AsLicense is the BasicResponseBase implementation for ResponseBase.
10665func (rb ResponseBase) AsLicense() (*License, bool) {
10666	return nil, false
10667}
10668
10669// AsStructuredValue is the BasicResponseBase implementation for ResponseBase.
10670func (rb ResponseBase) AsStructuredValue() (*StructuredValue, bool) {
10671	return nil, false
10672}
10673
10674// AsBasicStructuredValue is the BasicResponseBase implementation for ResponseBase.
10675func (rb ResponseBase) AsBasicStructuredValue() (BasicStructuredValue, bool) {
10676	return nil, false
10677}
10678
10679// AsEntertainmentBusiness is the BasicResponseBase implementation for ResponseBase.
10680func (rb ResponseBase) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
10681	return nil, false
10682}
10683
10684// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for ResponseBase.
10685func (rb ResponseBase) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
10686	return nil, false
10687}
10688
10689// AsFoodEstablishment is the BasicResponseBase implementation for ResponseBase.
10690func (rb ResponseBase) AsFoodEstablishment() (*FoodEstablishment, bool) {
10691	return nil, false
10692}
10693
10694// AsBasicFoodEstablishment is the BasicResponseBase implementation for ResponseBase.
10695func (rb ResponseBase) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
10696	return nil, false
10697}
10698
10699// AsLodgingBusiness is the BasicResponseBase implementation for ResponseBase.
10700func (rb ResponseBase) AsLodgingBusiness() (*LodgingBusiness, bool) {
10701	return nil, false
10702}
10703
10704// AsBasicLodgingBusiness is the BasicResponseBase implementation for ResponseBase.
10705func (rb ResponseBase) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
10706	return nil, false
10707}
10708
10709// AsRestaurant is the BasicResponseBase implementation for ResponseBase.
10710func (rb ResponseBase) AsRestaurant() (*Restaurant, bool) {
10711	return nil, false
10712}
10713
10714// AsHotel is the BasicResponseBase implementation for ResponseBase.
10715func (rb ResponseBase) AsHotel() (*Hotel, bool) {
10716	return nil, false
10717}
10718
10719// AsResponseBase is the BasicResponseBase implementation for ResponseBase.
10720func (rb ResponseBase) AsResponseBase() (*ResponseBase, bool) {
10721	return &rb, true
10722}
10723
10724// AsBasicResponseBase is the BasicResponseBase implementation for ResponseBase.
10725func (rb ResponseBase) AsBasicResponseBase() (BasicResponseBase, bool) {
10726	return &rb, true
10727}
10728
10729// Restaurant ...
10730type Restaurant struct {
10731	// AcceptsReservations - READ-ONLY
10732	AcceptsReservations *bool `json:"acceptsReservations,omitempty"`
10733	// ReservationURL - READ-ONLY
10734	ReservationURL *string `json:"reservationUrl,omitempty"`
10735	// ServesCuisine - READ-ONLY
10736	ServesCuisine *[]string `json:"servesCuisine,omitempty"`
10737	// MenuURL - READ-ONLY
10738	MenuURL *string `json:"menuUrl,omitempty"`
10739	// PriceRange - READ-ONLY; $$.
10740	PriceRange *string `json:"priceRange,omitempty"`
10741	// Panoramas - READ-ONLY
10742	Panoramas *[]ImageObject `json:"panoramas,omitempty"`
10743	// IsPermanentlyClosed - READ-ONLY
10744	IsPermanentlyClosed *bool `json:"isPermanentlyClosed,omitempty"`
10745	// TagLine - READ-ONLY
10746	TagLine *string `json:"tagLine,omitempty"`
10747	// Address - READ-ONLY; The postal address of where the entity is located
10748	Address *PostalAddress `json:"address,omitempty"`
10749	// Telephone - READ-ONLY; The entity's telephone number
10750	Telephone *string `json:"telephone,omitempty"`
10751	// Name - READ-ONLY; The name of the thing represented by this object.
10752	Name *string `json:"name,omitempty"`
10753	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
10754	URL *string `json:"url,omitempty"`
10755	// Image - READ-ONLY
10756	Image *ImageObject `json:"image,omitempty"`
10757	// Description - READ-ONLY; A short description of the item.
10758	Description *string `json:"description,omitempty"`
10759	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
10760	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
10761	// BingID - READ-ONLY; An ID that uniquely identifies this item.
10762	BingID *string `json:"bingId,omitempty"`
10763	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
10764	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
10765	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
10766	WebSearchURL *string `json:"webSearchUrl,omitempty"`
10767	// ID - READ-ONLY; A String identifier.
10768	ID *string `json:"id,omitempty"`
10769	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
10770	Type TypeBasicResponseBase `json:"_type,omitempty"`
10771}
10772
10773// MarshalJSON is the custom marshaler for Restaurant.
10774func (r Restaurant) MarshalJSON() ([]byte, error) {
10775	r.Type = TypeRestaurant
10776	objectMap := make(map[string]interface{})
10777	if r.Type != "" {
10778		objectMap["_type"] = r.Type
10779	}
10780	return json.Marshal(objectMap)
10781}
10782
10783// AsImageObject is the BasicResponseBase implementation for Restaurant.
10784func (r Restaurant) AsImageObject() (*ImageObject, bool) {
10785	return nil, false
10786}
10787
10788// AsThing is the BasicResponseBase implementation for Restaurant.
10789func (r Restaurant) AsThing() (*Thing, bool) {
10790	return nil, false
10791}
10792
10793// AsBasicThing is the BasicResponseBase implementation for Restaurant.
10794func (r Restaurant) AsBasicThing() (BasicThing, bool) {
10795	return &r, true
10796}
10797
10798// AsEntities is the BasicResponseBase implementation for Restaurant.
10799func (r Restaurant) AsEntities() (*Entities, bool) {
10800	return nil, false
10801}
10802
10803// AsPlaces is the BasicResponseBase implementation for Restaurant.
10804func (r Restaurant) AsPlaces() (*Places, bool) {
10805	return nil, false
10806}
10807
10808// AsSearchResponse is the BasicResponseBase implementation for Restaurant.
10809func (r Restaurant) AsSearchResponse() (*SearchResponse, bool) {
10810	return nil, false
10811}
10812
10813// AsResponse is the BasicResponseBase implementation for Restaurant.
10814func (r Restaurant) AsResponse() (*Response, bool) {
10815	return nil, false
10816}
10817
10818// AsBasicResponse is the BasicResponseBase implementation for Restaurant.
10819func (r Restaurant) AsBasicResponse() (BasicResponse, bool) {
10820	return &r, true
10821}
10822
10823// AsSearchResultsAnswer is the BasicResponseBase implementation for Restaurant.
10824func (r Restaurant) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
10825	return nil, false
10826}
10827
10828// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Restaurant.
10829func (r Restaurant) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
10830	return nil, false
10831}
10832
10833// AsIdentifiable is the BasicResponseBase implementation for Restaurant.
10834func (r Restaurant) AsIdentifiable() (*Identifiable, bool) {
10835	return nil, false
10836}
10837
10838// AsBasicIdentifiable is the BasicResponseBase implementation for Restaurant.
10839func (r Restaurant) AsBasicIdentifiable() (BasicIdentifiable, bool) {
10840	return &r, true
10841}
10842
10843// AsAnswer is the BasicResponseBase implementation for Restaurant.
10844func (r Restaurant) AsAnswer() (*Answer, bool) {
10845	return nil, false
10846}
10847
10848// AsBasicAnswer is the BasicResponseBase implementation for Restaurant.
10849func (r Restaurant) AsBasicAnswer() (BasicAnswer, bool) {
10850	return nil, false
10851}
10852
10853// AsErrorResponse is the BasicResponseBase implementation for Restaurant.
10854func (r Restaurant) AsErrorResponse() (*ErrorResponse, bool) {
10855	return nil, false
10856}
10857
10858// AsPostalAddress is the BasicResponseBase implementation for Restaurant.
10859func (r Restaurant) AsPostalAddress() (*PostalAddress, bool) {
10860	return nil, false
10861}
10862
10863// AsPlace is the BasicResponseBase implementation for Restaurant.
10864func (r Restaurant) AsPlace() (*Place, bool) {
10865	return nil, false
10866}
10867
10868// AsBasicPlace is the BasicResponseBase implementation for Restaurant.
10869func (r Restaurant) AsBasicPlace() (BasicPlace, bool) {
10870	return &r, true
10871}
10872
10873// AsOrganization is the BasicResponseBase implementation for Restaurant.
10874func (r Restaurant) AsOrganization() (*Organization, bool) {
10875	return nil, false
10876}
10877
10878// AsCreativeWork is the BasicResponseBase implementation for Restaurant.
10879func (r Restaurant) AsCreativeWork() (*CreativeWork, bool) {
10880	return nil, false
10881}
10882
10883// AsBasicCreativeWork is the BasicResponseBase implementation for Restaurant.
10884func (r Restaurant) AsBasicCreativeWork() (BasicCreativeWork, bool) {
10885	return nil, false
10886}
10887
10888// AsIntangible is the BasicResponseBase implementation for Restaurant.
10889func (r Restaurant) AsIntangible() (*Intangible, bool) {
10890	return nil, false
10891}
10892
10893// AsBasicIntangible is the BasicResponseBase implementation for Restaurant.
10894func (r Restaurant) AsBasicIntangible() (BasicIntangible, bool) {
10895	return nil, false
10896}
10897
10898// AsMovieTheater is the BasicResponseBase implementation for Restaurant.
10899func (r Restaurant) AsMovieTheater() (*MovieTheater, bool) {
10900	return nil, false
10901}
10902
10903// AsMediaObject is the BasicResponseBase implementation for Restaurant.
10904func (r Restaurant) AsMediaObject() (*MediaObject, bool) {
10905	return nil, false
10906}
10907
10908// AsBasicMediaObject is the BasicResponseBase implementation for Restaurant.
10909func (r Restaurant) AsBasicMediaObject() (BasicMediaObject, bool) {
10910	return nil, false
10911}
10912
10913// AsCivicStructure is the BasicResponseBase implementation for Restaurant.
10914func (r Restaurant) AsCivicStructure() (*CivicStructure, bool) {
10915	return nil, false
10916}
10917
10918// AsBasicCivicStructure is the BasicResponseBase implementation for Restaurant.
10919func (r Restaurant) AsBasicCivicStructure() (BasicCivicStructure, bool) {
10920	return nil, false
10921}
10922
10923// AsLocalBusiness is the BasicResponseBase implementation for Restaurant.
10924func (r Restaurant) AsLocalBusiness() (*LocalBusiness, bool) {
10925	return nil, false
10926}
10927
10928// AsBasicLocalBusiness is the BasicResponseBase implementation for Restaurant.
10929func (r Restaurant) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
10930	return &r, true
10931}
10932
10933// AsTouristAttraction is the BasicResponseBase implementation for Restaurant.
10934func (r Restaurant) AsTouristAttraction() (*TouristAttraction, bool) {
10935	return nil, false
10936}
10937
10938// AsAirport is the BasicResponseBase implementation for Restaurant.
10939func (r Restaurant) AsAirport() (*Airport, bool) {
10940	return nil, false
10941}
10942
10943// AsLicense is the BasicResponseBase implementation for Restaurant.
10944func (r Restaurant) AsLicense() (*License, bool) {
10945	return nil, false
10946}
10947
10948// AsStructuredValue is the BasicResponseBase implementation for Restaurant.
10949func (r Restaurant) AsStructuredValue() (*StructuredValue, bool) {
10950	return nil, false
10951}
10952
10953// AsBasicStructuredValue is the BasicResponseBase implementation for Restaurant.
10954func (r Restaurant) AsBasicStructuredValue() (BasicStructuredValue, bool) {
10955	return nil, false
10956}
10957
10958// AsEntertainmentBusiness is the BasicResponseBase implementation for Restaurant.
10959func (r Restaurant) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
10960	return nil, false
10961}
10962
10963// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Restaurant.
10964func (r Restaurant) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
10965	return nil, false
10966}
10967
10968// AsFoodEstablishment is the BasicResponseBase implementation for Restaurant.
10969func (r Restaurant) AsFoodEstablishment() (*FoodEstablishment, bool) {
10970	return nil, false
10971}
10972
10973// AsBasicFoodEstablishment is the BasicResponseBase implementation for Restaurant.
10974func (r Restaurant) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
10975	return &r, true
10976}
10977
10978// AsLodgingBusiness is the BasicResponseBase implementation for Restaurant.
10979func (r Restaurant) AsLodgingBusiness() (*LodgingBusiness, bool) {
10980	return nil, false
10981}
10982
10983// AsBasicLodgingBusiness is the BasicResponseBase implementation for Restaurant.
10984func (r Restaurant) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
10985	return nil, false
10986}
10987
10988// AsRestaurant is the BasicResponseBase implementation for Restaurant.
10989func (r Restaurant) AsRestaurant() (*Restaurant, bool) {
10990	return &r, true
10991}
10992
10993// AsHotel is the BasicResponseBase implementation for Restaurant.
10994func (r Restaurant) AsHotel() (*Hotel, bool) {
10995	return nil, false
10996}
10997
10998// AsResponseBase is the BasicResponseBase implementation for Restaurant.
10999func (r Restaurant) AsResponseBase() (*ResponseBase, bool) {
11000	return nil, false
11001}
11002
11003// AsBasicResponseBase is the BasicResponseBase implementation for Restaurant.
11004func (r Restaurant) AsBasicResponseBase() (BasicResponseBase, bool) {
11005	return &r, true
11006}
11007
11008// UnmarshalJSON is the custom unmarshaler for Restaurant struct.
11009func (r *Restaurant) UnmarshalJSON(body []byte) error {
11010	var m map[string]*json.RawMessage
11011	err := json.Unmarshal(body, &m)
11012	if err != nil {
11013		return err
11014	}
11015	for k, v := range m {
11016		switch k {
11017		case "acceptsReservations":
11018			if v != nil {
11019				var acceptsReservations bool
11020				err = json.Unmarshal(*v, &acceptsReservations)
11021				if err != nil {
11022					return err
11023				}
11024				r.AcceptsReservations = &acceptsReservations
11025			}
11026		case "reservationUrl":
11027			if v != nil {
11028				var reservationURL string
11029				err = json.Unmarshal(*v, &reservationURL)
11030				if err != nil {
11031					return err
11032				}
11033				r.ReservationURL = &reservationURL
11034			}
11035		case "servesCuisine":
11036			if v != nil {
11037				var servesCuisine []string
11038				err = json.Unmarshal(*v, &servesCuisine)
11039				if err != nil {
11040					return err
11041				}
11042				r.ServesCuisine = &servesCuisine
11043			}
11044		case "menuUrl":
11045			if v != nil {
11046				var menuURL string
11047				err = json.Unmarshal(*v, &menuURL)
11048				if err != nil {
11049					return err
11050				}
11051				r.MenuURL = &menuURL
11052			}
11053		case "priceRange":
11054			if v != nil {
11055				var priceRange string
11056				err = json.Unmarshal(*v, &priceRange)
11057				if err != nil {
11058					return err
11059				}
11060				r.PriceRange = &priceRange
11061			}
11062		case "panoramas":
11063			if v != nil {
11064				var panoramas []ImageObject
11065				err = json.Unmarshal(*v, &panoramas)
11066				if err != nil {
11067					return err
11068				}
11069				r.Panoramas = &panoramas
11070			}
11071		case "isPermanentlyClosed":
11072			if v != nil {
11073				var isPermanentlyClosed bool
11074				err = json.Unmarshal(*v, &isPermanentlyClosed)
11075				if err != nil {
11076					return err
11077				}
11078				r.IsPermanentlyClosed = &isPermanentlyClosed
11079			}
11080		case "tagLine":
11081			if v != nil {
11082				var tagLine string
11083				err = json.Unmarshal(*v, &tagLine)
11084				if err != nil {
11085					return err
11086				}
11087				r.TagLine = &tagLine
11088			}
11089		case "address":
11090			if v != nil {
11091				var address PostalAddress
11092				err = json.Unmarshal(*v, &address)
11093				if err != nil {
11094					return err
11095				}
11096				r.Address = &address
11097			}
11098		case "telephone":
11099			if v != nil {
11100				var telephone string
11101				err = json.Unmarshal(*v, &telephone)
11102				if err != nil {
11103					return err
11104				}
11105				r.Telephone = &telephone
11106			}
11107		case "name":
11108			if v != nil {
11109				var name string
11110				err = json.Unmarshal(*v, &name)
11111				if err != nil {
11112					return err
11113				}
11114				r.Name = &name
11115			}
11116		case "url":
11117			if v != nil {
11118				var URL string
11119				err = json.Unmarshal(*v, &URL)
11120				if err != nil {
11121					return err
11122				}
11123				r.URL = &URL
11124			}
11125		case "image":
11126			if v != nil {
11127				var imageVar ImageObject
11128				err = json.Unmarshal(*v, &imageVar)
11129				if err != nil {
11130					return err
11131				}
11132				r.Image = &imageVar
11133			}
11134		case "description":
11135			if v != nil {
11136				var description string
11137				err = json.Unmarshal(*v, &description)
11138				if err != nil {
11139					return err
11140				}
11141				r.Description = &description
11142			}
11143		case "entityPresentationInfo":
11144			if v != nil {
11145				var entityPresentationInfo EntitiesEntityPresentationInfo
11146				err = json.Unmarshal(*v, &entityPresentationInfo)
11147				if err != nil {
11148					return err
11149				}
11150				r.EntityPresentationInfo = &entityPresentationInfo
11151			}
11152		case "bingId":
11153			if v != nil {
11154				var bingID string
11155				err = json.Unmarshal(*v, &bingID)
11156				if err != nil {
11157					return err
11158				}
11159				r.BingID = &bingID
11160			}
11161		case "contractualRules":
11162			if v != nil {
11163				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
11164				if err != nil {
11165					return err
11166				}
11167				r.ContractualRules = &contractualRules
11168			}
11169		case "webSearchUrl":
11170			if v != nil {
11171				var webSearchURL string
11172				err = json.Unmarshal(*v, &webSearchURL)
11173				if err != nil {
11174					return err
11175				}
11176				r.WebSearchURL = &webSearchURL
11177			}
11178		case "id":
11179			if v != nil {
11180				var ID string
11181				err = json.Unmarshal(*v, &ID)
11182				if err != nil {
11183					return err
11184				}
11185				r.ID = &ID
11186			}
11187		case "_type":
11188			if v != nil {
11189				var typeVar TypeBasicResponseBase
11190				err = json.Unmarshal(*v, &typeVar)
11191				if err != nil {
11192					return err
11193				}
11194				r.Type = typeVar
11195			}
11196		}
11197	}
11198
11199	return nil
11200}
11201
11202// SearchResponse defines the top-level object that the response includes when the request succeeds.
11203type SearchResponse struct {
11204	autorest.Response `json:"-"`
11205	// QueryContext - READ-ONLY; An object that contains the query string that Bing used for the request. This object contains the query string as entered by the user. It may also contain an altered query string that Bing used for the query if the query string contained a spelling mistake.
11206	QueryContext *QueryContext `json:"queryContext,omitempty"`
11207	// Entities - READ-ONLY; A list of entities that are relevant to the search query.
11208	Entities *Entities `json:"entities,omitempty"`
11209	// Places - READ-ONLY; A list of local entities such as restaurants or hotels that are relevant to the query.
11210	Places *Places `json:"places,omitempty"`
11211	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
11212	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
11213	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
11214	WebSearchURL *string `json:"webSearchUrl,omitempty"`
11215	// ID - READ-ONLY; A String identifier.
11216	ID *string `json:"id,omitempty"`
11217	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
11218	Type TypeBasicResponseBase `json:"_type,omitempty"`
11219}
11220
11221// MarshalJSON is the custom marshaler for SearchResponse.
11222func (sr SearchResponse) MarshalJSON() ([]byte, error) {
11223	sr.Type = TypeSearchResponse
11224	objectMap := make(map[string]interface{})
11225	if sr.Type != "" {
11226		objectMap["_type"] = sr.Type
11227	}
11228	return json.Marshal(objectMap)
11229}
11230
11231// AsImageObject is the BasicResponseBase implementation for SearchResponse.
11232func (sr SearchResponse) AsImageObject() (*ImageObject, bool) {
11233	return nil, false
11234}
11235
11236// AsThing is the BasicResponseBase implementation for SearchResponse.
11237func (sr SearchResponse) AsThing() (*Thing, bool) {
11238	return nil, false
11239}
11240
11241// AsBasicThing is the BasicResponseBase implementation for SearchResponse.
11242func (sr SearchResponse) AsBasicThing() (BasicThing, bool) {
11243	return nil, false
11244}
11245
11246// AsEntities is the BasicResponseBase implementation for SearchResponse.
11247func (sr SearchResponse) AsEntities() (*Entities, bool) {
11248	return nil, false
11249}
11250
11251// AsPlaces is the BasicResponseBase implementation for SearchResponse.
11252func (sr SearchResponse) AsPlaces() (*Places, bool) {
11253	return nil, false
11254}
11255
11256// AsSearchResponse is the BasicResponseBase implementation for SearchResponse.
11257func (sr SearchResponse) AsSearchResponse() (*SearchResponse, bool) {
11258	return &sr, true
11259}
11260
11261// AsResponse is the BasicResponseBase implementation for SearchResponse.
11262func (sr SearchResponse) AsResponse() (*Response, bool) {
11263	return nil, false
11264}
11265
11266// AsBasicResponse is the BasicResponseBase implementation for SearchResponse.
11267func (sr SearchResponse) AsBasicResponse() (BasicResponse, bool) {
11268	return &sr, true
11269}
11270
11271// AsSearchResultsAnswer is the BasicResponseBase implementation for SearchResponse.
11272func (sr SearchResponse) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
11273	return nil, false
11274}
11275
11276// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for SearchResponse.
11277func (sr SearchResponse) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
11278	return nil, false
11279}
11280
11281// AsIdentifiable is the BasicResponseBase implementation for SearchResponse.
11282func (sr SearchResponse) AsIdentifiable() (*Identifiable, bool) {
11283	return nil, false
11284}
11285
11286// AsBasicIdentifiable is the BasicResponseBase implementation for SearchResponse.
11287func (sr SearchResponse) AsBasicIdentifiable() (BasicIdentifiable, bool) {
11288	return &sr, true
11289}
11290
11291// AsAnswer is the BasicResponseBase implementation for SearchResponse.
11292func (sr SearchResponse) AsAnswer() (*Answer, bool) {
11293	return nil, false
11294}
11295
11296// AsBasicAnswer is the BasicResponseBase implementation for SearchResponse.
11297func (sr SearchResponse) AsBasicAnswer() (BasicAnswer, bool) {
11298	return nil, false
11299}
11300
11301// AsErrorResponse is the BasicResponseBase implementation for SearchResponse.
11302func (sr SearchResponse) AsErrorResponse() (*ErrorResponse, bool) {
11303	return nil, false
11304}
11305
11306// AsPostalAddress is the BasicResponseBase implementation for SearchResponse.
11307func (sr SearchResponse) AsPostalAddress() (*PostalAddress, bool) {
11308	return nil, false
11309}
11310
11311// AsPlace is the BasicResponseBase implementation for SearchResponse.
11312func (sr SearchResponse) AsPlace() (*Place, bool) {
11313	return nil, false
11314}
11315
11316// AsBasicPlace is the BasicResponseBase implementation for SearchResponse.
11317func (sr SearchResponse) AsBasicPlace() (BasicPlace, bool) {
11318	return nil, false
11319}
11320
11321// AsOrganization is the BasicResponseBase implementation for SearchResponse.
11322func (sr SearchResponse) AsOrganization() (*Organization, bool) {
11323	return nil, false
11324}
11325
11326// AsCreativeWork is the BasicResponseBase implementation for SearchResponse.
11327func (sr SearchResponse) AsCreativeWork() (*CreativeWork, bool) {
11328	return nil, false
11329}
11330
11331// AsBasicCreativeWork is the BasicResponseBase implementation for SearchResponse.
11332func (sr SearchResponse) AsBasicCreativeWork() (BasicCreativeWork, bool) {
11333	return nil, false
11334}
11335
11336// AsIntangible is the BasicResponseBase implementation for SearchResponse.
11337func (sr SearchResponse) AsIntangible() (*Intangible, bool) {
11338	return nil, false
11339}
11340
11341// AsBasicIntangible is the BasicResponseBase implementation for SearchResponse.
11342func (sr SearchResponse) AsBasicIntangible() (BasicIntangible, bool) {
11343	return nil, false
11344}
11345
11346// AsMovieTheater is the BasicResponseBase implementation for SearchResponse.
11347func (sr SearchResponse) AsMovieTheater() (*MovieTheater, bool) {
11348	return nil, false
11349}
11350
11351// AsMediaObject is the BasicResponseBase implementation for SearchResponse.
11352func (sr SearchResponse) AsMediaObject() (*MediaObject, bool) {
11353	return nil, false
11354}
11355
11356// AsBasicMediaObject is the BasicResponseBase implementation for SearchResponse.
11357func (sr SearchResponse) AsBasicMediaObject() (BasicMediaObject, bool) {
11358	return nil, false
11359}
11360
11361// AsCivicStructure is the BasicResponseBase implementation for SearchResponse.
11362func (sr SearchResponse) AsCivicStructure() (*CivicStructure, bool) {
11363	return nil, false
11364}
11365
11366// AsBasicCivicStructure is the BasicResponseBase implementation for SearchResponse.
11367func (sr SearchResponse) AsBasicCivicStructure() (BasicCivicStructure, bool) {
11368	return nil, false
11369}
11370
11371// AsLocalBusiness is the BasicResponseBase implementation for SearchResponse.
11372func (sr SearchResponse) AsLocalBusiness() (*LocalBusiness, bool) {
11373	return nil, false
11374}
11375
11376// AsBasicLocalBusiness is the BasicResponseBase implementation for SearchResponse.
11377func (sr SearchResponse) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
11378	return nil, false
11379}
11380
11381// AsTouristAttraction is the BasicResponseBase implementation for SearchResponse.
11382func (sr SearchResponse) AsTouristAttraction() (*TouristAttraction, bool) {
11383	return nil, false
11384}
11385
11386// AsAirport is the BasicResponseBase implementation for SearchResponse.
11387func (sr SearchResponse) AsAirport() (*Airport, bool) {
11388	return nil, false
11389}
11390
11391// AsLicense is the BasicResponseBase implementation for SearchResponse.
11392func (sr SearchResponse) AsLicense() (*License, bool) {
11393	return nil, false
11394}
11395
11396// AsStructuredValue is the BasicResponseBase implementation for SearchResponse.
11397func (sr SearchResponse) AsStructuredValue() (*StructuredValue, bool) {
11398	return nil, false
11399}
11400
11401// AsBasicStructuredValue is the BasicResponseBase implementation for SearchResponse.
11402func (sr SearchResponse) AsBasicStructuredValue() (BasicStructuredValue, bool) {
11403	return nil, false
11404}
11405
11406// AsEntertainmentBusiness is the BasicResponseBase implementation for SearchResponse.
11407func (sr SearchResponse) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
11408	return nil, false
11409}
11410
11411// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for SearchResponse.
11412func (sr SearchResponse) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
11413	return nil, false
11414}
11415
11416// AsFoodEstablishment is the BasicResponseBase implementation for SearchResponse.
11417func (sr SearchResponse) AsFoodEstablishment() (*FoodEstablishment, bool) {
11418	return nil, false
11419}
11420
11421// AsBasicFoodEstablishment is the BasicResponseBase implementation for SearchResponse.
11422func (sr SearchResponse) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
11423	return nil, false
11424}
11425
11426// AsLodgingBusiness is the BasicResponseBase implementation for SearchResponse.
11427func (sr SearchResponse) AsLodgingBusiness() (*LodgingBusiness, bool) {
11428	return nil, false
11429}
11430
11431// AsBasicLodgingBusiness is the BasicResponseBase implementation for SearchResponse.
11432func (sr SearchResponse) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
11433	return nil, false
11434}
11435
11436// AsRestaurant is the BasicResponseBase implementation for SearchResponse.
11437func (sr SearchResponse) AsRestaurant() (*Restaurant, bool) {
11438	return nil, false
11439}
11440
11441// AsHotel is the BasicResponseBase implementation for SearchResponse.
11442func (sr SearchResponse) AsHotel() (*Hotel, bool) {
11443	return nil, false
11444}
11445
11446// AsResponseBase is the BasicResponseBase implementation for SearchResponse.
11447func (sr SearchResponse) AsResponseBase() (*ResponseBase, bool) {
11448	return nil, false
11449}
11450
11451// AsBasicResponseBase is the BasicResponseBase implementation for SearchResponse.
11452func (sr SearchResponse) AsBasicResponseBase() (BasicResponseBase, bool) {
11453	return &sr, true
11454}
11455
11456// UnmarshalJSON is the custom unmarshaler for SearchResponse struct.
11457func (sr *SearchResponse) UnmarshalJSON(body []byte) error {
11458	var m map[string]*json.RawMessage
11459	err := json.Unmarshal(body, &m)
11460	if err != nil {
11461		return err
11462	}
11463	for k, v := range m {
11464		switch k {
11465		case "queryContext":
11466			if v != nil {
11467				var queryContext QueryContext
11468				err = json.Unmarshal(*v, &queryContext)
11469				if err != nil {
11470					return err
11471				}
11472				sr.QueryContext = &queryContext
11473			}
11474		case "entities":
11475			if v != nil {
11476				var entities Entities
11477				err = json.Unmarshal(*v, &entities)
11478				if err != nil {
11479					return err
11480				}
11481				sr.Entities = &entities
11482			}
11483		case "places":
11484			if v != nil {
11485				var places Places
11486				err = json.Unmarshal(*v, &places)
11487				if err != nil {
11488					return err
11489				}
11490				sr.Places = &places
11491			}
11492		case "contractualRules":
11493			if v != nil {
11494				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
11495				if err != nil {
11496					return err
11497				}
11498				sr.ContractualRules = &contractualRules
11499			}
11500		case "webSearchUrl":
11501			if v != nil {
11502				var webSearchURL string
11503				err = json.Unmarshal(*v, &webSearchURL)
11504				if err != nil {
11505					return err
11506				}
11507				sr.WebSearchURL = &webSearchURL
11508			}
11509		case "id":
11510			if v != nil {
11511				var ID string
11512				err = json.Unmarshal(*v, &ID)
11513				if err != nil {
11514					return err
11515				}
11516				sr.ID = &ID
11517			}
11518		case "_type":
11519			if v != nil {
11520				var typeVar TypeBasicResponseBase
11521				err = json.Unmarshal(*v, &typeVar)
11522				if err != nil {
11523					return err
11524				}
11525				sr.Type = typeVar
11526			}
11527		}
11528	}
11529
11530	return nil
11531}
11532
11533// BasicSearchResultsAnswer ...
11534type BasicSearchResultsAnswer interface {
11535	AsEntities() (*Entities, bool)
11536	AsPlaces() (*Places, bool)
11537	AsSearchResultsAnswer() (*SearchResultsAnswer, bool)
11538}
11539
11540// SearchResultsAnswer ...
11541type SearchResultsAnswer struct {
11542	// QueryContext - READ-ONLY
11543	QueryContext *QueryContext `json:"queryContext,omitempty"`
11544	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
11545	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
11546	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
11547	WebSearchURL *string `json:"webSearchUrl,omitempty"`
11548	// ID - READ-ONLY; A String identifier.
11549	ID *string `json:"id,omitempty"`
11550	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
11551	Type TypeBasicResponseBase `json:"_type,omitempty"`
11552}
11553
11554func unmarshalBasicSearchResultsAnswer(body []byte) (BasicSearchResultsAnswer, error) {
11555	var m map[string]interface{}
11556	err := json.Unmarshal(body, &m)
11557	if err != nil {
11558		return nil, err
11559	}
11560
11561	switch m["_type"] {
11562	case string(TypeEntities):
11563		var e Entities
11564		err := json.Unmarshal(body, &e)
11565		return e, err
11566	case string(TypePlaces):
11567		var p Places
11568		err := json.Unmarshal(body, &p)
11569		return p, err
11570	default:
11571		var sra SearchResultsAnswer
11572		err := json.Unmarshal(body, &sra)
11573		return sra, err
11574	}
11575}
11576func unmarshalBasicSearchResultsAnswerArray(body []byte) ([]BasicSearchResultsAnswer, error) {
11577	var rawMessages []*json.RawMessage
11578	err := json.Unmarshal(body, &rawMessages)
11579	if err != nil {
11580		return nil, err
11581	}
11582
11583	sraArray := make([]BasicSearchResultsAnswer, len(rawMessages))
11584
11585	for index, rawMessage := range rawMessages {
11586		sra, err := unmarshalBasicSearchResultsAnswer(*rawMessage)
11587		if err != nil {
11588			return nil, err
11589		}
11590		sraArray[index] = sra
11591	}
11592	return sraArray, nil
11593}
11594
11595// MarshalJSON is the custom marshaler for SearchResultsAnswer.
11596func (sra SearchResultsAnswer) MarshalJSON() ([]byte, error) {
11597	sra.Type = TypeSearchResultsAnswer
11598	objectMap := make(map[string]interface{})
11599	if sra.Type != "" {
11600		objectMap["_type"] = sra.Type
11601	}
11602	return json.Marshal(objectMap)
11603}
11604
11605// AsImageObject is the BasicResponseBase implementation for SearchResultsAnswer.
11606func (sra SearchResultsAnswer) AsImageObject() (*ImageObject, bool) {
11607	return nil, false
11608}
11609
11610// AsThing is the BasicResponseBase implementation for SearchResultsAnswer.
11611func (sra SearchResultsAnswer) AsThing() (*Thing, bool) {
11612	return nil, false
11613}
11614
11615// AsBasicThing is the BasicResponseBase implementation for SearchResultsAnswer.
11616func (sra SearchResultsAnswer) AsBasicThing() (BasicThing, bool) {
11617	return nil, false
11618}
11619
11620// AsEntities is the BasicResponseBase implementation for SearchResultsAnswer.
11621func (sra SearchResultsAnswer) AsEntities() (*Entities, bool) {
11622	return nil, false
11623}
11624
11625// AsPlaces is the BasicResponseBase implementation for SearchResultsAnswer.
11626func (sra SearchResultsAnswer) AsPlaces() (*Places, bool) {
11627	return nil, false
11628}
11629
11630// AsSearchResponse is the BasicResponseBase implementation for SearchResultsAnswer.
11631func (sra SearchResultsAnswer) AsSearchResponse() (*SearchResponse, bool) {
11632	return nil, false
11633}
11634
11635// AsResponse is the BasicResponseBase implementation for SearchResultsAnswer.
11636func (sra SearchResultsAnswer) AsResponse() (*Response, bool) {
11637	return nil, false
11638}
11639
11640// AsBasicResponse is the BasicResponseBase implementation for SearchResultsAnswer.
11641func (sra SearchResultsAnswer) AsBasicResponse() (BasicResponse, bool) {
11642	return &sra, true
11643}
11644
11645// AsSearchResultsAnswer is the BasicResponseBase implementation for SearchResultsAnswer.
11646func (sra SearchResultsAnswer) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
11647	return &sra, true
11648}
11649
11650// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for SearchResultsAnswer.
11651func (sra SearchResultsAnswer) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
11652	return &sra, true
11653}
11654
11655// AsIdentifiable is the BasicResponseBase implementation for SearchResultsAnswer.
11656func (sra SearchResultsAnswer) AsIdentifiable() (*Identifiable, bool) {
11657	return nil, false
11658}
11659
11660// AsBasicIdentifiable is the BasicResponseBase implementation for SearchResultsAnswer.
11661func (sra SearchResultsAnswer) AsBasicIdentifiable() (BasicIdentifiable, bool) {
11662	return &sra, true
11663}
11664
11665// AsAnswer is the BasicResponseBase implementation for SearchResultsAnswer.
11666func (sra SearchResultsAnswer) AsAnswer() (*Answer, bool) {
11667	return nil, false
11668}
11669
11670// AsBasicAnswer is the BasicResponseBase implementation for SearchResultsAnswer.
11671func (sra SearchResultsAnswer) AsBasicAnswer() (BasicAnswer, bool) {
11672	return &sra, true
11673}
11674
11675// AsErrorResponse is the BasicResponseBase implementation for SearchResultsAnswer.
11676func (sra SearchResultsAnswer) AsErrorResponse() (*ErrorResponse, bool) {
11677	return nil, false
11678}
11679
11680// AsPostalAddress is the BasicResponseBase implementation for SearchResultsAnswer.
11681func (sra SearchResultsAnswer) AsPostalAddress() (*PostalAddress, bool) {
11682	return nil, false
11683}
11684
11685// AsPlace is the BasicResponseBase implementation for SearchResultsAnswer.
11686func (sra SearchResultsAnswer) AsPlace() (*Place, bool) {
11687	return nil, false
11688}
11689
11690// AsBasicPlace is the BasicResponseBase implementation for SearchResultsAnswer.
11691func (sra SearchResultsAnswer) AsBasicPlace() (BasicPlace, bool) {
11692	return nil, false
11693}
11694
11695// AsOrganization is the BasicResponseBase implementation for SearchResultsAnswer.
11696func (sra SearchResultsAnswer) AsOrganization() (*Organization, bool) {
11697	return nil, false
11698}
11699
11700// AsCreativeWork is the BasicResponseBase implementation for SearchResultsAnswer.
11701func (sra SearchResultsAnswer) AsCreativeWork() (*CreativeWork, bool) {
11702	return nil, false
11703}
11704
11705// AsBasicCreativeWork is the BasicResponseBase implementation for SearchResultsAnswer.
11706func (sra SearchResultsAnswer) AsBasicCreativeWork() (BasicCreativeWork, bool) {
11707	return nil, false
11708}
11709
11710// AsIntangible is the BasicResponseBase implementation for SearchResultsAnswer.
11711func (sra SearchResultsAnswer) AsIntangible() (*Intangible, bool) {
11712	return nil, false
11713}
11714
11715// AsBasicIntangible is the BasicResponseBase implementation for SearchResultsAnswer.
11716func (sra SearchResultsAnswer) AsBasicIntangible() (BasicIntangible, bool) {
11717	return nil, false
11718}
11719
11720// AsMovieTheater is the BasicResponseBase implementation for SearchResultsAnswer.
11721func (sra SearchResultsAnswer) AsMovieTheater() (*MovieTheater, bool) {
11722	return nil, false
11723}
11724
11725// AsMediaObject is the BasicResponseBase implementation for SearchResultsAnswer.
11726func (sra SearchResultsAnswer) AsMediaObject() (*MediaObject, bool) {
11727	return nil, false
11728}
11729
11730// AsBasicMediaObject is the BasicResponseBase implementation for SearchResultsAnswer.
11731func (sra SearchResultsAnswer) AsBasicMediaObject() (BasicMediaObject, bool) {
11732	return nil, false
11733}
11734
11735// AsCivicStructure is the BasicResponseBase implementation for SearchResultsAnswer.
11736func (sra SearchResultsAnswer) AsCivicStructure() (*CivicStructure, bool) {
11737	return nil, false
11738}
11739
11740// AsBasicCivicStructure is the BasicResponseBase implementation for SearchResultsAnswer.
11741func (sra SearchResultsAnswer) AsBasicCivicStructure() (BasicCivicStructure, bool) {
11742	return nil, false
11743}
11744
11745// AsLocalBusiness is the BasicResponseBase implementation for SearchResultsAnswer.
11746func (sra SearchResultsAnswer) AsLocalBusiness() (*LocalBusiness, bool) {
11747	return nil, false
11748}
11749
11750// AsBasicLocalBusiness is the BasicResponseBase implementation for SearchResultsAnswer.
11751func (sra SearchResultsAnswer) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
11752	return nil, false
11753}
11754
11755// AsTouristAttraction is the BasicResponseBase implementation for SearchResultsAnswer.
11756func (sra SearchResultsAnswer) AsTouristAttraction() (*TouristAttraction, bool) {
11757	return nil, false
11758}
11759
11760// AsAirport is the BasicResponseBase implementation for SearchResultsAnswer.
11761func (sra SearchResultsAnswer) AsAirport() (*Airport, bool) {
11762	return nil, false
11763}
11764
11765// AsLicense is the BasicResponseBase implementation for SearchResultsAnswer.
11766func (sra SearchResultsAnswer) AsLicense() (*License, bool) {
11767	return nil, false
11768}
11769
11770// AsStructuredValue is the BasicResponseBase implementation for SearchResultsAnswer.
11771func (sra SearchResultsAnswer) AsStructuredValue() (*StructuredValue, bool) {
11772	return nil, false
11773}
11774
11775// AsBasicStructuredValue is the BasicResponseBase implementation for SearchResultsAnswer.
11776func (sra SearchResultsAnswer) AsBasicStructuredValue() (BasicStructuredValue, bool) {
11777	return nil, false
11778}
11779
11780// AsEntertainmentBusiness is the BasicResponseBase implementation for SearchResultsAnswer.
11781func (sra SearchResultsAnswer) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
11782	return nil, false
11783}
11784
11785// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for SearchResultsAnswer.
11786func (sra SearchResultsAnswer) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
11787	return nil, false
11788}
11789
11790// AsFoodEstablishment is the BasicResponseBase implementation for SearchResultsAnswer.
11791func (sra SearchResultsAnswer) AsFoodEstablishment() (*FoodEstablishment, bool) {
11792	return nil, false
11793}
11794
11795// AsBasicFoodEstablishment is the BasicResponseBase implementation for SearchResultsAnswer.
11796func (sra SearchResultsAnswer) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
11797	return nil, false
11798}
11799
11800// AsLodgingBusiness is the BasicResponseBase implementation for SearchResultsAnswer.
11801func (sra SearchResultsAnswer) AsLodgingBusiness() (*LodgingBusiness, bool) {
11802	return nil, false
11803}
11804
11805// AsBasicLodgingBusiness is the BasicResponseBase implementation for SearchResultsAnswer.
11806func (sra SearchResultsAnswer) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
11807	return nil, false
11808}
11809
11810// AsRestaurant is the BasicResponseBase implementation for SearchResultsAnswer.
11811func (sra SearchResultsAnswer) AsRestaurant() (*Restaurant, bool) {
11812	return nil, false
11813}
11814
11815// AsHotel is the BasicResponseBase implementation for SearchResultsAnswer.
11816func (sra SearchResultsAnswer) AsHotel() (*Hotel, bool) {
11817	return nil, false
11818}
11819
11820// AsResponseBase is the BasicResponseBase implementation for SearchResultsAnswer.
11821func (sra SearchResultsAnswer) AsResponseBase() (*ResponseBase, bool) {
11822	return nil, false
11823}
11824
11825// AsBasicResponseBase is the BasicResponseBase implementation for SearchResultsAnswer.
11826func (sra SearchResultsAnswer) AsBasicResponseBase() (BasicResponseBase, bool) {
11827	return &sra, true
11828}
11829
11830// UnmarshalJSON is the custom unmarshaler for SearchResultsAnswer struct.
11831func (sra *SearchResultsAnswer) UnmarshalJSON(body []byte) error {
11832	var m map[string]*json.RawMessage
11833	err := json.Unmarshal(body, &m)
11834	if err != nil {
11835		return err
11836	}
11837	for k, v := range m {
11838		switch k {
11839		case "queryContext":
11840			if v != nil {
11841				var queryContext QueryContext
11842				err = json.Unmarshal(*v, &queryContext)
11843				if err != nil {
11844					return err
11845				}
11846				sra.QueryContext = &queryContext
11847			}
11848		case "contractualRules":
11849			if v != nil {
11850				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
11851				if err != nil {
11852					return err
11853				}
11854				sra.ContractualRules = &contractualRules
11855			}
11856		case "webSearchUrl":
11857			if v != nil {
11858				var webSearchURL string
11859				err = json.Unmarshal(*v, &webSearchURL)
11860				if err != nil {
11861					return err
11862				}
11863				sra.WebSearchURL = &webSearchURL
11864			}
11865		case "id":
11866			if v != nil {
11867				var ID string
11868				err = json.Unmarshal(*v, &ID)
11869				if err != nil {
11870					return err
11871				}
11872				sra.ID = &ID
11873			}
11874		case "_type":
11875			if v != nil {
11876				var typeVar TypeBasicResponseBase
11877				err = json.Unmarshal(*v, &typeVar)
11878				if err != nil {
11879					return err
11880				}
11881				sra.Type = typeVar
11882			}
11883		}
11884	}
11885
11886	return nil
11887}
11888
11889// BasicStructuredValue ...
11890type BasicStructuredValue interface {
11891	AsPostalAddress() (*PostalAddress, bool)
11892	AsStructuredValue() (*StructuredValue, bool)
11893}
11894
11895// StructuredValue ...
11896type StructuredValue struct {
11897	// Name - READ-ONLY; The name of the thing represented by this object.
11898	Name *string `json:"name,omitempty"`
11899	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
11900	URL *string `json:"url,omitempty"`
11901	// Image - READ-ONLY
11902	Image *ImageObject `json:"image,omitempty"`
11903	// Description - READ-ONLY; A short description of the item.
11904	Description *string `json:"description,omitempty"`
11905	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
11906	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
11907	// BingID - READ-ONLY; An ID that uniquely identifies this item.
11908	BingID *string `json:"bingId,omitempty"`
11909	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
11910	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
11911	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
11912	WebSearchURL *string `json:"webSearchUrl,omitempty"`
11913	// ID - READ-ONLY; A String identifier.
11914	ID *string `json:"id,omitempty"`
11915	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
11916	Type TypeBasicResponseBase `json:"_type,omitempty"`
11917}
11918
11919func unmarshalBasicStructuredValue(body []byte) (BasicStructuredValue, error) {
11920	var m map[string]interface{}
11921	err := json.Unmarshal(body, &m)
11922	if err != nil {
11923		return nil, err
11924	}
11925
11926	switch m["_type"] {
11927	case string(TypePostalAddress):
11928		var pa PostalAddress
11929		err := json.Unmarshal(body, &pa)
11930		return pa, err
11931	default:
11932		var sv StructuredValue
11933		err := json.Unmarshal(body, &sv)
11934		return sv, err
11935	}
11936}
11937func unmarshalBasicStructuredValueArray(body []byte) ([]BasicStructuredValue, error) {
11938	var rawMessages []*json.RawMessage
11939	err := json.Unmarshal(body, &rawMessages)
11940	if err != nil {
11941		return nil, err
11942	}
11943
11944	svArray := make([]BasicStructuredValue, len(rawMessages))
11945
11946	for index, rawMessage := range rawMessages {
11947		sv, err := unmarshalBasicStructuredValue(*rawMessage)
11948		if err != nil {
11949			return nil, err
11950		}
11951		svArray[index] = sv
11952	}
11953	return svArray, nil
11954}
11955
11956// MarshalJSON is the custom marshaler for StructuredValue.
11957func (sv StructuredValue) MarshalJSON() ([]byte, error) {
11958	sv.Type = TypeStructuredValue
11959	objectMap := make(map[string]interface{})
11960	if sv.Type != "" {
11961		objectMap["_type"] = sv.Type
11962	}
11963	return json.Marshal(objectMap)
11964}
11965
11966// AsImageObject is the BasicResponseBase implementation for StructuredValue.
11967func (sv StructuredValue) AsImageObject() (*ImageObject, bool) {
11968	return nil, false
11969}
11970
11971// AsThing is the BasicResponseBase implementation for StructuredValue.
11972func (sv StructuredValue) AsThing() (*Thing, bool) {
11973	return nil, false
11974}
11975
11976// AsBasicThing is the BasicResponseBase implementation for StructuredValue.
11977func (sv StructuredValue) AsBasicThing() (BasicThing, bool) {
11978	return &sv, true
11979}
11980
11981// AsEntities is the BasicResponseBase implementation for StructuredValue.
11982func (sv StructuredValue) AsEntities() (*Entities, bool) {
11983	return nil, false
11984}
11985
11986// AsPlaces is the BasicResponseBase implementation for StructuredValue.
11987func (sv StructuredValue) AsPlaces() (*Places, bool) {
11988	return nil, false
11989}
11990
11991// AsSearchResponse is the BasicResponseBase implementation for StructuredValue.
11992func (sv StructuredValue) AsSearchResponse() (*SearchResponse, bool) {
11993	return nil, false
11994}
11995
11996// AsResponse is the BasicResponseBase implementation for StructuredValue.
11997func (sv StructuredValue) AsResponse() (*Response, bool) {
11998	return nil, false
11999}
12000
12001// AsBasicResponse is the BasicResponseBase implementation for StructuredValue.
12002func (sv StructuredValue) AsBasicResponse() (BasicResponse, bool) {
12003	return &sv, true
12004}
12005
12006// AsSearchResultsAnswer is the BasicResponseBase implementation for StructuredValue.
12007func (sv StructuredValue) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
12008	return nil, false
12009}
12010
12011// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for StructuredValue.
12012func (sv StructuredValue) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
12013	return nil, false
12014}
12015
12016// AsIdentifiable is the BasicResponseBase implementation for StructuredValue.
12017func (sv StructuredValue) AsIdentifiable() (*Identifiable, bool) {
12018	return nil, false
12019}
12020
12021// AsBasicIdentifiable is the BasicResponseBase implementation for StructuredValue.
12022func (sv StructuredValue) AsBasicIdentifiable() (BasicIdentifiable, bool) {
12023	return &sv, true
12024}
12025
12026// AsAnswer is the BasicResponseBase implementation for StructuredValue.
12027func (sv StructuredValue) AsAnswer() (*Answer, bool) {
12028	return nil, false
12029}
12030
12031// AsBasicAnswer is the BasicResponseBase implementation for StructuredValue.
12032func (sv StructuredValue) AsBasicAnswer() (BasicAnswer, bool) {
12033	return nil, false
12034}
12035
12036// AsErrorResponse is the BasicResponseBase implementation for StructuredValue.
12037func (sv StructuredValue) AsErrorResponse() (*ErrorResponse, bool) {
12038	return nil, false
12039}
12040
12041// AsPostalAddress is the BasicResponseBase implementation for StructuredValue.
12042func (sv StructuredValue) AsPostalAddress() (*PostalAddress, bool) {
12043	return nil, false
12044}
12045
12046// AsPlace is the BasicResponseBase implementation for StructuredValue.
12047func (sv StructuredValue) AsPlace() (*Place, bool) {
12048	return nil, false
12049}
12050
12051// AsBasicPlace is the BasicResponseBase implementation for StructuredValue.
12052func (sv StructuredValue) AsBasicPlace() (BasicPlace, bool) {
12053	return nil, false
12054}
12055
12056// AsOrganization is the BasicResponseBase implementation for StructuredValue.
12057func (sv StructuredValue) AsOrganization() (*Organization, bool) {
12058	return nil, false
12059}
12060
12061// AsCreativeWork is the BasicResponseBase implementation for StructuredValue.
12062func (sv StructuredValue) AsCreativeWork() (*CreativeWork, bool) {
12063	return nil, false
12064}
12065
12066// AsBasicCreativeWork is the BasicResponseBase implementation for StructuredValue.
12067func (sv StructuredValue) AsBasicCreativeWork() (BasicCreativeWork, bool) {
12068	return nil, false
12069}
12070
12071// AsIntangible is the BasicResponseBase implementation for StructuredValue.
12072func (sv StructuredValue) AsIntangible() (*Intangible, bool) {
12073	return nil, false
12074}
12075
12076// AsBasicIntangible is the BasicResponseBase implementation for StructuredValue.
12077func (sv StructuredValue) AsBasicIntangible() (BasicIntangible, bool) {
12078	return &sv, true
12079}
12080
12081// AsMovieTheater is the BasicResponseBase implementation for StructuredValue.
12082func (sv StructuredValue) AsMovieTheater() (*MovieTheater, bool) {
12083	return nil, false
12084}
12085
12086// AsMediaObject is the BasicResponseBase implementation for StructuredValue.
12087func (sv StructuredValue) AsMediaObject() (*MediaObject, bool) {
12088	return nil, false
12089}
12090
12091// AsBasicMediaObject is the BasicResponseBase implementation for StructuredValue.
12092func (sv StructuredValue) AsBasicMediaObject() (BasicMediaObject, bool) {
12093	return nil, false
12094}
12095
12096// AsCivicStructure is the BasicResponseBase implementation for StructuredValue.
12097func (sv StructuredValue) AsCivicStructure() (*CivicStructure, bool) {
12098	return nil, false
12099}
12100
12101// AsBasicCivicStructure is the BasicResponseBase implementation for StructuredValue.
12102func (sv StructuredValue) AsBasicCivicStructure() (BasicCivicStructure, bool) {
12103	return nil, false
12104}
12105
12106// AsLocalBusiness is the BasicResponseBase implementation for StructuredValue.
12107func (sv StructuredValue) AsLocalBusiness() (*LocalBusiness, bool) {
12108	return nil, false
12109}
12110
12111// AsBasicLocalBusiness is the BasicResponseBase implementation for StructuredValue.
12112func (sv StructuredValue) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
12113	return nil, false
12114}
12115
12116// AsTouristAttraction is the BasicResponseBase implementation for StructuredValue.
12117func (sv StructuredValue) AsTouristAttraction() (*TouristAttraction, bool) {
12118	return nil, false
12119}
12120
12121// AsAirport is the BasicResponseBase implementation for StructuredValue.
12122func (sv StructuredValue) AsAirport() (*Airport, bool) {
12123	return nil, false
12124}
12125
12126// AsLicense is the BasicResponseBase implementation for StructuredValue.
12127func (sv StructuredValue) AsLicense() (*License, bool) {
12128	return nil, false
12129}
12130
12131// AsStructuredValue is the BasicResponseBase implementation for StructuredValue.
12132func (sv StructuredValue) AsStructuredValue() (*StructuredValue, bool) {
12133	return &sv, true
12134}
12135
12136// AsBasicStructuredValue is the BasicResponseBase implementation for StructuredValue.
12137func (sv StructuredValue) AsBasicStructuredValue() (BasicStructuredValue, bool) {
12138	return &sv, true
12139}
12140
12141// AsEntertainmentBusiness is the BasicResponseBase implementation for StructuredValue.
12142func (sv StructuredValue) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
12143	return nil, false
12144}
12145
12146// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for StructuredValue.
12147func (sv StructuredValue) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
12148	return nil, false
12149}
12150
12151// AsFoodEstablishment is the BasicResponseBase implementation for StructuredValue.
12152func (sv StructuredValue) AsFoodEstablishment() (*FoodEstablishment, bool) {
12153	return nil, false
12154}
12155
12156// AsBasicFoodEstablishment is the BasicResponseBase implementation for StructuredValue.
12157func (sv StructuredValue) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
12158	return nil, false
12159}
12160
12161// AsLodgingBusiness is the BasicResponseBase implementation for StructuredValue.
12162func (sv StructuredValue) AsLodgingBusiness() (*LodgingBusiness, bool) {
12163	return nil, false
12164}
12165
12166// AsBasicLodgingBusiness is the BasicResponseBase implementation for StructuredValue.
12167func (sv StructuredValue) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
12168	return nil, false
12169}
12170
12171// AsRestaurant is the BasicResponseBase implementation for StructuredValue.
12172func (sv StructuredValue) AsRestaurant() (*Restaurant, bool) {
12173	return nil, false
12174}
12175
12176// AsHotel is the BasicResponseBase implementation for StructuredValue.
12177func (sv StructuredValue) AsHotel() (*Hotel, bool) {
12178	return nil, false
12179}
12180
12181// AsResponseBase is the BasicResponseBase implementation for StructuredValue.
12182func (sv StructuredValue) AsResponseBase() (*ResponseBase, bool) {
12183	return nil, false
12184}
12185
12186// AsBasicResponseBase is the BasicResponseBase implementation for StructuredValue.
12187func (sv StructuredValue) AsBasicResponseBase() (BasicResponseBase, bool) {
12188	return &sv, true
12189}
12190
12191// UnmarshalJSON is the custom unmarshaler for StructuredValue struct.
12192func (sv *StructuredValue) UnmarshalJSON(body []byte) error {
12193	var m map[string]*json.RawMessage
12194	err := json.Unmarshal(body, &m)
12195	if err != nil {
12196		return err
12197	}
12198	for k, v := range m {
12199		switch k {
12200		case "name":
12201			if v != nil {
12202				var name string
12203				err = json.Unmarshal(*v, &name)
12204				if err != nil {
12205					return err
12206				}
12207				sv.Name = &name
12208			}
12209		case "url":
12210			if v != nil {
12211				var URL string
12212				err = json.Unmarshal(*v, &URL)
12213				if err != nil {
12214					return err
12215				}
12216				sv.URL = &URL
12217			}
12218		case "image":
12219			if v != nil {
12220				var imageVar ImageObject
12221				err = json.Unmarshal(*v, &imageVar)
12222				if err != nil {
12223					return err
12224				}
12225				sv.Image = &imageVar
12226			}
12227		case "description":
12228			if v != nil {
12229				var description string
12230				err = json.Unmarshal(*v, &description)
12231				if err != nil {
12232					return err
12233				}
12234				sv.Description = &description
12235			}
12236		case "entityPresentationInfo":
12237			if v != nil {
12238				var entityPresentationInfo EntitiesEntityPresentationInfo
12239				err = json.Unmarshal(*v, &entityPresentationInfo)
12240				if err != nil {
12241					return err
12242				}
12243				sv.EntityPresentationInfo = &entityPresentationInfo
12244			}
12245		case "bingId":
12246			if v != nil {
12247				var bingID string
12248				err = json.Unmarshal(*v, &bingID)
12249				if err != nil {
12250					return err
12251				}
12252				sv.BingID = &bingID
12253			}
12254		case "contractualRules":
12255			if v != nil {
12256				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
12257				if err != nil {
12258					return err
12259				}
12260				sv.ContractualRules = &contractualRules
12261			}
12262		case "webSearchUrl":
12263			if v != nil {
12264				var webSearchURL string
12265				err = json.Unmarshal(*v, &webSearchURL)
12266				if err != nil {
12267					return err
12268				}
12269				sv.WebSearchURL = &webSearchURL
12270			}
12271		case "id":
12272			if v != nil {
12273				var ID string
12274				err = json.Unmarshal(*v, &ID)
12275				if err != nil {
12276					return err
12277				}
12278				sv.ID = &ID
12279			}
12280		case "_type":
12281			if v != nil {
12282				var typeVar TypeBasicResponseBase
12283				err = json.Unmarshal(*v, &typeVar)
12284				if err != nil {
12285					return err
12286				}
12287				sv.Type = typeVar
12288			}
12289		}
12290	}
12291
12292	return nil
12293}
12294
12295// BasicThing ...
12296type BasicThing interface {
12297	AsImageObject() (*ImageObject, bool)
12298	AsPostalAddress() (*PostalAddress, bool)
12299	AsPlace() (*Place, bool)
12300	AsBasicPlace() (BasicPlace, bool)
12301	AsOrganization() (*Organization, bool)
12302	AsCreativeWork() (*CreativeWork, bool)
12303	AsBasicCreativeWork() (BasicCreativeWork, bool)
12304	AsIntangible() (*Intangible, bool)
12305	AsBasicIntangible() (BasicIntangible, bool)
12306	AsMovieTheater() (*MovieTheater, bool)
12307	AsMediaObject() (*MediaObject, bool)
12308	AsBasicMediaObject() (BasicMediaObject, bool)
12309	AsCivicStructure() (*CivicStructure, bool)
12310	AsBasicCivicStructure() (BasicCivicStructure, bool)
12311	AsLocalBusiness() (*LocalBusiness, bool)
12312	AsBasicLocalBusiness() (BasicLocalBusiness, bool)
12313	AsTouristAttraction() (*TouristAttraction, bool)
12314	AsAirport() (*Airport, bool)
12315	AsLicense() (*License, bool)
12316	AsStructuredValue() (*StructuredValue, bool)
12317	AsBasicStructuredValue() (BasicStructuredValue, bool)
12318	AsEntertainmentBusiness() (*EntertainmentBusiness, bool)
12319	AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool)
12320	AsFoodEstablishment() (*FoodEstablishment, bool)
12321	AsBasicFoodEstablishment() (BasicFoodEstablishment, bool)
12322	AsLodgingBusiness() (*LodgingBusiness, bool)
12323	AsBasicLodgingBusiness() (BasicLodgingBusiness, bool)
12324	AsRestaurant() (*Restaurant, bool)
12325	AsHotel() (*Hotel, bool)
12326	AsThing() (*Thing, bool)
12327}
12328
12329// Thing ...
12330type Thing struct {
12331	// Name - READ-ONLY; The name of the thing represented by this object.
12332	Name *string `json:"name,omitempty"`
12333	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
12334	URL *string `json:"url,omitempty"`
12335	// Image - READ-ONLY
12336	Image *ImageObject `json:"image,omitempty"`
12337	// Description - READ-ONLY; A short description of the item.
12338	Description *string `json:"description,omitempty"`
12339	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
12340	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
12341	// BingID - READ-ONLY; An ID that uniquely identifies this item.
12342	BingID *string `json:"bingId,omitempty"`
12343	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
12344	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
12345	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
12346	WebSearchURL *string `json:"webSearchUrl,omitempty"`
12347	// ID - READ-ONLY; A String identifier.
12348	ID *string `json:"id,omitempty"`
12349	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
12350	Type TypeBasicResponseBase `json:"_type,omitempty"`
12351}
12352
12353func unmarshalBasicThing(body []byte) (BasicThing, error) {
12354	var m map[string]interface{}
12355	err := json.Unmarshal(body, &m)
12356	if err != nil {
12357		return nil, err
12358	}
12359
12360	switch m["_type"] {
12361	case string(TypeImageObject):
12362		var ioVar ImageObject
12363		err := json.Unmarshal(body, &ioVar)
12364		return ioVar, err
12365	case string(TypePostalAddress):
12366		var pa PostalAddress
12367		err := json.Unmarshal(body, &pa)
12368		return pa, err
12369	case string(TypePlace):
12370		var p Place
12371		err := json.Unmarshal(body, &p)
12372		return p, err
12373	case string(TypeOrganization):
12374		var o Organization
12375		err := json.Unmarshal(body, &o)
12376		return o, err
12377	case string(TypeCreativeWork):
12378		var cw CreativeWork
12379		err := json.Unmarshal(body, &cw)
12380		return cw, err
12381	case string(TypeIntangible):
12382		var i Intangible
12383		err := json.Unmarshal(body, &i)
12384		return i, err
12385	case string(TypeMovieTheater):
12386		var mt MovieTheater
12387		err := json.Unmarshal(body, &mt)
12388		return mt, err
12389	case string(TypeMediaObject):
12390		var mo MediaObject
12391		err := json.Unmarshal(body, &mo)
12392		return mo, err
12393	case string(TypeCivicStructure):
12394		var cs CivicStructure
12395		err := json.Unmarshal(body, &cs)
12396		return cs, err
12397	case string(TypeLocalBusiness):
12398		var lb LocalBusiness
12399		err := json.Unmarshal(body, &lb)
12400		return lb, err
12401	case string(TypeTouristAttraction):
12402		var ta TouristAttraction
12403		err := json.Unmarshal(body, &ta)
12404		return ta, err
12405	case string(TypeAirport):
12406		var a Airport
12407		err := json.Unmarshal(body, &a)
12408		return a, err
12409	case string(TypeLicense):
12410		var l License
12411		err := json.Unmarshal(body, &l)
12412		return l, err
12413	case string(TypeStructuredValue):
12414		var sv StructuredValue
12415		err := json.Unmarshal(body, &sv)
12416		return sv, err
12417	case string(TypeEntertainmentBusiness):
12418		var eb EntertainmentBusiness
12419		err := json.Unmarshal(body, &eb)
12420		return eb, err
12421	case string(TypeFoodEstablishment):
12422		var fe FoodEstablishment
12423		err := json.Unmarshal(body, &fe)
12424		return fe, err
12425	case string(TypeLodgingBusiness):
12426		var lb LodgingBusiness
12427		err := json.Unmarshal(body, &lb)
12428		return lb, err
12429	case string(TypeRestaurant):
12430		var r Restaurant
12431		err := json.Unmarshal(body, &r)
12432		return r, err
12433	case string(TypeHotel):
12434		var h Hotel
12435		err := json.Unmarshal(body, &h)
12436		return h, err
12437	default:
12438		var t Thing
12439		err := json.Unmarshal(body, &t)
12440		return t, err
12441	}
12442}
12443func unmarshalBasicThingArray(body []byte) ([]BasicThing, error) {
12444	var rawMessages []*json.RawMessage
12445	err := json.Unmarshal(body, &rawMessages)
12446	if err != nil {
12447		return nil, err
12448	}
12449
12450	tArray := make([]BasicThing, len(rawMessages))
12451
12452	for index, rawMessage := range rawMessages {
12453		t, err := unmarshalBasicThing(*rawMessage)
12454		if err != nil {
12455			return nil, err
12456		}
12457		tArray[index] = t
12458	}
12459	return tArray, nil
12460}
12461
12462// MarshalJSON is the custom marshaler for Thing.
12463func (t Thing) MarshalJSON() ([]byte, error) {
12464	t.Type = TypeThing
12465	objectMap := make(map[string]interface{})
12466	if t.Type != "" {
12467		objectMap["_type"] = t.Type
12468	}
12469	return json.Marshal(objectMap)
12470}
12471
12472// AsImageObject is the BasicResponseBase implementation for Thing.
12473func (t Thing) AsImageObject() (*ImageObject, bool) {
12474	return nil, false
12475}
12476
12477// AsThing is the BasicResponseBase implementation for Thing.
12478func (t Thing) AsThing() (*Thing, bool) {
12479	return &t, true
12480}
12481
12482// AsBasicThing is the BasicResponseBase implementation for Thing.
12483func (t Thing) AsBasicThing() (BasicThing, bool) {
12484	return &t, true
12485}
12486
12487// AsEntities is the BasicResponseBase implementation for Thing.
12488func (t Thing) AsEntities() (*Entities, bool) {
12489	return nil, false
12490}
12491
12492// AsPlaces is the BasicResponseBase implementation for Thing.
12493func (t Thing) AsPlaces() (*Places, bool) {
12494	return nil, false
12495}
12496
12497// AsSearchResponse is the BasicResponseBase implementation for Thing.
12498func (t Thing) AsSearchResponse() (*SearchResponse, bool) {
12499	return nil, false
12500}
12501
12502// AsResponse is the BasicResponseBase implementation for Thing.
12503func (t Thing) AsResponse() (*Response, bool) {
12504	return nil, false
12505}
12506
12507// AsBasicResponse is the BasicResponseBase implementation for Thing.
12508func (t Thing) AsBasicResponse() (BasicResponse, bool) {
12509	return &t, true
12510}
12511
12512// AsSearchResultsAnswer is the BasicResponseBase implementation for Thing.
12513func (t Thing) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
12514	return nil, false
12515}
12516
12517// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for Thing.
12518func (t Thing) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
12519	return nil, false
12520}
12521
12522// AsIdentifiable is the BasicResponseBase implementation for Thing.
12523func (t Thing) AsIdentifiable() (*Identifiable, bool) {
12524	return nil, false
12525}
12526
12527// AsBasicIdentifiable is the BasicResponseBase implementation for Thing.
12528func (t Thing) AsBasicIdentifiable() (BasicIdentifiable, bool) {
12529	return &t, true
12530}
12531
12532// AsAnswer is the BasicResponseBase implementation for Thing.
12533func (t Thing) AsAnswer() (*Answer, bool) {
12534	return nil, false
12535}
12536
12537// AsBasicAnswer is the BasicResponseBase implementation for Thing.
12538func (t Thing) AsBasicAnswer() (BasicAnswer, bool) {
12539	return nil, false
12540}
12541
12542// AsErrorResponse is the BasicResponseBase implementation for Thing.
12543func (t Thing) AsErrorResponse() (*ErrorResponse, bool) {
12544	return nil, false
12545}
12546
12547// AsPostalAddress is the BasicResponseBase implementation for Thing.
12548func (t Thing) AsPostalAddress() (*PostalAddress, bool) {
12549	return nil, false
12550}
12551
12552// AsPlace is the BasicResponseBase implementation for Thing.
12553func (t Thing) AsPlace() (*Place, bool) {
12554	return nil, false
12555}
12556
12557// AsBasicPlace is the BasicResponseBase implementation for Thing.
12558func (t Thing) AsBasicPlace() (BasicPlace, bool) {
12559	return nil, false
12560}
12561
12562// AsOrganization is the BasicResponseBase implementation for Thing.
12563func (t Thing) AsOrganization() (*Organization, bool) {
12564	return nil, false
12565}
12566
12567// AsCreativeWork is the BasicResponseBase implementation for Thing.
12568func (t Thing) AsCreativeWork() (*CreativeWork, bool) {
12569	return nil, false
12570}
12571
12572// AsBasicCreativeWork is the BasicResponseBase implementation for Thing.
12573func (t Thing) AsBasicCreativeWork() (BasicCreativeWork, bool) {
12574	return nil, false
12575}
12576
12577// AsIntangible is the BasicResponseBase implementation for Thing.
12578func (t Thing) AsIntangible() (*Intangible, bool) {
12579	return nil, false
12580}
12581
12582// AsBasicIntangible is the BasicResponseBase implementation for Thing.
12583func (t Thing) AsBasicIntangible() (BasicIntangible, bool) {
12584	return nil, false
12585}
12586
12587// AsMovieTheater is the BasicResponseBase implementation for Thing.
12588func (t Thing) AsMovieTheater() (*MovieTheater, bool) {
12589	return nil, false
12590}
12591
12592// AsMediaObject is the BasicResponseBase implementation for Thing.
12593func (t Thing) AsMediaObject() (*MediaObject, bool) {
12594	return nil, false
12595}
12596
12597// AsBasicMediaObject is the BasicResponseBase implementation for Thing.
12598func (t Thing) AsBasicMediaObject() (BasicMediaObject, bool) {
12599	return nil, false
12600}
12601
12602// AsCivicStructure is the BasicResponseBase implementation for Thing.
12603func (t Thing) AsCivicStructure() (*CivicStructure, bool) {
12604	return nil, false
12605}
12606
12607// AsBasicCivicStructure is the BasicResponseBase implementation for Thing.
12608func (t Thing) AsBasicCivicStructure() (BasicCivicStructure, bool) {
12609	return nil, false
12610}
12611
12612// AsLocalBusiness is the BasicResponseBase implementation for Thing.
12613func (t Thing) AsLocalBusiness() (*LocalBusiness, bool) {
12614	return nil, false
12615}
12616
12617// AsBasicLocalBusiness is the BasicResponseBase implementation for Thing.
12618func (t Thing) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
12619	return nil, false
12620}
12621
12622// AsTouristAttraction is the BasicResponseBase implementation for Thing.
12623func (t Thing) AsTouristAttraction() (*TouristAttraction, bool) {
12624	return nil, false
12625}
12626
12627// AsAirport is the BasicResponseBase implementation for Thing.
12628func (t Thing) AsAirport() (*Airport, bool) {
12629	return nil, false
12630}
12631
12632// AsLicense is the BasicResponseBase implementation for Thing.
12633func (t Thing) AsLicense() (*License, bool) {
12634	return nil, false
12635}
12636
12637// AsStructuredValue is the BasicResponseBase implementation for Thing.
12638func (t Thing) AsStructuredValue() (*StructuredValue, bool) {
12639	return nil, false
12640}
12641
12642// AsBasicStructuredValue is the BasicResponseBase implementation for Thing.
12643func (t Thing) AsBasicStructuredValue() (BasicStructuredValue, bool) {
12644	return nil, false
12645}
12646
12647// AsEntertainmentBusiness is the BasicResponseBase implementation for Thing.
12648func (t Thing) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
12649	return nil, false
12650}
12651
12652// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for Thing.
12653func (t Thing) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
12654	return nil, false
12655}
12656
12657// AsFoodEstablishment is the BasicResponseBase implementation for Thing.
12658func (t Thing) AsFoodEstablishment() (*FoodEstablishment, bool) {
12659	return nil, false
12660}
12661
12662// AsBasicFoodEstablishment is the BasicResponseBase implementation for Thing.
12663func (t Thing) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
12664	return nil, false
12665}
12666
12667// AsLodgingBusiness is the BasicResponseBase implementation for Thing.
12668func (t Thing) AsLodgingBusiness() (*LodgingBusiness, bool) {
12669	return nil, false
12670}
12671
12672// AsBasicLodgingBusiness is the BasicResponseBase implementation for Thing.
12673func (t Thing) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
12674	return nil, false
12675}
12676
12677// AsRestaurant is the BasicResponseBase implementation for Thing.
12678func (t Thing) AsRestaurant() (*Restaurant, bool) {
12679	return nil, false
12680}
12681
12682// AsHotel is the BasicResponseBase implementation for Thing.
12683func (t Thing) AsHotel() (*Hotel, bool) {
12684	return nil, false
12685}
12686
12687// AsResponseBase is the BasicResponseBase implementation for Thing.
12688func (t Thing) AsResponseBase() (*ResponseBase, bool) {
12689	return nil, false
12690}
12691
12692// AsBasicResponseBase is the BasicResponseBase implementation for Thing.
12693func (t Thing) AsBasicResponseBase() (BasicResponseBase, bool) {
12694	return &t, true
12695}
12696
12697// UnmarshalJSON is the custom unmarshaler for Thing struct.
12698func (t *Thing) UnmarshalJSON(body []byte) error {
12699	var m map[string]*json.RawMessage
12700	err := json.Unmarshal(body, &m)
12701	if err != nil {
12702		return err
12703	}
12704	for k, v := range m {
12705		switch k {
12706		case "name":
12707			if v != nil {
12708				var name string
12709				err = json.Unmarshal(*v, &name)
12710				if err != nil {
12711					return err
12712				}
12713				t.Name = &name
12714			}
12715		case "url":
12716			if v != nil {
12717				var URL string
12718				err = json.Unmarshal(*v, &URL)
12719				if err != nil {
12720					return err
12721				}
12722				t.URL = &URL
12723			}
12724		case "image":
12725			if v != nil {
12726				var imageVar ImageObject
12727				err = json.Unmarshal(*v, &imageVar)
12728				if err != nil {
12729					return err
12730				}
12731				t.Image = &imageVar
12732			}
12733		case "description":
12734			if v != nil {
12735				var description string
12736				err = json.Unmarshal(*v, &description)
12737				if err != nil {
12738					return err
12739				}
12740				t.Description = &description
12741			}
12742		case "entityPresentationInfo":
12743			if v != nil {
12744				var entityPresentationInfo EntitiesEntityPresentationInfo
12745				err = json.Unmarshal(*v, &entityPresentationInfo)
12746				if err != nil {
12747					return err
12748				}
12749				t.EntityPresentationInfo = &entityPresentationInfo
12750			}
12751		case "bingId":
12752			if v != nil {
12753				var bingID string
12754				err = json.Unmarshal(*v, &bingID)
12755				if err != nil {
12756					return err
12757				}
12758				t.BingID = &bingID
12759			}
12760		case "contractualRules":
12761			if v != nil {
12762				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
12763				if err != nil {
12764					return err
12765				}
12766				t.ContractualRules = &contractualRules
12767			}
12768		case "webSearchUrl":
12769			if v != nil {
12770				var webSearchURL string
12771				err = json.Unmarshal(*v, &webSearchURL)
12772				if err != nil {
12773					return err
12774				}
12775				t.WebSearchURL = &webSearchURL
12776			}
12777		case "id":
12778			if v != nil {
12779				var ID string
12780				err = json.Unmarshal(*v, &ID)
12781				if err != nil {
12782					return err
12783				}
12784				t.ID = &ID
12785			}
12786		case "_type":
12787			if v != nil {
12788				var typeVar TypeBasicResponseBase
12789				err = json.Unmarshal(*v, &typeVar)
12790				if err != nil {
12791					return err
12792				}
12793				t.Type = typeVar
12794			}
12795		}
12796	}
12797
12798	return nil
12799}
12800
12801// TouristAttraction ...
12802type TouristAttraction struct {
12803	// Address - READ-ONLY; The postal address of where the entity is located
12804	Address *PostalAddress `json:"address,omitempty"`
12805	// Telephone - READ-ONLY; The entity's telephone number
12806	Telephone *string `json:"telephone,omitempty"`
12807	// Name - READ-ONLY; The name of the thing represented by this object.
12808	Name *string `json:"name,omitempty"`
12809	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
12810	URL *string `json:"url,omitempty"`
12811	// Image - READ-ONLY
12812	Image *ImageObject `json:"image,omitempty"`
12813	// Description - READ-ONLY; A short description of the item.
12814	Description *string `json:"description,omitempty"`
12815	// EntityPresentationInfo - READ-ONLY; Additional information about the entity such as hints that you can use to determine the entity's type. To determine the entity's type, use the entityScenario and entityTypeHint fields.
12816	EntityPresentationInfo *EntitiesEntityPresentationInfo `json:"entityPresentationInfo,omitempty"`
12817	// BingID - READ-ONLY; An ID that uniquely identifies this item.
12818	BingID *string `json:"bingId,omitempty"`
12819	// ContractualRules - READ-ONLY; A list of rules that you must adhere to if you display the item.
12820	ContractualRules *[]BasicContractualRulesContractualRule `json:"contractualRules,omitempty"`
12821	// WebSearchURL - READ-ONLY; The URL To Bing's search result for this item.
12822	WebSearchURL *string `json:"webSearchUrl,omitempty"`
12823	// ID - READ-ONLY; A String identifier.
12824	ID *string `json:"id,omitempty"`
12825	// Type - Possible values include: 'TypeResponseBase', 'TypeImageObject', 'TypeThing', 'TypeEntities', 'TypePlaces', 'TypeSearchResponse', 'TypeResponse', 'TypeSearchResultsAnswer', 'TypeIdentifiable', 'TypeAnswer', 'TypeErrorResponse', 'TypePostalAddress', 'TypePlace', 'TypeOrganization', 'TypeCreativeWork', 'TypeIntangible', 'TypeMovieTheater', 'TypeMediaObject', 'TypeCivicStructure', 'TypeLocalBusiness', 'TypeTouristAttraction', 'TypeAirport', 'TypeLicense', 'TypeStructuredValue', 'TypeEntertainmentBusiness', 'TypeFoodEstablishment', 'TypeLodgingBusiness', 'TypeRestaurant', 'TypeHotel'
12826	Type TypeBasicResponseBase `json:"_type,omitempty"`
12827}
12828
12829// MarshalJSON is the custom marshaler for TouristAttraction.
12830func (ta TouristAttraction) MarshalJSON() ([]byte, error) {
12831	ta.Type = TypeTouristAttraction
12832	objectMap := make(map[string]interface{})
12833	if ta.Type != "" {
12834		objectMap["_type"] = ta.Type
12835	}
12836	return json.Marshal(objectMap)
12837}
12838
12839// AsImageObject is the BasicResponseBase implementation for TouristAttraction.
12840func (ta TouristAttraction) AsImageObject() (*ImageObject, bool) {
12841	return nil, false
12842}
12843
12844// AsThing is the BasicResponseBase implementation for TouristAttraction.
12845func (ta TouristAttraction) AsThing() (*Thing, bool) {
12846	return nil, false
12847}
12848
12849// AsBasicThing is the BasicResponseBase implementation for TouristAttraction.
12850func (ta TouristAttraction) AsBasicThing() (BasicThing, bool) {
12851	return &ta, true
12852}
12853
12854// AsEntities is the BasicResponseBase implementation for TouristAttraction.
12855func (ta TouristAttraction) AsEntities() (*Entities, bool) {
12856	return nil, false
12857}
12858
12859// AsPlaces is the BasicResponseBase implementation for TouristAttraction.
12860func (ta TouristAttraction) AsPlaces() (*Places, bool) {
12861	return nil, false
12862}
12863
12864// AsSearchResponse is the BasicResponseBase implementation for TouristAttraction.
12865func (ta TouristAttraction) AsSearchResponse() (*SearchResponse, bool) {
12866	return nil, false
12867}
12868
12869// AsResponse is the BasicResponseBase implementation for TouristAttraction.
12870func (ta TouristAttraction) AsResponse() (*Response, bool) {
12871	return nil, false
12872}
12873
12874// AsBasicResponse is the BasicResponseBase implementation for TouristAttraction.
12875func (ta TouristAttraction) AsBasicResponse() (BasicResponse, bool) {
12876	return &ta, true
12877}
12878
12879// AsSearchResultsAnswer is the BasicResponseBase implementation for TouristAttraction.
12880func (ta TouristAttraction) AsSearchResultsAnswer() (*SearchResultsAnswer, bool) {
12881	return nil, false
12882}
12883
12884// AsBasicSearchResultsAnswer is the BasicResponseBase implementation for TouristAttraction.
12885func (ta TouristAttraction) AsBasicSearchResultsAnswer() (BasicSearchResultsAnswer, bool) {
12886	return nil, false
12887}
12888
12889// AsIdentifiable is the BasicResponseBase implementation for TouristAttraction.
12890func (ta TouristAttraction) AsIdentifiable() (*Identifiable, bool) {
12891	return nil, false
12892}
12893
12894// AsBasicIdentifiable is the BasicResponseBase implementation for TouristAttraction.
12895func (ta TouristAttraction) AsBasicIdentifiable() (BasicIdentifiable, bool) {
12896	return &ta, true
12897}
12898
12899// AsAnswer is the BasicResponseBase implementation for TouristAttraction.
12900func (ta TouristAttraction) AsAnswer() (*Answer, bool) {
12901	return nil, false
12902}
12903
12904// AsBasicAnswer is the BasicResponseBase implementation for TouristAttraction.
12905func (ta TouristAttraction) AsBasicAnswer() (BasicAnswer, bool) {
12906	return nil, false
12907}
12908
12909// AsErrorResponse is the BasicResponseBase implementation for TouristAttraction.
12910func (ta TouristAttraction) AsErrorResponse() (*ErrorResponse, bool) {
12911	return nil, false
12912}
12913
12914// AsPostalAddress is the BasicResponseBase implementation for TouristAttraction.
12915func (ta TouristAttraction) AsPostalAddress() (*PostalAddress, bool) {
12916	return nil, false
12917}
12918
12919// AsPlace is the BasicResponseBase implementation for TouristAttraction.
12920func (ta TouristAttraction) AsPlace() (*Place, bool) {
12921	return nil, false
12922}
12923
12924// AsBasicPlace is the BasicResponseBase implementation for TouristAttraction.
12925func (ta TouristAttraction) AsBasicPlace() (BasicPlace, bool) {
12926	return &ta, true
12927}
12928
12929// AsOrganization is the BasicResponseBase implementation for TouristAttraction.
12930func (ta TouristAttraction) AsOrganization() (*Organization, bool) {
12931	return nil, false
12932}
12933
12934// AsCreativeWork is the BasicResponseBase implementation for TouristAttraction.
12935func (ta TouristAttraction) AsCreativeWork() (*CreativeWork, bool) {
12936	return nil, false
12937}
12938
12939// AsBasicCreativeWork is the BasicResponseBase implementation for TouristAttraction.
12940func (ta TouristAttraction) AsBasicCreativeWork() (BasicCreativeWork, bool) {
12941	return nil, false
12942}
12943
12944// AsIntangible is the BasicResponseBase implementation for TouristAttraction.
12945func (ta TouristAttraction) AsIntangible() (*Intangible, bool) {
12946	return nil, false
12947}
12948
12949// AsBasicIntangible is the BasicResponseBase implementation for TouristAttraction.
12950func (ta TouristAttraction) AsBasicIntangible() (BasicIntangible, bool) {
12951	return nil, false
12952}
12953
12954// AsMovieTheater is the BasicResponseBase implementation for TouristAttraction.
12955func (ta TouristAttraction) AsMovieTheater() (*MovieTheater, bool) {
12956	return nil, false
12957}
12958
12959// AsMediaObject is the BasicResponseBase implementation for TouristAttraction.
12960func (ta TouristAttraction) AsMediaObject() (*MediaObject, bool) {
12961	return nil, false
12962}
12963
12964// AsBasicMediaObject is the BasicResponseBase implementation for TouristAttraction.
12965func (ta TouristAttraction) AsBasicMediaObject() (BasicMediaObject, bool) {
12966	return nil, false
12967}
12968
12969// AsCivicStructure is the BasicResponseBase implementation for TouristAttraction.
12970func (ta TouristAttraction) AsCivicStructure() (*CivicStructure, bool) {
12971	return nil, false
12972}
12973
12974// AsBasicCivicStructure is the BasicResponseBase implementation for TouristAttraction.
12975func (ta TouristAttraction) AsBasicCivicStructure() (BasicCivicStructure, bool) {
12976	return nil, false
12977}
12978
12979// AsLocalBusiness is the BasicResponseBase implementation for TouristAttraction.
12980func (ta TouristAttraction) AsLocalBusiness() (*LocalBusiness, bool) {
12981	return nil, false
12982}
12983
12984// AsBasicLocalBusiness is the BasicResponseBase implementation for TouristAttraction.
12985func (ta TouristAttraction) AsBasicLocalBusiness() (BasicLocalBusiness, bool) {
12986	return nil, false
12987}
12988
12989// AsTouristAttraction is the BasicResponseBase implementation for TouristAttraction.
12990func (ta TouristAttraction) AsTouristAttraction() (*TouristAttraction, bool) {
12991	return &ta, true
12992}
12993
12994// AsAirport is the BasicResponseBase implementation for TouristAttraction.
12995func (ta TouristAttraction) AsAirport() (*Airport, bool) {
12996	return nil, false
12997}
12998
12999// AsLicense is the BasicResponseBase implementation for TouristAttraction.
13000func (ta TouristAttraction) AsLicense() (*License, bool) {
13001	return nil, false
13002}
13003
13004// AsStructuredValue is the BasicResponseBase implementation for TouristAttraction.
13005func (ta TouristAttraction) AsStructuredValue() (*StructuredValue, bool) {
13006	return nil, false
13007}
13008
13009// AsBasicStructuredValue is the BasicResponseBase implementation for TouristAttraction.
13010func (ta TouristAttraction) AsBasicStructuredValue() (BasicStructuredValue, bool) {
13011	return nil, false
13012}
13013
13014// AsEntertainmentBusiness is the BasicResponseBase implementation for TouristAttraction.
13015func (ta TouristAttraction) AsEntertainmentBusiness() (*EntertainmentBusiness, bool) {
13016	return nil, false
13017}
13018
13019// AsBasicEntertainmentBusiness is the BasicResponseBase implementation for TouristAttraction.
13020func (ta TouristAttraction) AsBasicEntertainmentBusiness() (BasicEntertainmentBusiness, bool) {
13021	return nil, false
13022}
13023
13024// AsFoodEstablishment is the BasicResponseBase implementation for TouristAttraction.
13025func (ta TouristAttraction) AsFoodEstablishment() (*FoodEstablishment, bool) {
13026	return nil, false
13027}
13028
13029// AsBasicFoodEstablishment is the BasicResponseBase implementation for TouristAttraction.
13030func (ta TouristAttraction) AsBasicFoodEstablishment() (BasicFoodEstablishment, bool) {
13031	return nil, false
13032}
13033
13034// AsLodgingBusiness is the BasicResponseBase implementation for TouristAttraction.
13035func (ta TouristAttraction) AsLodgingBusiness() (*LodgingBusiness, bool) {
13036	return nil, false
13037}
13038
13039// AsBasicLodgingBusiness is the BasicResponseBase implementation for TouristAttraction.
13040func (ta TouristAttraction) AsBasicLodgingBusiness() (BasicLodgingBusiness, bool) {
13041	return nil, false
13042}
13043
13044// AsRestaurant is the BasicResponseBase implementation for TouristAttraction.
13045func (ta TouristAttraction) AsRestaurant() (*Restaurant, bool) {
13046	return nil, false
13047}
13048
13049// AsHotel is the BasicResponseBase implementation for TouristAttraction.
13050func (ta TouristAttraction) AsHotel() (*Hotel, bool) {
13051	return nil, false
13052}
13053
13054// AsResponseBase is the BasicResponseBase implementation for TouristAttraction.
13055func (ta TouristAttraction) AsResponseBase() (*ResponseBase, bool) {
13056	return nil, false
13057}
13058
13059// AsBasicResponseBase is the BasicResponseBase implementation for TouristAttraction.
13060func (ta TouristAttraction) AsBasicResponseBase() (BasicResponseBase, bool) {
13061	return &ta, true
13062}
13063
13064// UnmarshalJSON is the custom unmarshaler for TouristAttraction struct.
13065func (ta *TouristAttraction) UnmarshalJSON(body []byte) error {
13066	var m map[string]*json.RawMessage
13067	err := json.Unmarshal(body, &m)
13068	if err != nil {
13069		return err
13070	}
13071	for k, v := range m {
13072		switch k {
13073		case "address":
13074			if v != nil {
13075				var address PostalAddress
13076				err = json.Unmarshal(*v, &address)
13077				if err != nil {
13078					return err
13079				}
13080				ta.Address = &address
13081			}
13082		case "telephone":
13083			if v != nil {
13084				var telephone string
13085				err = json.Unmarshal(*v, &telephone)
13086				if err != nil {
13087					return err
13088				}
13089				ta.Telephone = &telephone
13090			}
13091		case "name":
13092			if v != nil {
13093				var name string
13094				err = json.Unmarshal(*v, &name)
13095				if err != nil {
13096					return err
13097				}
13098				ta.Name = &name
13099			}
13100		case "url":
13101			if v != nil {
13102				var URL string
13103				err = json.Unmarshal(*v, &URL)
13104				if err != nil {
13105					return err
13106				}
13107				ta.URL = &URL
13108			}
13109		case "image":
13110			if v != nil {
13111				var imageVar ImageObject
13112				err = json.Unmarshal(*v, &imageVar)
13113				if err != nil {
13114					return err
13115				}
13116				ta.Image = &imageVar
13117			}
13118		case "description":
13119			if v != nil {
13120				var description string
13121				err = json.Unmarshal(*v, &description)
13122				if err != nil {
13123					return err
13124				}
13125				ta.Description = &description
13126			}
13127		case "entityPresentationInfo":
13128			if v != nil {
13129				var entityPresentationInfo EntitiesEntityPresentationInfo
13130				err = json.Unmarshal(*v, &entityPresentationInfo)
13131				if err != nil {
13132					return err
13133				}
13134				ta.EntityPresentationInfo = &entityPresentationInfo
13135			}
13136		case "bingId":
13137			if v != nil {
13138				var bingID string
13139				err = json.Unmarshal(*v, &bingID)
13140				if err != nil {
13141					return err
13142				}
13143				ta.BingID = &bingID
13144			}
13145		case "contractualRules":
13146			if v != nil {
13147				contractualRules, err := unmarshalBasicContractualRulesContractualRuleArray(*v)
13148				if err != nil {
13149					return err
13150				}
13151				ta.ContractualRules = &contractualRules
13152			}
13153		case "webSearchUrl":
13154			if v != nil {
13155				var webSearchURL string
13156				err = json.Unmarshal(*v, &webSearchURL)
13157				if err != nil {
13158					return err
13159				}
13160				ta.WebSearchURL = &webSearchURL
13161			}
13162		case "id":
13163			if v != nil {
13164				var ID string
13165				err = json.Unmarshal(*v, &ID)
13166				if err != nil {
13167					return err
13168				}
13169				ta.ID = &ID
13170			}
13171		case "_type":
13172			if v != nil {
13173				var typeVar TypeBasicResponseBase
13174				err = json.Unmarshal(*v, &typeVar)
13175				if err != nil {
13176					return err
13177				}
13178				ta.Type = typeVar
13179			}
13180		}
13181	}
13182
13183	return nil
13184}
13185