1package visualsearch
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"encoding/json"
11	"github.com/Azure/go-autorest/autorest"
12)
13
14// The package's fully qualified name.
15const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v1.0/visualsearch"
16
17// BasicAction defines an action.
18type BasicAction interface {
19	AsImageAction() (*ImageAction, bool)
20	AsBasicImageAction() (BasicImageAction, bool)
21	AsImageEntityAction() (*ImageEntityAction, bool)
22	AsImageModuleAction() (*ImageModuleAction, bool)
23	AsImageRecipesAction() (*ImageRecipesAction, bool)
24	AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool)
25	AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool)
26	AsAction() (*Action, bool)
27}
28
29// Action defines an action.
30type Action struct {
31	// Result - READ-ONLY; The result produced in the action.
32	Result *[]BasicThing `json:"result,omitempty"`
33	// DisplayName - READ-ONLY; A display name for the action.
34	DisplayName *string `json:"displayName,omitempty"`
35	// IsTopAction - READ-ONLY; A Boolean representing whether this result is the top action.
36	IsTopAction *bool `json:"isTopAction,omitempty"`
37	// ServiceURL - READ-ONLY; Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.
38	ServiceURL *string `json:"serviceUrl,omitempty"`
39	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
40	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
41	// Provider - READ-ONLY; The source of the creative work.
42	Provider *[]BasicThing `json:"provider,omitempty"`
43	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
44	DatePublished *string `json:"datePublished,omitempty"`
45	// Text - READ-ONLY; Text content of this creative work.
46	Text *string `json:"text,omitempty"`
47	// Name - READ-ONLY; The name of the thing represented by this object.
48	Name *string `json:"name,omitempty"`
49	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
50	URL *string `json:"url,omitempty"`
51	// Image - READ-ONLY; An image of the item.
52	Image *ImageObject `json:"image,omitempty"`
53	// Description - READ-ONLY; A short description of the item.
54	Description *string `json:"description,omitempty"`
55	// AlternateName - READ-ONLY; An alias for the item.
56	AlternateName *string `json:"alternateName,omitempty"`
57	// BingID - READ-ONLY; An ID that uniquely identifies this item.
58	BingID *string `json:"bingId,omitempty"`
59	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
60	ReadLink *string `json:"readLink,omitempty"`
61	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
62	WebSearchURL *string `json:"webSearchUrl,omitempty"`
63	// ID - READ-ONLY; A String identifier.
64	ID *string `json:"id,omitempty"`
65	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
66	Type Type `json:"_type,omitempty"`
67}
68
69func unmarshalBasicAction(body []byte) (BasicAction, error) {
70	var m map[string]interface{}
71	err := json.Unmarshal(body, &m)
72	if err != nil {
73		return nil, err
74	}
75
76	switch m["_type"] {
77	case string(TypeImageAction):
78		var ia ImageAction
79		err := json.Unmarshal(body, &ia)
80		return ia, err
81	case string(TypeImageEntityAction):
82		var iea ImageEntityAction
83		err := json.Unmarshal(body, &iea)
84		return iea, err
85	case string(TypeImageModuleAction):
86		var ima ImageModuleAction
87		err := json.Unmarshal(body, &ima)
88		return ima, err
89	case string(TypeImageRecipesAction):
90		var ira ImageRecipesAction
91		err := json.Unmarshal(body, &ira)
92		return ira, err
93	case string(TypeImageRelatedSearchesAction):
94		var irsa ImageRelatedSearchesAction
95		err := json.Unmarshal(body, &irsa)
96		return irsa, err
97	case string(TypeImageShoppingSourcesAction):
98		var issa ImageShoppingSourcesAction
99		err := json.Unmarshal(body, &issa)
100		return issa, err
101	default:
102		var a Action
103		err := json.Unmarshal(body, &a)
104		return a, err
105	}
106}
107func unmarshalBasicActionArray(body []byte) ([]BasicAction, error) {
108	var rawMessages []*json.RawMessage
109	err := json.Unmarshal(body, &rawMessages)
110	if err != nil {
111		return nil, err
112	}
113
114	aArray := make([]BasicAction, len(rawMessages))
115
116	for index, rawMessage := range rawMessages {
117		a, err := unmarshalBasicAction(*rawMessage)
118		if err != nil {
119			return nil, err
120		}
121		aArray[index] = a
122	}
123	return aArray, nil
124}
125
126// MarshalJSON is the custom marshaler for Action.
127func (a Action) MarshalJSON() ([]byte, error) {
128	a.Type = TypeAction
129	objectMap := make(map[string]interface{})
130	if a.Type != "" {
131		objectMap["_type"] = a.Type
132	}
133	return json.Marshal(objectMap)
134}
135
136// AsPoint2D is the BasicResponseBase implementation for Action.
137func (a Action) AsPoint2D() (*Point2D, bool) {
138	return nil, false
139}
140
141// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Action.
142func (a Action) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
143	return nil, false
144}
145
146// AsImageAction is the BasicResponseBase implementation for Action.
147func (a Action) AsImageAction() (*ImageAction, bool) {
148	return nil, false
149}
150
151// AsBasicImageAction is the BasicResponseBase implementation for Action.
152func (a Action) AsBasicImageAction() (BasicImageAction, bool) {
153	return nil, false
154}
155
156// AsImageTag is the BasicResponseBase implementation for Action.
157func (a Action) AsImageTag() (*ImageTag, bool) {
158	return nil, false
159}
160
161// AsOrganization is the BasicResponseBase implementation for Action.
162func (a Action) AsOrganization() (*Organization, bool) {
163	return nil, false
164}
165
166// AsOffer is the BasicResponseBase implementation for Action.
167func (a Action) AsOffer() (*Offer, bool) {
168	return nil, false
169}
170
171// AsBasicOffer is the BasicResponseBase implementation for Action.
172func (a Action) AsBasicOffer() (BasicOffer, bool) {
173	return nil, false
174}
175
176// AsAggregateOffer is the BasicResponseBase implementation for Action.
177func (a Action) AsAggregateOffer() (*AggregateOffer, bool) {
178	return nil, false
179}
180
181// AsImageObject is the BasicResponseBase implementation for Action.
182func (a Action) AsImageObject() (*ImageObject, bool) {
183	return nil, false
184}
185
186// AsImageKnowledge is the BasicResponseBase implementation for Action.
187func (a Action) AsImageKnowledge() (*ImageKnowledge, bool) {
188	return nil, false
189}
190
191// AsResponse is the BasicResponseBase implementation for Action.
192func (a Action) AsResponse() (*Response, bool) {
193	return nil, false
194}
195
196// AsBasicResponse is the BasicResponseBase implementation for Action.
197func (a Action) AsBasicResponse() (BasicResponse, bool) {
198	return &a, true
199}
200
201// AsIdentifiable is the BasicResponseBase implementation for Action.
202func (a Action) AsIdentifiable() (*Identifiable, bool) {
203	return nil, false
204}
205
206// AsBasicIdentifiable is the BasicResponseBase implementation for Action.
207func (a Action) AsBasicIdentifiable() (BasicIdentifiable, bool) {
208	return &a, true
209}
210
211// AsErrorResponse is the BasicResponseBase implementation for Action.
212func (a Action) AsErrorResponse() (*ErrorResponse, bool) {
213	return nil, false
214}
215
216// AsThing is the BasicResponseBase implementation for Action.
217func (a Action) AsThing() (*Thing, bool) {
218	return nil, false
219}
220
221// AsBasicThing is the BasicResponseBase implementation for Action.
222func (a Action) AsBasicThing() (BasicThing, bool) {
223	return &a, true
224}
225
226// AsAction is the BasicResponseBase implementation for Action.
227func (a Action) AsAction() (*Action, bool) {
228	return &a, true
229}
230
231// AsBasicAction is the BasicResponseBase implementation for Action.
232func (a Action) AsBasicAction() (BasicAction, bool) {
233	return &a, true
234}
235
236// AsMediaObject is the BasicResponseBase implementation for Action.
237func (a Action) AsMediaObject() (*MediaObject, bool) {
238	return nil, false
239}
240
241// AsBasicMediaObject is the BasicResponseBase implementation for Action.
242func (a Action) AsBasicMediaObject() (BasicMediaObject, bool) {
243	return nil, false
244}
245
246// AsCreativeWork is the BasicResponseBase implementation for Action.
247func (a Action) AsCreativeWork() (*CreativeWork, bool) {
248	return nil, false
249}
250
251// AsBasicCreativeWork is the BasicResponseBase implementation for Action.
252func (a Action) AsBasicCreativeWork() (BasicCreativeWork, bool) {
253	return &a, true
254}
255
256// AsPerson is the BasicResponseBase implementation for Action.
257func (a Action) AsPerson() (*Person, bool) {
258	return nil, false
259}
260
261// AsIntangible is the BasicResponseBase implementation for Action.
262func (a Action) AsIntangible() (*Intangible, bool) {
263	return nil, false
264}
265
266// AsBasicIntangible is the BasicResponseBase implementation for Action.
267func (a Action) AsBasicIntangible() (BasicIntangible, bool) {
268	return nil, false
269}
270
271// AsImageEntityAction is the BasicResponseBase implementation for Action.
272func (a Action) AsImageEntityAction() (*ImageEntityAction, bool) {
273	return nil, false
274}
275
276// AsImageModuleAction is the BasicResponseBase implementation for Action.
277func (a Action) AsImageModuleAction() (*ImageModuleAction, bool) {
278	return nil, false
279}
280
281// AsRecipe is the BasicResponseBase implementation for Action.
282func (a Action) AsRecipe() (*Recipe, bool) {
283	return nil, false
284}
285
286// AsImageRecipesAction is the BasicResponseBase implementation for Action.
287func (a Action) AsImageRecipesAction() (*ImageRecipesAction, bool) {
288	return nil, false
289}
290
291// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Action.
292func (a Action) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
293	return nil, false
294}
295
296// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Action.
297func (a Action) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
298	return nil, false
299}
300
301// AsStructuredValue is the BasicResponseBase implementation for Action.
302func (a Action) AsStructuredValue() (*StructuredValue, bool) {
303	return nil, false
304}
305
306// AsBasicStructuredValue is the BasicResponseBase implementation for Action.
307func (a Action) AsBasicStructuredValue() (BasicStructuredValue, bool) {
308	return nil, false
309}
310
311// AsResponseBase is the BasicResponseBase implementation for Action.
312func (a Action) AsResponseBase() (*ResponseBase, bool) {
313	return nil, false
314}
315
316// AsBasicResponseBase is the BasicResponseBase implementation for Action.
317func (a Action) AsBasicResponseBase() (BasicResponseBase, bool) {
318	return &a, true
319}
320
321// UnmarshalJSON is the custom unmarshaler for Action struct.
322func (a *Action) UnmarshalJSON(body []byte) error {
323	var m map[string]*json.RawMessage
324	err := json.Unmarshal(body, &m)
325	if err != nil {
326		return err
327	}
328	for k, v := range m {
329		switch k {
330		case "result":
331			if v != nil {
332				resultVar, err := unmarshalBasicThingArray(*v)
333				if err != nil {
334					return err
335				}
336				a.Result = &resultVar
337			}
338		case "displayName":
339			if v != nil {
340				var displayName string
341				err = json.Unmarshal(*v, &displayName)
342				if err != nil {
343					return err
344				}
345				a.DisplayName = &displayName
346			}
347		case "isTopAction":
348			if v != nil {
349				var isTopAction bool
350				err = json.Unmarshal(*v, &isTopAction)
351				if err != nil {
352					return err
353				}
354				a.IsTopAction = &isTopAction
355			}
356		case "serviceUrl":
357			if v != nil {
358				var serviceURL string
359				err = json.Unmarshal(*v, &serviceURL)
360				if err != nil {
361					return err
362				}
363				a.ServiceURL = &serviceURL
364			}
365		case "thumbnailUrl":
366			if v != nil {
367				var thumbnailURL string
368				err = json.Unmarshal(*v, &thumbnailURL)
369				if err != nil {
370					return err
371				}
372				a.ThumbnailURL = &thumbnailURL
373			}
374		case "provider":
375			if v != nil {
376				provider, err := unmarshalBasicThingArray(*v)
377				if err != nil {
378					return err
379				}
380				a.Provider = &provider
381			}
382		case "datePublished":
383			if v != nil {
384				var datePublished string
385				err = json.Unmarshal(*v, &datePublished)
386				if err != nil {
387					return err
388				}
389				a.DatePublished = &datePublished
390			}
391		case "text":
392			if v != nil {
393				var textVar string
394				err = json.Unmarshal(*v, &textVar)
395				if err != nil {
396					return err
397				}
398				a.Text = &textVar
399			}
400		case "name":
401			if v != nil {
402				var name string
403				err = json.Unmarshal(*v, &name)
404				if err != nil {
405					return err
406				}
407				a.Name = &name
408			}
409		case "url":
410			if v != nil {
411				var URL string
412				err = json.Unmarshal(*v, &URL)
413				if err != nil {
414					return err
415				}
416				a.URL = &URL
417			}
418		case "image":
419			if v != nil {
420				var imageVar ImageObject
421				err = json.Unmarshal(*v, &imageVar)
422				if err != nil {
423					return err
424				}
425				a.Image = &imageVar
426			}
427		case "description":
428			if v != nil {
429				var description string
430				err = json.Unmarshal(*v, &description)
431				if err != nil {
432					return err
433				}
434				a.Description = &description
435			}
436		case "alternateName":
437			if v != nil {
438				var alternateName string
439				err = json.Unmarshal(*v, &alternateName)
440				if err != nil {
441					return err
442				}
443				a.AlternateName = &alternateName
444			}
445		case "bingId":
446			if v != nil {
447				var bingID string
448				err = json.Unmarshal(*v, &bingID)
449				if err != nil {
450					return err
451				}
452				a.BingID = &bingID
453			}
454		case "readLink":
455			if v != nil {
456				var readLink string
457				err = json.Unmarshal(*v, &readLink)
458				if err != nil {
459					return err
460				}
461				a.ReadLink = &readLink
462			}
463		case "webSearchUrl":
464			if v != nil {
465				var webSearchURL string
466				err = json.Unmarshal(*v, &webSearchURL)
467				if err != nil {
468					return err
469				}
470				a.WebSearchURL = &webSearchURL
471			}
472		case "id":
473			if v != nil {
474				var ID string
475				err = json.Unmarshal(*v, &ID)
476				if err != nil {
477					return err
478				}
479				a.ID = &ID
480			}
481		case "_type":
482			if v != nil {
483				var typeVar Type
484				err = json.Unmarshal(*v, &typeVar)
485				if err != nil {
486					return err
487				}
488				a.Type = typeVar
489			}
490		}
491	}
492
493	return nil
494}
495
496// AggregateOffer defines a list of offers from merchants that are related to the image.
497type AggregateOffer struct {
498	// Offers - READ-ONLY; A list of offers from merchants that have offerings related to the image.
499	Offers *[]BasicOffer `json:"offers,omitempty"`
500	// Seller - READ-ONLY; Seller for this offer.
501	Seller *Organization `json:"seller,omitempty"`
502	// Price - READ-ONLY; The item's price.
503	Price *float64 `json:"price,omitempty"`
504	// PriceCurrency - READ-ONLY; The monetary currency. For example, USD. Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'
505	PriceCurrency Currency `json:"priceCurrency,omitempty"`
506	// Availability - READ-ONLY; The item's availability. The following are the possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut'
507	Availability ItemAvailability `json:"availability,omitempty"`
508	// AggregateRating - READ-ONLY; An aggregated rating that indicates how well the product has been rated by others.
509	AggregateRating *AggregateRating `json:"aggregateRating,omitempty"`
510	// LastUpdated - READ-ONLY; The last date that the offer was updated. The date is in the form YYYY-MM-DD.
511	LastUpdated *string `json:"lastUpdated,omitempty"`
512	// Name - READ-ONLY; The name of the thing represented by this object.
513	Name *string `json:"name,omitempty"`
514	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
515	URL *string `json:"url,omitempty"`
516	// Image - READ-ONLY; An image of the item.
517	Image *ImageObject `json:"image,omitempty"`
518	// Description - READ-ONLY; A short description of the item.
519	Description *string `json:"description,omitempty"`
520	// AlternateName - READ-ONLY; An alias for the item.
521	AlternateName *string `json:"alternateName,omitempty"`
522	// BingID - READ-ONLY; An ID that uniquely identifies this item.
523	BingID *string `json:"bingId,omitempty"`
524	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
525	ReadLink *string `json:"readLink,omitempty"`
526	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
527	WebSearchURL *string `json:"webSearchUrl,omitempty"`
528	// ID - READ-ONLY; A String identifier.
529	ID *string `json:"id,omitempty"`
530	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
531	Type Type `json:"_type,omitempty"`
532}
533
534// MarshalJSON is the custom marshaler for AggregateOffer.
535func (ao AggregateOffer) MarshalJSON() ([]byte, error) {
536	ao.Type = TypeAggregateOffer
537	objectMap := make(map[string]interface{})
538	if ao.Type != "" {
539		objectMap["_type"] = ao.Type
540	}
541	return json.Marshal(objectMap)
542}
543
544// AsPoint2D is the BasicResponseBase implementation for AggregateOffer.
545func (ao AggregateOffer) AsPoint2D() (*Point2D, bool) {
546	return nil, false
547}
548
549// AsNormalizedQuadrilateral is the BasicResponseBase implementation for AggregateOffer.
550func (ao AggregateOffer) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
551	return nil, false
552}
553
554// AsImageAction is the BasicResponseBase implementation for AggregateOffer.
555func (ao AggregateOffer) AsImageAction() (*ImageAction, bool) {
556	return nil, false
557}
558
559// AsBasicImageAction is the BasicResponseBase implementation for AggregateOffer.
560func (ao AggregateOffer) AsBasicImageAction() (BasicImageAction, bool) {
561	return nil, false
562}
563
564// AsImageTag is the BasicResponseBase implementation for AggregateOffer.
565func (ao AggregateOffer) AsImageTag() (*ImageTag, bool) {
566	return nil, false
567}
568
569// AsOrganization is the BasicResponseBase implementation for AggregateOffer.
570func (ao AggregateOffer) AsOrganization() (*Organization, bool) {
571	return nil, false
572}
573
574// AsOffer is the BasicResponseBase implementation for AggregateOffer.
575func (ao AggregateOffer) AsOffer() (*Offer, bool) {
576	return nil, false
577}
578
579// AsBasicOffer is the BasicResponseBase implementation for AggregateOffer.
580func (ao AggregateOffer) AsBasicOffer() (BasicOffer, bool) {
581	return &ao, true
582}
583
584// AsAggregateOffer is the BasicResponseBase implementation for AggregateOffer.
585func (ao AggregateOffer) AsAggregateOffer() (*AggregateOffer, bool) {
586	return &ao, true
587}
588
589// AsImageObject is the BasicResponseBase implementation for AggregateOffer.
590func (ao AggregateOffer) AsImageObject() (*ImageObject, bool) {
591	return nil, false
592}
593
594// AsImageKnowledge is the BasicResponseBase implementation for AggregateOffer.
595func (ao AggregateOffer) AsImageKnowledge() (*ImageKnowledge, bool) {
596	return nil, false
597}
598
599// AsResponse is the BasicResponseBase implementation for AggregateOffer.
600func (ao AggregateOffer) AsResponse() (*Response, bool) {
601	return nil, false
602}
603
604// AsBasicResponse is the BasicResponseBase implementation for AggregateOffer.
605func (ao AggregateOffer) AsBasicResponse() (BasicResponse, bool) {
606	return &ao, true
607}
608
609// AsIdentifiable is the BasicResponseBase implementation for AggregateOffer.
610func (ao AggregateOffer) AsIdentifiable() (*Identifiable, bool) {
611	return nil, false
612}
613
614// AsBasicIdentifiable is the BasicResponseBase implementation for AggregateOffer.
615func (ao AggregateOffer) AsBasicIdentifiable() (BasicIdentifiable, bool) {
616	return &ao, true
617}
618
619// AsErrorResponse is the BasicResponseBase implementation for AggregateOffer.
620func (ao AggregateOffer) AsErrorResponse() (*ErrorResponse, bool) {
621	return nil, false
622}
623
624// AsThing is the BasicResponseBase implementation for AggregateOffer.
625func (ao AggregateOffer) AsThing() (*Thing, bool) {
626	return nil, false
627}
628
629// AsBasicThing is the BasicResponseBase implementation for AggregateOffer.
630func (ao AggregateOffer) AsBasicThing() (BasicThing, bool) {
631	return &ao, true
632}
633
634// AsAction is the BasicResponseBase implementation for AggregateOffer.
635func (ao AggregateOffer) AsAction() (*Action, bool) {
636	return nil, false
637}
638
639// AsBasicAction is the BasicResponseBase implementation for AggregateOffer.
640func (ao AggregateOffer) AsBasicAction() (BasicAction, bool) {
641	return nil, false
642}
643
644// AsMediaObject is the BasicResponseBase implementation for AggregateOffer.
645func (ao AggregateOffer) AsMediaObject() (*MediaObject, bool) {
646	return nil, false
647}
648
649// AsBasicMediaObject is the BasicResponseBase implementation for AggregateOffer.
650func (ao AggregateOffer) AsBasicMediaObject() (BasicMediaObject, bool) {
651	return nil, false
652}
653
654// AsCreativeWork is the BasicResponseBase implementation for AggregateOffer.
655func (ao AggregateOffer) AsCreativeWork() (*CreativeWork, bool) {
656	return nil, false
657}
658
659// AsBasicCreativeWork is the BasicResponseBase implementation for AggregateOffer.
660func (ao AggregateOffer) AsBasicCreativeWork() (BasicCreativeWork, bool) {
661	return nil, false
662}
663
664// AsPerson is the BasicResponseBase implementation for AggregateOffer.
665func (ao AggregateOffer) AsPerson() (*Person, bool) {
666	return nil, false
667}
668
669// AsIntangible is the BasicResponseBase implementation for AggregateOffer.
670func (ao AggregateOffer) AsIntangible() (*Intangible, bool) {
671	return nil, false
672}
673
674// AsBasicIntangible is the BasicResponseBase implementation for AggregateOffer.
675func (ao AggregateOffer) AsBasicIntangible() (BasicIntangible, bool) {
676	return nil, false
677}
678
679// AsImageEntityAction is the BasicResponseBase implementation for AggregateOffer.
680func (ao AggregateOffer) AsImageEntityAction() (*ImageEntityAction, bool) {
681	return nil, false
682}
683
684// AsImageModuleAction is the BasicResponseBase implementation for AggregateOffer.
685func (ao AggregateOffer) AsImageModuleAction() (*ImageModuleAction, bool) {
686	return nil, false
687}
688
689// AsRecipe is the BasicResponseBase implementation for AggregateOffer.
690func (ao AggregateOffer) AsRecipe() (*Recipe, bool) {
691	return nil, false
692}
693
694// AsImageRecipesAction is the BasicResponseBase implementation for AggregateOffer.
695func (ao AggregateOffer) AsImageRecipesAction() (*ImageRecipesAction, bool) {
696	return nil, false
697}
698
699// AsImageRelatedSearchesAction is the BasicResponseBase implementation for AggregateOffer.
700func (ao AggregateOffer) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
701	return nil, false
702}
703
704// AsImageShoppingSourcesAction is the BasicResponseBase implementation for AggregateOffer.
705func (ao AggregateOffer) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
706	return nil, false
707}
708
709// AsStructuredValue is the BasicResponseBase implementation for AggregateOffer.
710func (ao AggregateOffer) AsStructuredValue() (*StructuredValue, bool) {
711	return nil, false
712}
713
714// AsBasicStructuredValue is the BasicResponseBase implementation for AggregateOffer.
715func (ao AggregateOffer) AsBasicStructuredValue() (BasicStructuredValue, bool) {
716	return nil, false
717}
718
719// AsResponseBase is the BasicResponseBase implementation for AggregateOffer.
720func (ao AggregateOffer) AsResponseBase() (*ResponseBase, bool) {
721	return nil, false
722}
723
724// AsBasicResponseBase is the BasicResponseBase implementation for AggregateOffer.
725func (ao AggregateOffer) AsBasicResponseBase() (BasicResponseBase, bool) {
726	return &ao, true
727}
728
729// UnmarshalJSON is the custom unmarshaler for AggregateOffer struct.
730func (ao *AggregateOffer) UnmarshalJSON(body []byte) error {
731	var m map[string]*json.RawMessage
732	err := json.Unmarshal(body, &m)
733	if err != nil {
734		return err
735	}
736	for k, v := range m {
737		switch k {
738		case "offers":
739			if v != nil {
740				offers, err := unmarshalBasicOfferArray(*v)
741				if err != nil {
742					return err
743				}
744				ao.Offers = &offers
745			}
746		case "seller":
747			if v != nil {
748				var seller Organization
749				err = json.Unmarshal(*v, &seller)
750				if err != nil {
751					return err
752				}
753				ao.Seller = &seller
754			}
755		case "price":
756			if v != nil {
757				var price float64
758				err = json.Unmarshal(*v, &price)
759				if err != nil {
760					return err
761				}
762				ao.Price = &price
763			}
764		case "priceCurrency":
765			if v != nil {
766				var priceCurrency Currency
767				err = json.Unmarshal(*v, &priceCurrency)
768				if err != nil {
769					return err
770				}
771				ao.PriceCurrency = priceCurrency
772			}
773		case "availability":
774			if v != nil {
775				var availability ItemAvailability
776				err = json.Unmarshal(*v, &availability)
777				if err != nil {
778					return err
779				}
780				ao.Availability = availability
781			}
782		case "aggregateRating":
783			if v != nil {
784				var aggregateRating AggregateRating
785				err = json.Unmarshal(*v, &aggregateRating)
786				if err != nil {
787					return err
788				}
789				ao.AggregateRating = &aggregateRating
790			}
791		case "lastUpdated":
792			if v != nil {
793				var lastUpdated string
794				err = json.Unmarshal(*v, &lastUpdated)
795				if err != nil {
796					return err
797				}
798				ao.LastUpdated = &lastUpdated
799			}
800		case "name":
801			if v != nil {
802				var name string
803				err = json.Unmarshal(*v, &name)
804				if err != nil {
805					return err
806				}
807				ao.Name = &name
808			}
809		case "url":
810			if v != nil {
811				var URL string
812				err = json.Unmarshal(*v, &URL)
813				if err != nil {
814					return err
815				}
816				ao.URL = &URL
817			}
818		case "image":
819			if v != nil {
820				var imageVar ImageObject
821				err = json.Unmarshal(*v, &imageVar)
822				if err != nil {
823					return err
824				}
825				ao.Image = &imageVar
826			}
827		case "description":
828			if v != nil {
829				var description string
830				err = json.Unmarshal(*v, &description)
831				if err != nil {
832					return err
833				}
834				ao.Description = &description
835			}
836		case "alternateName":
837			if v != nil {
838				var alternateName string
839				err = json.Unmarshal(*v, &alternateName)
840				if err != nil {
841					return err
842				}
843				ao.AlternateName = &alternateName
844			}
845		case "bingId":
846			if v != nil {
847				var bingID string
848				err = json.Unmarshal(*v, &bingID)
849				if err != nil {
850					return err
851				}
852				ao.BingID = &bingID
853			}
854		case "readLink":
855			if v != nil {
856				var readLink string
857				err = json.Unmarshal(*v, &readLink)
858				if err != nil {
859					return err
860				}
861				ao.ReadLink = &readLink
862			}
863		case "webSearchUrl":
864			if v != nil {
865				var webSearchURL string
866				err = json.Unmarshal(*v, &webSearchURL)
867				if err != nil {
868					return err
869				}
870				ao.WebSearchURL = &webSearchURL
871			}
872		case "id":
873			if v != nil {
874				var ID string
875				err = json.Unmarshal(*v, &ID)
876				if err != nil {
877					return err
878				}
879				ao.ID = &ID
880			}
881		case "_type":
882			if v != nil {
883				var typeVar Type
884				err = json.Unmarshal(*v, &typeVar)
885				if err != nil {
886					return err
887				}
888				ao.Type = typeVar
889			}
890		}
891	}
892
893	return nil
894}
895
896// AggregateRating defines the metrics that indicate how well an item was rated by others.
897type AggregateRating struct {
898	// ReviewCount - READ-ONLY; The number of times the recipe has been rated or reviewed.
899	ReviewCount *int32 `json:"reviewCount,omitempty"`
900	// RatingValue - The mean (average) rating. The possible values are 1.0 through 5.0.
901	RatingValue *float64 `json:"ratingValue,omitempty"`
902	// BestRating - READ-ONLY; The highest rated review. The possible values are 1.0 through 5.0.
903	BestRating *float64 `json:"bestRating,omitempty"`
904	// Text - READ-ONLY; Text representation of an item.
905	Text *string `json:"text,omitempty"`
906	// Type - Possible values include: 'TypePropertiesItem', 'TypeAggregateRating', 'TypeRating'
907	Type TypeBasicPropertiesItem `json:"_type,omitempty"`
908}
909
910// MarshalJSON is the custom marshaler for AggregateRating.
911func (ar AggregateRating) MarshalJSON() ([]byte, error) {
912	ar.Type = TypeAggregateRating
913	objectMap := make(map[string]interface{})
914	if ar.RatingValue != nil {
915		objectMap["ratingValue"] = ar.RatingValue
916	}
917	if ar.Type != "" {
918		objectMap["_type"] = ar.Type
919	}
920	return json.Marshal(objectMap)
921}
922
923// AsAggregateRating is the BasicPropertiesItem implementation for AggregateRating.
924func (ar AggregateRating) AsAggregateRating() (*AggregateRating, bool) {
925	return &ar, true
926}
927
928// AsRating is the BasicPropertiesItem implementation for AggregateRating.
929func (ar AggregateRating) AsRating() (*Rating, bool) {
930	return nil, false
931}
932
933// AsBasicRating is the BasicPropertiesItem implementation for AggregateRating.
934func (ar AggregateRating) AsBasicRating() (BasicRating, bool) {
935	return &ar, true
936}
937
938// AsPropertiesItem is the BasicPropertiesItem implementation for AggregateRating.
939func (ar AggregateRating) AsPropertiesItem() (*PropertiesItem, bool) {
940	return nil, false
941}
942
943// AsBasicPropertiesItem is the BasicPropertiesItem implementation for AggregateRating.
944func (ar AggregateRating) AsBasicPropertiesItem() (BasicPropertiesItem, bool) {
945	return &ar, true
946}
947
948// BasicCreativeWork the most generic kind of creative work, including books, movies, photographs, software programs,
949// etc.
950type BasicCreativeWork interface {
951	AsImageAction() (*ImageAction, bool)
952	AsBasicImageAction() (BasicImageAction, bool)
953	AsImageObject() (*ImageObject, bool)
954	AsAction() (*Action, bool)
955	AsBasicAction() (BasicAction, bool)
956	AsMediaObject() (*MediaObject, bool)
957	AsBasicMediaObject() (BasicMediaObject, bool)
958	AsImageEntityAction() (*ImageEntityAction, bool)
959	AsImageModuleAction() (*ImageModuleAction, bool)
960	AsRecipe() (*Recipe, bool)
961	AsImageRecipesAction() (*ImageRecipesAction, bool)
962	AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool)
963	AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool)
964	AsCreativeWork() (*CreativeWork, bool)
965}
966
967// CreativeWork the most generic kind of creative work, including books, movies, photographs, software
968// programs, etc.
969type CreativeWork struct {
970	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
971	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
972	// Provider - READ-ONLY; The source of the creative work.
973	Provider *[]BasicThing `json:"provider,omitempty"`
974	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
975	DatePublished *string `json:"datePublished,omitempty"`
976	// Text - READ-ONLY; Text content of this creative work.
977	Text *string `json:"text,omitempty"`
978	// Name - READ-ONLY; The name of the thing represented by this object.
979	Name *string `json:"name,omitempty"`
980	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
981	URL *string `json:"url,omitempty"`
982	// Image - READ-ONLY; An image of the item.
983	Image *ImageObject `json:"image,omitempty"`
984	// Description - READ-ONLY; A short description of the item.
985	Description *string `json:"description,omitempty"`
986	// AlternateName - READ-ONLY; An alias for the item.
987	AlternateName *string `json:"alternateName,omitempty"`
988	// BingID - READ-ONLY; An ID that uniquely identifies this item.
989	BingID *string `json:"bingId,omitempty"`
990	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
991	ReadLink *string `json:"readLink,omitempty"`
992	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
993	WebSearchURL *string `json:"webSearchUrl,omitempty"`
994	// ID - READ-ONLY; A String identifier.
995	ID *string `json:"id,omitempty"`
996	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
997	Type Type `json:"_type,omitempty"`
998}
999
1000func unmarshalBasicCreativeWork(body []byte) (BasicCreativeWork, error) {
1001	var m map[string]interface{}
1002	err := json.Unmarshal(body, &m)
1003	if err != nil {
1004		return nil, err
1005	}
1006
1007	switch m["_type"] {
1008	case string(TypeImageAction):
1009		var ia ImageAction
1010		err := json.Unmarshal(body, &ia)
1011		return ia, err
1012	case string(TypeImageObject):
1013		var ioVar ImageObject
1014		err := json.Unmarshal(body, &ioVar)
1015		return ioVar, err
1016	case string(TypeAction):
1017		var a Action
1018		err := json.Unmarshal(body, &a)
1019		return a, err
1020	case string(TypeMediaObject):
1021		var mo MediaObject
1022		err := json.Unmarshal(body, &mo)
1023		return mo, err
1024	case string(TypeImageEntityAction):
1025		var iea ImageEntityAction
1026		err := json.Unmarshal(body, &iea)
1027		return iea, err
1028	case string(TypeImageModuleAction):
1029		var ima ImageModuleAction
1030		err := json.Unmarshal(body, &ima)
1031		return ima, err
1032	case string(TypeRecipe):
1033		var r Recipe
1034		err := json.Unmarshal(body, &r)
1035		return r, err
1036	case string(TypeImageRecipesAction):
1037		var ira ImageRecipesAction
1038		err := json.Unmarshal(body, &ira)
1039		return ira, err
1040	case string(TypeImageRelatedSearchesAction):
1041		var irsa ImageRelatedSearchesAction
1042		err := json.Unmarshal(body, &irsa)
1043		return irsa, err
1044	case string(TypeImageShoppingSourcesAction):
1045		var issa ImageShoppingSourcesAction
1046		err := json.Unmarshal(body, &issa)
1047		return issa, err
1048	default:
1049		var cw CreativeWork
1050		err := json.Unmarshal(body, &cw)
1051		return cw, err
1052	}
1053}
1054func unmarshalBasicCreativeWorkArray(body []byte) ([]BasicCreativeWork, error) {
1055	var rawMessages []*json.RawMessage
1056	err := json.Unmarshal(body, &rawMessages)
1057	if err != nil {
1058		return nil, err
1059	}
1060
1061	cwArray := make([]BasicCreativeWork, len(rawMessages))
1062
1063	for index, rawMessage := range rawMessages {
1064		cw, err := unmarshalBasicCreativeWork(*rawMessage)
1065		if err != nil {
1066			return nil, err
1067		}
1068		cwArray[index] = cw
1069	}
1070	return cwArray, nil
1071}
1072
1073// MarshalJSON is the custom marshaler for CreativeWork.
1074func (cw CreativeWork) MarshalJSON() ([]byte, error) {
1075	cw.Type = TypeCreativeWork
1076	objectMap := make(map[string]interface{})
1077	if cw.Type != "" {
1078		objectMap["_type"] = cw.Type
1079	}
1080	return json.Marshal(objectMap)
1081}
1082
1083// AsPoint2D is the BasicResponseBase implementation for CreativeWork.
1084func (cw CreativeWork) AsPoint2D() (*Point2D, bool) {
1085	return nil, false
1086}
1087
1088// AsNormalizedQuadrilateral is the BasicResponseBase implementation for CreativeWork.
1089func (cw CreativeWork) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
1090	return nil, false
1091}
1092
1093// AsImageAction is the BasicResponseBase implementation for CreativeWork.
1094func (cw CreativeWork) AsImageAction() (*ImageAction, bool) {
1095	return nil, false
1096}
1097
1098// AsBasicImageAction is the BasicResponseBase implementation for CreativeWork.
1099func (cw CreativeWork) AsBasicImageAction() (BasicImageAction, bool) {
1100	return nil, false
1101}
1102
1103// AsImageTag is the BasicResponseBase implementation for CreativeWork.
1104func (cw CreativeWork) AsImageTag() (*ImageTag, bool) {
1105	return nil, false
1106}
1107
1108// AsOrganization is the BasicResponseBase implementation for CreativeWork.
1109func (cw CreativeWork) AsOrganization() (*Organization, bool) {
1110	return nil, false
1111}
1112
1113// AsOffer is the BasicResponseBase implementation for CreativeWork.
1114func (cw CreativeWork) AsOffer() (*Offer, bool) {
1115	return nil, false
1116}
1117
1118// AsBasicOffer is the BasicResponseBase implementation for CreativeWork.
1119func (cw CreativeWork) AsBasicOffer() (BasicOffer, bool) {
1120	return nil, false
1121}
1122
1123// AsAggregateOffer is the BasicResponseBase implementation for CreativeWork.
1124func (cw CreativeWork) AsAggregateOffer() (*AggregateOffer, bool) {
1125	return nil, false
1126}
1127
1128// AsImageObject is the BasicResponseBase implementation for CreativeWork.
1129func (cw CreativeWork) AsImageObject() (*ImageObject, bool) {
1130	return nil, false
1131}
1132
1133// AsImageKnowledge is the BasicResponseBase implementation for CreativeWork.
1134func (cw CreativeWork) AsImageKnowledge() (*ImageKnowledge, bool) {
1135	return nil, false
1136}
1137
1138// AsResponse is the BasicResponseBase implementation for CreativeWork.
1139func (cw CreativeWork) AsResponse() (*Response, bool) {
1140	return nil, false
1141}
1142
1143// AsBasicResponse is the BasicResponseBase implementation for CreativeWork.
1144func (cw CreativeWork) AsBasicResponse() (BasicResponse, bool) {
1145	return &cw, true
1146}
1147
1148// AsIdentifiable is the BasicResponseBase implementation for CreativeWork.
1149func (cw CreativeWork) AsIdentifiable() (*Identifiable, bool) {
1150	return nil, false
1151}
1152
1153// AsBasicIdentifiable is the BasicResponseBase implementation for CreativeWork.
1154func (cw CreativeWork) AsBasicIdentifiable() (BasicIdentifiable, bool) {
1155	return &cw, true
1156}
1157
1158// AsErrorResponse is the BasicResponseBase implementation for CreativeWork.
1159func (cw CreativeWork) AsErrorResponse() (*ErrorResponse, bool) {
1160	return nil, false
1161}
1162
1163// AsThing is the BasicResponseBase implementation for CreativeWork.
1164func (cw CreativeWork) AsThing() (*Thing, bool) {
1165	return nil, false
1166}
1167
1168// AsBasicThing is the BasicResponseBase implementation for CreativeWork.
1169func (cw CreativeWork) AsBasicThing() (BasicThing, bool) {
1170	return &cw, true
1171}
1172
1173// AsAction is the BasicResponseBase implementation for CreativeWork.
1174func (cw CreativeWork) AsAction() (*Action, bool) {
1175	return nil, false
1176}
1177
1178// AsBasicAction is the BasicResponseBase implementation for CreativeWork.
1179func (cw CreativeWork) AsBasicAction() (BasicAction, bool) {
1180	return nil, false
1181}
1182
1183// AsMediaObject is the BasicResponseBase implementation for CreativeWork.
1184func (cw CreativeWork) AsMediaObject() (*MediaObject, bool) {
1185	return nil, false
1186}
1187
1188// AsBasicMediaObject is the BasicResponseBase implementation for CreativeWork.
1189func (cw CreativeWork) AsBasicMediaObject() (BasicMediaObject, bool) {
1190	return nil, false
1191}
1192
1193// AsCreativeWork is the BasicResponseBase implementation for CreativeWork.
1194func (cw CreativeWork) AsCreativeWork() (*CreativeWork, bool) {
1195	return &cw, true
1196}
1197
1198// AsBasicCreativeWork is the BasicResponseBase implementation for CreativeWork.
1199func (cw CreativeWork) AsBasicCreativeWork() (BasicCreativeWork, bool) {
1200	return &cw, true
1201}
1202
1203// AsPerson is the BasicResponseBase implementation for CreativeWork.
1204func (cw CreativeWork) AsPerson() (*Person, bool) {
1205	return nil, false
1206}
1207
1208// AsIntangible is the BasicResponseBase implementation for CreativeWork.
1209func (cw CreativeWork) AsIntangible() (*Intangible, bool) {
1210	return nil, false
1211}
1212
1213// AsBasicIntangible is the BasicResponseBase implementation for CreativeWork.
1214func (cw CreativeWork) AsBasicIntangible() (BasicIntangible, bool) {
1215	return nil, false
1216}
1217
1218// AsImageEntityAction is the BasicResponseBase implementation for CreativeWork.
1219func (cw CreativeWork) AsImageEntityAction() (*ImageEntityAction, bool) {
1220	return nil, false
1221}
1222
1223// AsImageModuleAction is the BasicResponseBase implementation for CreativeWork.
1224func (cw CreativeWork) AsImageModuleAction() (*ImageModuleAction, bool) {
1225	return nil, false
1226}
1227
1228// AsRecipe is the BasicResponseBase implementation for CreativeWork.
1229func (cw CreativeWork) AsRecipe() (*Recipe, bool) {
1230	return nil, false
1231}
1232
1233// AsImageRecipesAction is the BasicResponseBase implementation for CreativeWork.
1234func (cw CreativeWork) AsImageRecipesAction() (*ImageRecipesAction, bool) {
1235	return nil, false
1236}
1237
1238// AsImageRelatedSearchesAction is the BasicResponseBase implementation for CreativeWork.
1239func (cw CreativeWork) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
1240	return nil, false
1241}
1242
1243// AsImageShoppingSourcesAction is the BasicResponseBase implementation for CreativeWork.
1244func (cw CreativeWork) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
1245	return nil, false
1246}
1247
1248// AsStructuredValue is the BasicResponseBase implementation for CreativeWork.
1249func (cw CreativeWork) AsStructuredValue() (*StructuredValue, bool) {
1250	return nil, false
1251}
1252
1253// AsBasicStructuredValue is the BasicResponseBase implementation for CreativeWork.
1254func (cw CreativeWork) AsBasicStructuredValue() (BasicStructuredValue, bool) {
1255	return nil, false
1256}
1257
1258// AsResponseBase is the BasicResponseBase implementation for CreativeWork.
1259func (cw CreativeWork) AsResponseBase() (*ResponseBase, bool) {
1260	return nil, false
1261}
1262
1263// AsBasicResponseBase is the BasicResponseBase implementation for CreativeWork.
1264func (cw CreativeWork) AsBasicResponseBase() (BasicResponseBase, bool) {
1265	return &cw, true
1266}
1267
1268// UnmarshalJSON is the custom unmarshaler for CreativeWork struct.
1269func (cw *CreativeWork) UnmarshalJSON(body []byte) error {
1270	var m map[string]*json.RawMessage
1271	err := json.Unmarshal(body, &m)
1272	if err != nil {
1273		return err
1274	}
1275	for k, v := range m {
1276		switch k {
1277		case "thumbnailUrl":
1278			if v != nil {
1279				var thumbnailURL string
1280				err = json.Unmarshal(*v, &thumbnailURL)
1281				if err != nil {
1282					return err
1283				}
1284				cw.ThumbnailURL = &thumbnailURL
1285			}
1286		case "provider":
1287			if v != nil {
1288				provider, err := unmarshalBasicThingArray(*v)
1289				if err != nil {
1290					return err
1291				}
1292				cw.Provider = &provider
1293			}
1294		case "datePublished":
1295			if v != nil {
1296				var datePublished string
1297				err = json.Unmarshal(*v, &datePublished)
1298				if err != nil {
1299					return err
1300				}
1301				cw.DatePublished = &datePublished
1302			}
1303		case "text":
1304			if v != nil {
1305				var textVar string
1306				err = json.Unmarshal(*v, &textVar)
1307				if err != nil {
1308					return err
1309				}
1310				cw.Text = &textVar
1311			}
1312		case "name":
1313			if v != nil {
1314				var name string
1315				err = json.Unmarshal(*v, &name)
1316				if err != nil {
1317					return err
1318				}
1319				cw.Name = &name
1320			}
1321		case "url":
1322			if v != nil {
1323				var URL string
1324				err = json.Unmarshal(*v, &URL)
1325				if err != nil {
1326					return err
1327				}
1328				cw.URL = &URL
1329			}
1330		case "image":
1331			if v != nil {
1332				var imageVar ImageObject
1333				err = json.Unmarshal(*v, &imageVar)
1334				if err != nil {
1335					return err
1336				}
1337				cw.Image = &imageVar
1338			}
1339		case "description":
1340			if v != nil {
1341				var description string
1342				err = json.Unmarshal(*v, &description)
1343				if err != nil {
1344					return err
1345				}
1346				cw.Description = &description
1347			}
1348		case "alternateName":
1349			if v != nil {
1350				var alternateName string
1351				err = json.Unmarshal(*v, &alternateName)
1352				if err != nil {
1353					return err
1354				}
1355				cw.AlternateName = &alternateName
1356			}
1357		case "bingId":
1358			if v != nil {
1359				var bingID string
1360				err = json.Unmarshal(*v, &bingID)
1361				if err != nil {
1362					return err
1363				}
1364				cw.BingID = &bingID
1365			}
1366		case "readLink":
1367			if v != nil {
1368				var readLink string
1369				err = json.Unmarshal(*v, &readLink)
1370				if err != nil {
1371					return err
1372				}
1373				cw.ReadLink = &readLink
1374			}
1375		case "webSearchUrl":
1376			if v != nil {
1377				var webSearchURL string
1378				err = json.Unmarshal(*v, &webSearchURL)
1379				if err != nil {
1380					return err
1381				}
1382				cw.WebSearchURL = &webSearchURL
1383			}
1384		case "id":
1385			if v != nil {
1386				var ID string
1387				err = json.Unmarshal(*v, &ID)
1388				if err != nil {
1389					return err
1390				}
1391				cw.ID = &ID
1392			}
1393		case "_type":
1394			if v != nil {
1395				var typeVar Type
1396				err = json.Unmarshal(*v, &typeVar)
1397				if err != nil {
1398					return err
1399				}
1400				cw.Type = typeVar
1401			}
1402		}
1403	}
1404
1405	return nil
1406}
1407
1408// CropArea a JSON object consisting of coordinates specifying the four corners of a cropped rectangle
1409// within the input image.
1410type CropArea struct {
1411	// Top - The top coordinate of the region to be cropped. The coordinate is a fractional value of the original image's height and is measured from the top edge of the image. Specify the coordinate as a value from 0.0 through 1.0.
1412	Top *float64 `json:"top,omitempty"`
1413	// Bottom - The bottom coordinate of the region to be cropped. The coordinate is a fractional value of the original image's height and is measured from the top edge of the image. Specify the coordinate as a value from 0.0 through 1.0.
1414	Bottom *float64 `json:"bottom,omitempty"`
1415	// Left - The left coordinate of the region to be cropped. The coordinate is a fractional value of the original image's width and is measured from the left edge of the image. Specify the coordinate as a value from 0.0 through 1.0.
1416	Left *float64 `json:"left,omitempty"`
1417	// Right - The right coordinate of the region to be cropped. The coordinate is a fractional value of the original image's width and is measured from the left edge of the image. Specify the coordinate as a value from 0.0 through 1.0.
1418	Right *float64 `json:"right,omitempty"`
1419}
1420
1421// Error defines the error that occurred.
1422type Error struct {
1423	// Code - The error code that identifies the category of error. Possible values include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'
1424	Code ErrorCode `json:"code,omitempty"`
1425	// 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'
1426	SubCode ErrorSubCode `json:"subCode,omitempty"`
1427	// Message - A description of the error.
1428	Message *string `json:"message,omitempty"`
1429	// MoreDetails - READ-ONLY; A description that provides additional information about the error.
1430	MoreDetails *string `json:"moreDetails,omitempty"`
1431	// Parameter - READ-ONLY; The parameter in the request that caused the error.
1432	Parameter *string `json:"parameter,omitempty"`
1433	// Value - READ-ONLY; The parameter's value in the request that was not valid.
1434	Value *string `json:"value,omitempty"`
1435}
1436
1437// MarshalJSON is the custom marshaler for Error.
1438func (e Error) MarshalJSON() ([]byte, error) {
1439	objectMap := make(map[string]interface{})
1440	if e.Code != "" {
1441		objectMap["code"] = e.Code
1442	}
1443	if e.Message != nil {
1444		objectMap["message"] = e.Message
1445	}
1446	return json.Marshal(objectMap)
1447}
1448
1449// ErrorResponse the top-level response that represents a failed request.
1450type ErrorResponse struct {
1451	// Errors - A list of errors that describe the reasons why the request failed.
1452	Errors *[]Error `json:"errors,omitempty"`
1453	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
1454	ReadLink *string `json:"readLink,omitempty"`
1455	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
1456	WebSearchURL *string `json:"webSearchUrl,omitempty"`
1457	// ID - READ-ONLY; A String identifier.
1458	ID *string `json:"id,omitempty"`
1459	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
1460	Type Type `json:"_type,omitempty"`
1461}
1462
1463// MarshalJSON is the custom marshaler for ErrorResponse.
1464func (er ErrorResponse) MarshalJSON() ([]byte, error) {
1465	er.Type = TypeErrorResponse
1466	objectMap := make(map[string]interface{})
1467	if er.Errors != nil {
1468		objectMap["errors"] = er.Errors
1469	}
1470	if er.Type != "" {
1471		objectMap["_type"] = er.Type
1472	}
1473	return json.Marshal(objectMap)
1474}
1475
1476// AsPoint2D is the BasicResponseBase implementation for ErrorResponse.
1477func (er ErrorResponse) AsPoint2D() (*Point2D, bool) {
1478	return nil, false
1479}
1480
1481// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ErrorResponse.
1482func (er ErrorResponse) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
1483	return nil, false
1484}
1485
1486// AsImageAction is the BasicResponseBase implementation for ErrorResponse.
1487func (er ErrorResponse) AsImageAction() (*ImageAction, bool) {
1488	return nil, false
1489}
1490
1491// AsBasicImageAction is the BasicResponseBase implementation for ErrorResponse.
1492func (er ErrorResponse) AsBasicImageAction() (BasicImageAction, bool) {
1493	return nil, false
1494}
1495
1496// AsImageTag is the BasicResponseBase implementation for ErrorResponse.
1497func (er ErrorResponse) AsImageTag() (*ImageTag, bool) {
1498	return nil, false
1499}
1500
1501// AsOrganization is the BasicResponseBase implementation for ErrorResponse.
1502func (er ErrorResponse) AsOrganization() (*Organization, bool) {
1503	return nil, false
1504}
1505
1506// AsOffer is the BasicResponseBase implementation for ErrorResponse.
1507func (er ErrorResponse) AsOffer() (*Offer, bool) {
1508	return nil, false
1509}
1510
1511// AsBasicOffer is the BasicResponseBase implementation for ErrorResponse.
1512func (er ErrorResponse) AsBasicOffer() (BasicOffer, bool) {
1513	return nil, false
1514}
1515
1516// AsAggregateOffer is the BasicResponseBase implementation for ErrorResponse.
1517func (er ErrorResponse) AsAggregateOffer() (*AggregateOffer, bool) {
1518	return nil, false
1519}
1520
1521// AsImageObject is the BasicResponseBase implementation for ErrorResponse.
1522func (er ErrorResponse) AsImageObject() (*ImageObject, bool) {
1523	return nil, false
1524}
1525
1526// AsImageKnowledge is the BasicResponseBase implementation for ErrorResponse.
1527func (er ErrorResponse) AsImageKnowledge() (*ImageKnowledge, bool) {
1528	return nil, false
1529}
1530
1531// AsResponse is the BasicResponseBase implementation for ErrorResponse.
1532func (er ErrorResponse) AsResponse() (*Response, bool) {
1533	return nil, false
1534}
1535
1536// AsBasicResponse is the BasicResponseBase implementation for ErrorResponse.
1537func (er ErrorResponse) AsBasicResponse() (BasicResponse, bool) {
1538	return &er, true
1539}
1540
1541// AsIdentifiable is the BasicResponseBase implementation for ErrorResponse.
1542func (er ErrorResponse) AsIdentifiable() (*Identifiable, bool) {
1543	return nil, false
1544}
1545
1546// AsBasicIdentifiable is the BasicResponseBase implementation for ErrorResponse.
1547func (er ErrorResponse) AsBasicIdentifiable() (BasicIdentifiable, bool) {
1548	return &er, true
1549}
1550
1551// AsErrorResponse is the BasicResponseBase implementation for ErrorResponse.
1552func (er ErrorResponse) AsErrorResponse() (*ErrorResponse, bool) {
1553	return &er, true
1554}
1555
1556// AsThing is the BasicResponseBase implementation for ErrorResponse.
1557func (er ErrorResponse) AsThing() (*Thing, bool) {
1558	return nil, false
1559}
1560
1561// AsBasicThing is the BasicResponseBase implementation for ErrorResponse.
1562func (er ErrorResponse) AsBasicThing() (BasicThing, bool) {
1563	return nil, false
1564}
1565
1566// AsAction is the BasicResponseBase implementation for ErrorResponse.
1567func (er ErrorResponse) AsAction() (*Action, bool) {
1568	return nil, false
1569}
1570
1571// AsBasicAction is the BasicResponseBase implementation for ErrorResponse.
1572func (er ErrorResponse) AsBasicAction() (BasicAction, bool) {
1573	return nil, false
1574}
1575
1576// AsMediaObject is the BasicResponseBase implementation for ErrorResponse.
1577func (er ErrorResponse) AsMediaObject() (*MediaObject, bool) {
1578	return nil, false
1579}
1580
1581// AsBasicMediaObject is the BasicResponseBase implementation for ErrorResponse.
1582func (er ErrorResponse) AsBasicMediaObject() (BasicMediaObject, bool) {
1583	return nil, false
1584}
1585
1586// AsCreativeWork is the BasicResponseBase implementation for ErrorResponse.
1587func (er ErrorResponse) AsCreativeWork() (*CreativeWork, bool) {
1588	return nil, false
1589}
1590
1591// AsBasicCreativeWork is the BasicResponseBase implementation for ErrorResponse.
1592func (er ErrorResponse) AsBasicCreativeWork() (BasicCreativeWork, bool) {
1593	return nil, false
1594}
1595
1596// AsPerson is the BasicResponseBase implementation for ErrorResponse.
1597func (er ErrorResponse) AsPerson() (*Person, bool) {
1598	return nil, false
1599}
1600
1601// AsIntangible is the BasicResponseBase implementation for ErrorResponse.
1602func (er ErrorResponse) AsIntangible() (*Intangible, bool) {
1603	return nil, false
1604}
1605
1606// AsBasicIntangible is the BasicResponseBase implementation for ErrorResponse.
1607func (er ErrorResponse) AsBasicIntangible() (BasicIntangible, bool) {
1608	return nil, false
1609}
1610
1611// AsImageEntityAction is the BasicResponseBase implementation for ErrorResponse.
1612func (er ErrorResponse) AsImageEntityAction() (*ImageEntityAction, bool) {
1613	return nil, false
1614}
1615
1616// AsImageModuleAction is the BasicResponseBase implementation for ErrorResponse.
1617func (er ErrorResponse) AsImageModuleAction() (*ImageModuleAction, bool) {
1618	return nil, false
1619}
1620
1621// AsRecipe is the BasicResponseBase implementation for ErrorResponse.
1622func (er ErrorResponse) AsRecipe() (*Recipe, bool) {
1623	return nil, false
1624}
1625
1626// AsImageRecipesAction is the BasicResponseBase implementation for ErrorResponse.
1627func (er ErrorResponse) AsImageRecipesAction() (*ImageRecipesAction, bool) {
1628	return nil, false
1629}
1630
1631// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ErrorResponse.
1632func (er ErrorResponse) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
1633	return nil, false
1634}
1635
1636// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ErrorResponse.
1637func (er ErrorResponse) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
1638	return nil, false
1639}
1640
1641// AsStructuredValue is the BasicResponseBase implementation for ErrorResponse.
1642func (er ErrorResponse) AsStructuredValue() (*StructuredValue, bool) {
1643	return nil, false
1644}
1645
1646// AsBasicStructuredValue is the BasicResponseBase implementation for ErrorResponse.
1647func (er ErrorResponse) AsBasicStructuredValue() (BasicStructuredValue, bool) {
1648	return nil, false
1649}
1650
1651// AsResponseBase is the BasicResponseBase implementation for ErrorResponse.
1652func (er ErrorResponse) AsResponseBase() (*ResponseBase, bool) {
1653	return nil, false
1654}
1655
1656// AsBasicResponseBase is the BasicResponseBase implementation for ErrorResponse.
1657func (er ErrorResponse) AsBasicResponseBase() (BasicResponseBase, bool) {
1658	return &er, true
1659}
1660
1661// Filters a key-value object consisting of filters that may be specified to limit the results returned by
1662// the API. Current available filters: site.
1663type Filters struct {
1664	// Site - The URL of the site to return similar images and similar products from. (e.g., "www.bing.com", "bing.com").
1665	Site *string `json:"site,omitempty"`
1666}
1667
1668// BasicIdentifiable defines the identity of a resource.
1669type BasicIdentifiable interface {
1670	AsPoint2D() (*Point2D, bool)
1671	AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool)
1672	AsImageAction() (*ImageAction, bool)
1673	AsBasicImageAction() (BasicImageAction, bool)
1674	AsImageTag() (*ImageTag, bool)
1675	AsOrganization() (*Organization, bool)
1676	AsOffer() (*Offer, bool)
1677	AsBasicOffer() (BasicOffer, bool)
1678	AsAggregateOffer() (*AggregateOffer, bool)
1679	AsImageObject() (*ImageObject, bool)
1680	AsImageKnowledge() (*ImageKnowledge, bool)
1681	AsResponse() (*Response, bool)
1682	AsBasicResponse() (BasicResponse, bool)
1683	AsErrorResponse() (*ErrorResponse, bool)
1684	AsThing() (*Thing, bool)
1685	AsBasicThing() (BasicThing, bool)
1686	AsAction() (*Action, bool)
1687	AsBasicAction() (BasicAction, bool)
1688	AsMediaObject() (*MediaObject, bool)
1689	AsBasicMediaObject() (BasicMediaObject, bool)
1690	AsCreativeWork() (*CreativeWork, bool)
1691	AsBasicCreativeWork() (BasicCreativeWork, bool)
1692	AsPerson() (*Person, bool)
1693	AsIntangible() (*Intangible, bool)
1694	AsBasicIntangible() (BasicIntangible, bool)
1695	AsImageEntityAction() (*ImageEntityAction, bool)
1696	AsImageModuleAction() (*ImageModuleAction, bool)
1697	AsRecipe() (*Recipe, bool)
1698	AsImageRecipesAction() (*ImageRecipesAction, bool)
1699	AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool)
1700	AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool)
1701	AsStructuredValue() (*StructuredValue, bool)
1702	AsBasicStructuredValue() (BasicStructuredValue, bool)
1703	AsIdentifiable() (*Identifiable, bool)
1704}
1705
1706// Identifiable defines the identity of a resource.
1707type Identifiable struct {
1708	// ID - READ-ONLY; A String identifier.
1709	ID *string `json:"id,omitempty"`
1710	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
1711	Type Type `json:"_type,omitempty"`
1712}
1713
1714func unmarshalBasicIdentifiable(body []byte) (BasicIdentifiable, error) {
1715	var m map[string]interface{}
1716	err := json.Unmarshal(body, &m)
1717	if err != nil {
1718		return nil, err
1719	}
1720
1721	switch m["_type"] {
1722	case string(TypePoint2D):
1723		var p2 Point2D
1724		err := json.Unmarshal(body, &p2)
1725		return p2, err
1726	case string(TypeNormalizedQuadrilateral):
1727		var nq NormalizedQuadrilateral
1728		err := json.Unmarshal(body, &nq)
1729		return nq, err
1730	case string(TypeImageAction):
1731		var ia ImageAction
1732		err := json.Unmarshal(body, &ia)
1733		return ia, err
1734	case string(TypeImageTag):
1735		var it ImageTag
1736		err := json.Unmarshal(body, &it)
1737		return it, err
1738	case string(TypeOrganization):
1739		var o Organization
1740		err := json.Unmarshal(body, &o)
1741		return o, err
1742	case string(TypeOffer):
1743		var o Offer
1744		err := json.Unmarshal(body, &o)
1745		return o, err
1746	case string(TypeAggregateOffer):
1747		var ao AggregateOffer
1748		err := json.Unmarshal(body, &ao)
1749		return ao, err
1750	case string(TypeImageObject):
1751		var ioVar ImageObject
1752		err := json.Unmarshal(body, &ioVar)
1753		return ioVar, err
1754	case string(TypeImageKnowledge):
1755		var ik ImageKnowledge
1756		err := json.Unmarshal(body, &ik)
1757		return ik, err
1758	case string(TypeResponse):
1759		var r Response
1760		err := json.Unmarshal(body, &r)
1761		return r, err
1762	case string(TypeErrorResponse):
1763		var er ErrorResponse
1764		err := json.Unmarshal(body, &er)
1765		return er, err
1766	case string(TypeThing):
1767		var t Thing
1768		err := json.Unmarshal(body, &t)
1769		return t, err
1770	case string(TypeAction):
1771		var a Action
1772		err := json.Unmarshal(body, &a)
1773		return a, err
1774	case string(TypeMediaObject):
1775		var mo MediaObject
1776		err := json.Unmarshal(body, &mo)
1777		return mo, err
1778	case string(TypeCreativeWork):
1779		var cw CreativeWork
1780		err := json.Unmarshal(body, &cw)
1781		return cw, err
1782	case string(TypePerson):
1783		var p Person
1784		err := json.Unmarshal(body, &p)
1785		return p, err
1786	case string(TypeIntangible):
1787		var i Intangible
1788		err := json.Unmarshal(body, &i)
1789		return i, err
1790	case string(TypeImageEntityAction):
1791		var iea ImageEntityAction
1792		err := json.Unmarshal(body, &iea)
1793		return iea, err
1794	case string(TypeImageModuleAction):
1795		var ima ImageModuleAction
1796		err := json.Unmarshal(body, &ima)
1797		return ima, err
1798	case string(TypeRecipe):
1799		var r Recipe
1800		err := json.Unmarshal(body, &r)
1801		return r, err
1802	case string(TypeImageRecipesAction):
1803		var ira ImageRecipesAction
1804		err := json.Unmarshal(body, &ira)
1805		return ira, err
1806	case string(TypeImageRelatedSearchesAction):
1807		var irsa ImageRelatedSearchesAction
1808		err := json.Unmarshal(body, &irsa)
1809		return irsa, err
1810	case string(TypeImageShoppingSourcesAction):
1811		var issa ImageShoppingSourcesAction
1812		err := json.Unmarshal(body, &issa)
1813		return issa, err
1814	case string(TypeStructuredValue):
1815		var sv StructuredValue
1816		err := json.Unmarshal(body, &sv)
1817		return sv, err
1818	default:
1819		var i Identifiable
1820		err := json.Unmarshal(body, &i)
1821		return i, err
1822	}
1823}
1824func unmarshalBasicIdentifiableArray(body []byte) ([]BasicIdentifiable, error) {
1825	var rawMessages []*json.RawMessage
1826	err := json.Unmarshal(body, &rawMessages)
1827	if err != nil {
1828		return nil, err
1829	}
1830
1831	iArray := make([]BasicIdentifiable, len(rawMessages))
1832
1833	for index, rawMessage := range rawMessages {
1834		i, err := unmarshalBasicIdentifiable(*rawMessage)
1835		if err != nil {
1836			return nil, err
1837		}
1838		iArray[index] = i
1839	}
1840	return iArray, nil
1841}
1842
1843// MarshalJSON is the custom marshaler for Identifiable.
1844func (i Identifiable) MarshalJSON() ([]byte, error) {
1845	i.Type = TypeIdentifiable
1846	objectMap := make(map[string]interface{})
1847	if i.Type != "" {
1848		objectMap["_type"] = i.Type
1849	}
1850	return json.Marshal(objectMap)
1851}
1852
1853// AsPoint2D is the BasicResponseBase implementation for Identifiable.
1854func (i Identifiable) AsPoint2D() (*Point2D, bool) {
1855	return nil, false
1856}
1857
1858// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Identifiable.
1859func (i Identifiable) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
1860	return nil, false
1861}
1862
1863// AsImageAction is the BasicResponseBase implementation for Identifiable.
1864func (i Identifiable) AsImageAction() (*ImageAction, bool) {
1865	return nil, false
1866}
1867
1868// AsBasicImageAction is the BasicResponseBase implementation for Identifiable.
1869func (i Identifiable) AsBasicImageAction() (BasicImageAction, bool) {
1870	return nil, false
1871}
1872
1873// AsImageTag is the BasicResponseBase implementation for Identifiable.
1874func (i Identifiable) AsImageTag() (*ImageTag, bool) {
1875	return nil, false
1876}
1877
1878// AsOrganization is the BasicResponseBase implementation for Identifiable.
1879func (i Identifiable) AsOrganization() (*Organization, bool) {
1880	return nil, false
1881}
1882
1883// AsOffer is the BasicResponseBase implementation for Identifiable.
1884func (i Identifiable) AsOffer() (*Offer, bool) {
1885	return nil, false
1886}
1887
1888// AsBasicOffer is the BasicResponseBase implementation for Identifiable.
1889func (i Identifiable) AsBasicOffer() (BasicOffer, bool) {
1890	return nil, false
1891}
1892
1893// AsAggregateOffer is the BasicResponseBase implementation for Identifiable.
1894func (i Identifiable) AsAggregateOffer() (*AggregateOffer, bool) {
1895	return nil, false
1896}
1897
1898// AsImageObject is the BasicResponseBase implementation for Identifiable.
1899func (i Identifiable) AsImageObject() (*ImageObject, bool) {
1900	return nil, false
1901}
1902
1903// AsImageKnowledge is the BasicResponseBase implementation for Identifiable.
1904func (i Identifiable) AsImageKnowledge() (*ImageKnowledge, bool) {
1905	return nil, false
1906}
1907
1908// AsResponse is the BasicResponseBase implementation for Identifiable.
1909func (i Identifiable) AsResponse() (*Response, bool) {
1910	return nil, false
1911}
1912
1913// AsBasicResponse is the BasicResponseBase implementation for Identifiable.
1914func (i Identifiable) AsBasicResponse() (BasicResponse, bool) {
1915	return nil, false
1916}
1917
1918// AsIdentifiable is the BasicResponseBase implementation for Identifiable.
1919func (i Identifiable) AsIdentifiable() (*Identifiable, bool) {
1920	return &i, true
1921}
1922
1923// AsBasicIdentifiable is the BasicResponseBase implementation for Identifiable.
1924func (i Identifiable) AsBasicIdentifiable() (BasicIdentifiable, bool) {
1925	return &i, true
1926}
1927
1928// AsErrorResponse is the BasicResponseBase implementation for Identifiable.
1929func (i Identifiable) AsErrorResponse() (*ErrorResponse, bool) {
1930	return nil, false
1931}
1932
1933// AsThing is the BasicResponseBase implementation for Identifiable.
1934func (i Identifiable) AsThing() (*Thing, bool) {
1935	return nil, false
1936}
1937
1938// AsBasicThing is the BasicResponseBase implementation for Identifiable.
1939func (i Identifiable) AsBasicThing() (BasicThing, bool) {
1940	return nil, false
1941}
1942
1943// AsAction is the BasicResponseBase implementation for Identifiable.
1944func (i Identifiable) AsAction() (*Action, bool) {
1945	return nil, false
1946}
1947
1948// AsBasicAction is the BasicResponseBase implementation for Identifiable.
1949func (i Identifiable) AsBasicAction() (BasicAction, bool) {
1950	return nil, false
1951}
1952
1953// AsMediaObject is the BasicResponseBase implementation for Identifiable.
1954func (i Identifiable) AsMediaObject() (*MediaObject, bool) {
1955	return nil, false
1956}
1957
1958// AsBasicMediaObject is the BasicResponseBase implementation for Identifiable.
1959func (i Identifiable) AsBasicMediaObject() (BasicMediaObject, bool) {
1960	return nil, false
1961}
1962
1963// AsCreativeWork is the BasicResponseBase implementation for Identifiable.
1964func (i Identifiable) AsCreativeWork() (*CreativeWork, bool) {
1965	return nil, false
1966}
1967
1968// AsBasicCreativeWork is the BasicResponseBase implementation for Identifiable.
1969func (i Identifiable) AsBasicCreativeWork() (BasicCreativeWork, bool) {
1970	return nil, false
1971}
1972
1973// AsPerson is the BasicResponseBase implementation for Identifiable.
1974func (i Identifiable) AsPerson() (*Person, bool) {
1975	return nil, false
1976}
1977
1978// AsIntangible is the BasicResponseBase implementation for Identifiable.
1979func (i Identifiable) AsIntangible() (*Intangible, bool) {
1980	return nil, false
1981}
1982
1983// AsBasicIntangible is the BasicResponseBase implementation for Identifiable.
1984func (i Identifiable) AsBasicIntangible() (BasicIntangible, bool) {
1985	return nil, false
1986}
1987
1988// AsImageEntityAction is the BasicResponseBase implementation for Identifiable.
1989func (i Identifiable) AsImageEntityAction() (*ImageEntityAction, bool) {
1990	return nil, false
1991}
1992
1993// AsImageModuleAction is the BasicResponseBase implementation for Identifiable.
1994func (i Identifiable) AsImageModuleAction() (*ImageModuleAction, bool) {
1995	return nil, false
1996}
1997
1998// AsRecipe is the BasicResponseBase implementation for Identifiable.
1999func (i Identifiable) AsRecipe() (*Recipe, bool) {
2000	return nil, false
2001}
2002
2003// AsImageRecipesAction is the BasicResponseBase implementation for Identifiable.
2004func (i Identifiable) AsImageRecipesAction() (*ImageRecipesAction, bool) {
2005	return nil, false
2006}
2007
2008// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Identifiable.
2009func (i Identifiable) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
2010	return nil, false
2011}
2012
2013// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Identifiable.
2014func (i Identifiable) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
2015	return nil, false
2016}
2017
2018// AsStructuredValue is the BasicResponseBase implementation for Identifiable.
2019func (i Identifiable) AsStructuredValue() (*StructuredValue, bool) {
2020	return nil, false
2021}
2022
2023// AsBasicStructuredValue is the BasicResponseBase implementation for Identifiable.
2024func (i Identifiable) AsBasicStructuredValue() (BasicStructuredValue, bool) {
2025	return nil, false
2026}
2027
2028// AsResponseBase is the BasicResponseBase implementation for Identifiable.
2029func (i Identifiable) AsResponseBase() (*ResponseBase, bool) {
2030	return nil, false
2031}
2032
2033// AsBasicResponseBase is the BasicResponseBase implementation for Identifiable.
2034func (i Identifiable) AsBasicResponseBase() (BasicResponseBase, bool) {
2035	return &i, true
2036}
2037
2038// BasicImageAction defines an image action.
2039type BasicImageAction interface {
2040	AsImageEntityAction() (*ImageEntityAction, bool)
2041	AsImageModuleAction() (*ImageModuleAction, bool)
2042	AsImageRecipesAction() (*ImageRecipesAction, bool)
2043	AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool)
2044	AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool)
2045	AsImageAction() (*ImageAction, bool)
2046}
2047
2048// ImageAction defines an image action.
2049type ImageAction struct {
2050	// ActionType - READ-ONLY; A string representing the type of action.
2051	ActionType *string `json:"actionType,omitempty"`
2052	// Result - READ-ONLY; The result produced in the action.
2053	Result *[]BasicThing `json:"result,omitempty"`
2054	// DisplayName - READ-ONLY; A display name for the action.
2055	DisplayName *string `json:"displayName,omitempty"`
2056	// IsTopAction - READ-ONLY; A Boolean representing whether this result is the top action.
2057	IsTopAction *bool `json:"isTopAction,omitempty"`
2058	// ServiceURL - READ-ONLY; Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.
2059	ServiceURL *string `json:"serviceUrl,omitempty"`
2060	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
2061	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
2062	// Provider - READ-ONLY; The source of the creative work.
2063	Provider *[]BasicThing `json:"provider,omitempty"`
2064	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
2065	DatePublished *string `json:"datePublished,omitempty"`
2066	// Text - READ-ONLY; Text content of this creative work.
2067	Text *string `json:"text,omitempty"`
2068	// Name - READ-ONLY; The name of the thing represented by this object.
2069	Name *string `json:"name,omitempty"`
2070	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
2071	URL *string `json:"url,omitempty"`
2072	// Image - READ-ONLY; An image of the item.
2073	Image *ImageObject `json:"image,omitempty"`
2074	// Description - READ-ONLY; A short description of the item.
2075	Description *string `json:"description,omitempty"`
2076	// AlternateName - READ-ONLY; An alias for the item.
2077	AlternateName *string `json:"alternateName,omitempty"`
2078	// BingID - READ-ONLY; An ID that uniquely identifies this item.
2079	BingID *string `json:"bingId,omitempty"`
2080	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
2081	ReadLink *string `json:"readLink,omitempty"`
2082	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
2083	WebSearchURL *string `json:"webSearchUrl,omitempty"`
2084	// ID - READ-ONLY; A String identifier.
2085	ID *string `json:"id,omitempty"`
2086	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
2087	Type Type `json:"_type,omitempty"`
2088}
2089
2090func unmarshalBasicImageAction(body []byte) (BasicImageAction, error) {
2091	var m map[string]interface{}
2092	err := json.Unmarshal(body, &m)
2093	if err != nil {
2094		return nil, err
2095	}
2096
2097	switch m["_type"] {
2098	case string(TypeImageEntityAction):
2099		var iea ImageEntityAction
2100		err := json.Unmarshal(body, &iea)
2101		return iea, err
2102	case string(TypeImageModuleAction):
2103		var ima ImageModuleAction
2104		err := json.Unmarshal(body, &ima)
2105		return ima, err
2106	case string(TypeImageRecipesAction):
2107		var ira ImageRecipesAction
2108		err := json.Unmarshal(body, &ira)
2109		return ira, err
2110	case string(TypeImageRelatedSearchesAction):
2111		var irsa ImageRelatedSearchesAction
2112		err := json.Unmarshal(body, &irsa)
2113		return irsa, err
2114	case string(TypeImageShoppingSourcesAction):
2115		var issa ImageShoppingSourcesAction
2116		err := json.Unmarshal(body, &issa)
2117		return issa, err
2118	default:
2119		var ia ImageAction
2120		err := json.Unmarshal(body, &ia)
2121		return ia, err
2122	}
2123}
2124func unmarshalBasicImageActionArray(body []byte) ([]BasicImageAction, error) {
2125	var rawMessages []*json.RawMessage
2126	err := json.Unmarshal(body, &rawMessages)
2127	if err != nil {
2128		return nil, err
2129	}
2130
2131	iaArray := make([]BasicImageAction, len(rawMessages))
2132
2133	for index, rawMessage := range rawMessages {
2134		ia, err := unmarshalBasicImageAction(*rawMessage)
2135		if err != nil {
2136			return nil, err
2137		}
2138		iaArray[index] = ia
2139	}
2140	return iaArray, nil
2141}
2142
2143// MarshalJSON is the custom marshaler for ImageAction.
2144func (ia ImageAction) MarshalJSON() ([]byte, error) {
2145	ia.Type = TypeImageAction
2146	objectMap := make(map[string]interface{})
2147	if ia.Type != "" {
2148		objectMap["_type"] = ia.Type
2149	}
2150	return json.Marshal(objectMap)
2151}
2152
2153// AsPoint2D is the BasicResponseBase implementation for ImageAction.
2154func (ia ImageAction) AsPoint2D() (*Point2D, bool) {
2155	return nil, false
2156}
2157
2158// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ImageAction.
2159func (ia ImageAction) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
2160	return nil, false
2161}
2162
2163// AsImageAction is the BasicResponseBase implementation for ImageAction.
2164func (ia ImageAction) AsImageAction() (*ImageAction, bool) {
2165	return &ia, true
2166}
2167
2168// AsBasicImageAction is the BasicResponseBase implementation for ImageAction.
2169func (ia ImageAction) AsBasicImageAction() (BasicImageAction, bool) {
2170	return &ia, true
2171}
2172
2173// AsImageTag is the BasicResponseBase implementation for ImageAction.
2174func (ia ImageAction) AsImageTag() (*ImageTag, bool) {
2175	return nil, false
2176}
2177
2178// AsOrganization is the BasicResponseBase implementation for ImageAction.
2179func (ia ImageAction) AsOrganization() (*Organization, bool) {
2180	return nil, false
2181}
2182
2183// AsOffer is the BasicResponseBase implementation for ImageAction.
2184func (ia ImageAction) AsOffer() (*Offer, bool) {
2185	return nil, false
2186}
2187
2188// AsBasicOffer is the BasicResponseBase implementation for ImageAction.
2189func (ia ImageAction) AsBasicOffer() (BasicOffer, bool) {
2190	return nil, false
2191}
2192
2193// AsAggregateOffer is the BasicResponseBase implementation for ImageAction.
2194func (ia ImageAction) AsAggregateOffer() (*AggregateOffer, bool) {
2195	return nil, false
2196}
2197
2198// AsImageObject is the BasicResponseBase implementation for ImageAction.
2199func (ia ImageAction) AsImageObject() (*ImageObject, bool) {
2200	return nil, false
2201}
2202
2203// AsImageKnowledge is the BasicResponseBase implementation for ImageAction.
2204func (ia ImageAction) AsImageKnowledge() (*ImageKnowledge, bool) {
2205	return nil, false
2206}
2207
2208// AsResponse is the BasicResponseBase implementation for ImageAction.
2209func (ia ImageAction) AsResponse() (*Response, bool) {
2210	return nil, false
2211}
2212
2213// AsBasicResponse is the BasicResponseBase implementation for ImageAction.
2214func (ia ImageAction) AsBasicResponse() (BasicResponse, bool) {
2215	return &ia, true
2216}
2217
2218// AsIdentifiable is the BasicResponseBase implementation for ImageAction.
2219func (ia ImageAction) AsIdentifiable() (*Identifiable, bool) {
2220	return nil, false
2221}
2222
2223// AsBasicIdentifiable is the BasicResponseBase implementation for ImageAction.
2224func (ia ImageAction) AsBasicIdentifiable() (BasicIdentifiable, bool) {
2225	return &ia, true
2226}
2227
2228// AsErrorResponse is the BasicResponseBase implementation for ImageAction.
2229func (ia ImageAction) AsErrorResponse() (*ErrorResponse, bool) {
2230	return nil, false
2231}
2232
2233// AsThing is the BasicResponseBase implementation for ImageAction.
2234func (ia ImageAction) AsThing() (*Thing, bool) {
2235	return nil, false
2236}
2237
2238// AsBasicThing is the BasicResponseBase implementation for ImageAction.
2239func (ia ImageAction) AsBasicThing() (BasicThing, bool) {
2240	return &ia, true
2241}
2242
2243// AsAction is the BasicResponseBase implementation for ImageAction.
2244func (ia ImageAction) AsAction() (*Action, bool) {
2245	return nil, false
2246}
2247
2248// AsBasicAction is the BasicResponseBase implementation for ImageAction.
2249func (ia ImageAction) AsBasicAction() (BasicAction, bool) {
2250	return &ia, true
2251}
2252
2253// AsMediaObject is the BasicResponseBase implementation for ImageAction.
2254func (ia ImageAction) AsMediaObject() (*MediaObject, bool) {
2255	return nil, false
2256}
2257
2258// AsBasicMediaObject is the BasicResponseBase implementation for ImageAction.
2259func (ia ImageAction) AsBasicMediaObject() (BasicMediaObject, bool) {
2260	return nil, false
2261}
2262
2263// AsCreativeWork is the BasicResponseBase implementation for ImageAction.
2264func (ia ImageAction) AsCreativeWork() (*CreativeWork, bool) {
2265	return nil, false
2266}
2267
2268// AsBasicCreativeWork is the BasicResponseBase implementation for ImageAction.
2269func (ia ImageAction) AsBasicCreativeWork() (BasicCreativeWork, bool) {
2270	return &ia, true
2271}
2272
2273// AsPerson is the BasicResponseBase implementation for ImageAction.
2274func (ia ImageAction) AsPerson() (*Person, bool) {
2275	return nil, false
2276}
2277
2278// AsIntangible is the BasicResponseBase implementation for ImageAction.
2279func (ia ImageAction) AsIntangible() (*Intangible, bool) {
2280	return nil, false
2281}
2282
2283// AsBasicIntangible is the BasicResponseBase implementation for ImageAction.
2284func (ia ImageAction) AsBasicIntangible() (BasicIntangible, bool) {
2285	return nil, false
2286}
2287
2288// AsImageEntityAction is the BasicResponseBase implementation for ImageAction.
2289func (ia ImageAction) AsImageEntityAction() (*ImageEntityAction, bool) {
2290	return nil, false
2291}
2292
2293// AsImageModuleAction is the BasicResponseBase implementation for ImageAction.
2294func (ia ImageAction) AsImageModuleAction() (*ImageModuleAction, bool) {
2295	return nil, false
2296}
2297
2298// AsRecipe is the BasicResponseBase implementation for ImageAction.
2299func (ia ImageAction) AsRecipe() (*Recipe, bool) {
2300	return nil, false
2301}
2302
2303// AsImageRecipesAction is the BasicResponseBase implementation for ImageAction.
2304func (ia ImageAction) AsImageRecipesAction() (*ImageRecipesAction, bool) {
2305	return nil, false
2306}
2307
2308// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ImageAction.
2309func (ia ImageAction) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
2310	return nil, false
2311}
2312
2313// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ImageAction.
2314func (ia ImageAction) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
2315	return nil, false
2316}
2317
2318// AsStructuredValue is the BasicResponseBase implementation for ImageAction.
2319func (ia ImageAction) AsStructuredValue() (*StructuredValue, bool) {
2320	return nil, false
2321}
2322
2323// AsBasicStructuredValue is the BasicResponseBase implementation for ImageAction.
2324func (ia ImageAction) AsBasicStructuredValue() (BasicStructuredValue, bool) {
2325	return nil, false
2326}
2327
2328// AsResponseBase is the BasicResponseBase implementation for ImageAction.
2329func (ia ImageAction) AsResponseBase() (*ResponseBase, bool) {
2330	return nil, false
2331}
2332
2333// AsBasicResponseBase is the BasicResponseBase implementation for ImageAction.
2334func (ia ImageAction) AsBasicResponseBase() (BasicResponseBase, bool) {
2335	return &ia, true
2336}
2337
2338// UnmarshalJSON is the custom unmarshaler for ImageAction struct.
2339func (ia *ImageAction) UnmarshalJSON(body []byte) error {
2340	var m map[string]*json.RawMessage
2341	err := json.Unmarshal(body, &m)
2342	if err != nil {
2343		return err
2344	}
2345	for k, v := range m {
2346		switch k {
2347		case "actionType":
2348			if v != nil {
2349				var actionType string
2350				err = json.Unmarshal(*v, &actionType)
2351				if err != nil {
2352					return err
2353				}
2354				ia.ActionType = &actionType
2355			}
2356		case "result":
2357			if v != nil {
2358				resultVar, err := unmarshalBasicThingArray(*v)
2359				if err != nil {
2360					return err
2361				}
2362				ia.Result = &resultVar
2363			}
2364		case "displayName":
2365			if v != nil {
2366				var displayName string
2367				err = json.Unmarshal(*v, &displayName)
2368				if err != nil {
2369					return err
2370				}
2371				ia.DisplayName = &displayName
2372			}
2373		case "isTopAction":
2374			if v != nil {
2375				var isTopAction bool
2376				err = json.Unmarshal(*v, &isTopAction)
2377				if err != nil {
2378					return err
2379				}
2380				ia.IsTopAction = &isTopAction
2381			}
2382		case "serviceUrl":
2383			if v != nil {
2384				var serviceURL string
2385				err = json.Unmarshal(*v, &serviceURL)
2386				if err != nil {
2387					return err
2388				}
2389				ia.ServiceURL = &serviceURL
2390			}
2391		case "thumbnailUrl":
2392			if v != nil {
2393				var thumbnailURL string
2394				err = json.Unmarshal(*v, &thumbnailURL)
2395				if err != nil {
2396					return err
2397				}
2398				ia.ThumbnailURL = &thumbnailURL
2399			}
2400		case "provider":
2401			if v != nil {
2402				provider, err := unmarshalBasicThingArray(*v)
2403				if err != nil {
2404					return err
2405				}
2406				ia.Provider = &provider
2407			}
2408		case "datePublished":
2409			if v != nil {
2410				var datePublished string
2411				err = json.Unmarshal(*v, &datePublished)
2412				if err != nil {
2413					return err
2414				}
2415				ia.DatePublished = &datePublished
2416			}
2417		case "text":
2418			if v != nil {
2419				var textVar string
2420				err = json.Unmarshal(*v, &textVar)
2421				if err != nil {
2422					return err
2423				}
2424				ia.Text = &textVar
2425			}
2426		case "name":
2427			if v != nil {
2428				var name string
2429				err = json.Unmarshal(*v, &name)
2430				if err != nil {
2431					return err
2432				}
2433				ia.Name = &name
2434			}
2435		case "url":
2436			if v != nil {
2437				var URL string
2438				err = json.Unmarshal(*v, &URL)
2439				if err != nil {
2440					return err
2441				}
2442				ia.URL = &URL
2443			}
2444		case "image":
2445			if v != nil {
2446				var imageVar ImageObject
2447				err = json.Unmarshal(*v, &imageVar)
2448				if err != nil {
2449					return err
2450				}
2451				ia.Image = &imageVar
2452			}
2453		case "description":
2454			if v != nil {
2455				var description string
2456				err = json.Unmarshal(*v, &description)
2457				if err != nil {
2458					return err
2459				}
2460				ia.Description = &description
2461			}
2462		case "alternateName":
2463			if v != nil {
2464				var alternateName string
2465				err = json.Unmarshal(*v, &alternateName)
2466				if err != nil {
2467					return err
2468				}
2469				ia.AlternateName = &alternateName
2470			}
2471		case "bingId":
2472			if v != nil {
2473				var bingID string
2474				err = json.Unmarshal(*v, &bingID)
2475				if err != nil {
2476					return err
2477				}
2478				ia.BingID = &bingID
2479			}
2480		case "readLink":
2481			if v != nil {
2482				var readLink string
2483				err = json.Unmarshal(*v, &readLink)
2484				if err != nil {
2485					return err
2486				}
2487				ia.ReadLink = &readLink
2488			}
2489		case "webSearchUrl":
2490			if v != nil {
2491				var webSearchURL string
2492				err = json.Unmarshal(*v, &webSearchURL)
2493				if err != nil {
2494					return err
2495				}
2496				ia.WebSearchURL = &webSearchURL
2497			}
2498		case "id":
2499			if v != nil {
2500				var ID string
2501				err = json.Unmarshal(*v, &ID)
2502				if err != nil {
2503					return err
2504				}
2505				ia.ID = &ID
2506			}
2507		case "_type":
2508			if v != nil {
2509				var typeVar Type
2510				err = json.Unmarshal(*v, &typeVar)
2511				if err != nil {
2512					return err
2513				}
2514				ia.Type = typeVar
2515			}
2516		}
2517	}
2518
2519	return nil
2520}
2521
2522// ImageEntityAction defines an entity action.
2523type ImageEntityAction struct {
2524	// ActionType - READ-ONLY; A string representing the type of action.
2525	ActionType *string `json:"actionType,omitempty"`
2526	// Result - READ-ONLY; The result produced in the action.
2527	Result *[]BasicThing `json:"result,omitempty"`
2528	// DisplayName - READ-ONLY; A display name for the action.
2529	DisplayName *string `json:"displayName,omitempty"`
2530	// IsTopAction - READ-ONLY; A Boolean representing whether this result is the top action.
2531	IsTopAction *bool `json:"isTopAction,omitempty"`
2532	// ServiceURL - READ-ONLY; Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.
2533	ServiceURL *string `json:"serviceUrl,omitempty"`
2534	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
2535	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
2536	// Provider - READ-ONLY; The source of the creative work.
2537	Provider *[]BasicThing `json:"provider,omitempty"`
2538	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
2539	DatePublished *string `json:"datePublished,omitempty"`
2540	// Text - READ-ONLY; Text content of this creative work.
2541	Text *string `json:"text,omitempty"`
2542	// Name - READ-ONLY; The name of the thing represented by this object.
2543	Name *string `json:"name,omitempty"`
2544	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
2545	URL *string `json:"url,omitempty"`
2546	// Image - READ-ONLY; An image of the item.
2547	Image *ImageObject `json:"image,omitempty"`
2548	// Description - READ-ONLY; A short description of the item.
2549	Description *string `json:"description,omitempty"`
2550	// AlternateName - READ-ONLY; An alias for the item.
2551	AlternateName *string `json:"alternateName,omitempty"`
2552	// BingID - READ-ONLY; An ID that uniquely identifies this item.
2553	BingID *string `json:"bingId,omitempty"`
2554	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
2555	ReadLink *string `json:"readLink,omitempty"`
2556	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
2557	WebSearchURL *string `json:"webSearchUrl,omitempty"`
2558	// ID - READ-ONLY; A String identifier.
2559	ID *string `json:"id,omitempty"`
2560	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
2561	Type Type `json:"_type,omitempty"`
2562}
2563
2564// MarshalJSON is the custom marshaler for ImageEntityAction.
2565func (iea ImageEntityAction) MarshalJSON() ([]byte, error) {
2566	iea.Type = TypeImageEntityAction
2567	objectMap := make(map[string]interface{})
2568	if iea.Type != "" {
2569		objectMap["_type"] = iea.Type
2570	}
2571	return json.Marshal(objectMap)
2572}
2573
2574// AsPoint2D is the BasicResponseBase implementation for ImageEntityAction.
2575func (iea ImageEntityAction) AsPoint2D() (*Point2D, bool) {
2576	return nil, false
2577}
2578
2579// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ImageEntityAction.
2580func (iea ImageEntityAction) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
2581	return nil, false
2582}
2583
2584// AsImageAction is the BasicResponseBase implementation for ImageEntityAction.
2585func (iea ImageEntityAction) AsImageAction() (*ImageAction, bool) {
2586	return nil, false
2587}
2588
2589// AsBasicImageAction is the BasicResponseBase implementation for ImageEntityAction.
2590func (iea ImageEntityAction) AsBasicImageAction() (BasicImageAction, bool) {
2591	return &iea, true
2592}
2593
2594// AsImageTag is the BasicResponseBase implementation for ImageEntityAction.
2595func (iea ImageEntityAction) AsImageTag() (*ImageTag, bool) {
2596	return nil, false
2597}
2598
2599// AsOrganization is the BasicResponseBase implementation for ImageEntityAction.
2600func (iea ImageEntityAction) AsOrganization() (*Organization, bool) {
2601	return nil, false
2602}
2603
2604// AsOffer is the BasicResponseBase implementation for ImageEntityAction.
2605func (iea ImageEntityAction) AsOffer() (*Offer, bool) {
2606	return nil, false
2607}
2608
2609// AsBasicOffer is the BasicResponseBase implementation for ImageEntityAction.
2610func (iea ImageEntityAction) AsBasicOffer() (BasicOffer, bool) {
2611	return nil, false
2612}
2613
2614// AsAggregateOffer is the BasicResponseBase implementation for ImageEntityAction.
2615func (iea ImageEntityAction) AsAggregateOffer() (*AggregateOffer, bool) {
2616	return nil, false
2617}
2618
2619// AsImageObject is the BasicResponseBase implementation for ImageEntityAction.
2620func (iea ImageEntityAction) AsImageObject() (*ImageObject, bool) {
2621	return nil, false
2622}
2623
2624// AsImageKnowledge is the BasicResponseBase implementation for ImageEntityAction.
2625func (iea ImageEntityAction) AsImageKnowledge() (*ImageKnowledge, bool) {
2626	return nil, false
2627}
2628
2629// AsResponse is the BasicResponseBase implementation for ImageEntityAction.
2630func (iea ImageEntityAction) AsResponse() (*Response, bool) {
2631	return nil, false
2632}
2633
2634// AsBasicResponse is the BasicResponseBase implementation for ImageEntityAction.
2635func (iea ImageEntityAction) AsBasicResponse() (BasicResponse, bool) {
2636	return &iea, true
2637}
2638
2639// AsIdentifiable is the BasicResponseBase implementation for ImageEntityAction.
2640func (iea ImageEntityAction) AsIdentifiable() (*Identifiable, bool) {
2641	return nil, false
2642}
2643
2644// AsBasicIdentifiable is the BasicResponseBase implementation for ImageEntityAction.
2645func (iea ImageEntityAction) AsBasicIdentifiable() (BasicIdentifiable, bool) {
2646	return &iea, true
2647}
2648
2649// AsErrorResponse is the BasicResponseBase implementation for ImageEntityAction.
2650func (iea ImageEntityAction) AsErrorResponse() (*ErrorResponse, bool) {
2651	return nil, false
2652}
2653
2654// AsThing is the BasicResponseBase implementation for ImageEntityAction.
2655func (iea ImageEntityAction) AsThing() (*Thing, bool) {
2656	return nil, false
2657}
2658
2659// AsBasicThing is the BasicResponseBase implementation for ImageEntityAction.
2660func (iea ImageEntityAction) AsBasicThing() (BasicThing, bool) {
2661	return &iea, true
2662}
2663
2664// AsAction is the BasicResponseBase implementation for ImageEntityAction.
2665func (iea ImageEntityAction) AsAction() (*Action, bool) {
2666	return nil, false
2667}
2668
2669// AsBasicAction is the BasicResponseBase implementation for ImageEntityAction.
2670func (iea ImageEntityAction) AsBasicAction() (BasicAction, bool) {
2671	return &iea, true
2672}
2673
2674// AsMediaObject is the BasicResponseBase implementation for ImageEntityAction.
2675func (iea ImageEntityAction) AsMediaObject() (*MediaObject, bool) {
2676	return nil, false
2677}
2678
2679// AsBasicMediaObject is the BasicResponseBase implementation for ImageEntityAction.
2680func (iea ImageEntityAction) AsBasicMediaObject() (BasicMediaObject, bool) {
2681	return nil, false
2682}
2683
2684// AsCreativeWork is the BasicResponseBase implementation for ImageEntityAction.
2685func (iea ImageEntityAction) AsCreativeWork() (*CreativeWork, bool) {
2686	return nil, false
2687}
2688
2689// AsBasicCreativeWork is the BasicResponseBase implementation for ImageEntityAction.
2690func (iea ImageEntityAction) AsBasicCreativeWork() (BasicCreativeWork, bool) {
2691	return &iea, true
2692}
2693
2694// AsPerson is the BasicResponseBase implementation for ImageEntityAction.
2695func (iea ImageEntityAction) AsPerson() (*Person, bool) {
2696	return nil, false
2697}
2698
2699// AsIntangible is the BasicResponseBase implementation for ImageEntityAction.
2700func (iea ImageEntityAction) AsIntangible() (*Intangible, bool) {
2701	return nil, false
2702}
2703
2704// AsBasicIntangible is the BasicResponseBase implementation for ImageEntityAction.
2705func (iea ImageEntityAction) AsBasicIntangible() (BasicIntangible, bool) {
2706	return nil, false
2707}
2708
2709// AsImageEntityAction is the BasicResponseBase implementation for ImageEntityAction.
2710func (iea ImageEntityAction) AsImageEntityAction() (*ImageEntityAction, bool) {
2711	return &iea, true
2712}
2713
2714// AsImageModuleAction is the BasicResponseBase implementation for ImageEntityAction.
2715func (iea ImageEntityAction) AsImageModuleAction() (*ImageModuleAction, bool) {
2716	return nil, false
2717}
2718
2719// AsRecipe is the BasicResponseBase implementation for ImageEntityAction.
2720func (iea ImageEntityAction) AsRecipe() (*Recipe, bool) {
2721	return nil, false
2722}
2723
2724// AsImageRecipesAction is the BasicResponseBase implementation for ImageEntityAction.
2725func (iea ImageEntityAction) AsImageRecipesAction() (*ImageRecipesAction, bool) {
2726	return nil, false
2727}
2728
2729// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ImageEntityAction.
2730func (iea ImageEntityAction) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
2731	return nil, false
2732}
2733
2734// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ImageEntityAction.
2735func (iea ImageEntityAction) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
2736	return nil, false
2737}
2738
2739// AsStructuredValue is the BasicResponseBase implementation for ImageEntityAction.
2740func (iea ImageEntityAction) AsStructuredValue() (*StructuredValue, bool) {
2741	return nil, false
2742}
2743
2744// AsBasicStructuredValue is the BasicResponseBase implementation for ImageEntityAction.
2745func (iea ImageEntityAction) AsBasicStructuredValue() (BasicStructuredValue, bool) {
2746	return nil, false
2747}
2748
2749// AsResponseBase is the BasicResponseBase implementation for ImageEntityAction.
2750func (iea ImageEntityAction) AsResponseBase() (*ResponseBase, bool) {
2751	return nil, false
2752}
2753
2754// AsBasicResponseBase is the BasicResponseBase implementation for ImageEntityAction.
2755func (iea ImageEntityAction) AsBasicResponseBase() (BasicResponseBase, bool) {
2756	return &iea, true
2757}
2758
2759// UnmarshalJSON is the custom unmarshaler for ImageEntityAction struct.
2760func (iea *ImageEntityAction) UnmarshalJSON(body []byte) error {
2761	var m map[string]*json.RawMessage
2762	err := json.Unmarshal(body, &m)
2763	if err != nil {
2764		return err
2765	}
2766	for k, v := range m {
2767		switch k {
2768		case "actionType":
2769			if v != nil {
2770				var actionType string
2771				err = json.Unmarshal(*v, &actionType)
2772				if err != nil {
2773					return err
2774				}
2775				iea.ActionType = &actionType
2776			}
2777		case "result":
2778			if v != nil {
2779				resultVar, err := unmarshalBasicThingArray(*v)
2780				if err != nil {
2781					return err
2782				}
2783				iea.Result = &resultVar
2784			}
2785		case "displayName":
2786			if v != nil {
2787				var displayName string
2788				err = json.Unmarshal(*v, &displayName)
2789				if err != nil {
2790					return err
2791				}
2792				iea.DisplayName = &displayName
2793			}
2794		case "isTopAction":
2795			if v != nil {
2796				var isTopAction bool
2797				err = json.Unmarshal(*v, &isTopAction)
2798				if err != nil {
2799					return err
2800				}
2801				iea.IsTopAction = &isTopAction
2802			}
2803		case "serviceUrl":
2804			if v != nil {
2805				var serviceURL string
2806				err = json.Unmarshal(*v, &serviceURL)
2807				if err != nil {
2808					return err
2809				}
2810				iea.ServiceURL = &serviceURL
2811			}
2812		case "thumbnailUrl":
2813			if v != nil {
2814				var thumbnailURL string
2815				err = json.Unmarshal(*v, &thumbnailURL)
2816				if err != nil {
2817					return err
2818				}
2819				iea.ThumbnailURL = &thumbnailURL
2820			}
2821		case "provider":
2822			if v != nil {
2823				provider, err := unmarshalBasicThingArray(*v)
2824				if err != nil {
2825					return err
2826				}
2827				iea.Provider = &provider
2828			}
2829		case "datePublished":
2830			if v != nil {
2831				var datePublished string
2832				err = json.Unmarshal(*v, &datePublished)
2833				if err != nil {
2834					return err
2835				}
2836				iea.DatePublished = &datePublished
2837			}
2838		case "text":
2839			if v != nil {
2840				var textVar string
2841				err = json.Unmarshal(*v, &textVar)
2842				if err != nil {
2843					return err
2844				}
2845				iea.Text = &textVar
2846			}
2847		case "name":
2848			if v != nil {
2849				var name string
2850				err = json.Unmarshal(*v, &name)
2851				if err != nil {
2852					return err
2853				}
2854				iea.Name = &name
2855			}
2856		case "url":
2857			if v != nil {
2858				var URL string
2859				err = json.Unmarshal(*v, &URL)
2860				if err != nil {
2861					return err
2862				}
2863				iea.URL = &URL
2864			}
2865		case "image":
2866			if v != nil {
2867				var imageVar ImageObject
2868				err = json.Unmarshal(*v, &imageVar)
2869				if err != nil {
2870					return err
2871				}
2872				iea.Image = &imageVar
2873			}
2874		case "description":
2875			if v != nil {
2876				var description string
2877				err = json.Unmarshal(*v, &description)
2878				if err != nil {
2879					return err
2880				}
2881				iea.Description = &description
2882			}
2883		case "alternateName":
2884			if v != nil {
2885				var alternateName string
2886				err = json.Unmarshal(*v, &alternateName)
2887				if err != nil {
2888					return err
2889				}
2890				iea.AlternateName = &alternateName
2891			}
2892		case "bingId":
2893			if v != nil {
2894				var bingID string
2895				err = json.Unmarshal(*v, &bingID)
2896				if err != nil {
2897					return err
2898				}
2899				iea.BingID = &bingID
2900			}
2901		case "readLink":
2902			if v != nil {
2903				var readLink string
2904				err = json.Unmarshal(*v, &readLink)
2905				if err != nil {
2906					return err
2907				}
2908				iea.ReadLink = &readLink
2909			}
2910		case "webSearchUrl":
2911			if v != nil {
2912				var webSearchURL string
2913				err = json.Unmarshal(*v, &webSearchURL)
2914				if err != nil {
2915					return err
2916				}
2917				iea.WebSearchURL = &webSearchURL
2918			}
2919		case "id":
2920			if v != nil {
2921				var ID string
2922				err = json.Unmarshal(*v, &ID)
2923				if err != nil {
2924					return err
2925				}
2926				iea.ID = &ID
2927			}
2928		case "_type":
2929			if v != nil {
2930				var typeVar Type
2931				err = json.Unmarshal(*v, &typeVar)
2932				if err != nil {
2933					return err
2934				}
2935				iea.Type = typeVar
2936			}
2937		}
2938	}
2939
2940	return nil
2941}
2942
2943// ImageInfo a JSON object that identities the image to get insights of . It also includes the optional
2944// crop area that you use to identify the region of interest in the image.
2945type ImageInfo struct {
2946	// ImageInsightsToken - An image insights token. To get the insights token, call one of the Image Search APIs (for example, /images/search). In the search results, the [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) object's [imageInsightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken) field contains the token. The imageInsightsToken and url fields mutually exclusive; do not specify both. Do not specify an insights token if the request includes the image form data.
2947	ImageInsightsToken *string `json:"imageInsightsToken,omitempty"`
2948	// URL - The URL of the input image. The imageInsightsToken and url fields are mutually exclusive; do not specify both. Do not specify the URL if the request includes the image form data.
2949	URL *string `json:"url,omitempty"`
2950	// CropArea - A JSON object consisting of coordinates specifying the four corners of a cropped rectangle within the input image. Use the crop area to identify the region of interest in the image. You can apply the crop area to the images specified using the imageInsightsToken or url fields, or an image binary specified in an image form data.
2951	CropArea *CropArea `json:"cropArea,omitempty"`
2952}
2953
2954// ImageKnowledge defines a visual search API response.
2955type ImageKnowledge struct {
2956	autorest.Response `json:"-"`
2957	// Tags - READ-ONLY; A list of visual search tags.
2958	Tags *[]ImageTag `json:"tags,omitempty"`
2959	// Image - READ-ONLY; Image object containing metadata about the requested image.
2960	Image *ImageObject `json:"image,omitempty"`
2961	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
2962	ReadLink *string `json:"readLink,omitempty"`
2963	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
2964	WebSearchURL *string `json:"webSearchUrl,omitempty"`
2965	// ID - READ-ONLY; A String identifier.
2966	ID *string `json:"id,omitempty"`
2967	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
2968	Type Type `json:"_type,omitempty"`
2969}
2970
2971// MarshalJSON is the custom marshaler for ImageKnowledge.
2972func (ik ImageKnowledge) MarshalJSON() ([]byte, error) {
2973	ik.Type = TypeImageKnowledge
2974	objectMap := make(map[string]interface{})
2975	if ik.Type != "" {
2976		objectMap["_type"] = ik.Type
2977	}
2978	return json.Marshal(objectMap)
2979}
2980
2981// AsPoint2D is the BasicResponseBase implementation for ImageKnowledge.
2982func (ik ImageKnowledge) AsPoint2D() (*Point2D, bool) {
2983	return nil, false
2984}
2985
2986// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ImageKnowledge.
2987func (ik ImageKnowledge) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
2988	return nil, false
2989}
2990
2991// AsImageAction is the BasicResponseBase implementation for ImageKnowledge.
2992func (ik ImageKnowledge) AsImageAction() (*ImageAction, bool) {
2993	return nil, false
2994}
2995
2996// AsBasicImageAction is the BasicResponseBase implementation for ImageKnowledge.
2997func (ik ImageKnowledge) AsBasicImageAction() (BasicImageAction, bool) {
2998	return nil, false
2999}
3000
3001// AsImageTag is the BasicResponseBase implementation for ImageKnowledge.
3002func (ik ImageKnowledge) AsImageTag() (*ImageTag, bool) {
3003	return nil, false
3004}
3005
3006// AsOrganization is the BasicResponseBase implementation for ImageKnowledge.
3007func (ik ImageKnowledge) AsOrganization() (*Organization, bool) {
3008	return nil, false
3009}
3010
3011// AsOffer is the BasicResponseBase implementation for ImageKnowledge.
3012func (ik ImageKnowledge) AsOffer() (*Offer, bool) {
3013	return nil, false
3014}
3015
3016// AsBasicOffer is the BasicResponseBase implementation for ImageKnowledge.
3017func (ik ImageKnowledge) AsBasicOffer() (BasicOffer, bool) {
3018	return nil, false
3019}
3020
3021// AsAggregateOffer is the BasicResponseBase implementation for ImageKnowledge.
3022func (ik ImageKnowledge) AsAggregateOffer() (*AggregateOffer, bool) {
3023	return nil, false
3024}
3025
3026// AsImageObject is the BasicResponseBase implementation for ImageKnowledge.
3027func (ik ImageKnowledge) AsImageObject() (*ImageObject, bool) {
3028	return nil, false
3029}
3030
3031// AsImageKnowledge is the BasicResponseBase implementation for ImageKnowledge.
3032func (ik ImageKnowledge) AsImageKnowledge() (*ImageKnowledge, bool) {
3033	return &ik, true
3034}
3035
3036// AsResponse is the BasicResponseBase implementation for ImageKnowledge.
3037func (ik ImageKnowledge) AsResponse() (*Response, bool) {
3038	return nil, false
3039}
3040
3041// AsBasicResponse is the BasicResponseBase implementation for ImageKnowledge.
3042func (ik ImageKnowledge) AsBasicResponse() (BasicResponse, bool) {
3043	return &ik, true
3044}
3045
3046// AsIdentifiable is the BasicResponseBase implementation for ImageKnowledge.
3047func (ik ImageKnowledge) AsIdentifiable() (*Identifiable, bool) {
3048	return nil, false
3049}
3050
3051// AsBasicIdentifiable is the BasicResponseBase implementation for ImageKnowledge.
3052func (ik ImageKnowledge) AsBasicIdentifiable() (BasicIdentifiable, bool) {
3053	return &ik, true
3054}
3055
3056// AsErrorResponse is the BasicResponseBase implementation for ImageKnowledge.
3057func (ik ImageKnowledge) AsErrorResponse() (*ErrorResponse, bool) {
3058	return nil, false
3059}
3060
3061// AsThing is the BasicResponseBase implementation for ImageKnowledge.
3062func (ik ImageKnowledge) AsThing() (*Thing, bool) {
3063	return nil, false
3064}
3065
3066// AsBasicThing is the BasicResponseBase implementation for ImageKnowledge.
3067func (ik ImageKnowledge) AsBasicThing() (BasicThing, bool) {
3068	return nil, false
3069}
3070
3071// AsAction is the BasicResponseBase implementation for ImageKnowledge.
3072func (ik ImageKnowledge) AsAction() (*Action, bool) {
3073	return nil, false
3074}
3075
3076// AsBasicAction is the BasicResponseBase implementation for ImageKnowledge.
3077func (ik ImageKnowledge) AsBasicAction() (BasicAction, bool) {
3078	return nil, false
3079}
3080
3081// AsMediaObject is the BasicResponseBase implementation for ImageKnowledge.
3082func (ik ImageKnowledge) AsMediaObject() (*MediaObject, bool) {
3083	return nil, false
3084}
3085
3086// AsBasicMediaObject is the BasicResponseBase implementation for ImageKnowledge.
3087func (ik ImageKnowledge) AsBasicMediaObject() (BasicMediaObject, bool) {
3088	return nil, false
3089}
3090
3091// AsCreativeWork is the BasicResponseBase implementation for ImageKnowledge.
3092func (ik ImageKnowledge) AsCreativeWork() (*CreativeWork, bool) {
3093	return nil, false
3094}
3095
3096// AsBasicCreativeWork is the BasicResponseBase implementation for ImageKnowledge.
3097func (ik ImageKnowledge) AsBasicCreativeWork() (BasicCreativeWork, bool) {
3098	return nil, false
3099}
3100
3101// AsPerson is the BasicResponseBase implementation for ImageKnowledge.
3102func (ik ImageKnowledge) AsPerson() (*Person, bool) {
3103	return nil, false
3104}
3105
3106// AsIntangible is the BasicResponseBase implementation for ImageKnowledge.
3107func (ik ImageKnowledge) AsIntangible() (*Intangible, bool) {
3108	return nil, false
3109}
3110
3111// AsBasicIntangible is the BasicResponseBase implementation for ImageKnowledge.
3112func (ik ImageKnowledge) AsBasicIntangible() (BasicIntangible, bool) {
3113	return nil, false
3114}
3115
3116// AsImageEntityAction is the BasicResponseBase implementation for ImageKnowledge.
3117func (ik ImageKnowledge) AsImageEntityAction() (*ImageEntityAction, bool) {
3118	return nil, false
3119}
3120
3121// AsImageModuleAction is the BasicResponseBase implementation for ImageKnowledge.
3122func (ik ImageKnowledge) AsImageModuleAction() (*ImageModuleAction, bool) {
3123	return nil, false
3124}
3125
3126// AsRecipe is the BasicResponseBase implementation for ImageKnowledge.
3127func (ik ImageKnowledge) AsRecipe() (*Recipe, bool) {
3128	return nil, false
3129}
3130
3131// AsImageRecipesAction is the BasicResponseBase implementation for ImageKnowledge.
3132func (ik ImageKnowledge) AsImageRecipesAction() (*ImageRecipesAction, bool) {
3133	return nil, false
3134}
3135
3136// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ImageKnowledge.
3137func (ik ImageKnowledge) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
3138	return nil, false
3139}
3140
3141// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ImageKnowledge.
3142func (ik ImageKnowledge) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
3143	return nil, false
3144}
3145
3146// AsStructuredValue is the BasicResponseBase implementation for ImageKnowledge.
3147func (ik ImageKnowledge) AsStructuredValue() (*StructuredValue, bool) {
3148	return nil, false
3149}
3150
3151// AsBasicStructuredValue is the BasicResponseBase implementation for ImageKnowledge.
3152func (ik ImageKnowledge) AsBasicStructuredValue() (BasicStructuredValue, bool) {
3153	return nil, false
3154}
3155
3156// AsResponseBase is the BasicResponseBase implementation for ImageKnowledge.
3157func (ik ImageKnowledge) AsResponseBase() (*ResponseBase, bool) {
3158	return nil, false
3159}
3160
3161// AsBasicResponseBase is the BasicResponseBase implementation for ImageKnowledge.
3162func (ik ImageKnowledge) AsBasicResponseBase() (BasicResponseBase, bool) {
3163	return &ik, true
3164}
3165
3166// ImageModuleAction defines an image list action.
3167type ImageModuleAction struct {
3168	// Data - READ-ONLY; A list of images.
3169	Data *ImagesModule `json:"data,omitempty"`
3170	// ActionType - READ-ONLY; A string representing the type of action.
3171	ActionType *string `json:"actionType,omitempty"`
3172	// Result - READ-ONLY; The result produced in the action.
3173	Result *[]BasicThing `json:"result,omitempty"`
3174	// DisplayName - READ-ONLY; A display name for the action.
3175	DisplayName *string `json:"displayName,omitempty"`
3176	// IsTopAction - READ-ONLY; A Boolean representing whether this result is the top action.
3177	IsTopAction *bool `json:"isTopAction,omitempty"`
3178	// ServiceURL - READ-ONLY; Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.
3179	ServiceURL *string `json:"serviceUrl,omitempty"`
3180	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
3181	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
3182	// Provider - READ-ONLY; The source of the creative work.
3183	Provider *[]BasicThing `json:"provider,omitempty"`
3184	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
3185	DatePublished *string `json:"datePublished,omitempty"`
3186	// Text - READ-ONLY; Text content of this creative work.
3187	Text *string `json:"text,omitempty"`
3188	// Name - READ-ONLY; The name of the thing represented by this object.
3189	Name *string `json:"name,omitempty"`
3190	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
3191	URL *string `json:"url,omitempty"`
3192	// Image - READ-ONLY; An image of the item.
3193	Image *ImageObject `json:"image,omitempty"`
3194	// Description - READ-ONLY; A short description of the item.
3195	Description *string `json:"description,omitempty"`
3196	// AlternateName - READ-ONLY; An alias for the item.
3197	AlternateName *string `json:"alternateName,omitempty"`
3198	// BingID - READ-ONLY; An ID that uniquely identifies this item.
3199	BingID *string `json:"bingId,omitempty"`
3200	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
3201	ReadLink *string `json:"readLink,omitempty"`
3202	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
3203	WebSearchURL *string `json:"webSearchUrl,omitempty"`
3204	// ID - READ-ONLY; A String identifier.
3205	ID *string `json:"id,omitempty"`
3206	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
3207	Type Type `json:"_type,omitempty"`
3208}
3209
3210// MarshalJSON is the custom marshaler for ImageModuleAction.
3211func (ima ImageModuleAction) MarshalJSON() ([]byte, error) {
3212	ima.Type = TypeImageModuleAction
3213	objectMap := make(map[string]interface{})
3214	if ima.Type != "" {
3215		objectMap["_type"] = ima.Type
3216	}
3217	return json.Marshal(objectMap)
3218}
3219
3220// AsPoint2D is the BasicResponseBase implementation for ImageModuleAction.
3221func (ima ImageModuleAction) AsPoint2D() (*Point2D, bool) {
3222	return nil, false
3223}
3224
3225// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ImageModuleAction.
3226func (ima ImageModuleAction) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
3227	return nil, false
3228}
3229
3230// AsImageAction is the BasicResponseBase implementation for ImageModuleAction.
3231func (ima ImageModuleAction) AsImageAction() (*ImageAction, bool) {
3232	return nil, false
3233}
3234
3235// AsBasicImageAction is the BasicResponseBase implementation for ImageModuleAction.
3236func (ima ImageModuleAction) AsBasicImageAction() (BasicImageAction, bool) {
3237	return &ima, true
3238}
3239
3240// AsImageTag is the BasicResponseBase implementation for ImageModuleAction.
3241func (ima ImageModuleAction) AsImageTag() (*ImageTag, bool) {
3242	return nil, false
3243}
3244
3245// AsOrganization is the BasicResponseBase implementation for ImageModuleAction.
3246func (ima ImageModuleAction) AsOrganization() (*Organization, bool) {
3247	return nil, false
3248}
3249
3250// AsOffer is the BasicResponseBase implementation for ImageModuleAction.
3251func (ima ImageModuleAction) AsOffer() (*Offer, bool) {
3252	return nil, false
3253}
3254
3255// AsBasicOffer is the BasicResponseBase implementation for ImageModuleAction.
3256func (ima ImageModuleAction) AsBasicOffer() (BasicOffer, bool) {
3257	return nil, false
3258}
3259
3260// AsAggregateOffer is the BasicResponseBase implementation for ImageModuleAction.
3261func (ima ImageModuleAction) AsAggregateOffer() (*AggregateOffer, bool) {
3262	return nil, false
3263}
3264
3265// AsImageObject is the BasicResponseBase implementation for ImageModuleAction.
3266func (ima ImageModuleAction) AsImageObject() (*ImageObject, bool) {
3267	return nil, false
3268}
3269
3270// AsImageKnowledge is the BasicResponseBase implementation for ImageModuleAction.
3271func (ima ImageModuleAction) AsImageKnowledge() (*ImageKnowledge, bool) {
3272	return nil, false
3273}
3274
3275// AsResponse is the BasicResponseBase implementation for ImageModuleAction.
3276func (ima ImageModuleAction) AsResponse() (*Response, bool) {
3277	return nil, false
3278}
3279
3280// AsBasicResponse is the BasicResponseBase implementation for ImageModuleAction.
3281func (ima ImageModuleAction) AsBasicResponse() (BasicResponse, bool) {
3282	return &ima, true
3283}
3284
3285// AsIdentifiable is the BasicResponseBase implementation for ImageModuleAction.
3286func (ima ImageModuleAction) AsIdentifiable() (*Identifiable, bool) {
3287	return nil, false
3288}
3289
3290// AsBasicIdentifiable is the BasicResponseBase implementation for ImageModuleAction.
3291func (ima ImageModuleAction) AsBasicIdentifiable() (BasicIdentifiable, bool) {
3292	return &ima, true
3293}
3294
3295// AsErrorResponse is the BasicResponseBase implementation for ImageModuleAction.
3296func (ima ImageModuleAction) AsErrorResponse() (*ErrorResponse, bool) {
3297	return nil, false
3298}
3299
3300// AsThing is the BasicResponseBase implementation for ImageModuleAction.
3301func (ima ImageModuleAction) AsThing() (*Thing, bool) {
3302	return nil, false
3303}
3304
3305// AsBasicThing is the BasicResponseBase implementation for ImageModuleAction.
3306func (ima ImageModuleAction) AsBasicThing() (BasicThing, bool) {
3307	return &ima, true
3308}
3309
3310// AsAction is the BasicResponseBase implementation for ImageModuleAction.
3311func (ima ImageModuleAction) AsAction() (*Action, bool) {
3312	return nil, false
3313}
3314
3315// AsBasicAction is the BasicResponseBase implementation for ImageModuleAction.
3316func (ima ImageModuleAction) AsBasicAction() (BasicAction, bool) {
3317	return &ima, true
3318}
3319
3320// AsMediaObject is the BasicResponseBase implementation for ImageModuleAction.
3321func (ima ImageModuleAction) AsMediaObject() (*MediaObject, bool) {
3322	return nil, false
3323}
3324
3325// AsBasicMediaObject is the BasicResponseBase implementation for ImageModuleAction.
3326func (ima ImageModuleAction) AsBasicMediaObject() (BasicMediaObject, bool) {
3327	return nil, false
3328}
3329
3330// AsCreativeWork is the BasicResponseBase implementation for ImageModuleAction.
3331func (ima ImageModuleAction) AsCreativeWork() (*CreativeWork, bool) {
3332	return nil, false
3333}
3334
3335// AsBasicCreativeWork is the BasicResponseBase implementation for ImageModuleAction.
3336func (ima ImageModuleAction) AsBasicCreativeWork() (BasicCreativeWork, bool) {
3337	return &ima, true
3338}
3339
3340// AsPerson is the BasicResponseBase implementation for ImageModuleAction.
3341func (ima ImageModuleAction) AsPerson() (*Person, bool) {
3342	return nil, false
3343}
3344
3345// AsIntangible is the BasicResponseBase implementation for ImageModuleAction.
3346func (ima ImageModuleAction) AsIntangible() (*Intangible, bool) {
3347	return nil, false
3348}
3349
3350// AsBasicIntangible is the BasicResponseBase implementation for ImageModuleAction.
3351func (ima ImageModuleAction) AsBasicIntangible() (BasicIntangible, bool) {
3352	return nil, false
3353}
3354
3355// AsImageEntityAction is the BasicResponseBase implementation for ImageModuleAction.
3356func (ima ImageModuleAction) AsImageEntityAction() (*ImageEntityAction, bool) {
3357	return nil, false
3358}
3359
3360// AsImageModuleAction is the BasicResponseBase implementation for ImageModuleAction.
3361func (ima ImageModuleAction) AsImageModuleAction() (*ImageModuleAction, bool) {
3362	return &ima, true
3363}
3364
3365// AsRecipe is the BasicResponseBase implementation for ImageModuleAction.
3366func (ima ImageModuleAction) AsRecipe() (*Recipe, bool) {
3367	return nil, false
3368}
3369
3370// AsImageRecipesAction is the BasicResponseBase implementation for ImageModuleAction.
3371func (ima ImageModuleAction) AsImageRecipesAction() (*ImageRecipesAction, bool) {
3372	return nil, false
3373}
3374
3375// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ImageModuleAction.
3376func (ima ImageModuleAction) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
3377	return nil, false
3378}
3379
3380// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ImageModuleAction.
3381func (ima ImageModuleAction) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
3382	return nil, false
3383}
3384
3385// AsStructuredValue is the BasicResponseBase implementation for ImageModuleAction.
3386func (ima ImageModuleAction) AsStructuredValue() (*StructuredValue, bool) {
3387	return nil, false
3388}
3389
3390// AsBasicStructuredValue is the BasicResponseBase implementation for ImageModuleAction.
3391func (ima ImageModuleAction) AsBasicStructuredValue() (BasicStructuredValue, bool) {
3392	return nil, false
3393}
3394
3395// AsResponseBase is the BasicResponseBase implementation for ImageModuleAction.
3396func (ima ImageModuleAction) AsResponseBase() (*ResponseBase, bool) {
3397	return nil, false
3398}
3399
3400// AsBasicResponseBase is the BasicResponseBase implementation for ImageModuleAction.
3401func (ima ImageModuleAction) AsBasicResponseBase() (BasicResponseBase, bool) {
3402	return &ima, true
3403}
3404
3405// UnmarshalJSON is the custom unmarshaler for ImageModuleAction struct.
3406func (ima *ImageModuleAction) UnmarshalJSON(body []byte) error {
3407	var m map[string]*json.RawMessage
3408	err := json.Unmarshal(body, &m)
3409	if err != nil {
3410		return err
3411	}
3412	for k, v := range m {
3413		switch k {
3414		case "data":
3415			if v != nil {
3416				var data ImagesModule
3417				err = json.Unmarshal(*v, &data)
3418				if err != nil {
3419					return err
3420				}
3421				ima.Data = &data
3422			}
3423		case "actionType":
3424			if v != nil {
3425				var actionType string
3426				err = json.Unmarshal(*v, &actionType)
3427				if err != nil {
3428					return err
3429				}
3430				ima.ActionType = &actionType
3431			}
3432		case "result":
3433			if v != nil {
3434				resultVar, err := unmarshalBasicThingArray(*v)
3435				if err != nil {
3436					return err
3437				}
3438				ima.Result = &resultVar
3439			}
3440		case "displayName":
3441			if v != nil {
3442				var displayName string
3443				err = json.Unmarshal(*v, &displayName)
3444				if err != nil {
3445					return err
3446				}
3447				ima.DisplayName = &displayName
3448			}
3449		case "isTopAction":
3450			if v != nil {
3451				var isTopAction bool
3452				err = json.Unmarshal(*v, &isTopAction)
3453				if err != nil {
3454					return err
3455				}
3456				ima.IsTopAction = &isTopAction
3457			}
3458		case "serviceUrl":
3459			if v != nil {
3460				var serviceURL string
3461				err = json.Unmarshal(*v, &serviceURL)
3462				if err != nil {
3463					return err
3464				}
3465				ima.ServiceURL = &serviceURL
3466			}
3467		case "thumbnailUrl":
3468			if v != nil {
3469				var thumbnailURL string
3470				err = json.Unmarshal(*v, &thumbnailURL)
3471				if err != nil {
3472					return err
3473				}
3474				ima.ThumbnailURL = &thumbnailURL
3475			}
3476		case "provider":
3477			if v != nil {
3478				provider, err := unmarshalBasicThingArray(*v)
3479				if err != nil {
3480					return err
3481				}
3482				ima.Provider = &provider
3483			}
3484		case "datePublished":
3485			if v != nil {
3486				var datePublished string
3487				err = json.Unmarshal(*v, &datePublished)
3488				if err != nil {
3489					return err
3490				}
3491				ima.DatePublished = &datePublished
3492			}
3493		case "text":
3494			if v != nil {
3495				var textVar string
3496				err = json.Unmarshal(*v, &textVar)
3497				if err != nil {
3498					return err
3499				}
3500				ima.Text = &textVar
3501			}
3502		case "name":
3503			if v != nil {
3504				var name string
3505				err = json.Unmarshal(*v, &name)
3506				if err != nil {
3507					return err
3508				}
3509				ima.Name = &name
3510			}
3511		case "url":
3512			if v != nil {
3513				var URL string
3514				err = json.Unmarshal(*v, &URL)
3515				if err != nil {
3516					return err
3517				}
3518				ima.URL = &URL
3519			}
3520		case "image":
3521			if v != nil {
3522				var imageVar ImageObject
3523				err = json.Unmarshal(*v, &imageVar)
3524				if err != nil {
3525					return err
3526				}
3527				ima.Image = &imageVar
3528			}
3529		case "description":
3530			if v != nil {
3531				var description string
3532				err = json.Unmarshal(*v, &description)
3533				if err != nil {
3534					return err
3535				}
3536				ima.Description = &description
3537			}
3538		case "alternateName":
3539			if v != nil {
3540				var alternateName string
3541				err = json.Unmarshal(*v, &alternateName)
3542				if err != nil {
3543					return err
3544				}
3545				ima.AlternateName = &alternateName
3546			}
3547		case "bingId":
3548			if v != nil {
3549				var bingID string
3550				err = json.Unmarshal(*v, &bingID)
3551				if err != nil {
3552					return err
3553				}
3554				ima.BingID = &bingID
3555			}
3556		case "readLink":
3557			if v != nil {
3558				var readLink string
3559				err = json.Unmarshal(*v, &readLink)
3560				if err != nil {
3561					return err
3562				}
3563				ima.ReadLink = &readLink
3564			}
3565		case "webSearchUrl":
3566			if v != nil {
3567				var webSearchURL string
3568				err = json.Unmarshal(*v, &webSearchURL)
3569				if err != nil {
3570					return err
3571				}
3572				ima.WebSearchURL = &webSearchURL
3573			}
3574		case "id":
3575			if v != nil {
3576				var ID string
3577				err = json.Unmarshal(*v, &ID)
3578				if err != nil {
3579					return err
3580				}
3581				ima.ID = &ID
3582			}
3583		case "_type":
3584			if v != nil {
3585				var typeVar Type
3586				err = json.Unmarshal(*v, &typeVar)
3587				if err != nil {
3588					return err
3589				}
3590				ima.Type = typeVar
3591			}
3592		}
3593	}
3594
3595	return nil
3596}
3597
3598// ImageObject defines an image.
3599type ImageObject struct {
3600	// Thumbnail - READ-ONLY; The URL to a thumbnail of the image.
3601	Thumbnail *ImageObject `json:"thumbnail,omitempty"`
3602	// ImageInsightsToken - READ-ONLY; The token that you use in a subsequent call to Visual Search API to get additional information about the image. For information about using this token, see the imageInsightsToken field inside the knowledgeRequest request parameter.
3603	ImageInsightsToken *string `json:"imageInsightsToken,omitempty"`
3604	// InsightsMetadata - READ-ONLY; A count of the number of websites where you can shop or perform other actions related to the image. For example, if the image is of an apple pie, this object includes a count of the number of websites where you can buy an apple pie. To indicate the number of offers in your UX, include badging such as a shopping cart icon that contains the count. When the user clicks on the icon, use imageInsightsToken in a subsequent Visual Search API call to get the list of shopping websites.
3605	InsightsMetadata *ImagesImageMetadata `json:"insightsMetadata,omitempty"`
3606	// ImageID - READ-ONLY; Unique Id for the image.
3607	ImageID *string `json:"imageId,omitempty"`
3608	// AccentColor - READ-ONLY; A three-byte hexadecimal number that represents the color that dominates the image. Use the color as the temporary background in your client until the image is loaded.
3609	AccentColor *string `json:"accentColor,omitempty"`
3610	// VisualWords - READ-ONLY; For internal use only.
3611	VisualWords *string `json:"visualWords,omitempty"`
3612	// ContentURL - READ-ONLY; Original URL to retrieve the source (file) for the media object (e.g., the source URL for the image).
3613	ContentURL *string `json:"contentUrl,omitempty"`
3614	// HostPageURL - READ-ONLY; URL of the page that hosts the media object.
3615	HostPageURL *string `json:"hostPageUrl,omitempty"`
3616	// ContentSize - READ-ONLY; Size of the media object content. Use format "value unit" (e.g., "1024 B").
3617	ContentSize *string `json:"contentSize,omitempty"`
3618	// EncodingFormat - READ-ONLY; Encoding format (e.g., png, gif, jpeg, etc).
3619	EncodingFormat *string `json:"encodingFormat,omitempty"`
3620	// HostPageDisplayURL - READ-ONLY; Display URL of the page that hosts the media object.
3621	HostPageDisplayURL *string `json:"hostPageDisplayUrl,omitempty"`
3622	// Width - READ-ONLY; The width of the media object, in pixels.
3623	Width *int32 `json:"width,omitempty"`
3624	// Height - READ-ONLY; The height of the media object, in pixels.
3625	Height *int32 `json:"height,omitempty"`
3626	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
3627	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
3628	// Provider - READ-ONLY; The source of the creative work.
3629	Provider *[]BasicThing `json:"provider,omitempty"`
3630	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
3631	DatePublished *string `json:"datePublished,omitempty"`
3632	// Text - READ-ONLY; Text content of this creative work.
3633	Text *string `json:"text,omitempty"`
3634	// Name - READ-ONLY; The name of the thing represented by this object.
3635	Name *string `json:"name,omitempty"`
3636	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
3637	URL *string `json:"url,omitempty"`
3638	// Image - READ-ONLY; An image of the item.
3639	Image *ImageObject `json:"image,omitempty"`
3640	// Description - READ-ONLY; A short description of the item.
3641	Description *string `json:"description,omitempty"`
3642	// AlternateName - READ-ONLY; An alias for the item.
3643	AlternateName *string `json:"alternateName,omitempty"`
3644	// BingID - READ-ONLY; An ID that uniquely identifies this item.
3645	BingID *string `json:"bingId,omitempty"`
3646	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
3647	ReadLink *string `json:"readLink,omitempty"`
3648	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
3649	WebSearchURL *string `json:"webSearchUrl,omitempty"`
3650	// ID - READ-ONLY; A String identifier.
3651	ID *string `json:"id,omitempty"`
3652	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
3653	Type Type `json:"_type,omitempty"`
3654}
3655
3656// MarshalJSON is the custom marshaler for ImageObject.
3657func (ioVar ImageObject) MarshalJSON() ([]byte, error) {
3658	ioVar.Type = TypeImageObject
3659	objectMap := make(map[string]interface{})
3660	if ioVar.Type != "" {
3661		objectMap["_type"] = ioVar.Type
3662	}
3663	return json.Marshal(objectMap)
3664}
3665
3666// AsPoint2D is the BasicResponseBase implementation for ImageObject.
3667func (ioVar ImageObject) AsPoint2D() (*Point2D, bool) {
3668	return nil, false
3669}
3670
3671// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ImageObject.
3672func (ioVar ImageObject) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
3673	return nil, false
3674}
3675
3676// AsImageAction is the BasicResponseBase implementation for ImageObject.
3677func (ioVar ImageObject) AsImageAction() (*ImageAction, bool) {
3678	return nil, false
3679}
3680
3681// AsBasicImageAction is the BasicResponseBase implementation for ImageObject.
3682func (ioVar ImageObject) AsBasicImageAction() (BasicImageAction, bool) {
3683	return nil, false
3684}
3685
3686// AsImageTag is the BasicResponseBase implementation for ImageObject.
3687func (ioVar ImageObject) AsImageTag() (*ImageTag, bool) {
3688	return nil, false
3689}
3690
3691// AsOrganization is the BasicResponseBase implementation for ImageObject.
3692func (ioVar ImageObject) AsOrganization() (*Organization, bool) {
3693	return nil, false
3694}
3695
3696// AsOffer is the BasicResponseBase implementation for ImageObject.
3697func (ioVar ImageObject) AsOffer() (*Offer, bool) {
3698	return nil, false
3699}
3700
3701// AsBasicOffer is the BasicResponseBase implementation for ImageObject.
3702func (ioVar ImageObject) AsBasicOffer() (BasicOffer, bool) {
3703	return nil, false
3704}
3705
3706// AsAggregateOffer is the BasicResponseBase implementation for ImageObject.
3707func (ioVar ImageObject) AsAggregateOffer() (*AggregateOffer, bool) {
3708	return nil, false
3709}
3710
3711// AsImageObject is the BasicResponseBase implementation for ImageObject.
3712func (ioVar ImageObject) AsImageObject() (*ImageObject, bool) {
3713	return &ioVar, true
3714}
3715
3716// AsImageKnowledge is the BasicResponseBase implementation for ImageObject.
3717func (ioVar ImageObject) AsImageKnowledge() (*ImageKnowledge, bool) {
3718	return nil, false
3719}
3720
3721// AsResponse is the BasicResponseBase implementation for ImageObject.
3722func (ioVar ImageObject) AsResponse() (*Response, bool) {
3723	return nil, false
3724}
3725
3726// AsBasicResponse is the BasicResponseBase implementation for ImageObject.
3727func (ioVar ImageObject) AsBasicResponse() (BasicResponse, bool) {
3728	return &ioVar, true
3729}
3730
3731// AsIdentifiable is the BasicResponseBase implementation for ImageObject.
3732func (ioVar ImageObject) AsIdentifiable() (*Identifiable, bool) {
3733	return nil, false
3734}
3735
3736// AsBasicIdentifiable is the BasicResponseBase implementation for ImageObject.
3737func (ioVar ImageObject) AsBasicIdentifiable() (BasicIdentifiable, bool) {
3738	return &ioVar, true
3739}
3740
3741// AsErrorResponse is the BasicResponseBase implementation for ImageObject.
3742func (ioVar ImageObject) AsErrorResponse() (*ErrorResponse, bool) {
3743	return nil, false
3744}
3745
3746// AsThing is the BasicResponseBase implementation for ImageObject.
3747func (ioVar ImageObject) AsThing() (*Thing, bool) {
3748	return nil, false
3749}
3750
3751// AsBasicThing is the BasicResponseBase implementation for ImageObject.
3752func (ioVar ImageObject) AsBasicThing() (BasicThing, bool) {
3753	return &ioVar, true
3754}
3755
3756// AsAction is the BasicResponseBase implementation for ImageObject.
3757func (ioVar ImageObject) AsAction() (*Action, bool) {
3758	return nil, false
3759}
3760
3761// AsBasicAction is the BasicResponseBase implementation for ImageObject.
3762func (ioVar ImageObject) AsBasicAction() (BasicAction, bool) {
3763	return nil, false
3764}
3765
3766// AsMediaObject is the BasicResponseBase implementation for ImageObject.
3767func (ioVar ImageObject) AsMediaObject() (*MediaObject, bool) {
3768	return nil, false
3769}
3770
3771// AsBasicMediaObject is the BasicResponseBase implementation for ImageObject.
3772func (ioVar ImageObject) AsBasicMediaObject() (BasicMediaObject, bool) {
3773	return &ioVar, true
3774}
3775
3776// AsCreativeWork is the BasicResponseBase implementation for ImageObject.
3777func (ioVar ImageObject) AsCreativeWork() (*CreativeWork, bool) {
3778	return nil, false
3779}
3780
3781// AsBasicCreativeWork is the BasicResponseBase implementation for ImageObject.
3782func (ioVar ImageObject) AsBasicCreativeWork() (BasicCreativeWork, bool) {
3783	return &ioVar, true
3784}
3785
3786// AsPerson is the BasicResponseBase implementation for ImageObject.
3787func (ioVar ImageObject) AsPerson() (*Person, bool) {
3788	return nil, false
3789}
3790
3791// AsIntangible is the BasicResponseBase implementation for ImageObject.
3792func (ioVar ImageObject) AsIntangible() (*Intangible, bool) {
3793	return nil, false
3794}
3795
3796// AsBasicIntangible is the BasicResponseBase implementation for ImageObject.
3797func (ioVar ImageObject) AsBasicIntangible() (BasicIntangible, bool) {
3798	return nil, false
3799}
3800
3801// AsImageEntityAction is the BasicResponseBase implementation for ImageObject.
3802func (ioVar ImageObject) AsImageEntityAction() (*ImageEntityAction, bool) {
3803	return nil, false
3804}
3805
3806// AsImageModuleAction is the BasicResponseBase implementation for ImageObject.
3807func (ioVar ImageObject) AsImageModuleAction() (*ImageModuleAction, bool) {
3808	return nil, false
3809}
3810
3811// AsRecipe is the BasicResponseBase implementation for ImageObject.
3812func (ioVar ImageObject) AsRecipe() (*Recipe, bool) {
3813	return nil, false
3814}
3815
3816// AsImageRecipesAction is the BasicResponseBase implementation for ImageObject.
3817func (ioVar ImageObject) AsImageRecipesAction() (*ImageRecipesAction, bool) {
3818	return nil, false
3819}
3820
3821// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ImageObject.
3822func (ioVar ImageObject) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
3823	return nil, false
3824}
3825
3826// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ImageObject.
3827func (ioVar ImageObject) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
3828	return nil, false
3829}
3830
3831// AsStructuredValue is the BasicResponseBase implementation for ImageObject.
3832func (ioVar ImageObject) AsStructuredValue() (*StructuredValue, bool) {
3833	return nil, false
3834}
3835
3836// AsBasicStructuredValue is the BasicResponseBase implementation for ImageObject.
3837func (ioVar ImageObject) AsBasicStructuredValue() (BasicStructuredValue, bool) {
3838	return nil, false
3839}
3840
3841// AsResponseBase is the BasicResponseBase implementation for ImageObject.
3842func (ioVar ImageObject) AsResponseBase() (*ResponseBase, bool) {
3843	return nil, false
3844}
3845
3846// AsBasicResponseBase is the BasicResponseBase implementation for ImageObject.
3847func (ioVar ImageObject) AsBasicResponseBase() (BasicResponseBase, bool) {
3848	return &ioVar, true
3849}
3850
3851// UnmarshalJSON is the custom unmarshaler for ImageObject struct.
3852func (ioVar *ImageObject) UnmarshalJSON(body []byte) error {
3853	var m map[string]*json.RawMessage
3854	err := json.Unmarshal(body, &m)
3855	if err != nil {
3856		return err
3857	}
3858	for k, v := range m {
3859		switch k {
3860		case "thumbnail":
3861			if v != nil {
3862				var thumbnail ImageObject
3863				err = json.Unmarshal(*v, &thumbnail)
3864				if err != nil {
3865					return err
3866				}
3867				ioVar.Thumbnail = &thumbnail
3868			}
3869		case "imageInsightsToken":
3870			if v != nil {
3871				var imageInsightsToken string
3872				err = json.Unmarshal(*v, &imageInsightsToken)
3873				if err != nil {
3874					return err
3875				}
3876				ioVar.ImageInsightsToken = &imageInsightsToken
3877			}
3878		case "insightsMetadata":
3879			if v != nil {
3880				var insightsMetadata ImagesImageMetadata
3881				err = json.Unmarshal(*v, &insightsMetadata)
3882				if err != nil {
3883					return err
3884				}
3885				ioVar.InsightsMetadata = &insightsMetadata
3886			}
3887		case "imageId":
3888			if v != nil {
3889				var imageID string
3890				err = json.Unmarshal(*v, &imageID)
3891				if err != nil {
3892					return err
3893				}
3894				ioVar.ImageID = &imageID
3895			}
3896		case "accentColor":
3897			if v != nil {
3898				var accentColor string
3899				err = json.Unmarshal(*v, &accentColor)
3900				if err != nil {
3901					return err
3902				}
3903				ioVar.AccentColor = &accentColor
3904			}
3905		case "visualWords":
3906			if v != nil {
3907				var visualWords string
3908				err = json.Unmarshal(*v, &visualWords)
3909				if err != nil {
3910					return err
3911				}
3912				ioVar.VisualWords = &visualWords
3913			}
3914		case "contentUrl":
3915			if v != nil {
3916				var contentURL string
3917				err = json.Unmarshal(*v, &contentURL)
3918				if err != nil {
3919					return err
3920				}
3921				ioVar.ContentURL = &contentURL
3922			}
3923		case "hostPageUrl":
3924			if v != nil {
3925				var hostPageURL string
3926				err = json.Unmarshal(*v, &hostPageURL)
3927				if err != nil {
3928					return err
3929				}
3930				ioVar.HostPageURL = &hostPageURL
3931			}
3932		case "contentSize":
3933			if v != nil {
3934				var contentSize string
3935				err = json.Unmarshal(*v, &contentSize)
3936				if err != nil {
3937					return err
3938				}
3939				ioVar.ContentSize = &contentSize
3940			}
3941		case "encodingFormat":
3942			if v != nil {
3943				var encodingFormat string
3944				err = json.Unmarshal(*v, &encodingFormat)
3945				if err != nil {
3946					return err
3947				}
3948				ioVar.EncodingFormat = &encodingFormat
3949			}
3950		case "hostPageDisplayUrl":
3951			if v != nil {
3952				var hostPageDisplayURL string
3953				err = json.Unmarshal(*v, &hostPageDisplayURL)
3954				if err != nil {
3955					return err
3956				}
3957				ioVar.HostPageDisplayURL = &hostPageDisplayURL
3958			}
3959		case "width":
3960			if v != nil {
3961				var width int32
3962				err = json.Unmarshal(*v, &width)
3963				if err != nil {
3964					return err
3965				}
3966				ioVar.Width = &width
3967			}
3968		case "height":
3969			if v != nil {
3970				var height int32
3971				err = json.Unmarshal(*v, &height)
3972				if err != nil {
3973					return err
3974				}
3975				ioVar.Height = &height
3976			}
3977		case "thumbnailUrl":
3978			if v != nil {
3979				var thumbnailURL string
3980				err = json.Unmarshal(*v, &thumbnailURL)
3981				if err != nil {
3982					return err
3983				}
3984				ioVar.ThumbnailURL = &thumbnailURL
3985			}
3986		case "provider":
3987			if v != nil {
3988				provider, err := unmarshalBasicThingArray(*v)
3989				if err != nil {
3990					return err
3991				}
3992				ioVar.Provider = &provider
3993			}
3994		case "datePublished":
3995			if v != nil {
3996				var datePublished string
3997				err = json.Unmarshal(*v, &datePublished)
3998				if err != nil {
3999					return err
4000				}
4001				ioVar.DatePublished = &datePublished
4002			}
4003		case "text":
4004			if v != nil {
4005				var textVar string
4006				err = json.Unmarshal(*v, &textVar)
4007				if err != nil {
4008					return err
4009				}
4010				ioVar.Text = &textVar
4011			}
4012		case "name":
4013			if v != nil {
4014				var name string
4015				err = json.Unmarshal(*v, &name)
4016				if err != nil {
4017					return err
4018				}
4019				ioVar.Name = &name
4020			}
4021		case "url":
4022			if v != nil {
4023				var URL string
4024				err = json.Unmarshal(*v, &URL)
4025				if err != nil {
4026					return err
4027				}
4028				ioVar.URL = &URL
4029			}
4030		case "image":
4031			if v != nil {
4032				var imageVar ImageObject
4033				err = json.Unmarshal(*v, &imageVar)
4034				if err != nil {
4035					return err
4036				}
4037				ioVar.Image = &imageVar
4038			}
4039		case "description":
4040			if v != nil {
4041				var description string
4042				err = json.Unmarshal(*v, &description)
4043				if err != nil {
4044					return err
4045				}
4046				ioVar.Description = &description
4047			}
4048		case "alternateName":
4049			if v != nil {
4050				var alternateName string
4051				err = json.Unmarshal(*v, &alternateName)
4052				if err != nil {
4053					return err
4054				}
4055				ioVar.AlternateName = &alternateName
4056			}
4057		case "bingId":
4058			if v != nil {
4059				var bingID string
4060				err = json.Unmarshal(*v, &bingID)
4061				if err != nil {
4062					return err
4063				}
4064				ioVar.BingID = &bingID
4065			}
4066		case "readLink":
4067			if v != nil {
4068				var readLink string
4069				err = json.Unmarshal(*v, &readLink)
4070				if err != nil {
4071					return err
4072				}
4073				ioVar.ReadLink = &readLink
4074			}
4075		case "webSearchUrl":
4076			if v != nil {
4077				var webSearchURL string
4078				err = json.Unmarshal(*v, &webSearchURL)
4079				if err != nil {
4080					return err
4081				}
4082				ioVar.WebSearchURL = &webSearchURL
4083			}
4084		case "id":
4085			if v != nil {
4086				var ID string
4087				err = json.Unmarshal(*v, &ID)
4088				if err != nil {
4089					return err
4090				}
4091				ioVar.ID = &ID
4092			}
4093		case "_type":
4094			if v != nil {
4095				var typeVar Type
4096				err = json.Unmarshal(*v, &typeVar)
4097				if err != nil {
4098					return err
4099				}
4100				ioVar.Type = typeVar
4101			}
4102		}
4103	}
4104
4105	return nil
4106}
4107
4108// ImageRecipesAction defines an recipe action.
4109type ImageRecipesAction struct {
4110	// Data - READ-ONLY; A list of recipes related to the image.
4111	Data *RecipesModule `json:"data,omitempty"`
4112	// ActionType - READ-ONLY; A string representing the type of action.
4113	ActionType *string `json:"actionType,omitempty"`
4114	// Result - READ-ONLY; The result produced in the action.
4115	Result *[]BasicThing `json:"result,omitempty"`
4116	// DisplayName - READ-ONLY; A display name for the action.
4117	DisplayName *string `json:"displayName,omitempty"`
4118	// IsTopAction - READ-ONLY; A Boolean representing whether this result is the top action.
4119	IsTopAction *bool `json:"isTopAction,omitempty"`
4120	// ServiceURL - READ-ONLY; Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.
4121	ServiceURL *string `json:"serviceUrl,omitempty"`
4122	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
4123	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
4124	// Provider - READ-ONLY; The source of the creative work.
4125	Provider *[]BasicThing `json:"provider,omitempty"`
4126	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
4127	DatePublished *string `json:"datePublished,omitempty"`
4128	// Text - READ-ONLY; Text content of this creative work.
4129	Text *string `json:"text,omitempty"`
4130	// Name - READ-ONLY; The name of the thing represented by this object.
4131	Name *string `json:"name,omitempty"`
4132	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
4133	URL *string `json:"url,omitempty"`
4134	// Image - READ-ONLY; An image of the item.
4135	Image *ImageObject `json:"image,omitempty"`
4136	// Description - READ-ONLY; A short description of the item.
4137	Description *string `json:"description,omitempty"`
4138	// AlternateName - READ-ONLY; An alias for the item.
4139	AlternateName *string `json:"alternateName,omitempty"`
4140	// BingID - READ-ONLY; An ID that uniquely identifies this item.
4141	BingID *string `json:"bingId,omitempty"`
4142	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
4143	ReadLink *string `json:"readLink,omitempty"`
4144	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
4145	WebSearchURL *string `json:"webSearchUrl,omitempty"`
4146	// ID - READ-ONLY; A String identifier.
4147	ID *string `json:"id,omitempty"`
4148	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
4149	Type Type `json:"_type,omitempty"`
4150}
4151
4152// MarshalJSON is the custom marshaler for ImageRecipesAction.
4153func (ira ImageRecipesAction) MarshalJSON() ([]byte, error) {
4154	ira.Type = TypeImageRecipesAction
4155	objectMap := make(map[string]interface{})
4156	if ira.Type != "" {
4157		objectMap["_type"] = ira.Type
4158	}
4159	return json.Marshal(objectMap)
4160}
4161
4162// AsPoint2D is the BasicResponseBase implementation for ImageRecipesAction.
4163func (ira ImageRecipesAction) AsPoint2D() (*Point2D, bool) {
4164	return nil, false
4165}
4166
4167// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ImageRecipesAction.
4168func (ira ImageRecipesAction) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
4169	return nil, false
4170}
4171
4172// AsImageAction is the BasicResponseBase implementation for ImageRecipesAction.
4173func (ira ImageRecipesAction) AsImageAction() (*ImageAction, bool) {
4174	return nil, false
4175}
4176
4177// AsBasicImageAction is the BasicResponseBase implementation for ImageRecipesAction.
4178func (ira ImageRecipesAction) AsBasicImageAction() (BasicImageAction, bool) {
4179	return &ira, true
4180}
4181
4182// AsImageTag is the BasicResponseBase implementation for ImageRecipesAction.
4183func (ira ImageRecipesAction) AsImageTag() (*ImageTag, bool) {
4184	return nil, false
4185}
4186
4187// AsOrganization is the BasicResponseBase implementation for ImageRecipesAction.
4188func (ira ImageRecipesAction) AsOrganization() (*Organization, bool) {
4189	return nil, false
4190}
4191
4192// AsOffer is the BasicResponseBase implementation for ImageRecipesAction.
4193func (ira ImageRecipesAction) AsOffer() (*Offer, bool) {
4194	return nil, false
4195}
4196
4197// AsBasicOffer is the BasicResponseBase implementation for ImageRecipesAction.
4198func (ira ImageRecipesAction) AsBasicOffer() (BasicOffer, bool) {
4199	return nil, false
4200}
4201
4202// AsAggregateOffer is the BasicResponseBase implementation for ImageRecipesAction.
4203func (ira ImageRecipesAction) AsAggregateOffer() (*AggregateOffer, bool) {
4204	return nil, false
4205}
4206
4207// AsImageObject is the BasicResponseBase implementation for ImageRecipesAction.
4208func (ira ImageRecipesAction) AsImageObject() (*ImageObject, bool) {
4209	return nil, false
4210}
4211
4212// AsImageKnowledge is the BasicResponseBase implementation for ImageRecipesAction.
4213func (ira ImageRecipesAction) AsImageKnowledge() (*ImageKnowledge, bool) {
4214	return nil, false
4215}
4216
4217// AsResponse is the BasicResponseBase implementation for ImageRecipesAction.
4218func (ira ImageRecipesAction) AsResponse() (*Response, bool) {
4219	return nil, false
4220}
4221
4222// AsBasicResponse is the BasicResponseBase implementation for ImageRecipesAction.
4223func (ira ImageRecipesAction) AsBasicResponse() (BasicResponse, bool) {
4224	return &ira, true
4225}
4226
4227// AsIdentifiable is the BasicResponseBase implementation for ImageRecipesAction.
4228func (ira ImageRecipesAction) AsIdentifiable() (*Identifiable, bool) {
4229	return nil, false
4230}
4231
4232// AsBasicIdentifiable is the BasicResponseBase implementation for ImageRecipesAction.
4233func (ira ImageRecipesAction) AsBasicIdentifiable() (BasicIdentifiable, bool) {
4234	return &ira, true
4235}
4236
4237// AsErrorResponse is the BasicResponseBase implementation for ImageRecipesAction.
4238func (ira ImageRecipesAction) AsErrorResponse() (*ErrorResponse, bool) {
4239	return nil, false
4240}
4241
4242// AsThing is the BasicResponseBase implementation for ImageRecipesAction.
4243func (ira ImageRecipesAction) AsThing() (*Thing, bool) {
4244	return nil, false
4245}
4246
4247// AsBasicThing is the BasicResponseBase implementation for ImageRecipesAction.
4248func (ira ImageRecipesAction) AsBasicThing() (BasicThing, bool) {
4249	return &ira, true
4250}
4251
4252// AsAction is the BasicResponseBase implementation for ImageRecipesAction.
4253func (ira ImageRecipesAction) AsAction() (*Action, bool) {
4254	return nil, false
4255}
4256
4257// AsBasicAction is the BasicResponseBase implementation for ImageRecipesAction.
4258func (ira ImageRecipesAction) AsBasicAction() (BasicAction, bool) {
4259	return &ira, true
4260}
4261
4262// AsMediaObject is the BasicResponseBase implementation for ImageRecipesAction.
4263func (ira ImageRecipesAction) AsMediaObject() (*MediaObject, bool) {
4264	return nil, false
4265}
4266
4267// AsBasicMediaObject is the BasicResponseBase implementation for ImageRecipesAction.
4268func (ira ImageRecipesAction) AsBasicMediaObject() (BasicMediaObject, bool) {
4269	return nil, false
4270}
4271
4272// AsCreativeWork is the BasicResponseBase implementation for ImageRecipesAction.
4273func (ira ImageRecipesAction) AsCreativeWork() (*CreativeWork, bool) {
4274	return nil, false
4275}
4276
4277// AsBasicCreativeWork is the BasicResponseBase implementation for ImageRecipesAction.
4278func (ira ImageRecipesAction) AsBasicCreativeWork() (BasicCreativeWork, bool) {
4279	return &ira, true
4280}
4281
4282// AsPerson is the BasicResponseBase implementation for ImageRecipesAction.
4283func (ira ImageRecipesAction) AsPerson() (*Person, bool) {
4284	return nil, false
4285}
4286
4287// AsIntangible is the BasicResponseBase implementation for ImageRecipesAction.
4288func (ira ImageRecipesAction) AsIntangible() (*Intangible, bool) {
4289	return nil, false
4290}
4291
4292// AsBasicIntangible is the BasicResponseBase implementation for ImageRecipesAction.
4293func (ira ImageRecipesAction) AsBasicIntangible() (BasicIntangible, bool) {
4294	return nil, false
4295}
4296
4297// AsImageEntityAction is the BasicResponseBase implementation for ImageRecipesAction.
4298func (ira ImageRecipesAction) AsImageEntityAction() (*ImageEntityAction, bool) {
4299	return nil, false
4300}
4301
4302// AsImageModuleAction is the BasicResponseBase implementation for ImageRecipesAction.
4303func (ira ImageRecipesAction) AsImageModuleAction() (*ImageModuleAction, bool) {
4304	return nil, false
4305}
4306
4307// AsRecipe is the BasicResponseBase implementation for ImageRecipesAction.
4308func (ira ImageRecipesAction) AsRecipe() (*Recipe, bool) {
4309	return nil, false
4310}
4311
4312// AsImageRecipesAction is the BasicResponseBase implementation for ImageRecipesAction.
4313func (ira ImageRecipesAction) AsImageRecipesAction() (*ImageRecipesAction, bool) {
4314	return &ira, true
4315}
4316
4317// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ImageRecipesAction.
4318func (ira ImageRecipesAction) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
4319	return nil, false
4320}
4321
4322// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ImageRecipesAction.
4323func (ira ImageRecipesAction) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
4324	return nil, false
4325}
4326
4327// AsStructuredValue is the BasicResponseBase implementation for ImageRecipesAction.
4328func (ira ImageRecipesAction) AsStructuredValue() (*StructuredValue, bool) {
4329	return nil, false
4330}
4331
4332// AsBasicStructuredValue is the BasicResponseBase implementation for ImageRecipesAction.
4333func (ira ImageRecipesAction) AsBasicStructuredValue() (BasicStructuredValue, bool) {
4334	return nil, false
4335}
4336
4337// AsResponseBase is the BasicResponseBase implementation for ImageRecipesAction.
4338func (ira ImageRecipesAction) AsResponseBase() (*ResponseBase, bool) {
4339	return nil, false
4340}
4341
4342// AsBasicResponseBase is the BasicResponseBase implementation for ImageRecipesAction.
4343func (ira ImageRecipesAction) AsBasicResponseBase() (BasicResponseBase, bool) {
4344	return &ira, true
4345}
4346
4347// UnmarshalJSON is the custom unmarshaler for ImageRecipesAction struct.
4348func (ira *ImageRecipesAction) UnmarshalJSON(body []byte) error {
4349	var m map[string]*json.RawMessage
4350	err := json.Unmarshal(body, &m)
4351	if err != nil {
4352		return err
4353	}
4354	for k, v := range m {
4355		switch k {
4356		case "data":
4357			if v != nil {
4358				var data RecipesModule
4359				err = json.Unmarshal(*v, &data)
4360				if err != nil {
4361					return err
4362				}
4363				ira.Data = &data
4364			}
4365		case "actionType":
4366			if v != nil {
4367				var actionType string
4368				err = json.Unmarshal(*v, &actionType)
4369				if err != nil {
4370					return err
4371				}
4372				ira.ActionType = &actionType
4373			}
4374		case "result":
4375			if v != nil {
4376				resultVar, err := unmarshalBasicThingArray(*v)
4377				if err != nil {
4378					return err
4379				}
4380				ira.Result = &resultVar
4381			}
4382		case "displayName":
4383			if v != nil {
4384				var displayName string
4385				err = json.Unmarshal(*v, &displayName)
4386				if err != nil {
4387					return err
4388				}
4389				ira.DisplayName = &displayName
4390			}
4391		case "isTopAction":
4392			if v != nil {
4393				var isTopAction bool
4394				err = json.Unmarshal(*v, &isTopAction)
4395				if err != nil {
4396					return err
4397				}
4398				ira.IsTopAction = &isTopAction
4399			}
4400		case "serviceUrl":
4401			if v != nil {
4402				var serviceURL string
4403				err = json.Unmarshal(*v, &serviceURL)
4404				if err != nil {
4405					return err
4406				}
4407				ira.ServiceURL = &serviceURL
4408			}
4409		case "thumbnailUrl":
4410			if v != nil {
4411				var thumbnailURL string
4412				err = json.Unmarshal(*v, &thumbnailURL)
4413				if err != nil {
4414					return err
4415				}
4416				ira.ThumbnailURL = &thumbnailURL
4417			}
4418		case "provider":
4419			if v != nil {
4420				provider, err := unmarshalBasicThingArray(*v)
4421				if err != nil {
4422					return err
4423				}
4424				ira.Provider = &provider
4425			}
4426		case "datePublished":
4427			if v != nil {
4428				var datePublished string
4429				err = json.Unmarshal(*v, &datePublished)
4430				if err != nil {
4431					return err
4432				}
4433				ira.DatePublished = &datePublished
4434			}
4435		case "text":
4436			if v != nil {
4437				var textVar string
4438				err = json.Unmarshal(*v, &textVar)
4439				if err != nil {
4440					return err
4441				}
4442				ira.Text = &textVar
4443			}
4444		case "name":
4445			if v != nil {
4446				var name string
4447				err = json.Unmarshal(*v, &name)
4448				if err != nil {
4449					return err
4450				}
4451				ira.Name = &name
4452			}
4453		case "url":
4454			if v != nil {
4455				var URL string
4456				err = json.Unmarshal(*v, &URL)
4457				if err != nil {
4458					return err
4459				}
4460				ira.URL = &URL
4461			}
4462		case "image":
4463			if v != nil {
4464				var imageVar ImageObject
4465				err = json.Unmarshal(*v, &imageVar)
4466				if err != nil {
4467					return err
4468				}
4469				ira.Image = &imageVar
4470			}
4471		case "description":
4472			if v != nil {
4473				var description string
4474				err = json.Unmarshal(*v, &description)
4475				if err != nil {
4476					return err
4477				}
4478				ira.Description = &description
4479			}
4480		case "alternateName":
4481			if v != nil {
4482				var alternateName string
4483				err = json.Unmarshal(*v, &alternateName)
4484				if err != nil {
4485					return err
4486				}
4487				ira.AlternateName = &alternateName
4488			}
4489		case "bingId":
4490			if v != nil {
4491				var bingID string
4492				err = json.Unmarshal(*v, &bingID)
4493				if err != nil {
4494					return err
4495				}
4496				ira.BingID = &bingID
4497			}
4498		case "readLink":
4499			if v != nil {
4500				var readLink string
4501				err = json.Unmarshal(*v, &readLink)
4502				if err != nil {
4503					return err
4504				}
4505				ira.ReadLink = &readLink
4506			}
4507		case "webSearchUrl":
4508			if v != nil {
4509				var webSearchURL string
4510				err = json.Unmarshal(*v, &webSearchURL)
4511				if err != nil {
4512					return err
4513				}
4514				ira.WebSearchURL = &webSearchURL
4515			}
4516		case "id":
4517			if v != nil {
4518				var ID string
4519				err = json.Unmarshal(*v, &ID)
4520				if err != nil {
4521					return err
4522				}
4523				ira.ID = &ID
4524			}
4525		case "_type":
4526			if v != nil {
4527				var typeVar Type
4528				err = json.Unmarshal(*v, &typeVar)
4529				if err != nil {
4530					return err
4531				}
4532				ira.Type = typeVar
4533			}
4534		}
4535	}
4536
4537	return nil
4538}
4539
4540// ImageRelatedSearchesAction defines an related search action.
4541type ImageRelatedSearchesAction struct {
4542	// Data - READ-ONLY; A list of queries related to the image.
4543	Data *RelatedSearchesModule `json:"data,omitempty"`
4544	// ActionType - READ-ONLY; A string representing the type of action.
4545	ActionType *string `json:"actionType,omitempty"`
4546	// Result - READ-ONLY; The result produced in the action.
4547	Result *[]BasicThing `json:"result,omitempty"`
4548	// DisplayName - READ-ONLY; A display name for the action.
4549	DisplayName *string `json:"displayName,omitempty"`
4550	// IsTopAction - READ-ONLY; A Boolean representing whether this result is the top action.
4551	IsTopAction *bool `json:"isTopAction,omitempty"`
4552	// ServiceURL - READ-ONLY; Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.
4553	ServiceURL *string `json:"serviceUrl,omitempty"`
4554	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
4555	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
4556	// Provider - READ-ONLY; The source of the creative work.
4557	Provider *[]BasicThing `json:"provider,omitempty"`
4558	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
4559	DatePublished *string `json:"datePublished,omitempty"`
4560	// Text - READ-ONLY; Text content of this creative work.
4561	Text *string `json:"text,omitempty"`
4562	// Name - READ-ONLY; The name of the thing represented by this object.
4563	Name *string `json:"name,omitempty"`
4564	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
4565	URL *string `json:"url,omitempty"`
4566	// Image - READ-ONLY; An image of the item.
4567	Image *ImageObject `json:"image,omitempty"`
4568	// Description - READ-ONLY; A short description of the item.
4569	Description *string `json:"description,omitempty"`
4570	// AlternateName - READ-ONLY; An alias for the item.
4571	AlternateName *string `json:"alternateName,omitempty"`
4572	// BingID - READ-ONLY; An ID that uniquely identifies this item.
4573	BingID *string `json:"bingId,omitempty"`
4574	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
4575	ReadLink *string `json:"readLink,omitempty"`
4576	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
4577	WebSearchURL *string `json:"webSearchUrl,omitempty"`
4578	// ID - READ-ONLY; A String identifier.
4579	ID *string `json:"id,omitempty"`
4580	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
4581	Type Type `json:"_type,omitempty"`
4582}
4583
4584// MarshalJSON is the custom marshaler for ImageRelatedSearchesAction.
4585func (irsa ImageRelatedSearchesAction) MarshalJSON() ([]byte, error) {
4586	irsa.Type = TypeImageRelatedSearchesAction
4587	objectMap := make(map[string]interface{})
4588	if irsa.Type != "" {
4589		objectMap["_type"] = irsa.Type
4590	}
4591	return json.Marshal(objectMap)
4592}
4593
4594// AsPoint2D is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4595func (irsa ImageRelatedSearchesAction) AsPoint2D() (*Point2D, bool) {
4596	return nil, false
4597}
4598
4599// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4600func (irsa ImageRelatedSearchesAction) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
4601	return nil, false
4602}
4603
4604// AsImageAction is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4605func (irsa ImageRelatedSearchesAction) AsImageAction() (*ImageAction, bool) {
4606	return nil, false
4607}
4608
4609// AsBasicImageAction is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4610func (irsa ImageRelatedSearchesAction) AsBasicImageAction() (BasicImageAction, bool) {
4611	return &irsa, true
4612}
4613
4614// AsImageTag is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4615func (irsa ImageRelatedSearchesAction) AsImageTag() (*ImageTag, bool) {
4616	return nil, false
4617}
4618
4619// AsOrganization is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4620func (irsa ImageRelatedSearchesAction) AsOrganization() (*Organization, bool) {
4621	return nil, false
4622}
4623
4624// AsOffer is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4625func (irsa ImageRelatedSearchesAction) AsOffer() (*Offer, bool) {
4626	return nil, false
4627}
4628
4629// AsBasicOffer is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4630func (irsa ImageRelatedSearchesAction) AsBasicOffer() (BasicOffer, bool) {
4631	return nil, false
4632}
4633
4634// AsAggregateOffer is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4635func (irsa ImageRelatedSearchesAction) AsAggregateOffer() (*AggregateOffer, bool) {
4636	return nil, false
4637}
4638
4639// AsImageObject is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4640func (irsa ImageRelatedSearchesAction) AsImageObject() (*ImageObject, bool) {
4641	return nil, false
4642}
4643
4644// AsImageKnowledge is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4645func (irsa ImageRelatedSearchesAction) AsImageKnowledge() (*ImageKnowledge, bool) {
4646	return nil, false
4647}
4648
4649// AsResponse is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4650func (irsa ImageRelatedSearchesAction) AsResponse() (*Response, bool) {
4651	return nil, false
4652}
4653
4654// AsBasicResponse is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4655func (irsa ImageRelatedSearchesAction) AsBasicResponse() (BasicResponse, bool) {
4656	return &irsa, true
4657}
4658
4659// AsIdentifiable is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4660func (irsa ImageRelatedSearchesAction) AsIdentifiable() (*Identifiable, bool) {
4661	return nil, false
4662}
4663
4664// AsBasicIdentifiable is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4665func (irsa ImageRelatedSearchesAction) AsBasicIdentifiable() (BasicIdentifiable, bool) {
4666	return &irsa, true
4667}
4668
4669// AsErrorResponse is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4670func (irsa ImageRelatedSearchesAction) AsErrorResponse() (*ErrorResponse, bool) {
4671	return nil, false
4672}
4673
4674// AsThing is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4675func (irsa ImageRelatedSearchesAction) AsThing() (*Thing, bool) {
4676	return nil, false
4677}
4678
4679// AsBasicThing is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4680func (irsa ImageRelatedSearchesAction) AsBasicThing() (BasicThing, bool) {
4681	return &irsa, true
4682}
4683
4684// AsAction is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4685func (irsa ImageRelatedSearchesAction) AsAction() (*Action, bool) {
4686	return nil, false
4687}
4688
4689// AsBasicAction is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4690func (irsa ImageRelatedSearchesAction) AsBasicAction() (BasicAction, bool) {
4691	return &irsa, true
4692}
4693
4694// AsMediaObject is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4695func (irsa ImageRelatedSearchesAction) AsMediaObject() (*MediaObject, bool) {
4696	return nil, false
4697}
4698
4699// AsBasicMediaObject is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4700func (irsa ImageRelatedSearchesAction) AsBasicMediaObject() (BasicMediaObject, bool) {
4701	return nil, false
4702}
4703
4704// AsCreativeWork is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4705func (irsa ImageRelatedSearchesAction) AsCreativeWork() (*CreativeWork, bool) {
4706	return nil, false
4707}
4708
4709// AsBasicCreativeWork is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4710func (irsa ImageRelatedSearchesAction) AsBasicCreativeWork() (BasicCreativeWork, bool) {
4711	return &irsa, true
4712}
4713
4714// AsPerson is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4715func (irsa ImageRelatedSearchesAction) AsPerson() (*Person, bool) {
4716	return nil, false
4717}
4718
4719// AsIntangible is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4720func (irsa ImageRelatedSearchesAction) AsIntangible() (*Intangible, bool) {
4721	return nil, false
4722}
4723
4724// AsBasicIntangible is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4725func (irsa ImageRelatedSearchesAction) AsBasicIntangible() (BasicIntangible, bool) {
4726	return nil, false
4727}
4728
4729// AsImageEntityAction is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4730func (irsa ImageRelatedSearchesAction) AsImageEntityAction() (*ImageEntityAction, bool) {
4731	return nil, false
4732}
4733
4734// AsImageModuleAction is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4735func (irsa ImageRelatedSearchesAction) AsImageModuleAction() (*ImageModuleAction, bool) {
4736	return nil, false
4737}
4738
4739// AsRecipe is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4740func (irsa ImageRelatedSearchesAction) AsRecipe() (*Recipe, bool) {
4741	return nil, false
4742}
4743
4744// AsImageRecipesAction is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4745func (irsa ImageRelatedSearchesAction) AsImageRecipesAction() (*ImageRecipesAction, bool) {
4746	return nil, false
4747}
4748
4749// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4750func (irsa ImageRelatedSearchesAction) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
4751	return &irsa, true
4752}
4753
4754// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4755func (irsa ImageRelatedSearchesAction) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
4756	return nil, false
4757}
4758
4759// AsStructuredValue is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4760func (irsa ImageRelatedSearchesAction) AsStructuredValue() (*StructuredValue, bool) {
4761	return nil, false
4762}
4763
4764// AsBasicStructuredValue is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4765func (irsa ImageRelatedSearchesAction) AsBasicStructuredValue() (BasicStructuredValue, bool) {
4766	return nil, false
4767}
4768
4769// AsResponseBase is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4770func (irsa ImageRelatedSearchesAction) AsResponseBase() (*ResponseBase, bool) {
4771	return nil, false
4772}
4773
4774// AsBasicResponseBase is the BasicResponseBase implementation for ImageRelatedSearchesAction.
4775func (irsa ImageRelatedSearchesAction) AsBasicResponseBase() (BasicResponseBase, bool) {
4776	return &irsa, true
4777}
4778
4779// UnmarshalJSON is the custom unmarshaler for ImageRelatedSearchesAction struct.
4780func (irsa *ImageRelatedSearchesAction) UnmarshalJSON(body []byte) error {
4781	var m map[string]*json.RawMessage
4782	err := json.Unmarshal(body, &m)
4783	if err != nil {
4784		return err
4785	}
4786	for k, v := range m {
4787		switch k {
4788		case "data":
4789			if v != nil {
4790				var data RelatedSearchesModule
4791				err = json.Unmarshal(*v, &data)
4792				if err != nil {
4793					return err
4794				}
4795				irsa.Data = &data
4796			}
4797		case "actionType":
4798			if v != nil {
4799				var actionType string
4800				err = json.Unmarshal(*v, &actionType)
4801				if err != nil {
4802					return err
4803				}
4804				irsa.ActionType = &actionType
4805			}
4806		case "result":
4807			if v != nil {
4808				resultVar, err := unmarshalBasicThingArray(*v)
4809				if err != nil {
4810					return err
4811				}
4812				irsa.Result = &resultVar
4813			}
4814		case "displayName":
4815			if v != nil {
4816				var displayName string
4817				err = json.Unmarshal(*v, &displayName)
4818				if err != nil {
4819					return err
4820				}
4821				irsa.DisplayName = &displayName
4822			}
4823		case "isTopAction":
4824			if v != nil {
4825				var isTopAction bool
4826				err = json.Unmarshal(*v, &isTopAction)
4827				if err != nil {
4828					return err
4829				}
4830				irsa.IsTopAction = &isTopAction
4831			}
4832		case "serviceUrl":
4833			if v != nil {
4834				var serviceURL string
4835				err = json.Unmarshal(*v, &serviceURL)
4836				if err != nil {
4837					return err
4838				}
4839				irsa.ServiceURL = &serviceURL
4840			}
4841		case "thumbnailUrl":
4842			if v != nil {
4843				var thumbnailURL string
4844				err = json.Unmarshal(*v, &thumbnailURL)
4845				if err != nil {
4846					return err
4847				}
4848				irsa.ThumbnailURL = &thumbnailURL
4849			}
4850		case "provider":
4851			if v != nil {
4852				provider, err := unmarshalBasicThingArray(*v)
4853				if err != nil {
4854					return err
4855				}
4856				irsa.Provider = &provider
4857			}
4858		case "datePublished":
4859			if v != nil {
4860				var datePublished string
4861				err = json.Unmarshal(*v, &datePublished)
4862				if err != nil {
4863					return err
4864				}
4865				irsa.DatePublished = &datePublished
4866			}
4867		case "text":
4868			if v != nil {
4869				var textVar string
4870				err = json.Unmarshal(*v, &textVar)
4871				if err != nil {
4872					return err
4873				}
4874				irsa.Text = &textVar
4875			}
4876		case "name":
4877			if v != nil {
4878				var name string
4879				err = json.Unmarshal(*v, &name)
4880				if err != nil {
4881					return err
4882				}
4883				irsa.Name = &name
4884			}
4885		case "url":
4886			if v != nil {
4887				var URL string
4888				err = json.Unmarshal(*v, &URL)
4889				if err != nil {
4890					return err
4891				}
4892				irsa.URL = &URL
4893			}
4894		case "image":
4895			if v != nil {
4896				var imageVar ImageObject
4897				err = json.Unmarshal(*v, &imageVar)
4898				if err != nil {
4899					return err
4900				}
4901				irsa.Image = &imageVar
4902			}
4903		case "description":
4904			if v != nil {
4905				var description string
4906				err = json.Unmarshal(*v, &description)
4907				if err != nil {
4908					return err
4909				}
4910				irsa.Description = &description
4911			}
4912		case "alternateName":
4913			if v != nil {
4914				var alternateName string
4915				err = json.Unmarshal(*v, &alternateName)
4916				if err != nil {
4917					return err
4918				}
4919				irsa.AlternateName = &alternateName
4920			}
4921		case "bingId":
4922			if v != nil {
4923				var bingID string
4924				err = json.Unmarshal(*v, &bingID)
4925				if err != nil {
4926					return err
4927				}
4928				irsa.BingID = &bingID
4929			}
4930		case "readLink":
4931			if v != nil {
4932				var readLink string
4933				err = json.Unmarshal(*v, &readLink)
4934				if err != nil {
4935					return err
4936				}
4937				irsa.ReadLink = &readLink
4938			}
4939		case "webSearchUrl":
4940			if v != nil {
4941				var webSearchURL string
4942				err = json.Unmarshal(*v, &webSearchURL)
4943				if err != nil {
4944					return err
4945				}
4946				irsa.WebSearchURL = &webSearchURL
4947			}
4948		case "id":
4949			if v != nil {
4950				var ID string
4951				err = json.Unmarshal(*v, &ID)
4952				if err != nil {
4953					return err
4954				}
4955				irsa.ID = &ID
4956			}
4957		case "_type":
4958			if v != nil {
4959				var typeVar Type
4960				err = json.Unmarshal(*v, &typeVar)
4961				if err != nil {
4962					return err
4963				}
4964				irsa.Type = typeVar
4965			}
4966		}
4967	}
4968
4969	return nil
4970}
4971
4972// ImageShoppingSourcesAction defines a shopping sources action.
4973type ImageShoppingSourcesAction struct {
4974	// Data - READ-ONLY; A list of merchants that offer items related to the image.
4975	Data *AggregateOffer `json:"data,omitempty"`
4976	// ActionType - READ-ONLY; A string representing the type of action.
4977	ActionType *string `json:"actionType,omitempty"`
4978	// Result - READ-ONLY; The result produced in the action.
4979	Result *[]BasicThing `json:"result,omitempty"`
4980	// DisplayName - READ-ONLY; A display name for the action.
4981	DisplayName *string `json:"displayName,omitempty"`
4982	// IsTopAction - READ-ONLY; A Boolean representing whether this result is the top action.
4983	IsTopAction *bool `json:"isTopAction,omitempty"`
4984	// ServiceURL - READ-ONLY; Use this URL to get additional data to determine how to take the appropriate action. For example, the serviceUrl might return JSON along with an image URL.
4985	ServiceURL *string `json:"serviceUrl,omitempty"`
4986	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
4987	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
4988	// Provider - READ-ONLY; The source of the creative work.
4989	Provider *[]BasicThing `json:"provider,omitempty"`
4990	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
4991	DatePublished *string `json:"datePublished,omitempty"`
4992	// Text - READ-ONLY; Text content of this creative work.
4993	Text *string `json:"text,omitempty"`
4994	// Name - READ-ONLY; The name of the thing represented by this object.
4995	Name *string `json:"name,omitempty"`
4996	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
4997	URL *string `json:"url,omitempty"`
4998	// Image - READ-ONLY; An image of the item.
4999	Image *ImageObject `json:"image,omitempty"`
5000	// Description - READ-ONLY; A short description of the item.
5001	Description *string `json:"description,omitempty"`
5002	// AlternateName - READ-ONLY; An alias for the item.
5003	AlternateName *string `json:"alternateName,omitempty"`
5004	// BingID - READ-ONLY; An ID that uniquely identifies this item.
5005	BingID *string `json:"bingId,omitempty"`
5006	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
5007	ReadLink *string `json:"readLink,omitempty"`
5008	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
5009	WebSearchURL *string `json:"webSearchUrl,omitempty"`
5010	// ID - READ-ONLY; A String identifier.
5011	ID *string `json:"id,omitempty"`
5012	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
5013	Type Type `json:"_type,omitempty"`
5014}
5015
5016// MarshalJSON is the custom marshaler for ImageShoppingSourcesAction.
5017func (issa ImageShoppingSourcesAction) MarshalJSON() ([]byte, error) {
5018	issa.Type = TypeImageShoppingSourcesAction
5019	objectMap := make(map[string]interface{})
5020	if issa.Type != "" {
5021		objectMap["_type"] = issa.Type
5022	}
5023	return json.Marshal(objectMap)
5024}
5025
5026// AsPoint2D is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5027func (issa ImageShoppingSourcesAction) AsPoint2D() (*Point2D, bool) {
5028	return nil, false
5029}
5030
5031// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5032func (issa ImageShoppingSourcesAction) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
5033	return nil, false
5034}
5035
5036// AsImageAction is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5037func (issa ImageShoppingSourcesAction) AsImageAction() (*ImageAction, bool) {
5038	return nil, false
5039}
5040
5041// AsBasicImageAction is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5042func (issa ImageShoppingSourcesAction) AsBasicImageAction() (BasicImageAction, bool) {
5043	return &issa, true
5044}
5045
5046// AsImageTag is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5047func (issa ImageShoppingSourcesAction) AsImageTag() (*ImageTag, bool) {
5048	return nil, false
5049}
5050
5051// AsOrganization is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5052func (issa ImageShoppingSourcesAction) AsOrganization() (*Organization, bool) {
5053	return nil, false
5054}
5055
5056// AsOffer is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5057func (issa ImageShoppingSourcesAction) AsOffer() (*Offer, bool) {
5058	return nil, false
5059}
5060
5061// AsBasicOffer is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5062func (issa ImageShoppingSourcesAction) AsBasicOffer() (BasicOffer, bool) {
5063	return nil, false
5064}
5065
5066// AsAggregateOffer is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5067func (issa ImageShoppingSourcesAction) AsAggregateOffer() (*AggregateOffer, bool) {
5068	return nil, false
5069}
5070
5071// AsImageObject is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5072func (issa ImageShoppingSourcesAction) AsImageObject() (*ImageObject, bool) {
5073	return nil, false
5074}
5075
5076// AsImageKnowledge is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5077func (issa ImageShoppingSourcesAction) AsImageKnowledge() (*ImageKnowledge, bool) {
5078	return nil, false
5079}
5080
5081// AsResponse is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5082func (issa ImageShoppingSourcesAction) AsResponse() (*Response, bool) {
5083	return nil, false
5084}
5085
5086// AsBasicResponse is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5087func (issa ImageShoppingSourcesAction) AsBasicResponse() (BasicResponse, bool) {
5088	return &issa, true
5089}
5090
5091// AsIdentifiable is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5092func (issa ImageShoppingSourcesAction) AsIdentifiable() (*Identifiable, bool) {
5093	return nil, false
5094}
5095
5096// AsBasicIdentifiable is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5097func (issa ImageShoppingSourcesAction) AsBasicIdentifiable() (BasicIdentifiable, bool) {
5098	return &issa, true
5099}
5100
5101// AsErrorResponse is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5102func (issa ImageShoppingSourcesAction) AsErrorResponse() (*ErrorResponse, bool) {
5103	return nil, false
5104}
5105
5106// AsThing is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5107func (issa ImageShoppingSourcesAction) AsThing() (*Thing, bool) {
5108	return nil, false
5109}
5110
5111// AsBasicThing is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5112func (issa ImageShoppingSourcesAction) AsBasicThing() (BasicThing, bool) {
5113	return &issa, true
5114}
5115
5116// AsAction is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5117func (issa ImageShoppingSourcesAction) AsAction() (*Action, bool) {
5118	return nil, false
5119}
5120
5121// AsBasicAction is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5122func (issa ImageShoppingSourcesAction) AsBasicAction() (BasicAction, bool) {
5123	return &issa, true
5124}
5125
5126// AsMediaObject is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5127func (issa ImageShoppingSourcesAction) AsMediaObject() (*MediaObject, bool) {
5128	return nil, false
5129}
5130
5131// AsBasicMediaObject is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5132func (issa ImageShoppingSourcesAction) AsBasicMediaObject() (BasicMediaObject, bool) {
5133	return nil, false
5134}
5135
5136// AsCreativeWork is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5137func (issa ImageShoppingSourcesAction) AsCreativeWork() (*CreativeWork, bool) {
5138	return nil, false
5139}
5140
5141// AsBasicCreativeWork is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5142func (issa ImageShoppingSourcesAction) AsBasicCreativeWork() (BasicCreativeWork, bool) {
5143	return &issa, true
5144}
5145
5146// AsPerson is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5147func (issa ImageShoppingSourcesAction) AsPerson() (*Person, bool) {
5148	return nil, false
5149}
5150
5151// AsIntangible is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5152func (issa ImageShoppingSourcesAction) AsIntangible() (*Intangible, bool) {
5153	return nil, false
5154}
5155
5156// AsBasicIntangible is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5157func (issa ImageShoppingSourcesAction) AsBasicIntangible() (BasicIntangible, bool) {
5158	return nil, false
5159}
5160
5161// AsImageEntityAction is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5162func (issa ImageShoppingSourcesAction) AsImageEntityAction() (*ImageEntityAction, bool) {
5163	return nil, false
5164}
5165
5166// AsImageModuleAction is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5167func (issa ImageShoppingSourcesAction) AsImageModuleAction() (*ImageModuleAction, bool) {
5168	return nil, false
5169}
5170
5171// AsRecipe is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5172func (issa ImageShoppingSourcesAction) AsRecipe() (*Recipe, bool) {
5173	return nil, false
5174}
5175
5176// AsImageRecipesAction is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5177func (issa ImageShoppingSourcesAction) AsImageRecipesAction() (*ImageRecipesAction, bool) {
5178	return nil, false
5179}
5180
5181// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5182func (issa ImageShoppingSourcesAction) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
5183	return nil, false
5184}
5185
5186// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5187func (issa ImageShoppingSourcesAction) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
5188	return &issa, true
5189}
5190
5191// AsStructuredValue is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5192func (issa ImageShoppingSourcesAction) AsStructuredValue() (*StructuredValue, bool) {
5193	return nil, false
5194}
5195
5196// AsBasicStructuredValue is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5197func (issa ImageShoppingSourcesAction) AsBasicStructuredValue() (BasicStructuredValue, bool) {
5198	return nil, false
5199}
5200
5201// AsResponseBase is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5202func (issa ImageShoppingSourcesAction) AsResponseBase() (*ResponseBase, bool) {
5203	return nil, false
5204}
5205
5206// AsBasicResponseBase is the BasicResponseBase implementation for ImageShoppingSourcesAction.
5207func (issa ImageShoppingSourcesAction) AsBasicResponseBase() (BasicResponseBase, bool) {
5208	return &issa, true
5209}
5210
5211// UnmarshalJSON is the custom unmarshaler for ImageShoppingSourcesAction struct.
5212func (issa *ImageShoppingSourcesAction) UnmarshalJSON(body []byte) error {
5213	var m map[string]*json.RawMessage
5214	err := json.Unmarshal(body, &m)
5215	if err != nil {
5216		return err
5217	}
5218	for k, v := range m {
5219		switch k {
5220		case "data":
5221			if v != nil {
5222				var data AggregateOffer
5223				err = json.Unmarshal(*v, &data)
5224				if err != nil {
5225					return err
5226				}
5227				issa.Data = &data
5228			}
5229		case "actionType":
5230			if v != nil {
5231				var actionType string
5232				err = json.Unmarshal(*v, &actionType)
5233				if err != nil {
5234					return err
5235				}
5236				issa.ActionType = &actionType
5237			}
5238		case "result":
5239			if v != nil {
5240				resultVar, err := unmarshalBasicThingArray(*v)
5241				if err != nil {
5242					return err
5243				}
5244				issa.Result = &resultVar
5245			}
5246		case "displayName":
5247			if v != nil {
5248				var displayName string
5249				err = json.Unmarshal(*v, &displayName)
5250				if err != nil {
5251					return err
5252				}
5253				issa.DisplayName = &displayName
5254			}
5255		case "isTopAction":
5256			if v != nil {
5257				var isTopAction bool
5258				err = json.Unmarshal(*v, &isTopAction)
5259				if err != nil {
5260					return err
5261				}
5262				issa.IsTopAction = &isTopAction
5263			}
5264		case "serviceUrl":
5265			if v != nil {
5266				var serviceURL string
5267				err = json.Unmarshal(*v, &serviceURL)
5268				if err != nil {
5269					return err
5270				}
5271				issa.ServiceURL = &serviceURL
5272			}
5273		case "thumbnailUrl":
5274			if v != nil {
5275				var thumbnailURL string
5276				err = json.Unmarshal(*v, &thumbnailURL)
5277				if err != nil {
5278					return err
5279				}
5280				issa.ThumbnailURL = &thumbnailURL
5281			}
5282		case "provider":
5283			if v != nil {
5284				provider, err := unmarshalBasicThingArray(*v)
5285				if err != nil {
5286					return err
5287				}
5288				issa.Provider = &provider
5289			}
5290		case "datePublished":
5291			if v != nil {
5292				var datePublished string
5293				err = json.Unmarshal(*v, &datePublished)
5294				if err != nil {
5295					return err
5296				}
5297				issa.DatePublished = &datePublished
5298			}
5299		case "text":
5300			if v != nil {
5301				var textVar string
5302				err = json.Unmarshal(*v, &textVar)
5303				if err != nil {
5304					return err
5305				}
5306				issa.Text = &textVar
5307			}
5308		case "name":
5309			if v != nil {
5310				var name string
5311				err = json.Unmarshal(*v, &name)
5312				if err != nil {
5313					return err
5314				}
5315				issa.Name = &name
5316			}
5317		case "url":
5318			if v != nil {
5319				var URL string
5320				err = json.Unmarshal(*v, &URL)
5321				if err != nil {
5322					return err
5323				}
5324				issa.URL = &URL
5325			}
5326		case "image":
5327			if v != nil {
5328				var imageVar ImageObject
5329				err = json.Unmarshal(*v, &imageVar)
5330				if err != nil {
5331					return err
5332				}
5333				issa.Image = &imageVar
5334			}
5335		case "description":
5336			if v != nil {
5337				var description string
5338				err = json.Unmarshal(*v, &description)
5339				if err != nil {
5340					return err
5341				}
5342				issa.Description = &description
5343			}
5344		case "alternateName":
5345			if v != nil {
5346				var alternateName string
5347				err = json.Unmarshal(*v, &alternateName)
5348				if err != nil {
5349					return err
5350				}
5351				issa.AlternateName = &alternateName
5352			}
5353		case "bingId":
5354			if v != nil {
5355				var bingID string
5356				err = json.Unmarshal(*v, &bingID)
5357				if err != nil {
5358					return err
5359				}
5360				issa.BingID = &bingID
5361			}
5362		case "readLink":
5363			if v != nil {
5364				var readLink string
5365				err = json.Unmarshal(*v, &readLink)
5366				if err != nil {
5367					return err
5368				}
5369				issa.ReadLink = &readLink
5370			}
5371		case "webSearchUrl":
5372			if v != nil {
5373				var webSearchURL string
5374				err = json.Unmarshal(*v, &webSearchURL)
5375				if err != nil {
5376					return err
5377				}
5378				issa.WebSearchURL = &webSearchURL
5379			}
5380		case "id":
5381			if v != nil {
5382				var ID string
5383				err = json.Unmarshal(*v, &ID)
5384				if err != nil {
5385					return err
5386				}
5387				issa.ID = &ID
5388			}
5389		case "_type":
5390			if v != nil {
5391				var typeVar Type
5392				err = json.Unmarshal(*v, &typeVar)
5393				if err != nil {
5394					return err
5395				}
5396				issa.Type = typeVar
5397			}
5398		}
5399	}
5400
5401	return nil
5402}
5403
5404// ImagesImageMetadata defines a count of the number of websites where you can shop or perform other
5405// actions related to the image.
5406type ImagesImageMetadata struct {
5407	// ShoppingSourcesCount - READ-ONLY; The number of websites that sell the products seen in the image.
5408	ShoppingSourcesCount *int32 `json:"shoppingSourcesCount,omitempty"`
5409	// RecipeSourcesCount - READ-ONLY; The number of websites that offer recipes of the food seen in the image.
5410	RecipeSourcesCount *int32 `json:"recipeSourcesCount,omitempty"`
5411	// AggregateOffer - READ-ONLY; A summary of the online offers of products found in the image. For example, if the image is of a dress, the offer might identify the lowest price and the number of offers found. Only visually similar products insights include this field. The offer includes the following fields: Name, AggregateRating, OfferCount, and LowPrice.
5412	AggregateOffer *AggregateOffer `json:"aggregateOffer,omitempty"`
5413}
5414
5415// MarshalJSON is the custom marshaler for ImagesImageMetadata.
5416func (iim ImagesImageMetadata) MarshalJSON() ([]byte, error) {
5417	objectMap := make(map[string]interface{})
5418	return json.Marshal(objectMap)
5419}
5420
5421// ImagesModule defines a list of images.
5422type ImagesModule struct {
5423	// Value - READ-ONLY; A list of images.
5424	Value *[]ImageObject `json:"value,omitempty"`
5425}
5426
5427// MarshalJSON is the custom marshaler for ImagesModule.
5428func (im ImagesModule) MarshalJSON() ([]byte, error) {
5429	objectMap := make(map[string]interface{})
5430	return json.Marshal(objectMap)
5431}
5432
5433// ImageTag a visual search tag.
5434type ImageTag struct {
5435	// DisplayName - READ-ONLY; Display name for this tag. For the default tag, the display name is empty.
5436	DisplayName *string `json:"displayName,omitempty"`
5437	// BoundingBox - READ-ONLY; The bounding box for this tag. For the default tag, there is no bounding box.
5438	BoundingBox *ImageTagRegion `json:"boundingBox,omitempty"`
5439	// Actions - READ-ONLY; Actions within this tag. The order of the items denotes the default ranking order of these actions, with the first action being the most likely user intent.
5440	Actions *[]BasicImageAction `json:"actions,omitempty"`
5441	// Name - READ-ONLY; The name of the thing represented by this object.
5442	Name *string `json:"name,omitempty"`
5443	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
5444	URL *string `json:"url,omitempty"`
5445	// Image - READ-ONLY; An image of the item.
5446	Image *ImageObject `json:"image,omitempty"`
5447	// Description - READ-ONLY; A short description of the item.
5448	Description *string `json:"description,omitempty"`
5449	// AlternateName - READ-ONLY; An alias for the item.
5450	AlternateName *string `json:"alternateName,omitempty"`
5451	// BingID - READ-ONLY; An ID that uniquely identifies this item.
5452	BingID *string `json:"bingId,omitempty"`
5453	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
5454	ReadLink *string `json:"readLink,omitempty"`
5455	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
5456	WebSearchURL *string `json:"webSearchUrl,omitempty"`
5457	// ID - READ-ONLY; A String identifier.
5458	ID *string `json:"id,omitempty"`
5459	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
5460	Type Type `json:"_type,omitempty"`
5461}
5462
5463// MarshalJSON is the custom marshaler for ImageTag.
5464func (it ImageTag) MarshalJSON() ([]byte, error) {
5465	it.Type = TypeImageTag
5466	objectMap := make(map[string]interface{})
5467	if it.Type != "" {
5468		objectMap["_type"] = it.Type
5469	}
5470	return json.Marshal(objectMap)
5471}
5472
5473// AsPoint2D is the BasicResponseBase implementation for ImageTag.
5474func (it ImageTag) AsPoint2D() (*Point2D, bool) {
5475	return nil, false
5476}
5477
5478// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ImageTag.
5479func (it ImageTag) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
5480	return nil, false
5481}
5482
5483// AsImageAction is the BasicResponseBase implementation for ImageTag.
5484func (it ImageTag) AsImageAction() (*ImageAction, bool) {
5485	return nil, false
5486}
5487
5488// AsBasicImageAction is the BasicResponseBase implementation for ImageTag.
5489func (it ImageTag) AsBasicImageAction() (BasicImageAction, bool) {
5490	return nil, false
5491}
5492
5493// AsImageTag is the BasicResponseBase implementation for ImageTag.
5494func (it ImageTag) AsImageTag() (*ImageTag, bool) {
5495	return &it, true
5496}
5497
5498// AsOrganization is the BasicResponseBase implementation for ImageTag.
5499func (it ImageTag) AsOrganization() (*Organization, bool) {
5500	return nil, false
5501}
5502
5503// AsOffer is the BasicResponseBase implementation for ImageTag.
5504func (it ImageTag) AsOffer() (*Offer, bool) {
5505	return nil, false
5506}
5507
5508// AsBasicOffer is the BasicResponseBase implementation for ImageTag.
5509func (it ImageTag) AsBasicOffer() (BasicOffer, bool) {
5510	return nil, false
5511}
5512
5513// AsAggregateOffer is the BasicResponseBase implementation for ImageTag.
5514func (it ImageTag) AsAggregateOffer() (*AggregateOffer, bool) {
5515	return nil, false
5516}
5517
5518// AsImageObject is the BasicResponseBase implementation for ImageTag.
5519func (it ImageTag) AsImageObject() (*ImageObject, bool) {
5520	return nil, false
5521}
5522
5523// AsImageKnowledge is the BasicResponseBase implementation for ImageTag.
5524func (it ImageTag) AsImageKnowledge() (*ImageKnowledge, bool) {
5525	return nil, false
5526}
5527
5528// AsResponse is the BasicResponseBase implementation for ImageTag.
5529func (it ImageTag) AsResponse() (*Response, bool) {
5530	return nil, false
5531}
5532
5533// AsBasicResponse is the BasicResponseBase implementation for ImageTag.
5534func (it ImageTag) AsBasicResponse() (BasicResponse, bool) {
5535	return &it, true
5536}
5537
5538// AsIdentifiable is the BasicResponseBase implementation for ImageTag.
5539func (it ImageTag) AsIdentifiable() (*Identifiable, bool) {
5540	return nil, false
5541}
5542
5543// AsBasicIdentifiable is the BasicResponseBase implementation for ImageTag.
5544func (it ImageTag) AsBasicIdentifiable() (BasicIdentifiable, bool) {
5545	return &it, true
5546}
5547
5548// AsErrorResponse is the BasicResponseBase implementation for ImageTag.
5549func (it ImageTag) AsErrorResponse() (*ErrorResponse, bool) {
5550	return nil, false
5551}
5552
5553// AsThing is the BasicResponseBase implementation for ImageTag.
5554func (it ImageTag) AsThing() (*Thing, bool) {
5555	return nil, false
5556}
5557
5558// AsBasicThing is the BasicResponseBase implementation for ImageTag.
5559func (it ImageTag) AsBasicThing() (BasicThing, bool) {
5560	return &it, true
5561}
5562
5563// AsAction is the BasicResponseBase implementation for ImageTag.
5564func (it ImageTag) AsAction() (*Action, bool) {
5565	return nil, false
5566}
5567
5568// AsBasicAction is the BasicResponseBase implementation for ImageTag.
5569func (it ImageTag) AsBasicAction() (BasicAction, bool) {
5570	return nil, false
5571}
5572
5573// AsMediaObject is the BasicResponseBase implementation for ImageTag.
5574func (it ImageTag) AsMediaObject() (*MediaObject, bool) {
5575	return nil, false
5576}
5577
5578// AsBasicMediaObject is the BasicResponseBase implementation for ImageTag.
5579func (it ImageTag) AsBasicMediaObject() (BasicMediaObject, bool) {
5580	return nil, false
5581}
5582
5583// AsCreativeWork is the BasicResponseBase implementation for ImageTag.
5584func (it ImageTag) AsCreativeWork() (*CreativeWork, bool) {
5585	return nil, false
5586}
5587
5588// AsBasicCreativeWork is the BasicResponseBase implementation for ImageTag.
5589func (it ImageTag) AsBasicCreativeWork() (BasicCreativeWork, bool) {
5590	return nil, false
5591}
5592
5593// AsPerson is the BasicResponseBase implementation for ImageTag.
5594func (it ImageTag) AsPerson() (*Person, bool) {
5595	return nil, false
5596}
5597
5598// AsIntangible is the BasicResponseBase implementation for ImageTag.
5599func (it ImageTag) AsIntangible() (*Intangible, bool) {
5600	return nil, false
5601}
5602
5603// AsBasicIntangible is the BasicResponseBase implementation for ImageTag.
5604func (it ImageTag) AsBasicIntangible() (BasicIntangible, bool) {
5605	return nil, false
5606}
5607
5608// AsImageEntityAction is the BasicResponseBase implementation for ImageTag.
5609func (it ImageTag) AsImageEntityAction() (*ImageEntityAction, bool) {
5610	return nil, false
5611}
5612
5613// AsImageModuleAction is the BasicResponseBase implementation for ImageTag.
5614func (it ImageTag) AsImageModuleAction() (*ImageModuleAction, bool) {
5615	return nil, false
5616}
5617
5618// AsRecipe is the BasicResponseBase implementation for ImageTag.
5619func (it ImageTag) AsRecipe() (*Recipe, bool) {
5620	return nil, false
5621}
5622
5623// AsImageRecipesAction is the BasicResponseBase implementation for ImageTag.
5624func (it ImageTag) AsImageRecipesAction() (*ImageRecipesAction, bool) {
5625	return nil, false
5626}
5627
5628// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ImageTag.
5629func (it ImageTag) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
5630	return nil, false
5631}
5632
5633// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ImageTag.
5634func (it ImageTag) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
5635	return nil, false
5636}
5637
5638// AsStructuredValue is the BasicResponseBase implementation for ImageTag.
5639func (it ImageTag) AsStructuredValue() (*StructuredValue, bool) {
5640	return nil, false
5641}
5642
5643// AsBasicStructuredValue is the BasicResponseBase implementation for ImageTag.
5644func (it ImageTag) AsBasicStructuredValue() (BasicStructuredValue, bool) {
5645	return nil, false
5646}
5647
5648// AsResponseBase is the BasicResponseBase implementation for ImageTag.
5649func (it ImageTag) AsResponseBase() (*ResponseBase, bool) {
5650	return nil, false
5651}
5652
5653// AsBasicResponseBase is the BasicResponseBase implementation for ImageTag.
5654func (it ImageTag) AsBasicResponseBase() (BasicResponseBase, bool) {
5655	return &it, true
5656}
5657
5658// UnmarshalJSON is the custom unmarshaler for ImageTag struct.
5659func (it *ImageTag) UnmarshalJSON(body []byte) error {
5660	var m map[string]*json.RawMessage
5661	err := json.Unmarshal(body, &m)
5662	if err != nil {
5663		return err
5664	}
5665	for k, v := range m {
5666		switch k {
5667		case "displayName":
5668			if v != nil {
5669				var displayName string
5670				err = json.Unmarshal(*v, &displayName)
5671				if err != nil {
5672					return err
5673				}
5674				it.DisplayName = &displayName
5675			}
5676		case "boundingBox":
5677			if v != nil {
5678				var boundingBox ImageTagRegion
5679				err = json.Unmarshal(*v, &boundingBox)
5680				if err != nil {
5681					return err
5682				}
5683				it.BoundingBox = &boundingBox
5684			}
5685		case "actions":
5686			if v != nil {
5687				actions, err := unmarshalBasicImageActionArray(*v)
5688				if err != nil {
5689					return err
5690				}
5691				it.Actions = &actions
5692			}
5693		case "name":
5694			if v != nil {
5695				var name string
5696				err = json.Unmarshal(*v, &name)
5697				if err != nil {
5698					return err
5699				}
5700				it.Name = &name
5701			}
5702		case "url":
5703			if v != nil {
5704				var URL string
5705				err = json.Unmarshal(*v, &URL)
5706				if err != nil {
5707					return err
5708				}
5709				it.URL = &URL
5710			}
5711		case "image":
5712			if v != nil {
5713				var imageVar ImageObject
5714				err = json.Unmarshal(*v, &imageVar)
5715				if err != nil {
5716					return err
5717				}
5718				it.Image = &imageVar
5719			}
5720		case "description":
5721			if v != nil {
5722				var description string
5723				err = json.Unmarshal(*v, &description)
5724				if err != nil {
5725					return err
5726				}
5727				it.Description = &description
5728			}
5729		case "alternateName":
5730			if v != nil {
5731				var alternateName string
5732				err = json.Unmarshal(*v, &alternateName)
5733				if err != nil {
5734					return err
5735				}
5736				it.AlternateName = &alternateName
5737			}
5738		case "bingId":
5739			if v != nil {
5740				var bingID string
5741				err = json.Unmarshal(*v, &bingID)
5742				if err != nil {
5743					return err
5744				}
5745				it.BingID = &bingID
5746			}
5747		case "readLink":
5748			if v != nil {
5749				var readLink string
5750				err = json.Unmarshal(*v, &readLink)
5751				if err != nil {
5752					return err
5753				}
5754				it.ReadLink = &readLink
5755			}
5756		case "webSearchUrl":
5757			if v != nil {
5758				var webSearchURL string
5759				err = json.Unmarshal(*v, &webSearchURL)
5760				if err != nil {
5761					return err
5762				}
5763				it.WebSearchURL = &webSearchURL
5764			}
5765		case "id":
5766			if v != nil {
5767				var ID string
5768				err = json.Unmarshal(*v, &ID)
5769				if err != nil {
5770					return err
5771				}
5772				it.ID = &ID
5773			}
5774		case "_type":
5775			if v != nil {
5776				var typeVar Type
5777				err = json.Unmarshal(*v, &typeVar)
5778				if err != nil {
5779					return err
5780				}
5781				it.Type = typeVar
5782			}
5783		}
5784	}
5785
5786	return nil
5787}
5788
5789// ImageTagRegion defines an image region relevant to the ImageTag.
5790type ImageTagRegion struct {
5791	// QueryRectangle - A rectangle that outlines the area of interest for this tag.
5792	QueryRectangle *NormalizedQuadrilateral `json:"queryRectangle,omitempty"`
5793	// DisplayRectangle - A recommended rectangle to show to the user.
5794	DisplayRectangle *NormalizedQuadrilateral `json:"displayRectangle,omitempty"`
5795}
5796
5797// BasicIntangible a utility class that serves as the umbrella for a number of 'intangible' things such as quantities,
5798// structured values, etc.
5799type BasicIntangible interface {
5800	AsPoint2D() (*Point2D, bool)
5801	AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool)
5802	AsStructuredValue() (*StructuredValue, bool)
5803	AsBasicStructuredValue() (BasicStructuredValue, bool)
5804	AsIntangible() (*Intangible, bool)
5805}
5806
5807// Intangible a utility class that serves as the umbrella for a number of 'intangible' things such as
5808// quantities, structured values, etc.
5809type Intangible struct {
5810	// Name - READ-ONLY; The name of the thing represented by this object.
5811	Name *string `json:"name,omitempty"`
5812	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
5813	URL *string `json:"url,omitempty"`
5814	// Image - READ-ONLY; An image of the item.
5815	Image *ImageObject `json:"image,omitempty"`
5816	// Description - READ-ONLY; A short description of the item.
5817	Description *string `json:"description,omitempty"`
5818	// AlternateName - READ-ONLY; An alias for the item.
5819	AlternateName *string `json:"alternateName,omitempty"`
5820	// BingID - READ-ONLY; An ID that uniquely identifies this item.
5821	BingID *string `json:"bingId,omitempty"`
5822	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
5823	ReadLink *string `json:"readLink,omitempty"`
5824	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
5825	WebSearchURL *string `json:"webSearchUrl,omitempty"`
5826	// ID - READ-ONLY; A String identifier.
5827	ID *string `json:"id,omitempty"`
5828	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
5829	Type Type `json:"_type,omitempty"`
5830}
5831
5832func unmarshalBasicIntangible(body []byte) (BasicIntangible, error) {
5833	var m map[string]interface{}
5834	err := json.Unmarshal(body, &m)
5835	if err != nil {
5836		return nil, err
5837	}
5838
5839	switch m["_type"] {
5840	case string(TypePoint2D):
5841		var p2 Point2D
5842		err := json.Unmarshal(body, &p2)
5843		return p2, err
5844	case string(TypeNormalizedQuadrilateral):
5845		var nq NormalizedQuadrilateral
5846		err := json.Unmarshal(body, &nq)
5847		return nq, err
5848	case string(TypeStructuredValue):
5849		var sv StructuredValue
5850		err := json.Unmarshal(body, &sv)
5851		return sv, err
5852	default:
5853		var i Intangible
5854		err := json.Unmarshal(body, &i)
5855		return i, err
5856	}
5857}
5858func unmarshalBasicIntangibleArray(body []byte) ([]BasicIntangible, error) {
5859	var rawMessages []*json.RawMessage
5860	err := json.Unmarshal(body, &rawMessages)
5861	if err != nil {
5862		return nil, err
5863	}
5864
5865	iArray := make([]BasicIntangible, len(rawMessages))
5866
5867	for index, rawMessage := range rawMessages {
5868		i, err := unmarshalBasicIntangible(*rawMessage)
5869		if err != nil {
5870			return nil, err
5871		}
5872		iArray[index] = i
5873	}
5874	return iArray, nil
5875}
5876
5877// MarshalJSON is the custom marshaler for Intangible.
5878func (i Intangible) MarshalJSON() ([]byte, error) {
5879	i.Type = TypeIntangible
5880	objectMap := make(map[string]interface{})
5881	if i.Type != "" {
5882		objectMap["_type"] = i.Type
5883	}
5884	return json.Marshal(objectMap)
5885}
5886
5887// AsPoint2D is the BasicResponseBase implementation for Intangible.
5888func (i Intangible) AsPoint2D() (*Point2D, bool) {
5889	return nil, false
5890}
5891
5892// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Intangible.
5893func (i Intangible) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
5894	return nil, false
5895}
5896
5897// AsImageAction is the BasicResponseBase implementation for Intangible.
5898func (i Intangible) AsImageAction() (*ImageAction, bool) {
5899	return nil, false
5900}
5901
5902// AsBasicImageAction is the BasicResponseBase implementation for Intangible.
5903func (i Intangible) AsBasicImageAction() (BasicImageAction, bool) {
5904	return nil, false
5905}
5906
5907// AsImageTag is the BasicResponseBase implementation for Intangible.
5908func (i Intangible) AsImageTag() (*ImageTag, bool) {
5909	return nil, false
5910}
5911
5912// AsOrganization is the BasicResponseBase implementation for Intangible.
5913func (i Intangible) AsOrganization() (*Organization, bool) {
5914	return nil, false
5915}
5916
5917// AsOffer is the BasicResponseBase implementation for Intangible.
5918func (i Intangible) AsOffer() (*Offer, bool) {
5919	return nil, false
5920}
5921
5922// AsBasicOffer is the BasicResponseBase implementation for Intangible.
5923func (i Intangible) AsBasicOffer() (BasicOffer, bool) {
5924	return nil, false
5925}
5926
5927// AsAggregateOffer is the BasicResponseBase implementation for Intangible.
5928func (i Intangible) AsAggregateOffer() (*AggregateOffer, bool) {
5929	return nil, false
5930}
5931
5932// AsImageObject is the BasicResponseBase implementation for Intangible.
5933func (i Intangible) AsImageObject() (*ImageObject, bool) {
5934	return nil, false
5935}
5936
5937// AsImageKnowledge is the BasicResponseBase implementation for Intangible.
5938func (i Intangible) AsImageKnowledge() (*ImageKnowledge, bool) {
5939	return nil, false
5940}
5941
5942// AsResponse is the BasicResponseBase implementation for Intangible.
5943func (i Intangible) AsResponse() (*Response, bool) {
5944	return nil, false
5945}
5946
5947// AsBasicResponse is the BasicResponseBase implementation for Intangible.
5948func (i Intangible) AsBasicResponse() (BasicResponse, bool) {
5949	return &i, true
5950}
5951
5952// AsIdentifiable is the BasicResponseBase implementation for Intangible.
5953func (i Intangible) AsIdentifiable() (*Identifiable, bool) {
5954	return nil, false
5955}
5956
5957// AsBasicIdentifiable is the BasicResponseBase implementation for Intangible.
5958func (i Intangible) AsBasicIdentifiable() (BasicIdentifiable, bool) {
5959	return &i, true
5960}
5961
5962// AsErrorResponse is the BasicResponseBase implementation for Intangible.
5963func (i Intangible) AsErrorResponse() (*ErrorResponse, bool) {
5964	return nil, false
5965}
5966
5967// AsThing is the BasicResponseBase implementation for Intangible.
5968func (i Intangible) AsThing() (*Thing, bool) {
5969	return nil, false
5970}
5971
5972// AsBasicThing is the BasicResponseBase implementation for Intangible.
5973func (i Intangible) AsBasicThing() (BasicThing, bool) {
5974	return &i, true
5975}
5976
5977// AsAction is the BasicResponseBase implementation for Intangible.
5978func (i Intangible) AsAction() (*Action, bool) {
5979	return nil, false
5980}
5981
5982// AsBasicAction is the BasicResponseBase implementation for Intangible.
5983func (i Intangible) AsBasicAction() (BasicAction, bool) {
5984	return nil, false
5985}
5986
5987// AsMediaObject is the BasicResponseBase implementation for Intangible.
5988func (i Intangible) AsMediaObject() (*MediaObject, bool) {
5989	return nil, false
5990}
5991
5992// AsBasicMediaObject is the BasicResponseBase implementation for Intangible.
5993func (i Intangible) AsBasicMediaObject() (BasicMediaObject, bool) {
5994	return nil, false
5995}
5996
5997// AsCreativeWork is the BasicResponseBase implementation for Intangible.
5998func (i Intangible) AsCreativeWork() (*CreativeWork, bool) {
5999	return nil, false
6000}
6001
6002// AsBasicCreativeWork is the BasicResponseBase implementation for Intangible.
6003func (i Intangible) AsBasicCreativeWork() (BasicCreativeWork, bool) {
6004	return nil, false
6005}
6006
6007// AsPerson is the BasicResponseBase implementation for Intangible.
6008func (i Intangible) AsPerson() (*Person, bool) {
6009	return nil, false
6010}
6011
6012// AsIntangible is the BasicResponseBase implementation for Intangible.
6013func (i Intangible) AsIntangible() (*Intangible, bool) {
6014	return &i, true
6015}
6016
6017// AsBasicIntangible is the BasicResponseBase implementation for Intangible.
6018func (i Intangible) AsBasicIntangible() (BasicIntangible, bool) {
6019	return &i, true
6020}
6021
6022// AsImageEntityAction is the BasicResponseBase implementation for Intangible.
6023func (i Intangible) AsImageEntityAction() (*ImageEntityAction, bool) {
6024	return nil, false
6025}
6026
6027// AsImageModuleAction is the BasicResponseBase implementation for Intangible.
6028func (i Intangible) AsImageModuleAction() (*ImageModuleAction, bool) {
6029	return nil, false
6030}
6031
6032// AsRecipe is the BasicResponseBase implementation for Intangible.
6033func (i Intangible) AsRecipe() (*Recipe, bool) {
6034	return nil, false
6035}
6036
6037// AsImageRecipesAction is the BasicResponseBase implementation for Intangible.
6038func (i Intangible) AsImageRecipesAction() (*ImageRecipesAction, bool) {
6039	return nil, false
6040}
6041
6042// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Intangible.
6043func (i Intangible) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
6044	return nil, false
6045}
6046
6047// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Intangible.
6048func (i Intangible) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
6049	return nil, false
6050}
6051
6052// AsStructuredValue is the BasicResponseBase implementation for Intangible.
6053func (i Intangible) AsStructuredValue() (*StructuredValue, bool) {
6054	return nil, false
6055}
6056
6057// AsBasicStructuredValue is the BasicResponseBase implementation for Intangible.
6058func (i Intangible) AsBasicStructuredValue() (BasicStructuredValue, bool) {
6059	return nil, false
6060}
6061
6062// AsResponseBase is the BasicResponseBase implementation for Intangible.
6063func (i Intangible) AsResponseBase() (*ResponseBase, bool) {
6064	return nil, false
6065}
6066
6067// AsBasicResponseBase is the BasicResponseBase implementation for Intangible.
6068func (i Intangible) AsBasicResponseBase() (BasicResponseBase, bool) {
6069	return &i, true
6070}
6071
6072// KnowledgeRequest a JSON object containing information about the request, such as filters for the
6073// resulting actions.
6074type KnowledgeRequest struct {
6075	// Filters - A key-value object consisting of filters that may be specified to limit the results returned by the API.
6076	Filters *Filters `json:"filters,omitempty"`
6077}
6078
6079// BasicMediaObject defines a media object.
6080type BasicMediaObject interface {
6081	AsImageObject() (*ImageObject, bool)
6082	AsMediaObject() (*MediaObject, bool)
6083}
6084
6085// MediaObject defines a media object.
6086type MediaObject struct {
6087	// ContentURL - READ-ONLY; Original URL to retrieve the source (file) for the media object (e.g., the source URL for the image).
6088	ContentURL *string `json:"contentUrl,omitempty"`
6089	// HostPageURL - READ-ONLY; URL of the page that hosts the media object.
6090	HostPageURL *string `json:"hostPageUrl,omitempty"`
6091	// ContentSize - READ-ONLY; Size of the media object content. Use format "value unit" (e.g., "1024 B").
6092	ContentSize *string `json:"contentSize,omitempty"`
6093	// EncodingFormat - READ-ONLY; Encoding format (e.g., png, gif, jpeg, etc).
6094	EncodingFormat *string `json:"encodingFormat,omitempty"`
6095	// HostPageDisplayURL - READ-ONLY; Display URL of the page that hosts the media object.
6096	HostPageDisplayURL *string `json:"hostPageDisplayUrl,omitempty"`
6097	// Width - READ-ONLY; The width of the media object, in pixels.
6098	Width *int32 `json:"width,omitempty"`
6099	// Height - READ-ONLY; The height of the media object, in pixels.
6100	Height *int32 `json:"height,omitempty"`
6101	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
6102	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
6103	// Provider - READ-ONLY; The source of the creative work.
6104	Provider *[]BasicThing `json:"provider,omitempty"`
6105	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
6106	DatePublished *string `json:"datePublished,omitempty"`
6107	// Text - READ-ONLY; Text content of this creative work.
6108	Text *string `json:"text,omitempty"`
6109	// Name - READ-ONLY; The name of the thing represented by this object.
6110	Name *string `json:"name,omitempty"`
6111	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
6112	URL *string `json:"url,omitempty"`
6113	// Image - READ-ONLY; An image of the item.
6114	Image *ImageObject `json:"image,omitempty"`
6115	// Description - READ-ONLY; A short description of the item.
6116	Description *string `json:"description,omitempty"`
6117	// AlternateName - READ-ONLY; An alias for the item.
6118	AlternateName *string `json:"alternateName,omitempty"`
6119	// BingID - READ-ONLY; An ID that uniquely identifies this item.
6120	BingID *string `json:"bingId,omitempty"`
6121	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
6122	ReadLink *string `json:"readLink,omitempty"`
6123	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
6124	WebSearchURL *string `json:"webSearchUrl,omitempty"`
6125	// ID - READ-ONLY; A String identifier.
6126	ID *string `json:"id,omitempty"`
6127	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
6128	Type Type `json:"_type,omitempty"`
6129}
6130
6131func unmarshalBasicMediaObject(body []byte) (BasicMediaObject, error) {
6132	var m map[string]interface{}
6133	err := json.Unmarshal(body, &m)
6134	if err != nil {
6135		return nil, err
6136	}
6137
6138	switch m["_type"] {
6139	case string(TypeImageObject):
6140		var ioVar ImageObject
6141		err := json.Unmarshal(body, &ioVar)
6142		return ioVar, err
6143	default:
6144		var mo MediaObject
6145		err := json.Unmarshal(body, &mo)
6146		return mo, err
6147	}
6148}
6149func unmarshalBasicMediaObjectArray(body []byte) ([]BasicMediaObject, error) {
6150	var rawMessages []*json.RawMessage
6151	err := json.Unmarshal(body, &rawMessages)
6152	if err != nil {
6153		return nil, err
6154	}
6155
6156	moArray := make([]BasicMediaObject, len(rawMessages))
6157
6158	for index, rawMessage := range rawMessages {
6159		mo, err := unmarshalBasicMediaObject(*rawMessage)
6160		if err != nil {
6161			return nil, err
6162		}
6163		moArray[index] = mo
6164	}
6165	return moArray, nil
6166}
6167
6168// MarshalJSON is the custom marshaler for MediaObject.
6169func (mo MediaObject) MarshalJSON() ([]byte, error) {
6170	mo.Type = TypeMediaObject
6171	objectMap := make(map[string]interface{})
6172	if mo.Type != "" {
6173		objectMap["_type"] = mo.Type
6174	}
6175	return json.Marshal(objectMap)
6176}
6177
6178// AsPoint2D is the BasicResponseBase implementation for MediaObject.
6179func (mo MediaObject) AsPoint2D() (*Point2D, bool) {
6180	return nil, false
6181}
6182
6183// AsNormalizedQuadrilateral is the BasicResponseBase implementation for MediaObject.
6184func (mo MediaObject) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
6185	return nil, false
6186}
6187
6188// AsImageAction is the BasicResponseBase implementation for MediaObject.
6189func (mo MediaObject) AsImageAction() (*ImageAction, bool) {
6190	return nil, false
6191}
6192
6193// AsBasicImageAction is the BasicResponseBase implementation for MediaObject.
6194func (mo MediaObject) AsBasicImageAction() (BasicImageAction, bool) {
6195	return nil, false
6196}
6197
6198// AsImageTag is the BasicResponseBase implementation for MediaObject.
6199func (mo MediaObject) AsImageTag() (*ImageTag, bool) {
6200	return nil, false
6201}
6202
6203// AsOrganization is the BasicResponseBase implementation for MediaObject.
6204func (mo MediaObject) AsOrganization() (*Organization, bool) {
6205	return nil, false
6206}
6207
6208// AsOffer is the BasicResponseBase implementation for MediaObject.
6209func (mo MediaObject) AsOffer() (*Offer, bool) {
6210	return nil, false
6211}
6212
6213// AsBasicOffer is the BasicResponseBase implementation for MediaObject.
6214func (mo MediaObject) AsBasicOffer() (BasicOffer, bool) {
6215	return nil, false
6216}
6217
6218// AsAggregateOffer is the BasicResponseBase implementation for MediaObject.
6219func (mo MediaObject) AsAggregateOffer() (*AggregateOffer, bool) {
6220	return nil, false
6221}
6222
6223// AsImageObject is the BasicResponseBase implementation for MediaObject.
6224func (mo MediaObject) AsImageObject() (*ImageObject, bool) {
6225	return nil, false
6226}
6227
6228// AsImageKnowledge is the BasicResponseBase implementation for MediaObject.
6229func (mo MediaObject) AsImageKnowledge() (*ImageKnowledge, bool) {
6230	return nil, false
6231}
6232
6233// AsResponse is the BasicResponseBase implementation for MediaObject.
6234func (mo MediaObject) AsResponse() (*Response, bool) {
6235	return nil, false
6236}
6237
6238// AsBasicResponse is the BasicResponseBase implementation for MediaObject.
6239func (mo MediaObject) AsBasicResponse() (BasicResponse, bool) {
6240	return &mo, true
6241}
6242
6243// AsIdentifiable is the BasicResponseBase implementation for MediaObject.
6244func (mo MediaObject) AsIdentifiable() (*Identifiable, bool) {
6245	return nil, false
6246}
6247
6248// AsBasicIdentifiable is the BasicResponseBase implementation for MediaObject.
6249func (mo MediaObject) AsBasicIdentifiable() (BasicIdentifiable, bool) {
6250	return &mo, true
6251}
6252
6253// AsErrorResponse is the BasicResponseBase implementation for MediaObject.
6254func (mo MediaObject) AsErrorResponse() (*ErrorResponse, bool) {
6255	return nil, false
6256}
6257
6258// AsThing is the BasicResponseBase implementation for MediaObject.
6259func (mo MediaObject) AsThing() (*Thing, bool) {
6260	return nil, false
6261}
6262
6263// AsBasicThing is the BasicResponseBase implementation for MediaObject.
6264func (mo MediaObject) AsBasicThing() (BasicThing, bool) {
6265	return &mo, true
6266}
6267
6268// AsAction is the BasicResponseBase implementation for MediaObject.
6269func (mo MediaObject) AsAction() (*Action, bool) {
6270	return nil, false
6271}
6272
6273// AsBasicAction is the BasicResponseBase implementation for MediaObject.
6274func (mo MediaObject) AsBasicAction() (BasicAction, bool) {
6275	return nil, false
6276}
6277
6278// AsMediaObject is the BasicResponseBase implementation for MediaObject.
6279func (mo MediaObject) AsMediaObject() (*MediaObject, bool) {
6280	return &mo, true
6281}
6282
6283// AsBasicMediaObject is the BasicResponseBase implementation for MediaObject.
6284func (mo MediaObject) AsBasicMediaObject() (BasicMediaObject, bool) {
6285	return &mo, true
6286}
6287
6288// AsCreativeWork is the BasicResponseBase implementation for MediaObject.
6289func (mo MediaObject) AsCreativeWork() (*CreativeWork, bool) {
6290	return nil, false
6291}
6292
6293// AsBasicCreativeWork is the BasicResponseBase implementation for MediaObject.
6294func (mo MediaObject) AsBasicCreativeWork() (BasicCreativeWork, bool) {
6295	return &mo, true
6296}
6297
6298// AsPerson is the BasicResponseBase implementation for MediaObject.
6299func (mo MediaObject) AsPerson() (*Person, bool) {
6300	return nil, false
6301}
6302
6303// AsIntangible is the BasicResponseBase implementation for MediaObject.
6304func (mo MediaObject) AsIntangible() (*Intangible, bool) {
6305	return nil, false
6306}
6307
6308// AsBasicIntangible is the BasicResponseBase implementation for MediaObject.
6309func (mo MediaObject) AsBasicIntangible() (BasicIntangible, bool) {
6310	return nil, false
6311}
6312
6313// AsImageEntityAction is the BasicResponseBase implementation for MediaObject.
6314func (mo MediaObject) AsImageEntityAction() (*ImageEntityAction, bool) {
6315	return nil, false
6316}
6317
6318// AsImageModuleAction is the BasicResponseBase implementation for MediaObject.
6319func (mo MediaObject) AsImageModuleAction() (*ImageModuleAction, bool) {
6320	return nil, false
6321}
6322
6323// AsRecipe is the BasicResponseBase implementation for MediaObject.
6324func (mo MediaObject) AsRecipe() (*Recipe, bool) {
6325	return nil, false
6326}
6327
6328// AsImageRecipesAction is the BasicResponseBase implementation for MediaObject.
6329func (mo MediaObject) AsImageRecipesAction() (*ImageRecipesAction, bool) {
6330	return nil, false
6331}
6332
6333// AsImageRelatedSearchesAction is the BasicResponseBase implementation for MediaObject.
6334func (mo MediaObject) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
6335	return nil, false
6336}
6337
6338// AsImageShoppingSourcesAction is the BasicResponseBase implementation for MediaObject.
6339func (mo MediaObject) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
6340	return nil, false
6341}
6342
6343// AsStructuredValue is the BasicResponseBase implementation for MediaObject.
6344func (mo MediaObject) AsStructuredValue() (*StructuredValue, bool) {
6345	return nil, false
6346}
6347
6348// AsBasicStructuredValue is the BasicResponseBase implementation for MediaObject.
6349func (mo MediaObject) AsBasicStructuredValue() (BasicStructuredValue, bool) {
6350	return nil, false
6351}
6352
6353// AsResponseBase is the BasicResponseBase implementation for MediaObject.
6354func (mo MediaObject) AsResponseBase() (*ResponseBase, bool) {
6355	return nil, false
6356}
6357
6358// AsBasicResponseBase is the BasicResponseBase implementation for MediaObject.
6359func (mo MediaObject) AsBasicResponseBase() (BasicResponseBase, bool) {
6360	return &mo, true
6361}
6362
6363// UnmarshalJSON is the custom unmarshaler for MediaObject struct.
6364func (mo *MediaObject) UnmarshalJSON(body []byte) error {
6365	var m map[string]*json.RawMessage
6366	err := json.Unmarshal(body, &m)
6367	if err != nil {
6368		return err
6369	}
6370	for k, v := range m {
6371		switch k {
6372		case "contentUrl":
6373			if v != nil {
6374				var contentURL string
6375				err = json.Unmarshal(*v, &contentURL)
6376				if err != nil {
6377					return err
6378				}
6379				mo.ContentURL = &contentURL
6380			}
6381		case "hostPageUrl":
6382			if v != nil {
6383				var hostPageURL string
6384				err = json.Unmarshal(*v, &hostPageURL)
6385				if err != nil {
6386					return err
6387				}
6388				mo.HostPageURL = &hostPageURL
6389			}
6390		case "contentSize":
6391			if v != nil {
6392				var contentSize string
6393				err = json.Unmarshal(*v, &contentSize)
6394				if err != nil {
6395					return err
6396				}
6397				mo.ContentSize = &contentSize
6398			}
6399		case "encodingFormat":
6400			if v != nil {
6401				var encodingFormat string
6402				err = json.Unmarshal(*v, &encodingFormat)
6403				if err != nil {
6404					return err
6405				}
6406				mo.EncodingFormat = &encodingFormat
6407			}
6408		case "hostPageDisplayUrl":
6409			if v != nil {
6410				var hostPageDisplayURL string
6411				err = json.Unmarshal(*v, &hostPageDisplayURL)
6412				if err != nil {
6413					return err
6414				}
6415				mo.HostPageDisplayURL = &hostPageDisplayURL
6416			}
6417		case "width":
6418			if v != nil {
6419				var width int32
6420				err = json.Unmarshal(*v, &width)
6421				if err != nil {
6422					return err
6423				}
6424				mo.Width = &width
6425			}
6426		case "height":
6427			if v != nil {
6428				var height int32
6429				err = json.Unmarshal(*v, &height)
6430				if err != nil {
6431					return err
6432				}
6433				mo.Height = &height
6434			}
6435		case "thumbnailUrl":
6436			if v != nil {
6437				var thumbnailURL string
6438				err = json.Unmarshal(*v, &thumbnailURL)
6439				if err != nil {
6440					return err
6441				}
6442				mo.ThumbnailURL = &thumbnailURL
6443			}
6444		case "provider":
6445			if v != nil {
6446				provider, err := unmarshalBasicThingArray(*v)
6447				if err != nil {
6448					return err
6449				}
6450				mo.Provider = &provider
6451			}
6452		case "datePublished":
6453			if v != nil {
6454				var datePublished string
6455				err = json.Unmarshal(*v, &datePublished)
6456				if err != nil {
6457					return err
6458				}
6459				mo.DatePublished = &datePublished
6460			}
6461		case "text":
6462			if v != nil {
6463				var textVar string
6464				err = json.Unmarshal(*v, &textVar)
6465				if err != nil {
6466					return err
6467				}
6468				mo.Text = &textVar
6469			}
6470		case "name":
6471			if v != nil {
6472				var name string
6473				err = json.Unmarshal(*v, &name)
6474				if err != nil {
6475					return err
6476				}
6477				mo.Name = &name
6478			}
6479		case "url":
6480			if v != nil {
6481				var URL string
6482				err = json.Unmarshal(*v, &URL)
6483				if err != nil {
6484					return err
6485				}
6486				mo.URL = &URL
6487			}
6488		case "image":
6489			if v != nil {
6490				var imageVar ImageObject
6491				err = json.Unmarshal(*v, &imageVar)
6492				if err != nil {
6493					return err
6494				}
6495				mo.Image = &imageVar
6496			}
6497		case "description":
6498			if v != nil {
6499				var description string
6500				err = json.Unmarshal(*v, &description)
6501				if err != nil {
6502					return err
6503				}
6504				mo.Description = &description
6505			}
6506		case "alternateName":
6507			if v != nil {
6508				var alternateName string
6509				err = json.Unmarshal(*v, &alternateName)
6510				if err != nil {
6511					return err
6512				}
6513				mo.AlternateName = &alternateName
6514			}
6515		case "bingId":
6516			if v != nil {
6517				var bingID string
6518				err = json.Unmarshal(*v, &bingID)
6519				if err != nil {
6520					return err
6521				}
6522				mo.BingID = &bingID
6523			}
6524		case "readLink":
6525			if v != nil {
6526				var readLink string
6527				err = json.Unmarshal(*v, &readLink)
6528				if err != nil {
6529					return err
6530				}
6531				mo.ReadLink = &readLink
6532			}
6533		case "webSearchUrl":
6534			if v != nil {
6535				var webSearchURL string
6536				err = json.Unmarshal(*v, &webSearchURL)
6537				if err != nil {
6538					return err
6539				}
6540				mo.WebSearchURL = &webSearchURL
6541			}
6542		case "id":
6543			if v != nil {
6544				var ID string
6545				err = json.Unmarshal(*v, &ID)
6546				if err != nil {
6547					return err
6548				}
6549				mo.ID = &ID
6550			}
6551		case "_type":
6552			if v != nil {
6553				var typeVar Type
6554				err = json.Unmarshal(*v, &typeVar)
6555				if err != nil {
6556					return err
6557				}
6558				mo.Type = typeVar
6559			}
6560		}
6561	}
6562
6563	return nil
6564}
6565
6566// NormalizedQuadrilateral defines a region of an image. The region is a convex quadrilateral defined by
6567// coordinates of its top left, top right, bottom left, and bottom right points. The coordinates are
6568// fractional values of the original image's width and height in the range 0.0 through 1.0.
6569type NormalizedQuadrilateral struct {
6570	// TopLeft - The top left corner coordinate.
6571	TopLeft *Point2D `json:"topLeft,omitempty"`
6572	// TopRight - The top right corner coordinate.
6573	TopRight *Point2D `json:"topRight,omitempty"`
6574	// BottomRight - The bottom right corner coordinate.
6575	BottomRight *Point2D `json:"bottomRight,omitempty"`
6576	// BottomLeft - The bottom left corner coordinate.
6577	BottomLeft *Point2D `json:"bottomLeft,omitempty"`
6578	// Name - READ-ONLY; The name of the thing represented by this object.
6579	Name *string `json:"name,omitempty"`
6580	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
6581	URL *string `json:"url,omitempty"`
6582	// Image - READ-ONLY; An image of the item.
6583	Image *ImageObject `json:"image,omitempty"`
6584	// Description - READ-ONLY; A short description of the item.
6585	Description *string `json:"description,omitempty"`
6586	// AlternateName - READ-ONLY; An alias for the item.
6587	AlternateName *string `json:"alternateName,omitempty"`
6588	// BingID - READ-ONLY; An ID that uniquely identifies this item.
6589	BingID *string `json:"bingId,omitempty"`
6590	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
6591	ReadLink *string `json:"readLink,omitempty"`
6592	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
6593	WebSearchURL *string `json:"webSearchUrl,omitempty"`
6594	// ID - READ-ONLY; A String identifier.
6595	ID *string `json:"id,omitempty"`
6596	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
6597	Type Type `json:"_type,omitempty"`
6598}
6599
6600// MarshalJSON is the custom marshaler for NormalizedQuadrilateral.
6601func (nq NormalizedQuadrilateral) MarshalJSON() ([]byte, error) {
6602	nq.Type = TypeNormalizedQuadrilateral
6603	objectMap := make(map[string]interface{})
6604	if nq.TopLeft != nil {
6605		objectMap["topLeft"] = nq.TopLeft
6606	}
6607	if nq.TopRight != nil {
6608		objectMap["topRight"] = nq.TopRight
6609	}
6610	if nq.BottomRight != nil {
6611		objectMap["bottomRight"] = nq.BottomRight
6612	}
6613	if nq.BottomLeft != nil {
6614		objectMap["bottomLeft"] = nq.BottomLeft
6615	}
6616	if nq.Type != "" {
6617		objectMap["_type"] = nq.Type
6618	}
6619	return json.Marshal(objectMap)
6620}
6621
6622// AsPoint2D is the BasicResponseBase implementation for NormalizedQuadrilateral.
6623func (nq NormalizedQuadrilateral) AsPoint2D() (*Point2D, bool) {
6624	return nil, false
6625}
6626
6627// AsNormalizedQuadrilateral is the BasicResponseBase implementation for NormalizedQuadrilateral.
6628func (nq NormalizedQuadrilateral) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
6629	return &nq, true
6630}
6631
6632// AsImageAction is the BasicResponseBase implementation for NormalizedQuadrilateral.
6633func (nq NormalizedQuadrilateral) AsImageAction() (*ImageAction, bool) {
6634	return nil, false
6635}
6636
6637// AsBasicImageAction is the BasicResponseBase implementation for NormalizedQuadrilateral.
6638func (nq NormalizedQuadrilateral) AsBasicImageAction() (BasicImageAction, bool) {
6639	return nil, false
6640}
6641
6642// AsImageTag is the BasicResponseBase implementation for NormalizedQuadrilateral.
6643func (nq NormalizedQuadrilateral) AsImageTag() (*ImageTag, bool) {
6644	return nil, false
6645}
6646
6647// AsOrganization is the BasicResponseBase implementation for NormalizedQuadrilateral.
6648func (nq NormalizedQuadrilateral) AsOrganization() (*Organization, bool) {
6649	return nil, false
6650}
6651
6652// AsOffer is the BasicResponseBase implementation for NormalizedQuadrilateral.
6653func (nq NormalizedQuadrilateral) AsOffer() (*Offer, bool) {
6654	return nil, false
6655}
6656
6657// AsBasicOffer is the BasicResponseBase implementation for NormalizedQuadrilateral.
6658func (nq NormalizedQuadrilateral) AsBasicOffer() (BasicOffer, bool) {
6659	return nil, false
6660}
6661
6662// AsAggregateOffer is the BasicResponseBase implementation for NormalizedQuadrilateral.
6663func (nq NormalizedQuadrilateral) AsAggregateOffer() (*AggregateOffer, bool) {
6664	return nil, false
6665}
6666
6667// AsImageObject is the BasicResponseBase implementation for NormalizedQuadrilateral.
6668func (nq NormalizedQuadrilateral) AsImageObject() (*ImageObject, bool) {
6669	return nil, false
6670}
6671
6672// AsImageKnowledge is the BasicResponseBase implementation for NormalizedQuadrilateral.
6673func (nq NormalizedQuadrilateral) AsImageKnowledge() (*ImageKnowledge, bool) {
6674	return nil, false
6675}
6676
6677// AsResponse is the BasicResponseBase implementation for NormalizedQuadrilateral.
6678func (nq NormalizedQuadrilateral) AsResponse() (*Response, bool) {
6679	return nil, false
6680}
6681
6682// AsBasicResponse is the BasicResponseBase implementation for NormalizedQuadrilateral.
6683func (nq NormalizedQuadrilateral) AsBasicResponse() (BasicResponse, bool) {
6684	return &nq, true
6685}
6686
6687// AsIdentifiable is the BasicResponseBase implementation for NormalizedQuadrilateral.
6688func (nq NormalizedQuadrilateral) AsIdentifiable() (*Identifiable, bool) {
6689	return nil, false
6690}
6691
6692// AsBasicIdentifiable is the BasicResponseBase implementation for NormalizedQuadrilateral.
6693func (nq NormalizedQuadrilateral) AsBasicIdentifiable() (BasicIdentifiable, bool) {
6694	return &nq, true
6695}
6696
6697// AsErrorResponse is the BasicResponseBase implementation for NormalizedQuadrilateral.
6698func (nq NormalizedQuadrilateral) AsErrorResponse() (*ErrorResponse, bool) {
6699	return nil, false
6700}
6701
6702// AsThing is the BasicResponseBase implementation for NormalizedQuadrilateral.
6703func (nq NormalizedQuadrilateral) AsThing() (*Thing, bool) {
6704	return nil, false
6705}
6706
6707// AsBasicThing is the BasicResponseBase implementation for NormalizedQuadrilateral.
6708func (nq NormalizedQuadrilateral) AsBasicThing() (BasicThing, bool) {
6709	return &nq, true
6710}
6711
6712// AsAction is the BasicResponseBase implementation for NormalizedQuadrilateral.
6713func (nq NormalizedQuadrilateral) AsAction() (*Action, bool) {
6714	return nil, false
6715}
6716
6717// AsBasicAction is the BasicResponseBase implementation for NormalizedQuadrilateral.
6718func (nq NormalizedQuadrilateral) AsBasicAction() (BasicAction, bool) {
6719	return nil, false
6720}
6721
6722// AsMediaObject is the BasicResponseBase implementation for NormalizedQuadrilateral.
6723func (nq NormalizedQuadrilateral) AsMediaObject() (*MediaObject, bool) {
6724	return nil, false
6725}
6726
6727// AsBasicMediaObject is the BasicResponseBase implementation for NormalizedQuadrilateral.
6728func (nq NormalizedQuadrilateral) AsBasicMediaObject() (BasicMediaObject, bool) {
6729	return nil, false
6730}
6731
6732// AsCreativeWork is the BasicResponseBase implementation for NormalizedQuadrilateral.
6733func (nq NormalizedQuadrilateral) AsCreativeWork() (*CreativeWork, bool) {
6734	return nil, false
6735}
6736
6737// AsBasicCreativeWork is the BasicResponseBase implementation for NormalizedQuadrilateral.
6738func (nq NormalizedQuadrilateral) AsBasicCreativeWork() (BasicCreativeWork, bool) {
6739	return nil, false
6740}
6741
6742// AsPerson is the BasicResponseBase implementation for NormalizedQuadrilateral.
6743func (nq NormalizedQuadrilateral) AsPerson() (*Person, bool) {
6744	return nil, false
6745}
6746
6747// AsIntangible is the BasicResponseBase implementation for NormalizedQuadrilateral.
6748func (nq NormalizedQuadrilateral) AsIntangible() (*Intangible, bool) {
6749	return nil, false
6750}
6751
6752// AsBasicIntangible is the BasicResponseBase implementation for NormalizedQuadrilateral.
6753func (nq NormalizedQuadrilateral) AsBasicIntangible() (BasicIntangible, bool) {
6754	return &nq, true
6755}
6756
6757// AsImageEntityAction is the BasicResponseBase implementation for NormalizedQuadrilateral.
6758func (nq NormalizedQuadrilateral) AsImageEntityAction() (*ImageEntityAction, bool) {
6759	return nil, false
6760}
6761
6762// AsImageModuleAction is the BasicResponseBase implementation for NormalizedQuadrilateral.
6763func (nq NormalizedQuadrilateral) AsImageModuleAction() (*ImageModuleAction, bool) {
6764	return nil, false
6765}
6766
6767// AsRecipe is the BasicResponseBase implementation for NormalizedQuadrilateral.
6768func (nq NormalizedQuadrilateral) AsRecipe() (*Recipe, bool) {
6769	return nil, false
6770}
6771
6772// AsImageRecipesAction is the BasicResponseBase implementation for NormalizedQuadrilateral.
6773func (nq NormalizedQuadrilateral) AsImageRecipesAction() (*ImageRecipesAction, bool) {
6774	return nil, false
6775}
6776
6777// AsImageRelatedSearchesAction is the BasicResponseBase implementation for NormalizedQuadrilateral.
6778func (nq NormalizedQuadrilateral) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
6779	return nil, false
6780}
6781
6782// AsImageShoppingSourcesAction is the BasicResponseBase implementation for NormalizedQuadrilateral.
6783func (nq NormalizedQuadrilateral) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
6784	return nil, false
6785}
6786
6787// AsStructuredValue is the BasicResponseBase implementation for NormalizedQuadrilateral.
6788func (nq NormalizedQuadrilateral) AsStructuredValue() (*StructuredValue, bool) {
6789	return nil, false
6790}
6791
6792// AsBasicStructuredValue is the BasicResponseBase implementation for NormalizedQuadrilateral.
6793func (nq NormalizedQuadrilateral) AsBasicStructuredValue() (BasicStructuredValue, bool) {
6794	return &nq, true
6795}
6796
6797// AsResponseBase is the BasicResponseBase implementation for NormalizedQuadrilateral.
6798func (nq NormalizedQuadrilateral) AsResponseBase() (*ResponseBase, bool) {
6799	return nil, false
6800}
6801
6802// AsBasicResponseBase is the BasicResponseBase implementation for NormalizedQuadrilateral.
6803func (nq NormalizedQuadrilateral) AsBasicResponseBase() (BasicResponseBase, bool) {
6804	return &nq, true
6805}
6806
6807// BasicOffer defines a merchant's offer.
6808type BasicOffer interface {
6809	AsAggregateOffer() (*AggregateOffer, bool)
6810	AsOffer() (*Offer, bool)
6811}
6812
6813// Offer defines a merchant's offer.
6814type Offer struct {
6815	// Seller - READ-ONLY; Seller for this offer.
6816	Seller *Organization `json:"seller,omitempty"`
6817	// Price - READ-ONLY; The item's price.
6818	Price *float64 `json:"price,omitempty"`
6819	// PriceCurrency - READ-ONLY; The monetary currency. For example, USD. Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'
6820	PriceCurrency Currency `json:"priceCurrency,omitempty"`
6821	// Availability - READ-ONLY; The item's availability. The following are the possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut'
6822	Availability ItemAvailability `json:"availability,omitempty"`
6823	// AggregateRating - READ-ONLY; An aggregated rating that indicates how well the product has been rated by others.
6824	AggregateRating *AggregateRating `json:"aggregateRating,omitempty"`
6825	// LastUpdated - READ-ONLY; The last date that the offer was updated. The date is in the form YYYY-MM-DD.
6826	LastUpdated *string `json:"lastUpdated,omitempty"`
6827	// Name - READ-ONLY; The name of the thing represented by this object.
6828	Name *string `json:"name,omitempty"`
6829	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
6830	URL *string `json:"url,omitempty"`
6831	// Image - READ-ONLY; An image of the item.
6832	Image *ImageObject `json:"image,omitempty"`
6833	// Description - READ-ONLY; A short description of the item.
6834	Description *string `json:"description,omitempty"`
6835	// AlternateName - READ-ONLY; An alias for the item.
6836	AlternateName *string `json:"alternateName,omitempty"`
6837	// BingID - READ-ONLY; An ID that uniquely identifies this item.
6838	BingID *string `json:"bingId,omitempty"`
6839	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
6840	ReadLink *string `json:"readLink,omitempty"`
6841	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
6842	WebSearchURL *string `json:"webSearchUrl,omitempty"`
6843	// ID - READ-ONLY; A String identifier.
6844	ID *string `json:"id,omitempty"`
6845	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
6846	Type Type `json:"_type,omitempty"`
6847}
6848
6849func unmarshalBasicOffer(body []byte) (BasicOffer, error) {
6850	var m map[string]interface{}
6851	err := json.Unmarshal(body, &m)
6852	if err != nil {
6853		return nil, err
6854	}
6855
6856	switch m["_type"] {
6857	case string(TypeAggregateOffer):
6858		var ao AggregateOffer
6859		err := json.Unmarshal(body, &ao)
6860		return ao, err
6861	default:
6862		var o Offer
6863		err := json.Unmarshal(body, &o)
6864		return o, err
6865	}
6866}
6867func unmarshalBasicOfferArray(body []byte) ([]BasicOffer, error) {
6868	var rawMessages []*json.RawMessage
6869	err := json.Unmarshal(body, &rawMessages)
6870	if err != nil {
6871		return nil, err
6872	}
6873
6874	oArray := make([]BasicOffer, len(rawMessages))
6875
6876	for index, rawMessage := range rawMessages {
6877		o, err := unmarshalBasicOffer(*rawMessage)
6878		if err != nil {
6879			return nil, err
6880		}
6881		oArray[index] = o
6882	}
6883	return oArray, nil
6884}
6885
6886// MarshalJSON is the custom marshaler for Offer.
6887func (o Offer) MarshalJSON() ([]byte, error) {
6888	o.Type = TypeOffer
6889	objectMap := make(map[string]interface{})
6890	if o.Type != "" {
6891		objectMap["_type"] = o.Type
6892	}
6893	return json.Marshal(objectMap)
6894}
6895
6896// AsPoint2D is the BasicResponseBase implementation for Offer.
6897func (o Offer) AsPoint2D() (*Point2D, bool) {
6898	return nil, false
6899}
6900
6901// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Offer.
6902func (o Offer) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
6903	return nil, false
6904}
6905
6906// AsImageAction is the BasicResponseBase implementation for Offer.
6907func (o Offer) AsImageAction() (*ImageAction, bool) {
6908	return nil, false
6909}
6910
6911// AsBasicImageAction is the BasicResponseBase implementation for Offer.
6912func (o Offer) AsBasicImageAction() (BasicImageAction, bool) {
6913	return nil, false
6914}
6915
6916// AsImageTag is the BasicResponseBase implementation for Offer.
6917func (o Offer) AsImageTag() (*ImageTag, bool) {
6918	return nil, false
6919}
6920
6921// AsOrganization is the BasicResponseBase implementation for Offer.
6922func (o Offer) AsOrganization() (*Organization, bool) {
6923	return nil, false
6924}
6925
6926// AsOffer is the BasicResponseBase implementation for Offer.
6927func (o Offer) AsOffer() (*Offer, bool) {
6928	return &o, true
6929}
6930
6931// AsBasicOffer is the BasicResponseBase implementation for Offer.
6932func (o Offer) AsBasicOffer() (BasicOffer, bool) {
6933	return &o, true
6934}
6935
6936// AsAggregateOffer is the BasicResponseBase implementation for Offer.
6937func (o Offer) AsAggregateOffer() (*AggregateOffer, bool) {
6938	return nil, false
6939}
6940
6941// AsImageObject is the BasicResponseBase implementation for Offer.
6942func (o Offer) AsImageObject() (*ImageObject, bool) {
6943	return nil, false
6944}
6945
6946// AsImageKnowledge is the BasicResponseBase implementation for Offer.
6947func (o Offer) AsImageKnowledge() (*ImageKnowledge, bool) {
6948	return nil, false
6949}
6950
6951// AsResponse is the BasicResponseBase implementation for Offer.
6952func (o Offer) AsResponse() (*Response, bool) {
6953	return nil, false
6954}
6955
6956// AsBasicResponse is the BasicResponseBase implementation for Offer.
6957func (o Offer) AsBasicResponse() (BasicResponse, bool) {
6958	return &o, true
6959}
6960
6961// AsIdentifiable is the BasicResponseBase implementation for Offer.
6962func (o Offer) AsIdentifiable() (*Identifiable, bool) {
6963	return nil, false
6964}
6965
6966// AsBasicIdentifiable is the BasicResponseBase implementation for Offer.
6967func (o Offer) AsBasicIdentifiable() (BasicIdentifiable, bool) {
6968	return &o, true
6969}
6970
6971// AsErrorResponse is the BasicResponseBase implementation for Offer.
6972func (o Offer) AsErrorResponse() (*ErrorResponse, bool) {
6973	return nil, false
6974}
6975
6976// AsThing is the BasicResponseBase implementation for Offer.
6977func (o Offer) AsThing() (*Thing, bool) {
6978	return nil, false
6979}
6980
6981// AsBasicThing is the BasicResponseBase implementation for Offer.
6982func (o Offer) AsBasicThing() (BasicThing, bool) {
6983	return &o, true
6984}
6985
6986// AsAction is the BasicResponseBase implementation for Offer.
6987func (o Offer) AsAction() (*Action, bool) {
6988	return nil, false
6989}
6990
6991// AsBasicAction is the BasicResponseBase implementation for Offer.
6992func (o Offer) AsBasicAction() (BasicAction, bool) {
6993	return nil, false
6994}
6995
6996// AsMediaObject is the BasicResponseBase implementation for Offer.
6997func (o Offer) AsMediaObject() (*MediaObject, bool) {
6998	return nil, false
6999}
7000
7001// AsBasicMediaObject is the BasicResponseBase implementation for Offer.
7002func (o Offer) AsBasicMediaObject() (BasicMediaObject, bool) {
7003	return nil, false
7004}
7005
7006// AsCreativeWork is the BasicResponseBase implementation for Offer.
7007func (o Offer) AsCreativeWork() (*CreativeWork, bool) {
7008	return nil, false
7009}
7010
7011// AsBasicCreativeWork is the BasicResponseBase implementation for Offer.
7012func (o Offer) AsBasicCreativeWork() (BasicCreativeWork, bool) {
7013	return nil, false
7014}
7015
7016// AsPerson is the BasicResponseBase implementation for Offer.
7017func (o Offer) AsPerson() (*Person, bool) {
7018	return nil, false
7019}
7020
7021// AsIntangible is the BasicResponseBase implementation for Offer.
7022func (o Offer) AsIntangible() (*Intangible, bool) {
7023	return nil, false
7024}
7025
7026// AsBasicIntangible is the BasicResponseBase implementation for Offer.
7027func (o Offer) AsBasicIntangible() (BasicIntangible, bool) {
7028	return nil, false
7029}
7030
7031// AsImageEntityAction is the BasicResponseBase implementation for Offer.
7032func (o Offer) AsImageEntityAction() (*ImageEntityAction, bool) {
7033	return nil, false
7034}
7035
7036// AsImageModuleAction is the BasicResponseBase implementation for Offer.
7037func (o Offer) AsImageModuleAction() (*ImageModuleAction, bool) {
7038	return nil, false
7039}
7040
7041// AsRecipe is the BasicResponseBase implementation for Offer.
7042func (o Offer) AsRecipe() (*Recipe, bool) {
7043	return nil, false
7044}
7045
7046// AsImageRecipesAction is the BasicResponseBase implementation for Offer.
7047func (o Offer) AsImageRecipesAction() (*ImageRecipesAction, bool) {
7048	return nil, false
7049}
7050
7051// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Offer.
7052func (o Offer) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
7053	return nil, false
7054}
7055
7056// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Offer.
7057func (o Offer) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
7058	return nil, false
7059}
7060
7061// AsStructuredValue is the BasicResponseBase implementation for Offer.
7062func (o Offer) AsStructuredValue() (*StructuredValue, bool) {
7063	return nil, false
7064}
7065
7066// AsBasicStructuredValue is the BasicResponseBase implementation for Offer.
7067func (o Offer) AsBasicStructuredValue() (BasicStructuredValue, bool) {
7068	return nil, false
7069}
7070
7071// AsResponseBase is the BasicResponseBase implementation for Offer.
7072func (o Offer) AsResponseBase() (*ResponseBase, bool) {
7073	return nil, false
7074}
7075
7076// AsBasicResponseBase is the BasicResponseBase implementation for Offer.
7077func (o Offer) AsBasicResponseBase() (BasicResponseBase, bool) {
7078	return &o, true
7079}
7080
7081// Organization defines an organization.
7082type Organization struct {
7083	// Name - READ-ONLY; The name of the thing represented by this object.
7084	Name *string `json:"name,omitempty"`
7085	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
7086	URL *string `json:"url,omitempty"`
7087	// Image - READ-ONLY; An image of the item.
7088	Image *ImageObject `json:"image,omitempty"`
7089	// Description - READ-ONLY; A short description of the item.
7090	Description *string `json:"description,omitempty"`
7091	// AlternateName - READ-ONLY; An alias for the item.
7092	AlternateName *string `json:"alternateName,omitempty"`
7093	// BingID - READ-ONLY; An ID that uniquely identifies this item.
7094	BingID *string `json:"bingId,omitempty"`
7095	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
7096	ReadLink *string `json:"readLink,omitempty"`
7097	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
7098	WebSearchURL *string `json:"webSearchUrl,omitempty"`
7099	// ID - READ-ONLY; A String identifier.
7100	ID *string `json:"id,omitempty"`
7101	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
7102	Type Type `json:"_type,omitempty"`
7103}
7104
7105// MarshalJSON is the custom marshaler for Organization.
7106func (o Organization) MarshalJSON() ([]byte, error) {
7107	o.Type = TypeOrganization
7108	objectMap := make(map[string]interface{})
7109	if o.Type != "" {
7110		objectMap["_type"] = o.Type
7111	}
7112	return json.Marshal(objectMap)
7113}
7114
7115// AsPoint2D is the BasicResponseBase implementation for Organization.
7116func (o Organization) AsPoint2D() (*Point2D, bool) {
7117	return nil, false
7118}
7119
7120// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Organization.
7121func (o Organization) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
7122	return nil, false
7123}
7124
7125// AsImageAction is the BasicResponseBase implementation for Organization.
7126func (o Organization) AsImageAction() (*ImageAction, bool) {
7127	return nil, false
7128}
7129
7130// AsBasicImageAction is the BasicResponseBase implementation for Organization.
7131func (o Organization) AsBasicImageAction() (BasicImageAction, bool) {
7132	return nil, false
7133}
7134
7135// AsImageTag is the BasicResponseBase implementation for Organization.
7136func (o Organization) AsImageTag() (*ImageTag, bool) {
7137	return nil, false
7138}
7139
7140// AsOrganization is the BasicResponseBase implementation for Organization.
7141func (o Organization) AsOrganization() (*Organization, bool) {
7142	return &o, true
7143}
7144
7145// AsOffer is the BasicResponseBase implementation for Organization.
7146func (o Organization) AsOffer() (*Offer, bool) {
7147	return nil, false
7148}
7149
7150// AsBasicOffer is the BasicResponseBase implementation for Organization.
7151func (o Organization) AsBasicOffer() (BasicOffer, bool) {
7152	return nil, false
7153}
7154
7155// AsAggregateOffer is the BasicResponseBase implementation for Organization.
7156func (o Organization) AsAggregateOffer() (*AggregateOffer, bool) {
7157	return nil, false
7158}
7159
7160// AsImageObject is the BasicResponseBase implementation for Organization.
7161func (o Organization) AsImageObject() (*ImageObject, bool) {
7162	return nil, false
7163}
7164
7165// AsImageKnowledge is the BasicResponseBase implementation for Organization.
7166func (o Organization) AsImageKnowledge() (*ImageKnowledge, bool) {
7167	return nil, false
7168}
7169
7170// AsResponse is the BasicResponseBase implementation for Organization.
7171func (o Organization) AsResponse() (*Response, bool) {
7172	return nil, false
7173}
7174
7175// AsBasicResponse is the BasicResponseBase implementation for Organization.
7176func (o Organization) AsBasicResponse() (BasicResponse, bool) {
7177	return &o, true
7178}
7179
7180// AsIdentifiable is the BasicResponseBase implementation for Organization.
7181func (o Organization) AsIdentifiable() (*Identifiable, bool) {
7182	return nil, false
7183}
7184
7185// AsBasicIdentifiable is the BasicResponseBase implementation for Organization.
7186func (o Organization) AsBasicIdentifiable() (BasicIdentifiable, bool) {
7187	return &o, true
7188}
7189
7190// AsErrorResponse is the BasicResponseBase implementation for Organization.
7191func (o Organization) AsErrorResponse() (*ErrorResponse, bool) {
7192	return nil, false
7193}
7194
7195// AsThing is the BasicResponseBase implementation for Organization.
7196func (o Organization) AsThing() (*Thing, bool) {
7197	return nil, false
7198}
7199
7200// AsBasicThing is the BasicResponseBase implementation for Organization.
7201func (o Organization) AsBasicThing() (BasicThing, bool) {
7202	return &o, true
7203}
7204
7205// AsAction is the BasicResponseBase implementation for Organization.
7206func (o Organization) AsAction() (*Action, bool) {
7207	return nil, false
7208}
7209
7210// AsBasicAction is the BasicResponseBase implementation for Organization.
7211func (o Organization) AsBasicAction() (BasicAction, bool) {
7212	return nil, false
7213}
7214
7215// AsMediaObject is the BasicResponseBase implementation for Organization.
7216func (o Organization) AsMediaObject() (*MediaObject, bool) {
7217	return nil, false
7218}
7219
7220// AsBasicMediaObject is the BasicResponseBase implementation for Organization.
7221func (o Organization) AsBasicMediaObject() (BasicMediaObject, bool) {
7222	return nil, false
7223}
7224
7225// AsCreativeWork is the BasicResponseBase implementation for Organization.
7226func (o Organization) AsCreativeWork() (*CreativeWork, bool) {
7227	return nil, false
7228}
7229
7230// AsBasicCreativeWork is the BasicResponseBase implementation for Organization.
7231func (o Organization) AsBasicCreativeWork() (BasicCreativeWork, bool) {
7232	return nil, false
7233}
7234
7235// AsPerson is the BasicResponseBase implementation for Organization.
7236func (o Organization) AsPerson() (*Person, bool) {
7237	return nil, false
7238}
7239
7240// AsIntangible is the BasicResponseBase implementation for Organization.
7241func (o Organization) AsIntangible() (*Intangible, bool) {
7242	return nil, false
7243}
7244
7245// AsBasicIntangible is the BasicResponseBase implementation for Organization.
7246func (o Organization) AsBasicIntangible() (BasicIntangible, bool) {
7247	return nil, false
7248}
7249
7250// AsImageEntityAction is the BasicResponseBase implementation for Organization.
7251func (o Organization) AsImageEntityAction() (*ImageEntityAction, bool) {
7252	return nil, false
7253}
7254
7255// AsImageModuleAction is the BasicResponseBase implementation for Organization.
7256func (o Organization) AsImageModuleAction() (*ImageModuleAction, bool) {
7257	return nil, false
7258}
7259
7260// AsRecipe is the BasicResponseBase implementation for Organization.
7261func (o Organization) AsRecipe() (*Recipe, bool) {
7262	return nil, false
7263}
7264
7265// AsImageRecipesAction is the BasicResponseBase implementation for Organization.
7266func (o Organization) AsImageRecipesAction() (*ImageRecipesAction, bool) {
7267	return nil, false
7268}
7269
7270// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Organization.
7271func (o Organization) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
7272	return nil, false
7273}
7274
7275// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Organization.
7276func (o Organization) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
7277	return nil, false
7278}
7279
7280// AsStructuredValue is the BasicResponseBase implementation for Organization.
7281func (o Organization) AsStructuredValue() (*StructuredValue, bool) {
7282	return nil, false
7283}
7284
7285// AsBasicStructuredValue is the BasicResponseBase implementation for Organization.
7286func (o Organization) AsBasicStructuredValue() (BasicStructuredValue, bool) {
7287	return nil, false
7288}
7289
7290// AsResponseBase is the BasicResponseBase implementation for Organization.
7291func (o Organization) AsResponseBase() (*ResponseBase, bool) {
7292	return nil, false
7293}
7294
7295// AsBasicResponseBase is the BasicResponseBase implementation for Organization.
7296func (o Organization) AsBasicResponseBase() (BasicResponseBase, bool) {
7297	return &o, true
7298}
7299
7300// Person defines a person.
7301type Person struct {
7302	// JobTitle - READ-ONLY; The person's job title.
7303	JobTitle *string `json:"jobTitle,omitempty"`
7304	// TwitterProfile - READ-ONLY; The URL of the person's twitter profile.
7305	TwitterProfile *string `json:"twitterProfile,omitempty"`
7306	// Name - READ-ONLY; The name of the thing represented by this object.
7307	Name *string `json:"name,omitempty"`
7308	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
7309	URL *string `json:"url,omitempty"`
7310	// Image - READ-ONLY; An image of the item.
7311	Image *ImageObject `json:"image,omitempty"`
7312	// Description - READ-ONLY; A short description of the item.
7313	Description *string `json:"description,omitempty"`
7314	// AlternateName - READ-ONLY; An alias for the item.
7315	AlternateName *string `json:"alternateName,omitempty"`
7316	// BingID - READ-ONLY; An ID that uniquely identifies this item.
7317	BingID *string `json:"bingId,omitempty"`
7318	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
7319	ReadLink *string `json:"readLink,omitempty"`
7320	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
7321	WebSearchURL *string `json:"webSearchUrl,omitempty"`
7322	// ID - READ-ONLY; A String identifier.
7323	ID *string `json:"id,omitempty"`
7324	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
7325	Type Type `json:"_type,omitempty"`
7326}
7327
7328// MarshalJSON is the custom marshaler for Person.
7329func (p Person) MarshalJSON() ([]byte, error) {
7330	p.Type = TypePerson
7331	objectMap := make(map[string]interface{})
7332	if p.Type != "" {
7333		objectMap["_type"] = p.Type
7334	}
7335	return json.Marshal(objectMap)
7336}
7337
7338// AsPoint2D is the BasicResponseBase implementation for Person.
7339func (p Person) AsPoint2D() (*Point2D, bool) {
7340	return nil, false
7341}
7342
7343// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Person.
7344func (p Person) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
7345	return nil, false
7346}
7347
7348// AsImageAction is the BasicResponseBase implementation for Person.
7349func (p Person) AsImageAction() (*ImageAction, bool) {
7350	return nil, false
7351}
7352
7353// AsBasicImageAction is the BasicResponseBase implementation for Person.
7354func (p Person) AsBasicImageAction() (BasicImageAction, bool) {
7355	return nil, false
7356}
7357
7358// AsImageTag is the BasicResponseBase implementation for Person.
7359func (p Person) AsImageTag() (*ImageTag, bool) {
7360	return nil, false
7361}
7362
7363// AsOrganization is the BasicResponseBase implementation for Person.
7364func (p Person) AsOrganization() (*Organization, bool) {
7365	return nil, false
7366}
7367
7368// AsOffer is the BasicResponseBase implementation for Person.
7369func (p Person) AsOffer() (*Offer, bool) {
7370	return nil, false
7371}
7372
7373// AsBasicOffer is the BasicResponseBase implementation for Person.
7374func (p Person) AsBasicOffer() (BasicOffer, bool) {
7375	return nil, false
7376}
7377
7378// AsAggregateOffer is the BasicResponseBase implementation for Person.
7379func (p Person) AsAggregateOffer() (*AggregateOffer, bool) {
7380	return nil, false
7381}
7382
7383// AsImageObject is the BasicResponseBase implementation for Person.
7384func (p Person) AsImageObject() (*ImageObject, bool) {
7385	return nil, false
7386}
7387
7388// AsImageKnowledge is the BasicResponseBase implementation for Person.
7389func (p Person) AsImageKnowledge() (*ImageKnowledge, bool) {
7390	return nil, false
7391}
7392
7393// AsResponse is the BasicResponseBase implementation for Person.
7394func (p Person) AsResponse() (*Response, bool) {
7395	return nil, false
7396}
7397
7398// AsBasicResponse is the BasicResponseBase implementation for Person.
7399func (p Person) AsBasicResponse() (BasicResponse, bool) {
7400	return &p, true
7401}
7402
7403// AsIdentifiable is the BasicResponseBase implementation for Person.
7404func (p Person) AsIdentifiable() (*Identifiable, bool) {
7405	return nil, false
7406}
7407
7408// AsBasicIdentifiable is the BasicResponseBase implementation for Person.
7409func (p Person) AsBasicIdentifiable() (BasicIdentifiable, bool) {
7410	return &p, true
7411}
7412
7413// AsErrorResponse is the BasicResponseBase implementation for Person.
7414func (p Person) AsErrorResponse() (*ErrorResponse, bool) {
7415	return nil, false
7416}
7417
7418// AsThing is the BasicResponseBase implementation for Person.
7419func (p Person) AsThing() (*Thing, bool) {
7420	return nil, false
7421}
7422
7423// AsBasicThing is the BasicResponseBase implementation for Person.
7424func (p Person) AsBasicThing() (BasicThing, bool) {
7425	return &p, true
7426}
7427
7428// AsAction is the BasicResponseBase implementation for Person.
7429func (p Person) AsAction() (*Action, bool) {
7430	return nil, false
7431}
7432
7433// AsBasicAction is the BasicResponseBase implementation for Person.
7434func (p Person) AsBasicAction() (BasicAction, bool) {
7435	return nil, false
7436}
7437
7438// AsMediaObject is the BasicResponseBase implementation for Person.
7439func (p Person) AsMediaObject() (*MediaObject, bool) {
7440	return nil, false
7441}
7442
7443// AsBasicMediaObject is the BasicResponseBase implementation for Person.
7444func (p Person) AsBasicMediaObject() (BasicMediaObject, bool) {
7445	return nil, false
7446}
7447
7448// AsCreativeWork is the BasicResponseBase implementation for Person.
7449func (p Person) AsCreativeWork() (*CreativeWork, bool) {
7450	return nil, false
7451}
7452
7453// AsBasicCreativeWork is the BasicResponseBase implementation for Person.
7454func (p Person) AsBasicCreativeWork() (BasicCreativeWork, bool) {
7455	return nil, false
7456}
7457
7458// AsPerson is the BasicResponseBase implementation for Person.
7459func (p Person) AsPerson() (*Person, bool) {
7460	return &p, true
7461}
7462
7463// AsIntangible is the BasicResponseBase implementation for Person.
7464func (p Person) AsIntangible() (*Intangible, bool) {
7465	return nil, false
7466}
7467
7468// AsBasicIntangible is the BasicResponseBase implementation for Person.
7469func (p Person) AsBasicIntangible() (BasicIntangible, bool) {
7470	return nil, false
7471}
7472
7473// AsImageEntityAction is the BasicResponseBase implementation for Person.
7474func (p Person) AsImageEntityAction() (*ImageEntityAction, bool) {
7475	return nil, false
7476}
7477
7478// AsImageModuleAction is the BasicResponseBase implementation for Person.
7479func (p Person) AsImageModuleAction() (*ImageModuleAction, bool) {
7480	return nil, false
7481}
7482
7483// AsRecipe is the BasicResponseBase implementation for Person.
7484func (p Person) AsRecipe() (*Recipe, bool) {
7485	return nil, false
7486}
7487
7488// AsImageRecipesAction is the BasicResponseBase implementation for Person.
7489func (p Person) AsImageRecipesAction() (*ImageRecipesAction, bool) {
7490	return nil, false
7491}
7492
7493// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Person.
7494func (p Person) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
7495	return nil, false
7496}
7497
7498// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Person.
7499func (p Person) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
7500	return nil, false
7501}
7502
7503// AsStructuredValue is the BasicResponseBase implementation for Person.
7504func (p Person) AsStructuredValue() (*StructuredValue, bool) {
7505	return nil, false
7506}
7507
7508// AsBasicStructuredValue is the BasicResponseBase implementation for Person.
7509func (p Person) AsBasicStructuredValue() (BasicStructuredValue, bool) {
7510	return nil, false
7511}
7512
7513// AsResponseBase is the BasicResponseBase implementation for Person.
7514func (p Person) AsResponseBase() (*ResponseBase, bool) {
7515	return nil, false
7516}
7517
7518// AsBasicResponseBase is the BasicResponseBase implementation for Person.
7519func (p Person) AsBasicResponseBase() (BasicResponseBase, bool) {
7520	return &p, true
7521}
7522
7523// Point2D defines a 2D point with X and Y coordinates.
7524type Point2D struct {
7525	// X - The x-coordinate of the point.
7526	X *float64 `json:"x,omitempty"`
7527	// Y - The y-coordinate of the point.
7528	Y *float64 `json:"y,omitempty"`
7529	// Name - READ-ONLY; The name of the thing represented by this object.
7530	Name *string `json:"name,omitempty"`
7531	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
7532	URL *string `json:"url,omitempty"`
7533	// Image - READ-ONLY; An image of the item.
7534	Image *ImageObject `json:"image,omitempty"`
7535	// Description - READ-ONLY; A short description of the item.
7536	Description *string `json:"description,omitempty"`
7537	// AlternateName - READ-ONLY; An alias for the item.
7538	AlternateName *string `json:"alternateName,omitempty"`
7539	// BingID - READ-ONLY; An ID that uniquely identifies this item.
7540	BingID *string `json:"bingId,omitempty"`
7541	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
7542	ReadLink *string `json:"readLink,omitempty"`
7543	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
7544	WebSearchURL *string `json:"webSearchUrl,omitempty"`
7545	// ID - READ-ONLY; A String identifier.
7546	ID *string `json:"id,omitempty"`
7547	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
7548	Type Type `json:"_type,omitempty"`
7549}
7550
7551// MarshalJSON is the custom marshaler for Point2D.
7552func (p2 Point2D) MarshalJSON() ([]byte, error) {
7553	p2.Type = TypePoint2D
7554	objectMap := make(map[string]interface{})
7555	if p2.X != nil {
7556		objectMap["x"] = p2.X
7557	}
7558	if p2.Y != nil {
7559		objectMap["y"] = p2.Y
7560	}
7561	if p2.Type != "" {
7562		objectMap["_type"] = p2.Type
7563	}
7564	return json.Marshal(objectMap)
7565}
7566
7567// AsPoint2D is the BasicResponseBase implementation for Point2D.
7568func (p2 Point2D) AsPoint2D() (*Point2D, bool) {
7569	return &p2, true
7570}
7571
7572// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Point2D.
7573func (p2 Point2D) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
7574	return nil, false
7575}
7576
7577// AsImageAction is the BasicResponseBase implementation for Point2D.
7578func (p2 Point2D) AsImageAction() (*ImageAction, bool) {
7579	return nil, false
7580}
7581
7582// AsBasicImageAction is the BasicResponseBase implementation for Point2D.
7583func (p2 Point2D) AsBasicImageAction() (BasicImageAction, bool) {
7584	return nil, false
7585}
7586
7587// AsImageTag is the BasicResponseBase implementation for Point2D.
7588func (p2 Point2D) AsImageTag() (*ImageTag, bool) {
7589	return nil, false
7590}
7591
7592// AsOrganization is the BasicResponseBase implementation for Point2D.
7593func (p2 Point2D) AsOrganization() (*Organization, bool) {
7594	return nil, false
7595}
7596
7597// AsOffer is the BasicResponseBase implementation for Point2D.
7598func (p2 Point2D) AsOffer() (*Offer, bool) {
7599	return nil, false
7600}
7601
7602// AsBasicOffer is the BasicResponseBase implementation for Point2D.
7603func (p2 Point2D) AsBasicOffer() (BasicOffer, bool) {
7604	return nil, false
7605}
7606
7607// AsAggregateOffer is the BasicResponseBase implementation for Point2D.
7608func (p2 Point2D) AsAggregateOffer() (*AggregateOffer, bool) {
7609	return nil, false
7610}
7611
7612// AsImageObject is the BasicResponseBase implementation for Point2D.
7613func (p2 Point2D) AsImageObject() (*ImageObject, bool) {
7614	return nil, false
7615}
7616
7617// AsImageKnowledge is the BasicResponseBase implementation for Point2D.
7618func (p2 Point2D) AsImageKnowledge() (*ImageKnowledge, bool) {
7619	return nil, false
7620}
7621
7622// AsResponse is the BasicResponseBase implementation for Point2D.
7623func (p2 Point2D) AsResponse() (*Response, bool) {
7624	return nil, false
7625}
7626
7627// AsBasicResponse is the BasicResponseBase implementation for Point2D.
7628func (p2 Point2D) AsBasicResponse() (BasicResponse, bool) {
7629	return &p2, true
7630}
7631
7632// AsIdentifiable is the BasicResponseBase implementation for Point2D.
7633func (p2 Point2D) AsIdentifiable() (*Identifiable, bool) {
7634	return nil, false
7635}
7636
7637// AsBasicIdentifiable is the BasicResponseBase implementation for Point2D.
7638func (p2 Point2D) AsBasicIdentifiable() (BasicIdentifiable, bool) {
7639	return &p2, true
7640}
7641
7642// AsErrorResponse is the BasicResponseBase implementation for Point2D.
7643func (p2 Point2D) AsErrorResponse() (*ErrorResponse, bool) {
7644	return nil, false
7645}
7646
7647// AsThing is the BasicResponseBase implementation for Point2D.
7648func (p2 Point2D) AsThing() (*Thing, bool) {
7649	return nil, false
7650}
7651
7652// AsBasicThing is the BasicResponseBase implementation for Point2D.
7653func (p2 Point2D) AsBasicThing() (BasicThing, bool) {
7654	return &p2, true
7655}
7656
7657// AsAction is the BasicResponseBase implementation for Point2D.
7658func (p2 Point2D) AsAction() (*Action, bool) {
7659	return nil, false
7660}
7661
7662// AsBasicAction is the BasicResponseBase implementation for Point2D.
7663func (p2 Point2D) AsBasicAction() (BasicAction, bool) {
7664	return nil, false
7665}
7666
7667// AsMediaObject is the BasicResponseBase implementation for Point2D.
7668func (p2 Point2D) AsMediaObject() (*MediaObject, bool) {
7669	return nil, false
7670}
7671
7672// AsBasicMediaObject is the BasicResponseBase implementation for Point2D.
7673func (p2 Point2D) AsBasicMediaObject() (BasicMediaObject, bool) {
7674	return nil, false
7675}
7676
7677// AsCreativeWork is the BasicResponseBase implementation for Point2D.
7678func (p2 Point2D) AsCreativeWork() (*CreativeWork, bool) {
7679	return nil, false
7680}
7681
7682// AsBasicCreativeWork is the BasicResponseBase implementation for Point2D.
7683func (p2 Point2D) AsBasicCreativeWork() (BasicCreativeWork, bool) {
7684	return nil, false
7685}
7686
7687// AsPerson is the BasicResponseBase implementation for Point2D.
7688func (p2 Point2D) AsPerson() (*Person, bool) {
7689	return nil, false
7690}
7691
7692// AsIntangible is the BasicResponseBase implementation for Point2D.
7693func (p2 Point2D) AsIntangible() (*Intangible, bool) {
7694	return nil, false
7695}
7696
7697// AsBasicIntangible is the BasicResponseBase implementation for Point2D.
7698func (p2 Point2D) AsBasicIntangible() (BasicIntangible, bool) {
7699	return &p2, true
7700}
7701
7702// AsImageEntityAction is the BasicResponseBase implementation for Point2D.
7703func (p2 Point2D) AsImageEntityAction() (*ImageEntityAction, bool) {
7704	return nil, false
7705}
7706
7707// AsImageModuleAction is the BasicResponseBase implementation for Point2D.
7708func (p2 Point2D) AsImageModuleAction() (*ImageModuleAction, bool) {
7709	return nil, false
7710}
7711
7712// AsRecipe is the BasicResponseBase implementation for Point2D.
7713func (p2 Point2D) AsRecipe() (*Recipe, bool) {
7714	return nil, false
7715}
7716
7717// AsImageRecipesAction is the BasicResponseBase implementation for Point2D.
7718func (p2 Point2D) AsImageRecipesAction() (*ImageRecipesAction, bool) {
7719	return nil, false
7720}
7721
7722// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Point2D.
7723func (p2 Point2D) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
7724	return nil, false
7725}
7726
7727// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Point2D.
7728func (p2 Point2D) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
7729	return nil, false
7730}
7731
7732// AsStructuredValue is the BasicResponseBase implementation for Point2D.
7733func (p2 Point2D) AsStructuredValue() (*StructuredValue, bool) {
7734	return nil, false
7735}
7736
7737// AsBasicStructuredValue is the BasicResponseBase implementation for Point2D.
7738func (p2 Point2D) AsBasicStructuredValue() (BasicStructuredValue, bool) {
7739	return &p2, true
7740}
7741
7742// AsResponseBase is the BasicResponseBase implementation for Point2D.
7743func (p2 Point2D) AsResponseBase() (*ResponseBase, bool) {
7744	return nil, false
7745}
7746
7747// AsBasicResponseBase is the BasicResponseBase implementation for Point2D.
7748func (p2 Point2D) AsBasicResponseBase() (BasicResponseBase, bool) {
7749	return &p2, true
7750}
7751
7752// BasicPropertiesItem defines an item.
7753type BasicPropertiesItem interface {
7754	AsAggregateRating() (*AggregateRating, bool)
7755	AsRating() (*Rating, bool)
7756	AsBasicRating() (BasicRating, bool)
7757	AsPropertiesItem() (*PropertiesItem, bool)
7758}
7759
7760// PropertiesItem defines an item.
7761type PropertiesItem struct {
7762	// Text - READ-ONLY; Text representation of an item.
7763	Text *string `json:"text,omitempty"`
7764	// Type - Possible values include: 'TypePropertiesItem', 'TypeAggregateRating', 'TypeRating'
7765	Type TypeBasicPropertiesItem `json:"_type,omitempty"`
7766}
7767
7768func unmarshalBasicPropertiesItem(body []byte) (BasicPropertiesItem, error) {
7769	var m map[string]interface{}
7770	err := json.Unmarshal(body, &m)
7771	if err != nil {
7772		return nil, err
7773	}
7774
7775	switch m["_type"] {
7776	case string(TypeAggregateRating):
7777		var ar AggregateRating
7778		err := json.Unmarshal(body, &ar)
7779		return ar, err
7780	case string(TypeRating):
7781		var r Rating
7782		err := json.Unmarshal(body, &r)
7783		return r, err
7784	default:
7785		var pi PropertiesItem
7786		err := json.Unmarshal(body, &pi)
7787		return pi, err
7788	}
7789}
7790func unmarshalBasicPropertiesItemArray(body []byte) ([]BasicPropertiesItem, error) {
7791	var rawMessages []*json.RawMessage
7792	err := json.Unmarshal(body, &rawMessages)
7793	if err != nil {
7794		return nil, err
7795	}
7796
7797	piArray := make([]BasicPropertiesItem, len(rawMessages))
7798
7799	for index, rawMessage := range rawMessages {
7800		pi, err := unmarshalBasicPropertiesItem(*rawMessage)
7801		if err != nil {
7802			return nil, err
7803		}
7804		piArray[index] = pi
7805	}
7806	return piArray, nil
7807}
7808
7809// MarshalJSON is the custom marshaler for PropertiesItem.
7810func (pi PropertiesItem) MarshalJSON() ([]byte, error) {
7811	pi.Type = TypePropertiesItem
7812	objectMap := make(map[string]interface{})
7813	if pi.Type != "" {
7814		objectMap["_type"] = pi.Type
7815	}
7816	return json.Marshal(objectMap)
7817}
7818
7819// AsAggregateRating is the BasicPropertiesItem implementation for PropertiesItem.
7820func (pi PropertiesItem) AsAggregateRating() (*AggregateRating, bool) {
7821	return nil, false
7822}
7823
7824// AsRating is the BasicPropertiesItem implementation for PropertiesItem.
7825func (pi PropertiesItem) AsRating() (*Rating, bool) {
7826	return nil, false
7827}
7828
7829// AsBasicRating is the BasicPropertiesItem implementation for PropertiesItem.
7830func (pi PropertiesItem) AsBasicRating() (BasicRating, bool) {
7831	return nil, false
7832}
7833
7834// AsPropertiesItem is the BasicPropertiesItem implementation for PropertiesItem.
7835func (pi PropertiesItem) AsPropertiesItem() (*PropertiesItem, bool) {
7836	return &pi, true
7837}
7838
7839// AsBasicPropertiesItem is the BasicPropertiesItem implementation for PropertiesItem.
7840func (pi PropertiesItem) AsBasicPropertiesItem() (BasicPropertiesItem, bool) {
7841	return &pi, true
7842}
7843
7844// Query defines a search query.
7845type Query struct {
7846	// Text - The query string. Use this string as the query term in a new search request.
7847	Text *string `json:"text,omitempty"`
7848	// DisplayText - READ-ONLY; The display version of the query term.
7849	DisplayText *string `json:"displayText,omitempty"`
7850	// WebSearchURL - READ-ONLY; The URL that takes the user to the Bing search results page for the query.
7851	WebSearchURL *string `json:"webSearchUrl,omitempty"`
7852	// SearchLink - READ-ONLY; The URL that you use to get the results of the related search. Before using the URL, you must append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL if you're displaying the results in your own user interface. Otherwise, use the webSearchUrl URL.
7853	SearchLink *string `json:"searchLink,omitempty"`
7854	// Thumbnail - READ-ONLY; The URL to a thumbnail of a related image.
7855	Thumbnail *ImageObject `json:"thumbnail,omitempty"`
7856}
7857
7858// MarshalJSON is the custom marshaler for Query.
7859func (q Query) MarshalJSON() ([]byte, error) {
7860	objectMap := make(map[string]interface{})
7861	if q.Text != nil {
7862		objectMap["text"] = q.Text
7863	}
7864	return json.Marshal(objectMap)
7865}
7866
7867// BasicRating defines a rating.
7868type BasicRating interface {
7869	AsAggregateRating() (*AggregateRating, bool)
7870	AsRating() (*Rating, bool)
7871}
7872
7873// Rating defines a rating.
7874type Rating struct {
7875	// RatingValue - The mean (average) rating. The possible values are 1.0 through 5.0.
7876	RatingValue *float64 `json:"ratingValue,omitempty"`
7877	// BestRating - READ-ONLY; The highest rated review. The possible values are 1.0 through 5.0.
7878	BestRating *float64 `json:"bestRating,omitempty"`
7879	// Text - READ-ONLY; Text representation of an item.
7880	Text *string `json:"text,omitempty"`
7881	// Type - Possible values include: 'TypePropertiesItem', 'TypeAggregateRating', 'TypeRating'
7882	Type TypeBasicPropertiesItem `json:"_type,omitempty"`
7883}
7884
7885func unmarshalBasicRating(body []byte) (BasicRating, error) {
7886	var m map[string]interface{}
7887	err := json.Unmarshal(body, &m)
7888	if err != nil {
7889		return nil, err
7890	}
7891
7892	switch m["_type"] {
7893	case string(TypeAggregateRating):
7894		var ar AggregateRating
7895		err := json.Unmarshal(body, &ar)
7896		return ar, err
7897	default:
7898		var r Rating
7899		err := json.Unmarshal(body, &r)
7900		return r, err
7901	}
7902}
7903func unmarshalBasicRatingArray(body []byte) ([]BasicRating, error) {
7904	var rawMessages []*json.RawMessage
7905	err := json.Unmarshal(body, &rawMessages)
7906	if err != nil {
7907		return nil, err
7908	}
7909
7910	rArray := make([]BasicRating, len(rawMessages))
7911
7912	for index, rawMessage := range rawMessages {
7913		r, err := unmarshalBasicRating(*rawMessage)
7914		if err != nil {
7915			return nil, err
7916		}
7917		rArray[index] = r
7918	}
7919	return rArray, nil
7920}
7921
7922// MarshalJSON is the custom marshaler for Rating.
7923func (r Rating) MarshalJSON() ([]byte, error) {
7924	r.Type = TypeRating
7925	objectMap := make(map[string]interface{})
7926	if r.RatingValue != nil {
7927		objectMap["ratingValue"] = r.RatingValue
7928	}
7929	if r.Type != "" {
7930		objectMap["_type"] = r.Type
7931	}
7932	return json.Marshal(objectMap)
7933}
7934
7935// AsAggregateRating is the BasicPropertiesItem implementation for Rating.
7936func (r Rating) AsAggregateRating() (*AggregateRating, bool) {
7937	return nil, false
7938}
7939
7940// AsRating is the BasicPropertiesItem implementation for Rating.
7941func (r Rating) AsRating() (*Rating, bool) {
7942	return &r, true
7943}
7944
7945// AsBasicRating is the BasicPropertiesItem implementation for Rating.
7946func (r Rating) AsBasicRating() (BasicRating, bool) {
7947	return &r, true
7948}
7949
7950// AsPropertiesItem is the BasicPropertiesItem implementation for Rating.
7951func (r Rating) AsPropertiesItem() (*PropertiesItem, bool) {
7952	return nil, false
7953}
7954
7955// AsBasicPropertiesItem is the BasicPropertiesItem implementation for Rating.
7956func (r Rating) AsBasicPropertiesItem() (BasicPropertiesItem, bool) {
7957	return &r, true
7958}
7959
7960// Recipe defines a cooking recipe.
7961type Recipe struct {
7962	// CookTime - READ-ONLY; The amount of time the food takes to cook. For example, PT25M. For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations.
7963	CookTime *string `json:"cookTime,omitempty"`
7964	// PrepTime - READ-ONLY; The amount of time required to prepare the ingredients. For example, PT15M. For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations.
7965	PrepTime *string `json:"prepTime,omitempty"`
7966	// TotalTime - READ-ONLY; The total amount of time it takes to prepare and cook the recipe. For example, PT45M. For information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations.
7967	TotalTime *string `json:"totalTime,omitempty"`
7968	// ThumbnailURL - READ-ONLY; The URL to a thumbnail of the item.
7969	ThumbnailURL *string `json:"thumbnailUrl,omitempty"`
7970	// Provider - READ-ONLY; The source of the creative work.
7971	Provider *[]BasicThing `json:"provider,omitempty"`
7972	// DatePublished - READ-ONLY; The date on which the CreativeWork was published.
7973	DatePublished *string `json:"datePublished,omitempty"`
7974	// Text - READ-ONLY; Text content of this creative work.
7975	Text *string `json:"text,omitempty"`
7976	// Name - READ-ONLY; The name of the thing represented by this object.
7977	Name *string `json:"name,omitempty"`
7978	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
7979	URL *string `json:"url,omitempty"`
7980	// Image - READ-ONLY; An image of the item.
7981	Image *ImageObject `json:"image,omitempty"`
7982	// Description - READ-ONLY; A short description of the item.
7983	Description *string `json:"description,omitempty"`
7984	// AlternateName - READ-ONLY; An alias for the item.
7985	AlternateName *string `json:"alternateName,omitempty"`
7986	// BingID - READ-ONLY; An ID that uniquely identifies this item.
7987	BingID *string `json:"bingId,omitempty"`
7988	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
7989	ReadLink *string `json:"readLink,omitempty"`
7990	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
7991	WebSearchURL *string `json:"webSearchUrl,omitempty"`
7992	// ID - READ-ONLY; A String identifier.
7993	ID *string `json:"id,omitempty"`
7994	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
7995	Type Type `json:"_type,omitempty"`
7996}
7997
7998// MarshalJSON is the custom marshaler for Recipe.
7999func (r Recipe) MarshalJSON() ([]byte, error) {
8000	r.Type = TypeRecipe
8001	objectMap := make(map[string]interface{})
8002	if r.Type != "" {
8003		objectMap["_type"] = r.Type
8004	}
8005	return json.Marshal(objectMap)
8006}
8007
8008// AsPoint2D is the BasicResponseBase implementation for Recipe.
8009func (r Recipe) AsPoint2D() (*Point2D, bool) {
8010	return nil, false
8011}
8012
8013// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Recipe.
8014func (r Recipe) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
8015	return nil, false
8016}
8017
8018// AsImageAction is the BasicResponseBase implementation for Recipe.
8019func (r Recipe) AsImageAction() (*ImageAction, bool) {
8020	return nil, false
8021}
8022
8023// AsBasicImageAction is the BasicResponseBase implementation for Recipe.
8024func (r Recipe) AsBasicImageAction() (BasicImageAction, bool) {
8025	return nil, false
8026}
8027
8028// AsImageTag is the BasicResponseBase implementation for Recipe.
8029func (r Recipe) AsImageTag() (*ImageTag, bool) {
8030	return nil, false
8031}
8032
8033// AsOrganization is the BasicResponseBase implementation for Recipe.
8034func (r Recipe) AsOrganization() (*Organization, bool) {
8035	return nil, false
8036}
8037
8038// AsOffer is the BasicResponseBase implementation for Recipe.
8039func (r Recipe) AsOffer() (*Offer, bool) {
8040	return nil, false
8041}
8042
8043// AsBasicOffer is the BasicResponseBase implementation for Recipe.
8044func (r Recipe) AsBasicOffer() (BasicOffer, bool) {
8045	return nil, false
8046}
8047
8048// AsAggregateOffer is the BasicResponseBase implementation for Recipe.
8049func (r Recipe) AsAggregateOffer() (*AggregateOffer, bool) {
8050	return nil, false
8051}
8052
8053// AsImageObject is the BasicResponseBase implementation for Recipe.
8054func (r Recipe) AsImageObject() (*ImageObject, bool) {
8055	return nil, false
8056}
8057
8058// AsImageKnowledge is the BasicResponseBase implementation for Recipe.
8059func (r Recipe) AsImageKnowledge() (*ImageKnowledge, bool) {
8060	return nil, false
8061}
8062
8063// AsResponse is the BasicResponseBase implementation for Recipe.
8064func (r Recipe) AsResponse() (*Response, bool) {
8065	return nil, false
8066}
8067
8068// AsBasicResponse is the BasicResponseBase implementation for Recipe.
8069func (r Recipe) AsBasicResponse() (BasicResponse, bool) {
8070	return &r, true
8071}
8072
8073// AsIdentifiable is the BasicResponseBase implementation for Recipe.
8074func (r Recipe) AsIdentifiable() (*Identifiable, bool) {
8075	return nil, false
8076}
8077
8078// AsBasicIdentifiable is the BasicResponseBase implementation for Recipe.
8079func (r Recipe) AsBasicIdentifiable() (BasicIdentifiable, bool) {
8080	return &r, true
8081}
8082
8083// AsErrorResponse is the BasicResponseBase implementation for Recipe.
8084func (r Recipe) AsErrorResponse() (*ErrorResponse, bool) {
8085	return nil, false
8086}
8087
8088// AsThing is the BasicResponseBase implementation for Recipe.
8089func (r Recipe) AsThing() (*Thing, bool) {
8090	return nil, false
8091}
8092
8093// AsBasicThing is the BasicResponseBase implementation for Recipe.
8094func (r Recipe) AsBasicThing() (BasicThing, bool) {
8095	return &r, true
8096}
8097
8098// AsAction is the BasicResponseBase implementation for Recipe.
8099func (r Recipe) AsAction() (*Action, bool) {
8100	return nil, false
8101}
8102
8103// AsBasicAction is the BasicResponseBase implementation for Recipe.
8104func (r Recipe) AsBasicAction() (BasicAction, bool) {
8105	return nil, false
8106}
8107
8108// AsMediaObject is the BasicResponseBase implementation for Recipe.
8109func (r Recipe) AsMediaObject() (*MediaObject, bool) {
8110	return nil, false
8111}
8112
8113// AsBasicMediaObject is the BasicResponseBase implementation for Recipe.
8114func (r Recipe) AsBasicMediaObject() (BasicMediaObject, bool) {
8115	return nil, false
8116}
8117
8118// AsCreativeWork is the BasicResponseBase implementation for Recipe.
8119func (r Recipe) AsCreativeWork() (*CreativeWork, bool) {
8120	return nil, false
8121}
8122
8123// AsBasicCreativeWork is the BasicResponseBase implementation for Recipe.
8124func (r Recipe) AsBasicCreativeWork() (BasicCreativeWork, bool) {
8125	return &r, true
8126}
8127
8128// AsPerson is the BasicResponseBase implementation for Recipe.
8129func (r Recipe) AsPerson() (*Person, bool) {
8130	return nil, false
8131}
8132
8133// AsIntangible is the BasicResponseBase implementation for Recipe.
8134func (r Recipe) AsIntangible() (*Intangible, bool) {
8135	return nil, false
8136}
8137
8138// AsBasicIntangible is the BasicResponseBase implementation for Recipe.
8139func (r Recipe) AsBasicIntangible() (BasicIntangible, bool) {
8140	return nil, false
8141}
8142
8143// AsImageEntityAction is the BasicResponseBase implementation for Recipe.
8144func (r Recipe) AsImageEntityAction() (*ImageEntityAction, bool) {
8145	return nil, false
8146}
8147
8148// AsImageModuleAction is the BasicResponseBase implementation for Recipe.
8149func (r Recipe) AsImageModuleAction() (*ImageModuleAction, bool) {
8150	return nil, false
8151}
8152
8153// AsRecipe is the BasicResponseBase implementation for Recipe.
8154func (r Recipe) AsRecipe() (*Recipe, bool) {
8155	return &r, true
8156}
8157
8158// AsImageRecipesAction is the BasicResponseBase implementation for Recipe.
8159func (r Recipe) AsImageRecipesAction() (*ImageRecipesAction, bool) {
8160	return nil, false
8161}
8162
8163// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Recipe.
8164func (r Recipe) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
8165	return nil, false
8166}
8167
8168// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Recipe.
8169func (r Recipe) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
8170	return nil, false
8171}
8172
8173// AsStructuredValue is the BasicResponseBase implementation for Recipe.
8174func (r Recipe) AsStructuredValue() (*StructuredValue, bool) {
8175	return nil, false
8176}
8177
8178// AsBasicStructuredValue is the BasicResponseBase implementation for Recipe.
8179func (r Recipe) AsBasicStructuredValue() (BasicStructuredValue, bool) {
8180	return nil, false
8181}
8182
8183// AsResponseBase is the BasicResponseBase implementation for Recipe.
8184func (r Recipe) AsResponseBase() (*ResponseBase, bool) {
8185	return nil, false
8186}
8187
8188// AsBasicResponseBase is the BasicResponseBase implementation for Recipe.
8189func (r Recipe) AsBasicResponseBase() (BasicResponseBase, bool) {
8190	return &r, true
8191}
8192
8193// UnmarshalJSON is the custom unmarshaler for Recipe struct.
8194func (r *Recipe) UnmarshalJSON(body []byte) error {
8195	var m map[string]*json.RawMessage
8196	err := json.Unmarshal(body, &m)
8197	if err != nil {
8198		return err
8199	}
8200	for k, v := range m {
8201		switch k {
8202		case "cookTime":
8203			if v != nil {
8204				var cookTime string
8205				err = json.Unmarshal(*v, &cookTime)
8206				if err != nil {
8207					return err
8208				}
8209				r.CookTime = &cookTime
8210			}
8211		case "prepTime":
8212			if v != nil {
8213				var prepTime string
8214				err = json.Unmarshal(*v, &prepTime)
8215				if err != nil {
8216					return err
8217				}
8218				r.PrepTime = &prepTime
8219			}
8220		case "totalTime":
8221			if v != nil {
8222				var totalTime string
8223				err = json.Unmarshal(*v, &totalTime)
8224				if err != nil {
8225					return err
8226				}
8227				r.TotalTime = &totalTime
8228			}
8229		case "thumbnailUrl":
8230			if v != nil {
8231				var thumbnailURL string
8232				err = json.Unmarshal(*v, &thumbnailURL)
8233				if err != nil {
8234					return err
8235				}
8236				r.ThumbnailURL = &thumbnailURL
8237			}
8238		case "provider":
8239			if v != nil {
8240				provider, err := unmarshalBasicThingArray(*v)
8241				if err != nil {
8242					return err
8243				}
8244				r.Provider = &provider
8245			}
8246		case "datePublished":
8247			if v != nil {
8248				var datePublished string
8249				err = json.Unmarshal(*v, &datePublished)
8250				if err != nil {
8251					return err
8252				}
8253				r.DatePublished = &datePublished
8254			}
8255		case "text":
8256			if v != nil {
8257				var textVar string
8258				err = json.Unmarshal(*v, &textVar)
8259				if err != nil {
8260					return err
8261				}
8262				r.Text = &textVar
8263			}
8264		case "name":
8265			if v != nil {
8266				var name string
8267				err = json.Unmarshal(*v, &name)
8268				if err != nil {
8269					return err
8270				}
8271				r.Name = &name
8272			}
8273		case "url":
8274			if v != nil {
8275				var URL string
8276				err = json.Unmarshal(*v, &URL)
8277				if err != nil {
8278					return err
8279				}
8280				r.URL = &URL
8281			}
8282		case "image":
8283			if v != nil {
8284				var imageVar ImageObject
8285				err = json.Unmarshal(*v, &imageVar)
8286				if err != nil {
8287					return err
8288				}
8289				r.Image = &imageVar
8290			}
8291		case "description":
8292			if v != nil {
8293				var description string
8294				err = json.Unmarshal(*v, &description)
8295				if err != nil {
8296					return err
8297				}
8298				r.Description = &description
8299			}
8300		case "alternateName":
8301			if v != nil {
8302				var alternateName string
8303				err = json.Unmarshal(*v, &alternateName)
8304				if err != nil {
8305					return err
8306				}
8307				r.AlternateName = &alternateName
8308			}
8309		case "bingId":
8310			if v != nil {
8311				var bingID string
8312				err = json.Unmarshal(*v, &bingID)
8313				if err != nil {
8314					return err
8315				}
8316				r.BingID = &bingID
8317			}
8318		case "readLink":
8319			if v != nil {
8320				var readLink string
8321				err = json.Unmarshal(*v, &readLink)
8322				if err != nil {
8323					return err
8324				}
8325				r.ReadLink = &readLink
8326			}
8327		case "webSearchUrl":
8328			if v != nil {
8329				var webSearchURL string
8330				err = json.Unmarshal(*v, &webSearchURL)
8331				if err != nil {
8332					return err
8333				}
8334				r.WebSearchURL = &webSearchURL
8335			}
8336		case "id":
8337			if v != nil {
8338				var ID string
8339				err = json.Unmarshal(*v, &ID)
8340				if err != nil {
8341					return err
8342				}
8343				r.ID = &ID
8344			}
8345		case "_type":
8346			if v != nil {
8347				var typeVar Type
8348				err = json.Unmarshal(*v, &typeVar)
8349				if err != nil {
8350					return err
8351				}
8352				r.Type = typeVar
8353			}
8354		}
8355	}
8356
8357	return nil
8358}
8359
8360// RecipesModule defines a list of recipes.
8361type RecipesModule struct {
8362	// Value - READ-ONLY; A list of recipes.
8363	Value *[]Recipe `json:"value,omitempty"`
8364}
8365
8366// MarshalJSON is the custom marshaler for RecipesModule.
8367func (rm RecipesModule) MarshalJSON() ([]byte, error) {
8368	objectMap := make(map[string]interface{})
8369	return json.Marshal(objectMap)
8370}
8371
8372// RelatedSearchesModule defines a list of related searches.
8373type RelatedSearchesModule struct {
8374	// Value - READ-ONLY; A list of related searches.
8375	Value *[]Query `json:"value,omitempty"`
8376}
8377
8378// MarshalJSON is the custom marshaler for RelatedSearchesModule.
8379func (rsm RelatedSearchesModule) MarshalJSON() ([]byte, error) {
8380	objectMap := make(map[string]interface{})
8381	return json.Marshal(objectMap)
8382}
8383
8384// Request a JSON object that contains information about the image to get insights of. Specify this object
8385// only in a knowledgeRequest form data.
8386type Request struct {
8387	// ImageInfo - A JSON object that identities the image to get insights of.
8388	ImageInfo *ImageInfo `json:"imageInfo,omitempty"`
8389	// KnowledgeRequest - A JSON object containing information about the request, such as filters, or a description.
8390	KnowledgeRequest *KnowledgeRequest `json:"knowledgeRequest,omitempty"`
8391}
8392
8393// BasicResponse defines a response. All schemas that return at the root of the response must inherit from this object.
8394type BasicResponse interface {
8395	AsPoint2D() (*Point2D, bool)
8396	AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool)
8397	AsImageAction() (*ImageAction, bool)
8398	AsBasicImageAction() (BasicImageAction, bool)
8399	AsImageTag() (*ImageTag, bool)
8400	AsOrganization() (*Organization, bool)
8401	AsOffer() (*Offer, bool)
8402	AsBasicOffer() (BasicOffer, bool)
8403	AsAggregateOffer() (*AggregateOffer, bool)
8404	AsImageObject() (*ImageObject, bool)
8405	AsImageKnowledge() (*ImageKnowledge, bool)
8406	AsErrorResponse() (*ErrorResponse, bool)
8407	AsThing() (*Thing, bool)
8408	AsBasicThing() (BasicThing, bool)
8409	AsAction() (*Action, bool)
8410	AsBasicAction() (BasicAction, bool)
8411	AsMediaObject() (*MediaObject, bool)
8412	AsBasicMediaObject() (BasicMediaObject, bool)
8413	AsCreativeWork() (*CreativeWork, bool)
8414	AsBasicCreativeWork() (BasicCreativeWork, bool)
8415	AsPerson() (*Person, bool)
8416	AsIntangible() (*Intangible, bool)
8417	AsBasicIntangible() (BasicIntangible, bool)
8418	AsImageEntityAction() (*ImageEntityAction, bool)
8419	AsImageModuleAction() (*ImageModuleAction, bool)
8420	AsRecipe() (*Recipe, bool)
8421	AsImageRecipesAction() (*ImageRecipesAction, bool)
8422	AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool)
8423	AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool)
8424	AsStructuredValue() (*StructuredValue, bool)
8425	AsBasicStructuredValue() (BasicStructuredValue, bool)
8426	AsResponse() (*Response, bool)
8427}
8428
8429// Response defines a response. All schemas that return at the root of the response must inherit from this
8430// object.
8431type Response struct {
8432	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
8433	ReadLink *string `json:"readLink,omitempty"`
8434	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
8435	WebSearchURL *string `json:"webSearchUrl,omitempty"`
8436	// ID - READ-ONLY; A String identifier.
8437	ID *string `json:"id,omitempty"`
8438	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
8439	Type Type `json:"_type,omitempty"`
8440}
8441
8442func unmarshalBasicResponse(body []byte) (BasicResponse, error) {
8443	var m map[string]interface{}
8444	err := json.Unmarshal(body, &m)
8445	if err != nil {
8446		return nil, err
8447	}
8448
8449	switch m["_type"] {
8450	case string(TypePoint2D):
8451		var p2 Point2D
8452		err := json.Unmarshal(body, &p2)
8453		return p2, err
8454	case string(TypeNormalizedQuadrilateral):
8455		var nq NormalizedQuadrilateral
8456		err := json.Unmarshal(body, &nq)
8457		return nq, err
8458	case string(TypeImageAction):
8459		var ia ImageAction
8460		err := json.Unmarshal(body, &ia)
8461		return ia, err
8462	case string(TypeImageTag):
8463		var it ImageTag
8464		err := json.Unmarshal(body, &it)
8465		return it, err
8466	case string(TypeOrganization):
8467		var o Organization
8468		err := json.Unmarshal(body, &o)
8469		return o, err
8470	case string(TypeOffer):
8471		var o Offer
8472		err := json.Unmarshal(body, &o)
8473		return o, err
8474	case string(TypeAggregateOffer):
8475		var ao AggregateOffer
8476		err := json.Unmarshal(body, &ao)
8477		return ao, err
8478	case string(TypeImageObject):
8479		var ioVar ImageObject
8480		err := json.Unmarshal(body, &ioVar)
8481		return ioVar, err
8482	case string(TypeImageKnowledge):
8483		var ik ImageKnowledge
8484		err := json.Unmarshal(body, &ik)
8485		return ik, err
8486	case string(TypeErrorResponse):
8487		var er ErrorResponse
8488		err := json.Unmarshal(body, &er)
8489		return er, err
8490	case string(TypeThing):
8491		var t Thing
8492		err := json.Unmarshal(body, &t)
8493		return t, err
8494	case string(TypeAction):
8495		var a Action
8496		err := json.Unmarshal(body, &a)
8497		return a, err
8498	case string(TypeMediaObject):
8499		var mo MediaObject
8500		err := json.Unmarshal(body, &mo)
8501		return mo, err
8502	case string(TypeCreativeWork):
8503		var cw CreativeWork
8504		err := json.Unmarshal(body, &cw)
8505		return cw, err
8506	case string(TypePerson):
8507		var p Person
8508		err := json.Unmarshal(body, &p)
8509		return p, err
8510	case string(TypeIntangible):
8511		var i Intangible
8512		err := json.Unmarshal(body, &i)
8513		return i, err
8514	case string(TypeImageEntityAction):
8515		var iea ImageEntityAction
8516		err := json.Unmarshal(body, &iea)
8517		return iea, err
8518	case string(TypeImageModuleAction):
8519		var ima ImageModuleAction
8520		err := json.Unmarshal(body, &ima)
8521		return ima, err
8522	case string(TypeRecipe):
8523		var r Recipe
8524		err := json.Unmarshal(body, &r)
8525		return r, err
8526	case string(TypeImageRecipesAction):
8527		var ira ImageRecipesAction
8528		err := json.Unmarshal(body, &ira)
8529		return ira, err
8530	case string(TypeImageRelatedSearchesAction):
8531		var irsa ImageRelatedSearchesAction
8532		err := json.Unmarshal(body, &irsa)
8533		return irsa, err
8534	case string(TypeImageShoppingSourcesAction):
8535		var issa ImageShoppingSourcesAction
8536		err := json.Unmarshal(body, &issa)
8537		return issa, err
8538	case string(TypeStructuredValue):
8539		var sv StructuredValue
8540		err := json.Unmarshal(body, &sv)
8541		return sv, err
8542	default:
8543		var r Response
8544		err := json.Unmarshal(body, &r)
8545		return r, err
8546	}
8547}
8548func unmarshalBasicResponseArray(body []byte) ([]BasicResponse, error) {
8549	var rawMessages []*json.RawMessage
8550	err := json.Unmarshal(body, &rawMessages)
8551	if err != nil {
8552		return nil, err
8553	}
8554
8555	rArray := make([]BasicResponse, len(rawMessages))
8556
8557	for index, rawMessage := range rawMessages {
8558		r, err := unmarshalBasicResponse(*rawMessage)
8559		if err != nil {
8560			return nil, err
8561		}
8562		rArray[index] = r
8563	}
8564	return rArray, nil
8565}
8566
8567// MarshalJSON is the custom marshaler for Response.
8568func (r Response) MarshalJSON() ([]byte, error) {
8569	r.Type = TypeResponse
8570	objectMap := make(map[string]interface{})
8571	if r.Type != "" {
8572		objectMap["_type"] = r.Type
8573	}
8574	return json.Marshal(objectMap)
8575}
8576
8577// AsPoint2D is the BasicResponseBase implementation for Response.
8578func (r Response) AsPoint2D() (*Point2D, bool) {
8579	return nil, false
8580}
8581
8582// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Response.
8583func (r Response) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
8584	return nil, false
8585}
8586
8587// AsImageAction is the BasicResponseBase implementation for Response.
8588func (r Response) AsImageAction() (*ImageAction, bool) {
8589	return nil, false
8590}
8591
8592// AsBasicImageAction is the BasicResponseBase implementation for Response.
8593func (r Response) AsBasicImageAction() (BasicImageAction, bool) {
8594	return nil, false
8595}
8596
8597// AsImageTag is the BasicResponseBase implementation for Response.
8598func (r Response) AsImageTag() (*ImageTag, bool) {
8599	return nil, false
8600}
8601
8602// AsOrganization is the BasicResponseBase implementation for Response.
8603func (r Response) AsOrganization() (*Organization, bool) {
8604	return nil, false
8605}
8606
8607// AsOffer is the BasicResponseBase implementation for Response.
8608func (r Response) AsOffer() (*Offer, bool) {
8609	return nil, false
8610}
8611
8612// AsBasicOffer is the BasicResponseBase implementation for Response.
8613func (r Response) AsBasicOffer() (BasicOffer, bool) {
8614	return nil, false
8615}
8616
8617// AsAggregateOffer is the BasicResponseBase implementation for Response.
8618func (r Response) AsAggregateOffer() (*AggregateOffer, bool) {
8619	return nil, false
8620}
8621
8622// AsImageObject is the BasicResponseBase implementation for Response.
8623func (r Response) AsImageObject() (*ImageObject, bool) {
8624	return nil, false
8625}
8626
8627// AsImageKnowledge is the BasicResponseBase implementation for Response.
8628func (r Response) AsImageKnowledge() (*ImageKnowledge, bool) {
8629	return nil, false
8630}
8631
8632// AsResponse is the BasicResponseBase implementation for Response.
8633func (r Response) AsResponse() (*Response, bool) {
8634	return &r, true
8635}
8636
8637// AsBasicResponse is the BasicResponseBase implementation for Response.
8638func (r Response) AsBasicResponse() (BasicResponse, bool) {
8639	return &r, true
8640}
8641
8642// AsIdentifiable is the BasicResponseBase implementation for Response.
8643func (r Response) AsIdentifiable() (*Identifiable, bool) {
8644	return nil, false
8645}
8646
8647// AsBasicIdentifiable is the BasicResponseBase implementation for Response.
8648func (r Response) AsBasicIdentifiable() (BasicIdentifiable, bool) {
8649	return &r, true
8650}
8651
8652// AsErrorResponse is the BasicResponseBase implementation for Response.
8653func (r Response) AsErrorResponse() (*ErrorResponse, bool) {
8654	return nil, false
8655}
8656
8657// AsThing is the BasicResponseBase implementation for Response.
8658func (r Response) AsThing() (*Thing, bool) {
8659	return nil, false
8660}
8661
8662// AsBasicThing is the BasicResponseBase implementation for Response.
8663func (r Response) AsBasicThing() (BasicThing, bool) {
8664	return nil, false
8665}
8666
8667// AsAction is the BasicResponseBase implementation for Response.
8668func (r Response) AsAction() (*Action, bool) {
8669	return nil, false
8670}
8671
8672// AsBasicAction is the BasicResponseBase implementation for Response.
8673func (r Response) AsBasicAction() (BasicAction, bool) {
8674	return nil, false
8675}
8676
8677// AsMediaObject is the BasicResponseBase implementation for Response.
8678func (r Response) AsMediaObject() (*MediaObject, bool) {
8679	return nil, false
8680}
8681
8682// AsBasicMediaObject is the BasicResponseBase implementation for Response.
8683func (r Response) AsBasicMediaObject() (BasicMediaObject, bool) {
8684	return nil, false
8685}
8686
8687// AsCreativeWork is the BasicResponseBase implementation for Response.
8688func (r Response) AsCreativeWork() (*CreativeWork, bool) {
8689	return nil, false
8690}
8691
8692// AsBasicCreativeWork is the BasicResponseBase implementation for Response.
8693func (r Response) AsBasicCreativeWork() (BasicCreativeWork, bool) {
8694	return nil, false
8695}
8696
8697// AsPerson is the BasicResponseBase implementation for Response.
8698func (r Response) AsPerson() (*Person, bool) {
8699	return nil, false
8700}
8701
8702// AsIntangible is the BasicResponseBase implementation for Response.
8703func (r Response) AsIntangible() (*Intangible, bool) {
8704	return nil, false
8705}
8706
8707// AsBasicIntangible is the BasicResponseBase implementation for Response.
8708func (r Response) AsBasicIntangible() (BasicIntangible, bool) {
8709	return nil, false
8710}
8711
8712// AsImageEntityAction is the BasicResponseBase implementation for Response.
8713func (r Response) AsImageEntityAction() (*ImageEntityAction, bool) {
8714	return nil, false
8715}
8716
8717// AsImageModuleAction is the BasicResponseBase implementation for Response.
8718func (r Response) AsImageModuleAction() (*ImageModuleAction, bool) {
8719	return nil, false
8720}
8721
8722// AsRecipe is the BasicResponseBase implementation for Response.
8723func (r Response) AsRecipe() (*Recipe, bool) {
8724	return nil, false
8725}
8726
8727// AsImageRecipesAction is the BasicResponseBase implementation for Response.
8728func (r Response) AsImageRecipesAction() (*ImageRecipesAction, bool) {
8729	return nil, false
8730}
8731
8732// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Response.
8733func (r Response) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
8734	return nil, false
8735}
8736
8737// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Response.
8738func (r Response) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
8739	return nil, false
8740}
8741
8742// AsStructuredValue is the BasicResponseBase implementation for Response.
8743func (r Response) AsStructuredValue() (*StructuredValue, bool) {
8744	return nil, false
8745}
8746
8747// AsBasicStructuredValue is the BasicResponseBase implementation for Response.
8748func (r Response) AsBasicStructuredValue() (BasicStructuredValue, bool) {
8749	return nil, false
8750}
8751
8752// AsResponseBase is the BasicResponseBase implementation for Response.
8753func (r Response) AsResponseBase() (*ResponseBase, bool) {
8754	return nil, false
8755}
8756
8757// AsBasicResponseBase is the BasicResponseBase implementation for Response.
8758func (r Response) AsBasicResponseBase() (BasicResponseBase, bool) {
8759	return &r, true
8760}
8761
8762// BasicResponseBase response base.
8763type BasicResponseBase interface {
8764	AsPoint2D() (*Point2D, bool)
8765	AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool)
8766	AsImageAction() (*ImageAction, bool)
8767	AsBasicImageAction() (BasicImageAction, bool)
8768	AsImageTag() (*ImageTag, bool)
8769	AsOrganization() (*Organization, bool)
8770	AsOffer() (*Offer, bool)
8771	AsBasicOffer() (BasicOffer, bool)
8772	AsAggregateOffer() (*AggregateOffer, bool)
8773	AsImageObject() (*ImageObject, bool)
8774	AsImageKnowledge() (*ImageKnowledge, bool)
8775	AsResponse() (*Response, bool)
8776	AsBasicResponse() (BasicResponse, bool)
8777	AsIdentifiable() (*Identifiable, bool)
8778	AsBasicIdentifiable() (BasicIdentifiable, bool)
8779	AsErrorResponse() (*ErrorResponse, bool)
8780	AsThing() (*Thing, bool)
8781	AsBasicThing() (BasicThing, bool)
8782	AsAction() (*Action, bool)
8783	AsBasicAction() (BasicAction, bool)
8784	AsMediaObject() (*MediaObject, bool)
8785	AsBasicMediaObject() (BasicMediaObject, bool)
8786	AsCreativeWork() (*CreativeWork, bool)
8787	AsBasicCreativeWork() (BasicCreativeWork, bool)
8788	AsPerson() (*Person, bool)
8789	AsIntangible() (*Intangible, bool)
8790	AsBasicIntangible() (BasicIntangible, bool)
8791	AsImageEntityAction() (*ImageEntityAction, bool)
8792	AsImageModuleAction() (*ImageModuleAction, bool)
8793	AsRecipe() (*Recipe, bool)
8794	AsImageRecipesAction() (*ImageRecipesAction, bool)
8795	AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool)
8796	AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool)
8797	AsStructuredValue() (*StructuredValue, bool)
8798	AsBasicStructuredValue() (BasicStructuredValue, bool)
8799	AsResponseBase() (*ResponseBase, bool)
8800}
8801
8802// ResponseBase response base.
8803type ResponseBase struct {
8804	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
8805	Type Type `json:"_type,omitempty"`
8806}
8807
8808func unmarshalBasicResponseBase(body []byte) (BasicResponseBase, error) {
8809	var m map[string]interface{}
8810	err := json.Unmarshal(body, &m)
8811	if err != nil {
8812		return nil, err
8813	}
8814
8815	switch m["_type"] {
8816	case string(TypePoint2D):
8817		var p2 Point2D
8818		err := json.Unmarshal(body, &p2)
8819		return p2, err
8820	case string(TypeNormalizedQuadrilateral):
8821		var nq NormalizedQuadrilateral
8822		err := json.Unmarshal(body, &nq)
8823		return nq, err
8824	case string(TypeImageAction):
8825		var ia ImageAction
8826		err := json.Unmarshal(body, &ia)
8827		return ia, err
8828	case string(TypeImageTag):
8829		var it ImageTag
8830		err := json.Unmarshal(body, &it)
8831		return it, err
8832	case string(TypeOrganization):
8833		var o Organization
8834		err := json.Unmarshal(body, &o)
8835		return o, err
8836	case string(TypeOffer):
8837		var o Offer
8838		err := json.Unmarshal(body, &o)
8839		return o, err
8840	case string(TypeAggregateOffer):
8841		var ao AggregateOffer
8842		err := json.Unmarshal(body, &ao)
8843		return ao, err
8844	case string(TypeImageObject):
8845		var ioVar ImageObject
8846		err := json.Unmarshal(body, &ioVar)
8847		return ioVar, err
8848	case string(TypeImageKnowledge):
8849		var ik ImageKnowledge
8850		err := json.Unmarshal(body, &ik)
8851		return ik, err
8852	case string(TypeResponse):
8853		var r Response
8854		err := json.Unmarshal(body, &r)
8855		return r, err
8856	case string(TypeIdentifiable):
8857		var i Identifiable
8858		err := json.Unmarshal(body, &i)
8859		return i, err
8860	case string(TypeErrorResponse):
8861		var er ErrorResponse
8862		err := json.Unmarshal(body, &er)
8863		return er, err
8864	case string(TypeThing):
8865		var t Thing
8866		err := json.Unmarshal(body, &t)
8867		return t, err
8868	case string(TypeAction):
8869		var a Action
8870		err := json.Unmarshal(body, &a)
8871		return a, err
8872	case string(TypeMediaObject):
8873		var mo MediaObject
8874		err := json.Unmarshal(body, &mo)
8875		return mo, err
8876	case string(TypeCreativeWork):
8877		var cw CreativeWork
8878		err := json.Unmarshal(body, &cw)
8879		return cw, err
8880	case string(TypePerson):
8881		var p Person
8882		err := json.Unmarshal(body, &p)
8883		return p, err
8884	case string(TypeIntangible):
8885		var i Intangible
8886		err := json.Unmarshal(body, &i)
8887		return i, err
8888	case string(TypeImageEntityAction):
8889		var iea ImageEntityAction
8890		err := json.Unmarshal(body, &iea)
8891		return iea, err
8892	case string(TypeImageModuleAction):
8893		var ima ImageModuleAction
8894		err := json.Unmarshal(body, &ima)
8895		return ima, err
8896	case string(TypeRecipe):
8897		var r Recipe
8898		err := json.Unmarshal(body, &r)
8899		return r, err
8900	case string(TypeImageRecipesAction):
8901		var ira ImageRecipesAction
8902		err := json.Unmarshal(body, &ira)
8903		return ira, err
8904	case string(TypeImageRelatedSearchesAction):
8905		var irsa ImageRelatedSearchesAction
8906		err := json.Unmarshal(body, &irsa)
8907		return irsa, err
8908	case string(TypeImageShoppingSourcesAction):
8909		var issa ImageShoppingSourcesAction
8910		err := json.Unmarshal(body, &issa)
8911		return issa, err
8912	case string(TypeStructuredValue):
8913		var sv StructuredValue
8914		err := json.Unmarshal(body, &sv)
8915		return sv, err
8916	default:
8917		var rb ResponseBase
8918		err := json.Unmarshal(body, &rb)
8919		return rb, err
8920	}
8921}
8922func unmarshalBasicResponseBaseArray(body []byte) ([]BasicResponseBase, error) {
8923	var rawMessages []*json.RawMessage
8924	err := json.Unmarshal(body, &rawMessages)
8925	if err != nil {
8926		return nil, err
8927	}
8928
8929	rbArray := make([]BasicResponseBase, len(rawMessages))
8930
8931	for index, rawMessage := range rawMessages {
8932		rb, err := unmarshalBasicResponseBase(*rawMessage)
8933		if err != nil {
8934			return nil, err
8935		}
8936		rbArray[index] = rb
8937	}
8938	return rbArray, nil
8939}
8940
8941// MarshalJSON is the custom marshaler for ResponseBase.
8942func (rb ResponseBase) MarshalJSON() ([]byte, error) {
8943	rb.Type = TypeResponseBase
8944	objectMap := make(map[string]interface{})
8945	if rb.Type != "" {
8946		objectMap["_type"] = rb.Type
8947	}
8948	return json.Marshal(objectMap)
8949}
8950
8951// AsPoint2D is the BasicResponseBase implementation for ResponseBase.
8952func (rb ResponseBase) AsPoint2D() (*Point2D, bool) {
8953	return nil, false
8954}
8955
8956// AsNormalizedQuadrilateral is the BasicResponseBase implementation for ResponseBase.
8957func (rb ResponseBase) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
8958	return nil, false
8959}
8960
8961// AsImageAction is the BasicResponseBase implementation for ResponseBase.
8962func (rb ResponseBase) AsImageAction() (*ImageAction, bool) {
8963	return nil, false
8964}
8965
8966// AsBasicImageAction is the BasicResponseBase implementation for ResponseBase.
8967func (rb ResponseBase) AsBasicImageAction() (BasicImageAction, bool) {
8968	return nil, false
8969}
8970
8971// AsImageTag is the BasicResponseBase implementation for ResponseBase.
8972func (rb ResponseBase) AsImageTag() (*ImageTag, bool) {
8973	return nil, false
8974}
8975
8976// AsOrganization is the BasicResponseBase implementation for ResponseBase.
8977func (rb ResponseBase) AsOrganization() (*Organization, bool) {
8978	return nil, false
8979}
8980
8981// AsOffer is the BasicResponseBase implementation for ResponseBase.
8982func (rb ResponseBase) AsOffer() (*Offer, bool) {
8983	return nil, false
8984}
8985
8986// AsBasicOffer is the BasicResponseBase implementation for ResponseBase.
8987func (rb ResponseBase) AsBasicOffer() (BasicOffer, bool) {
8988	return nil, false
8989}
8990
8991// AsAggregateOffer is the BasicResponseBase implementation for ResponseBase.
8992func (rb ResponseBase) AsAggregateOffer() (*AggregateOffer, bool) {
8993	return nil, false
8994}
8995
8996// AsImageObject is the BasicResponseBase implementation for ResponseBase.
8997func (rb ResponseBase) AsImageObject() (*ImageObject, bool) {
8998	return nil, false
8999}
9000
9001// AsImageKnowledge is the BasicResponseBase implementation for ResponseBase.
9002func (rb ResponseBase) AsImageKnowledge() (*ImageKnowledge, bool) {
9003	return nil, false
9004}
9005
9006// AsResponse is the BasicResponseBase implementation for ResponseBase.
9007func (rb ResponseBase) AsResponse() (*Response, bool) {
9008	return nil, false
9009}
9010
9011// AsBasicResponse is the BasicResponseBase implementation for ResponseBase.
9012func (rb ResponseBase) AsBasicResponse() (BasicResponse, bool) {
9013	return nil, false
9014}
9015
9016// AsIdentifiable is the BasicResponseBase implementation for ResponseBase.
9017func (rb ResponseBase) AsIdentifiable() (*Identifiable, bool) {
9018	return nil, false
9019}
9020
9021// AsBasicIdentifiable is the BasicResponseBase implementation for ResponseBase.
9022func (rb ResponseBase) AsBasicIdentifiable() (BasicIdentifiable, bool) {
9023	return nil, false
9024}
9025
9026// AsErrorResponse is the BasicResponseBase implementation for ResponseBase.
9027func (rb ResponseBase) AsErrorResponse() (*ErrorResponse, bool) {
9028	return nil, false
9029}
9030
9031// AsThing is the BasicResponseBase implementation for ResponseBase.
9032func (rb ResponseBase) AsThing() (*Thing, bool) {
9033	return nil, false
9034}
9035
9036// AsBasicThing is the BasicResponseBase implementation for ResponseBase.
9037func (rb ResponseBase) AsBasicThing() (BasicThing, bool) {
9038	return nil, false
9039}
9040
9041// AsAction is the BasicResponseBase implementation for ResponseBase.
9042func (rb ResponseBase) AsAction() (*Action, bool) {
9043	return nil, false
9044}
9045
9046// AsBasicAction is the BasicResponseBase implementation for ResponseBase.
9047func (rb ResponseBase) AsBasicAction() (BasicAction, bool) {
9048	return nil, false
9049}
9050
9051// AsMediaObject is the BasicResponseBase implementation for ResponseBase.
9052func (rb ResponseBase) AsMediaObject() (*MediaObject, bool) {
9053	return nil, false
9054}
9055
9056// AsBasicMediaObject is the BasicResponseBase implementation for ResponseBase.
9057func (rb ResponseBase) AsBasicMediaObject() (BasicMediaObject, bool) {
9058	return nil, false
9059}
9060
9061// AsCreativeWork is the BasicResponseBase implementation for ResponseBase.
9062func (rb ResponseBase) AsCreativeWork() (*CreativeWork, bool) {
9063	return nil, false
9064}
9065
9066// AsBasicCreativeWork is the BasicResponseBase implementation for ResponseBase.
9067func (rb ResponseBase) AsBasicCreativeWork() (BasicCreativeWork, bool) {
9068	return nil, false
9069}
9070
9071// AsPerson is the BasicResponseBase implementation for ResponseBase.
9072func (rb ResponseBase) AsPerson() (*Person, bool) {
9073	return nil, false
9074}
9075
9076// AsIntangible is the BasicResponseBase implementation for ResponseBase.
9077func (rb ResponseBase) AsIntangible() (*Intangible, bool) {
9078	return nil, false
9079}
9080
9081// AsBasicIntangible is the BasicResponseBase implementation for ResponseBase.
9082func (rb ResponseBase) AsBasicIntangible() (BasicIntangible, bool) {
9083	return nil, false
9084}
9085
9086// AsImageEntityAction is the BasicResponseBase implementation for ResponseBase.
9087func (rb ResponseBase) AsImageEntityAction() (*ImageEntityAction, bool) {
9088	return nil, false
9089}
9090
9091// AsImageModuleAction is the BasicResponseBase implementation for ResponseBase.
9092func (rb ResponseBase) AsImageModuleAction() (*ImageModuleAction, bool) {
9093	return nil, false
9094}
9095
9096// AsRecipe is the BasicResponseBase implementation for ResponseBase.
9097func (rb ResponseBase) AsRecipe() (*Recipe, bool) {
9098	return nil, false
9099}
9100
9101// AsImageRecipesAction is the BasicResponseBase implementation for ResponseBase.
9102func (rb ResponseBase) AsImageRecipesAction() (*ImageRecipesAction, bool) {
9103	return nil, false
9104}
9105
9106// AsImageRelatedSearchesAction is the BasicResponseBase implementation for ResponseBase.
9107func (rb ResponseBase) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
9108	return nil, false
9109}
9110
9111// AsImageShoppingSourcesAction is the BasicResponseBase implementation for ResponseBase.
9112func (rb ResponseBase) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
9113	return nil, false
9114}
9115
9116// AsStructuredValue is the BasicResponseBase implementation for ResponseBase.
9117func (rb ResponseBase) AsStructuredValue() (*StructuredValue, bool) {
9118	return nil, false
9119}
9120
9121// AsBasicStructuredValue is the BasicResponseBase implementation for ResponseBase.
9122func (rb ResponseBase) AsBasicStructuredValue() (BasicStructuredValue, bool) {
9123	return nil, false
9124}
9125
9126// AsResponseBase is the BasicResponseBase implementation for ResponseBase.
9127func (rb ResponseBase) AsResponseBase() (*ResponseBase, bool) {
9128	return &rb, true
9129}
9130
9131// AsBasicResponseBase is the BasicResponseBase implementation for ResponseBase.
9132func (rb ResponseBase) AsBasicResponseBase() (BasicResponseBase, bool) {
9133	return &rb, true
9134}
9135
9136// BasicStructuredValue ...
9137type BasicStructuredValue interface {
9138	AsPoint2D() (*Point2D, bool)
9139	AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool)
9140	AsStructuredValue() (*StructuredValue, bool)
9141}
9142
9143// StructuredValue ...
9144type StructuredValue struct {
9145	// Name - READ-ONLY; The name of the thing represented by this object.
9146	Name *string `json:"name,omitempty"`
9147	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
9148	URL *string `json:"url,omitempty"`
9149	// Image - READ-ONLY; An image of the item.
9150	Image *ImageObject `json:"image,omitempty"`
9151	// Description - READ-ONLY; A short description of the item.
9152	Description *string `json:"description,omitempty"`
9153	// AlternateName - READ-ONLY; An alias for the item.
9154	AlternateName *string `json:"alternateName,omitempty"`
9155	// BingID - READ-ONLY; An ID that uniquely identifies this item.
9156	BingID *string `json:"bingId,omitempty"`
9157	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
9158	ReadLink *string `json:"readLink,omitempty"`
9159	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
9160	WebSearchURL *string `json:"webSearchUrl,omitempty"`
9161	// ID - READ-ONLY; A String identifier.
9162	ID *string `json:"id,omitempty"`
9163	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
9164	Type Type `json:"_type,omitempty"`
9165}
9166
9167func unmarshalBasicStructuredValue(body []byte) (BasicStructuredValue, error) {
9168	var m map[string]interface{}
9169	err := json.Unmarshal(body, &m)
9170	if err != nil {
9171		return nil, err
9172	}
9173
9174	switch m["_type"] {
9175	case string(TypePoint2D):
9176		var p2 Point2D
9177		err := json.Unmarshal(body, &p2)
9178		return p2, err
9179	case string(TypeNormalizedQuadrilateral):
9180		var nq NormalizedQuadrilateral
9181		err := json.Unmarshal(body, &nq)
9182		return nq, err
9183	default:
9184		var sv StructuredValue
9185		err := json.Unmarshal(body, &sv)
9186		return sv, err
9187	}
9188}
9189func unmarshalBasicStructuredValueArray(body []byte) ([]BasicStructuredValue, error) {
9190	var rawMessages []*json.RawMessage
9191	err := json.Unmarshal(body, &rawMessages)
9192	if err != nil {
9193		return nil, err
9194	}
9195
9196	svArray := make([]BasicStructuredValue, len(rawMessages))
9197
9198	for index, rawMessage := range rawMessages {
9199		sv, err := unmarshalBasicStructuredValue(*rawMessage)
9200		if err != nil {
9201			return nil, err
9202		}
9203		svArray[index] = sv
9204	}
9205	return svArray, nil
9206}
9207
9208// MarshalJSON is the custom marshaler for StructuredValue.
9209func (sv StructuredValue) MarshalJSON() ([]byte, error) {
9210	sv.Type = TypeStructuredValue
9211	objectMap := make(map[string]interface{})
9212	if sv.Type != "" {
9213		objectMap["_type"] = sv.Type
9214	}
9215	return json.Marshal(objectMap)
9216}
9217
9218// AsPoint2D is the BasicResponseBase implementation for StructuredValue.
9219func (sv StructuredValue) AsPoint2D() (*Point2D, bool) {
9220	return nil, false
9221}
9222
9223// AsNormalizedQuadrilateral is the BasicResponseBase implementation for StructuredValue.
9224func (sv StructuredValue) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
9225	return nil, false
9226}
9227
9228// AsImageAction is the BasicResponseBase implementation for StructuredValue.
9229func (sv StructuredValue) AsImageAction() (*ImageAction, bool) {
9230	return nil, false
9231}
9232
9233// AsBasicImageAction is the BasicResponseBase implementation for StructuredValue.
9234func (sv StructuredValue) AsBasicImageAction() (BasicImageAction, bool) {
9235	return nil, false
9236}
9237
9238// AsImageTag is the BasicResponseBase implementation for StructuredValue.
9239func (sv StructuredValue) AsImageTag() (*ImageTag, bool) {
9240	return nil, false
9241}
9242
9243// AsOrganization is the BasicResponseBase implementation for StructuredValue.
9244func (sv StructuredValue) AsOrganization() (*Organization, bool) {
9245	return nil, false
9246}
9247
9248// AsOffer is the BasicResponseBase implementation for StructuredValue.
9249func (sv StructuredValue) AsOffer() (*Offer, bool) {
9250	return nil, false
9251}
9252
9253// AsBasicOffer is the BasicResponseBase implementation for StructuredValue.
9254func (sv StructuredValue) AsBasicOffer() (BasicOffer, bool) {
9255	return nil, false
9256}
9257
9258// AsAggregateOffer is the BasicResponseBase implementation for StructuredValue.
9259func (sv StructuredValue) AsAggregateOffer() (*AggregateOffer, bool) {
9260	return nil, false
9261}
9262
9263// AsImageObject is the BasicResponseBase implementation for StructuredValue.
9264func (sv StructuredValue) AsImageObject() (*ImageObject, bool) {
9265	return nil, false
9266}
9267
9268// AsImageKnowledge is the BasicResponseBase implementation for StructuredValue.
9269func (sv StructuredValue) AsImageKnowledge() (*ImageKnowledge, bool) {
9270	return nil, false
9271}
9272
9273// AsResponse is the BasicResponseBase implementation for StructuredValue.
9274func (sv StructuredValue) AsResponse() (*Response, bool) {
9275	return nil, false
9276}
9277
9278// AsBasicResponse is the BasicResponseBase implementation for StructuredValue.
9279func (sv StructuredValue) AsBasicResponse() (BasicResponse, bool) {
9280	return &sv, true
9281}
9282
9283// AsIdentifiable is the BasicResponseBase implementation for StructuredValue.
9284func (sv StructuredValue) AsIdentifiable() (*Identifiable, bool) {
9285	return nil, false
9286}
9287
9288// AsBasicIdentifiable is the BasicResponseBase implementation for StructuredValue.
9289func (sv StructuredValue) AsBasicIdentifiable() (BasicIdentifiable, bool) {
9290	return &sv, true
9291}
9292
9293// AsErrorResponse is the BasicResponseBase implementation for StructuredValue.
9294func (sv StructuredValue) AsErrorResponse() (*ErrorResponse, bool) {
9295	return nil, false
9296}
9297
9298// AsThing is the BasicResponseBase implementation for StructuredValue.
9299func (sv StructuredValue) AsThing() (*Thing, bool) {
9300	return nil, false
9301}
9302
9303// AsBasicThing is the BasicResponseBase implementation for StructuredValue.
9304func (sv StructuredValue) AsBasicThing() (BasicThing, bool) {
9305	return &sv, true
9306}
9307
9308// AsAction is the BasicResponseBase implementation for StructuredValue.
9309func (sv StructuredValue) AsAction() (*Action, bool) {
9310	return nil, false
9311}
9312
9313// AsBasicAction is the BasicResponseBase implementation for StructuredValue.
9314func (sv StructuredValue) AsBasicAction() (BasicAction, bool) {
9315	return nil, false
9316}
9317
9318// AsMediaObject is the BasicResponseBase implementation for StructuredValue.
9319func (sv StructuredValue) AsMediaObject() (*MediaObject, bool) {
9320	return nil, false
9321}
9322
9323// AsBasicMediaObject is the BasicResponseBase implementation for StructuredValue.
9324func (sv StructuredValue) AsBasicMediaObject() (BasicMediaObject, bool) {
9325	return nil, false
9326}
9327
9328// AsCreativeWork is the BasicResponseBase implementation for StructuredValue.
9329func (sv StructuredValue) AsCreativeWork() (*CreativeWork, bool) {
9330	return nil, false
9331}
9332
9333// AsBasicCreativeWork is the BasicResponseBase implementation for StructuredValue.
9334func (sv StructuredValue) AsBasicCreativeWork() (BasicCreativeWork, bool) {
9335	return nil, false
9336}
9337
9338// AsPerson is the BasicResponseBase implementation for StructuredValue.
9339func (sv StructuredValue) AsPerson() (*Person, bool) {
9340	return nil, false
9341}
9342
9343// AsIntangible is the BasicResponseBase implementation for StructuredValue.
9344func (sv StructuredValue) AsIntangible() (*Intangible, bool) {
9345	return nil, false
9346}
9347
9348// AsBasicIntangible is the BasicResponseBase implementation for StructuredValue.
9349func (sv StructuredValue) AsBasicIntangible() (BasicIntangible, bool) {
9350	return &sv, true
9351}
9352
9353// AsImageEntityAction is the BasicResponseBase implementation for StructuredValue.
9354func (sv StructuredValue) AsImageEntityAction() (*ImageEntityAction, bool) {
9355	return nil, false
9356}
9357
9358// AsImageModuleAction is the BasicResponseBase implementation for StructuredValue.
9359func (sv StructuredValue) AsImageModuleAction() (*ImageModuleAction, bool) {
9360	return nil, false
9361}
9362
9363// AsRecipe is the BasicResponseBase implementation for StructuredValue.
9364func (sv StructuredValue) AsRecipe() (*Recipe, bool) {
9365	return nil, false
9366}
9367
9368// AsImageRecipesAction is the BasicResponseBase implementation for StructuredValue.
9369func (sv StructuredValue) AsImageRecipesAction() (*ImageRecipesAction, bool) {
9370	return nil, false
9371}
9372
9373// AsImageRelatedSearchesAction is the BasicResponseBase implementation for StructuredValue.
9374func (sv StructuredValue) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
9375	return nil, false
9376}
9377
9378// AsImageShoppingSourcesAction is the BasicResponseBase implementation for StructuredValue.
9379func (sv StructuredValue) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
9380	return nil, false
9381}
9382
9383// AsStructuredValue is the BasicResponseBase implementation for StructuredValue.
9384func (sv StructuredValue) AsStructuredValue() (*StructuredValue, bool) {
9385	return &sv, true
9386}
9387
9388// AsBasicStructuredValue is the BasicResponseBase implementation for StructuredValue.
9389func (sv StructuredValue) AsBasicStructuredValue() (BasicStructuredValue, bool) {
9390	return &sv, true
9391}
9392
9393// AsResponseBase is the BasicResponseBase implementation for StructuredValue.
9394func (sv StructuredValue) AsResponseBase() (*ResponseBase, bool) {
9395	return nil, false
9396}
9397
9398// AsBasicResponseBase is the BasicResponseBase implementation for StructuredValue.
9399func (sv StructuredValue) AsBasicResponseBase() (BasicResponseBase, bool) {
9400	return &sv, true
9401}
9402
9403// BasicThing defines a thing.
9404type BasicThing interface {
9405	AsPoint2D() (*Point2D, bool)
9406	AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool)
9407	AsImageAction() (*ImageAction, bool)
9408	AsBasicImageAction() (BasicImageAction, bool)
9409	AsImageTag() (*ImageTag, bool)
9410	AsOrganization() (*Organization, bool)
9411	AsOffer() (*Offer, bool)
9412	AsBasicOffer() (BasicOffer, bool)
9413	AsAggregateOffer() (*AggregateOffer, bool)
9414	AsImageObject() (*ImageObject, bool)
9415	AsAction() (*Action, bool)
9416	AsBasicAction() (BasicAction, bool)
9417	AsMediaObject() (*MediaObject, bool)
9418	AsBasicMediaObject() (BasicMediaObject, bool)
9419	AsCreativeWork() (*CreativeWork, bool)
9420	AsBasicCreativeWork() (BasicCreativeWork, bool)
9421	AsPerson() (*Person, bool)
9422	AsIntangible() (*Intangible, bool)
9423	AsBasicIntangible() (BasicIntangible, bool)
9424	AsImageEntityAction() (*ImageEntityAction, bool)
9425	AsImageModuleAction() (*ImageModuleAction, bool)
9426	AsRecipe() (*Recipe, bool)
9427	AsImageRecipesAction() (*ImageRecipesAction, bool)
9428	AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool)
9429	AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool)
9430	AsStructuredValue() (*StructuredValue, bool)
9431	AsBasicStructuredValue() (BasicStructuredValue, bool)
9432	AsThing() (*Thing, bool)
9433}
9434
9435// Thing defines a thing.
9436type Thing struct {
9437	// Name - READ-ONLY; The name of the thing represented by this object.
9438	Name *string `json:"name,omitempty"`
9439	// URL - READ-ONLY; The URL to get more information about the thing represented by this object.
9440	URL *string `json:"url,omitempty"`
9441	// Image - READ-ONLY; An image of the item.
9442	Image *ImageObject `json:"image,omitempty"`
9443	// Description - READ-ONLY; A short description of the item.
9444	Description *string `json:"description,omitempty"`
9445	// AlternateName - READ-ONLY; An alias for the item.
9446	AlternateName *string `json:"alternateName,omitempty"`
9447	// BingID - READ-ONLY; An ID that uniquely identifies this item.
9448	BingID *string `json:"bingId,omitempty"`
9449	// ReadLink - READ-ONLY; The URL that returns this resource. To use the URL, append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header.
9450	ReadLink *string `json:"readLink,omitempty"`
9451	// WebSearchURL - READ-ONLY; The URL to Bing's search result for this item.
9452	WebSearchURL *string `json:"webSearchUrl,omitempty"`
9453	// ID - READ-ONLY; A String identifier.
9454	ID *string `json:"id,omitempty"`
9455	// Type - Possible values include: 'TypeResponseBase', 'TypePoint2D', 'TypeNormalizedQuadrilateral', 'TypeImageAction', 'TypeImageTag', 'TypeOrganization', 'TypeOffer', 'TypeAggregateOffer', 'TypeImageObject', 'TypeImageKnowledge', 'TypeResponse', 'TypeIdentifiable', 'TypeErrorResponse', 'TypeThing', 'TypeAction', 'TypeMediaObject', 'TypeCreativeWork', 'TypePerson', 'TypeIntangible', 'TypeImageEntityAction', 'TypeImageModuleAction', 'TypeRecipe', 'TypeImageRecipesAction', 'TypeImageRelatedSearchesAction', 'TypeImageShoppingSourcesAction', 'TypeStructuredValue'
9456	Type Type `json:"_type,omitempty"`
9457}
9458
9459func unmarshalBasicThing(body []byte) (BasicThing, error) {
9460	var m map[string]interface{}
9461	err := json.Unmarshal(body, &m)
9462	if err != nil {
9463		return nil, err
9464	}
9465
9466	switch m["_type"] {
9467	case string(TypePoint2D):
9468		var p2 Point2D
9469		err := json.Unmarshal(body, &p2)
9470		return p2, err
9471	case string(TypeNormalizedQuadrilateral):
9472		var nq NormalizedQuadrilateral
9473		err := json.Unmarshal(body, &nq)
9474		return nq, err
9475	case string(TypeImageAction):
9476		var ia ImageAction
9477		err := json.Unmarshal(body, &ia)
9478		return ia, err
9479	case string(TypeImageTag):
9480		var it ImageTag
9481		err := json.Unmarshal(body, &it)
9482		return it, err
9483	case string(TypeOrganization):
9484		var o Organization
9485		err := json.Unmarshal(body, &o)
9486		return o, err
9487	case string(TypeOffer):
9488		var o Offer
9489		err := json.Unmarshal(body, &o)
9490		return o, err
9491	case string(TypeAggregateOffer):
9492		var ao AggregateOffer
9493		err := json.Unmarshal(body, &ao)
9494		return ao, err
9495	case string(TypeImageObject):
9496		var ioVar ImageObject
9497		err := json.Unmarshal(body, &ioVar)
9498		return ioVar, err
9499	case string(TypeAction):
9500		var a Action
9501		err := json.Unmarshal(body, &a)
9502		return a, err
9503	case string(TypeMediaObject):
9504		var mo MediaObject
9505		err := json.Unmarshal(body, &mo)
9506		return mo, err
9507	case string(TypeCreativeWork):
9508		var cw CreativeWork
9509		err := json.Unmarshal(body, &cw)
9510		return cw, err
9511	case string(TypePerson):
9512		var p Person
9513		err := json.Unmarshal(body, &p)
9514		return p, err
9515	case string(TypeIntangible):
9516		var i Intangible
9517		err := json.Unmarshal(body, &i)
9518		return i, err
9519	case string(TypeImageEntityAction):
9520		var iea ImageEntityAction
9521		err := json.Unmarshal(body, &iea)
9522		return iea, err
9523	case string(TypeImageModuleAction):
9524		var ima ImageModuleAction
9525		err := json.Unmarshal(body, &ima)
9526		return ima, err
9527	case string(TypeRecipe):
9528		var r Recipe
9529		err := json.Unmarshal(body, &r)
9530		return r, err
9531	case string(TypeImageRecipesAction):
9532		var ira ImageRecipesAction
9533		err := json.Unmarshal(body, &ira)
9534		return ira, err
9535	case string(TypeImageRelatedSearchesAction):
9536		var irsa ImageRelatedSearchesAction
9537		err := json.Unmarshal(body, &irsa)
9538		return irsa, err
9539	case string(TypeImageShoppingSourcesAction):
9540		var issa ImageShoppingSourcesAction
9541		err := json.Unmarshal(body, &issa)
9542		return issa, err
9543	case string(TypeStructuredValue):
9544		var sv StructuredValue
9545		err := json.Unmarshal(body, &sv)
9546		return sv, err
9547	default:
9548		var t Thing
9549		err := json.Unmarshal(body, &t)
9550		return t, err
9551	}
9552}
9553func unmarshalBasicThingArray(body []byte) ([]BasicThing, error) {
9554	var rawMessages []*json.RawMessage
9555	err := json.Unmarshal(body, &rawMessages)
9556	if err != nil {
9557		return nil, err
9558	}
9559
9560	tArray := make([]BasicThing, len(rawMessages))
9561
9562	for index, rawMessage := range rawMessages {
9563		t, err := unmarshalBasicThing(*rawMessage)
9564		if err != nil {
9565			return nil, err
9566		}
9567		tArray[index] = t
9568	}
9569	return tArray, nil
9570}
9571
9572// MarshalJSON is the custom marshaler for Thing.
9573func (t Thing) MarshalJSON() ([]byte, error) {
9574	t.Type = TypeThing
9575	objectMap := make(map[string]interface{})
9576	if t.Type != "" {
9577		objectMap["_type"] = t.Type
9578	}
9579	return json.Marshal(objectMap)
9580}
9581
9582// AsPoint2D is the BasicResponseBase implementation for Thing.
9583func (t Thing) AsPoint2D() (*Point2D, bool) {
9584	return nil, false
9585}
9586
9587// AsNormalizedQuadrilateral is the BasicResponseBase implementation for Thing.
9588func (t Thing) AsNormalizedQuadrilateral() (*NormalizedQuadrilateral, bool) {
9589	return nil, false
9590}
9591
9592// AsImageAction is the BasicResponseBase implementation for Thing.
9593func (t Thing) AsImageAction() (*ImageAction, bool) {
9594	return nil, false
9595}
9596
9597// AsBasicImageAction is the BasicResponseBase implementation for Thing.
9598func (t Thing) AsBasicImageAction() (BasicImageAction, bool) {
9599	return nil, false
9600}
9601
9602// AsImageTag is the BasicResponseBase implementation for Thing.
9603func (t Thing) AsImageTag() (*ImageTag, bool) {
9604	return nil, false
9605}
9606
9607// AsOrganization is the BasicResponseBase implementation for Thing.
9608func (t Thing) AsOrganization() (*Organization, bool) {
9609	return nil, false
9610}
9611
9612// AsOffer is the BasicResponseBase implementation for Thing.
9613func (t Thing) AsOffer() (*Offer, bool) {
9614	return nil, false
9615}
9616
9617// AsBasicOffer is the BasicResponseBase implementation for Thing.
9618func (t Thing) AsBasicOffer() (BasicOffer, bool) {
9619	return nil, false
9620}
9621
9622// AsAggregateOffer is the BasicResponseBase implementation for Thing.
9623func (t Thing) AsAggregateOffer() (*AggregateOffer, bool) {
9624	return nil, false
9625}
9626
9627// AsImageObject is the BasicResponseBase implementation for Thing.
9628func (t Thing) AsImageObject() (*ImageObject, bool) {
9629	return nil, false
9630}
9631
9632// AsImageKnowledge is the BasicResponseBase implementation for Thing.
9633func (t Thing) AsImageKnowledge() (*ImageKnowledge, bool) {
9634	return nil, false
9635}
9636
9637// AsResponse is the BasicResponseBase implementation for Thing.
9638func (t Thing) AsResponse() (*Response, bool) {
9639	return nil, false
9640}
9641
9642// AsBasicResponse is the BasicResponseBase implementation for Thing.
9643func (t Thing) AsBasicResponse() (BasicResponse, bool) {
9644	return &t, true
9645}
9646
9647// AsIdentifiable is the BasicResponseBase implementation for Thing.
9648func (t Thing) AsIdentifiable() (*Identifiable, bool) {
9649	return nil, false
9650}
9651
9652// AsBasicIdentifiable is the BasicResponseBase implementation for Thing.
9653func (t Thing) AsBasicIdentifiable() (BasicIdentifiable, bool) {
9654	return &t, true
9655}
9656
9657// AsErrorResponse is the BasicResponseBase implementation for Thing.
9658func (t Thing) AsErrorResponse() (*ErrorResponse, bool) {
9659	return nil, false
9660}
9661
9662// AsThing is the BasicResponseBase implementation for Thing.
9663func (t Thing) AsThing() (*Thing, bool) {
9664	return &t, true
9665}
9666
9667// AsBasicThing is the BasicResponseBase implementation for Thing.
9668func (t Thing) AsBasicThing() (BasicThing, bool) {
9669	return &t, true
9670}
9671
9672// AsAction is the BasicResponseBase implementation for Thing.
9673func (t Thing) AsAction() (*Action, bool) {
9674	return nil, false
9675}
9676
9677// AsBasicAction is the BasicResponseBase implementation for Thing.
9678func (t Thing) AsBasicAction() (BasicAction, bool) {
9679	return nil, false
9680}
9681
9682// AsMediaObject is the BasicResponseBase implementation for Thing.
9683func (t Thing) AsMediaObject() (*MediaObject, bool) {
9684	return nil, false
9685}
9686
9687// AsBasicMediaObject is the BasicResponseBase implementation for Thing.
9688func (t Thing) AsBasicMediaObject() (BasicMediaObject, bool) {
9689	return nil, false
9690}
9691
9692// AsCreativeWork is the BasicResponseBase implementation for Thing.
9693func (t Thing) AsCreativeWork() (*CreativeWork, bool) {
9694	return nil, false
9695}
9696
9697// AsBasicCreativeWork is the BasicResponseBase implementation for Thing.
9698func (t Thing) AsBasicCreativeWork() (BasicCreativeWork, bool) {
9699	return nil, false
9700}
9701
9702// AsPerson is the BasicResponseBase implementation for Thing.
9703func (t Thing) AsPerson() (*Person, bool) {
9704	return nil, false
9705}
9706
9707// AsIntangible is the BasicResponseBase implementation for Thing.
9708func (t Thing) AsIntangible() (*Intangible, bool) {
9709	return nil, false
9710}
9711
9712// AsBasicIntangible is the BasicResponseBase implementation for Thing.
9713func (t Thing) AsBasicIntangible() (BasicIntangible, bool) {
9714	return nil, false
9715}
9716
9717// AsImageEntityAction is the BasicResponseBase implementation for Thing.
9718func (t Thing) AsImageEntityAction() (*ImageEntityAction, bool) {
9719	return nil, false
9720}
9721
9722// AsImageModuleAction is the BasicResponseBase implementation for Thing.
9723func (t Thing) AsImageModuleAction() (*ImageModuleAction, bool) {
9724	return nil, false
9725}
9726
9727// AsRecipe is the BasicResponseBase implementation for Thing.
9728func (t Thing) AsRecipe() (*Recipe, bool) {
9729	return nil, false
9730}
9731
9732// AsImageRecipesAction is the BasicResponseBase implementation for Thing.
9733func (t Thing) AsImageRecipesAction() (*ImageRecipesAction, bool) {
9734	return nil, false
9735}
9736
9737// AsImageRelatedSearchesAction is the BasicResponseBase implementation for Thing.
9738func (t Thing) AsImageRelatedSearchesAction() (*ImageRelatedSearchesAction, bool) {
9739	return nil, false
9740}
9741
9742// AsImageShoppingSourcesAction is the BasicResponseBase implementation for Thing.
9743func (t Thing) AsImageShoppingSourcesAction() (*ImageShoppingSourcesAction, bool) {
9744	return nil, false
9745}
9746
9747// AsStructuredValue is the BasicResponseBase implementation for Thing.
9748func (t Thing) AsStructuredValue() (*StructuredValue, bool) {
9749	return nil, false
9750}
9751
9752// AsBasicStructuredValue is the BasicResponseBase implementation for Thing.
9753func (t Thing) AsBasicStructuredValue() (BasicStructuredValue, bool) {
9754	return nil, false
9755}
9756
9757// AsResponseBase is the BasicResponseBase implementation for Thing.
9758func (t Thing) AsResponseBase() (*ResponseBase, bool) {
9759	return nil, false
9760}
9761
9762// AsBasicResponseBase is the BasicResponseBase implementation for Thing.
9763func (t Thing) AsBasicResponseBase() (BasicResponseBase, bool) {
9764	return &t, true
9765}
9766