diff --git a/packages/@azure/cognitiveservices-imagesearch/.npmignore b/packages/@azure/cognitiveservices-imagesearch/.npmignore
new file mode 100644
index 000000000000..a07a455ac10c
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/.npmignore
@@ -0,0 +1,35 @@
+#git
+.git
+.gitignore
+#gulp
+gulpfile.js
+#documentation
+doc/
+docs/
+#dependencies
+node_modules/
+#samples
+sample/
+samples/
+#tests
+test/
+tests/
+coverage/
+#tools and scripts
+tools/
+scripts/
+#IDE settings
+*.sln
+.vscode/
+.idea
+.editorconfig
+.ntvs_analysis.*
+#build tools
+.travis.yml
+.jenkins.yml
+.codeclimate.yml
+appveyor.yml
+# Nuget packages #
+.nuget/
+packages/
+packages.config
diff --git a/packages/@azure/cognitiveservices-imagesearch/LICENSE.txt b/packages/@azure/cognitiveservices-imagesearch/LICENSE.txt
new file mode 100644
index 000000000000..5431ba98b936
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/@azure/cognitiveservices-imagesearch/README.md b/packages/@azure/cognitiveservices-imagesearch/README.md
new file mode 100644
index 000000000000..4807b197b330
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/README.md
@@ -0,0 +1,122 @@
+# An isomorphic javascript sdk for - ImageSearchAPIClient
+This project provides an isomorphic javascript package. Right now it supports:
+- node.js version 6.x.x or higher
+- browser javascript
+
+## How to Install
+
+- nodejs
+```
+npm install @azure/cognitiveservices-imagesearch
+```
+- browser
+```html
+
+```
+
+## How to use
+
+### nodejs - Authentication, client creation and search images as an example written in TypeScript.
+
+```ts
+import * as msRest from "ms-rest-js";
+import { ImageSearchAPIClient, ImageSearchAPIModels, ImageSearchAPIMappers } from "@azure/cognitiveservices-imagesearch";
+const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
+
+const token = "";
+const creds = new msRest.TokenCredentials(token);
+const client = new ImageSearchAPIClient(creds, subscriptionId);
+const query = "testquery";
+const acceptLanguage = "testacceptLanguage";
+const userAgent = "testuserAgent";
+const clientId = "testclientId";
+const clientIp = "testclientIp";
+const location = "westus";
+const aspect = "All";
+const color = "ColorOnly";
+const countryCode = "testcountryCode";
+const count = 1;
+const freshness = "Day";
+const height = 1;
+const id = "testid";
+const imageContent = "Face";
+const imageType = "AnimatedGif";
+const license = "All";
+const market = "testmarket";
+const maxFileSize = 1;
+const maxHeight = 1;
+const maxWidth = 1;
+const minFileSize = 1;
+const minHeight = 1;
+const minWidth = 1;
+const offset = 1;
+const safeSearch = "Off";
+const size = "All";
+const setLang = "testsetLang";
+const width = 1;
+client.images.search(query, acceptLanguage, userAgent, clientId, clientIp, location, aspect, color, countryCode, count, freshness, height, id, imageContent, imageType, license, market, maxFileSize, maxHeight, maxWidth, minFileSize, minHeight, minWidth, offset, safeSearch, size, setLang, width).then((result) => {
+ console.log("The result is:");
+ console.log(result);
+}).catch((err) => {
+ console.error(err);
+});
+```
+
+### browser - Authentication, client creation and search images as an example written in javascript.
+
+- index.html
+```html
+
+
+
+ @azure/cognitiveservices-imagesearch sample
+
+
+
+
+
+
+
+```
+
+# Related projects
+ - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
diff --git a/packages/@azure/cognitiveservices-imagesearch/lib/imageSearchAPIClient.ts b/packages/@azure/cognitiveservices-imagesearch/lib/imageSearchAPIClient.ts
new file mode 100644
index 000000000000..aaba35262545
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/lib/imageSearchAPIClient.ts
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as Models from "./models";
+import * as Mappers from "./models/mappers";
+import * as operations from "./operations";
+import { ImageSearchAPIClientContext } from "./imageSearchAPIClientContext";
+
+class ImageSearchAPIClient extends ImageSearchAPIClientContext {
+ // Operation groups
+ images: operations.ImagesOperations;
+
+ /**
+ * Initializes a new instance of the ImageSearchAPIClient class.
+ * @param credentials Subscription credentials which uniquely identify client subscription.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, options?: Models.ImageSearchAPIClientOptions) {
+ super(credentials, options);
+ this.images = new operations.ImagesOperations(this);
+ }
+}
+
+// Operation Specifications
+
+export {
+ ImageSearchAPIClient,
+ ImageSearchAPIClientContext,
+ Models as ImageSearchAPIModels,
+ Mappers as ImageSearchAPIMappers
+};
+export * from "./operations";
diff --git a/packages/@azure/cognitiveservices-imagesearch/lib/imageSearchAPIClientContext.ts b/packages/@azure/cognitiveservices-imagesearch/lib/imageSearchAPIClientContext.ts
new file mode 100644
index 000000000000..fed0776d299c
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/lib/imageSearchAPIClientContext.ts
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "./models";
+
+const packageName = "@azure/cognitiveservices-imagesearch";
+const packageVersion = "1.0.0";
+
+export class ImageSearchAPIClientContext extends msRest.ServiceClient {
+ credentials: msRest.ServiceClientCredentials;
+
+ /**
+ * Initializes a new instance of the ImageSearchAPIClientContext class.
+ * @param credentials Subscription credentials which uniquely identify client subscription.
+ * @param [options] The parameter options
+ */
+ constructor(credentials: msRest.ServiceClientCredentials, options?: Models.ImageSearchAPIClientOptions) {
+ if (credentials === null || credentials === undefined) {
+ throw new Error('\'credentials\' cannot be null.');
+ }
+
+ if (!options) {
+ options = {};
+ }
+
+ super(credentials, options);
+
+ this.baseUri = options.baseUri || this.baseUri || "https://api.cognitive.microsoft.com";
+ this.requestContentType = "application/json; charset=utf-8";
+ this.credentials = credentials;
+
+ this.addUserAgentInfo(`${packageName}/${packageVersion}`);
+ }
+}
diff --git a/packages/@azure/cognitiveservices-imagesearch/lib/models/imagesOperationsMappers.ts b/packages/@azure/cognitiveservices-imagesearch/lib/models/imagesOperationsMappers.ts
new file mode 100644
index 000000000000..a613f10b8bec
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/lib/models/imagesOperationsMappers.ts
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export {
+ discriminators,
+ Images,
+ SearchResultsAnswer,
+ Answer,
+ Response,
+ Identifiable,
+ ResponseBase,
+ ImageObject,
+ MediaObject,
+ CreativeWork,
+ Thing,
+ ImagesImageMetadata,
+ AggregateOffer,
+ Offer,
+ Organization,
+ AggregateRating,
+ Rating,
+ PropertiesItem,
+ Query,
+ PivotSuggestions,
+ ErrorResponse,
+ ErrorModel,
+ ImageInsights,
+ ImageInsightsImageCaption,
+ RelatedCollectionsModule,
+ ImageGallery,
+ CollectionPage,
+ WebPage,
+ ImagesModule,
+ RelatedSearchesModule,
+ RecipesModule,
+ Recipe,
+ RecognizedEntitiesModule,
+ RecognizedEntityGroup,
+ RecognizedEntityRegion,
+ NormalizedRectangle,
+ StructuredValue,
+ Intangible,
+ RecognizedEntity,
+ ImageTagsModule,
+ InsightsTag,
+ TrendingImages,
+ TrendingImagesCategory,
+ TrendingImagesTile,
+ Person
+} from "../models/mappers";
+
diff --git a/packages/@azure/cognitiveservices-imagesearch/lib/models/index.ts b/packages/@azure/cognitiveservices-imagesearch/lib/models/index.ts
new file mode 100644
index 000000000000..b05994623c5e
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/lib/models/index.ts
@@ -0,0 +1,4080 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import { ServiceClientOptions } from "ms-rest-js";
+import * as msRest from "ms-rest-js";
+
+
+/**
+ * Contains the possible cases for ResponseBase.
+ */
+export type ResponseBaseUnion = ResponseBase | IdentifiableUnion;
+
+/**
+ * @interface
+ * An interface representing ResponseBase.
+ * Response base
+ *
+ */
+export interface ResponseBase {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "ResponseBase";
+}
+
+/**
+ * Contains the possible cases for Identifiable.
+ */
+export type IdentifiableUnion = Identifiable | ResponseUnion;
+
+/**
+ * @interface
+ * An interface representing Identifiable.
+ * Defines the identity of a resource.
+ *
+ */
+export interface Identifiable {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Identifiable";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+}
+
+/**
+ * Contains the possible cases for Response.
+ */
+export type ResponseUnion = Response | AnswerUnion | ThingUnion | ErrorResponse | RecognizedEntity | RecognizedEntityRegion | ImageInsights | TrendingImages;
+
+/**
+ * @interface
+ * An interface representing Response.
+ * Defines a response. All schemas that could be returned at the root of a
+ * response should inherit from this
+ *
+ */
+export interface Response {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Response";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+}
+
+/**
+ * Contains the possible cases for Thing.
+ */
+export type ThingUnion = Thing | Organization | OfferUnion | CreativeWorkUnion | Person | IntangibleUnion;
+
+/**
+ * @interface
+ * An interface representing Thing.
+ * Defines a thing.
+ *
+ */
+export interface Thing {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Thing";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Organization.
+ * Defines an organization.
+ *
+ */
+export interface Organization {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Organization";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+}
+
+/**
+ * Contains the possible cases for PropertiesItem.
+ */
+export type PropertiesItemUnion = PropertiesItem | RatingUnion;
+
+/**
+ * @interface
+ * An interface representing PropertiesItem.
+ * Defines an item.
+ *
+ */
+export interface PropertiesItem {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Properties/Item";
+ /**
+ * @member {string} [text] Text representation of an item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+}
+
+/**
+ * Contains the possible cases for Rating.
+ */
+export type RatingUnion = Rating | AggregateRating;
+
+/**
+ * @interface
+ * An interface representing Rating.
+ * Defines a rating.
+ *
+ */
+export interface Rating {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Rating";
+ /**
+ * @member {string} [text] Text representation of an item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+ /**
+ * @member {number} ratingValue The mean (average) rating. The possible
+ * values are 1.0 through 5.0.
+ */
+ ratingValue: number;
+ /**
+ * @member {number} [bestRating] The highest rated review. The possible
+ * values are 1.0 through 5.0.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bestRating?: number;
+}
+
+/**
+ * @interface
+ * An interface representing AggregateRating.
+ * Defines the metrics that indicate how well an item was rated by others.
+ *
+ */
+export interface AggregateRating {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "AggregateRating";
+ /**
+ * @member {string} [text] Text representation of an item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+ /**
+ * @member {number} ratingValue The mean (average) rating. The possible
+ * values are 1.0 through 5.0.
+ */
+ ratingValue: number;
+ /**
+ * @member {number} [bestRating] The highest rated review. The possible
+ * values are 1.0 through 5.0.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bestRating?: number;
+ /**
+ * @member {number} [reviewCount] The number of times the recipe has been
+ * rated or reviewed.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly reviewCount?: number;
+}
+
+/**
+ * Contains the possible cases for Offer.
+ */
+export type OfferUnion = Offer | AggregateOffer;
+
+/**
+ * @interface
+ * An interface representing Offer.
+ * Defines a merchant's offer.
+ *
+ */
+export interface Offer {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Offer";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {Organization} [seller] Seller for this offer
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly seller?: Organization;
+ /**
+ * @member {number} [price] The item's price.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly price?: number;
+ /**
+ * @member {Currency} [priceCurrency] 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'
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**. Default value: 'USD' .
+ */
+ readonly priceCurrency?: Currency;
+ /**
+ * @member {ItemAvailability} [availability] 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'
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly availability?: ItemAvailability;
+ /**
+ * @member {AggregateRating} [aggregateRating] An aggregated rating that
+ * indicates how well the product has been rated by others.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly aggregateRating?: AggregateRating;
+ /**
+ * @member {string} [lastUpdated] The last date that the offer was updated.
+ * The date is in the form YYYY-MM-DD.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly lastUpdated?: string;
+}
+
+/**
+ * @interface
+ * An interface representing AggregateOffer.
+ * Defines a list of offers from merchants that are related to the image.
+ *
+ */
+export interface AggregateOffer {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "AggregateOffer";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {Organization} [seller] Seller for this offer
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly seller?: Organization;
+ /**
+ * @member {number} [price] The item's price.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly price?: number;
+ /**
+ * @member {Currency} [priceCurrency] 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'
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**. Default value: 'USD' .
+ */
+ readonly priceCurrency?: Currency;
+ /**
+ * @member {ItemAvailability} [availability] 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'
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly availability?: ItemAvailability;
+ /**
+ * @member {AggregateRating} [aggregateRating] An aggregated rating that
+ * indicates how well the product has been rated by others.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly aggregateRating?: AggregateRating;
+ /**
+ * @member {string} [lastUpdated] The last date that the offer was updated.
+ * The date is in the form YYYY-MM-DD.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly lastUpdated?: string;
+ /**
+ * @member {OfferUnion[]} [offers] A list of offers from merchants that have
+ * offerings related to the image.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly offers?: OfferUnion[];
+}
+
+/**
+ * @interface
+ * An interface representing ImagesImageMetadata.
+ * Defines a count of the number of websites where you can shop or perform
+ * other actions related to the image.
+ *
+ */
+export interface ImagesImageMetadata {
+ /**
+ * @member {number} [shoppingSourcesCount] The number of websites that offer
+ * goods of the products seen in the image.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly shoppingSourcesCount?: number;
+ /**
+ * @member {number} [recipeSourcesCount] The number of websites that offer
+ * recipes of the food seen in the image.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly recipeSourcesCount?: number;
+ /**
+ * @member {AggregateOffer} [aggregateOffer] 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.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly aggregateOffer?: AggregateOffer;
+}
+
+/**
+ * Contains the possible cases for CreativeWork.
+ */
+export type CreativeWorkUnion = CreativeWork | MediaObjectUnion | Recipe | WebPageUnion;
+
+/**
+ * @interface
+ * An interface representing CreativeWork.
+ * The most generic kind of creative work, including books, movies,
+ * photographs, software programs, etc.
+ *
+ */
+export interface CreativeWork {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "CreativeWork";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {string} [thumbnailUrl] The URL to a thumbnail of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly thumbnailUrl?: string;
+ /**
+ * @member {ThingUnion[]} [provider] The source of the creative work.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provider?: ThingUnion[];
+ /**
+ * @member {string} [datePublished] The date on which the CreativeWork was
+ * published.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly datePublished?: string;
+ /**
+ * @member {string} [text] Text content of this creative work
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+}
+
+/**
+ * Contains the possible cases for MediaObject.
+ */
+export type MediaObjectUnion = MediaObject | ImageObject;
+
+/**
+ * @interface
+ * An interface representing MediaObject.
+ * Defines a media object.
+ *
+ */
+export interface MediaObject {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "MediaObject";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {string} [thumbnailUrl] The URL to a thumbnail of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly thumbnailUrl?: string;
+ /**
+ * @member {ThingUnion[]} [provider] The source of the creative work.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provider?: ThingUnion[];
+ /**
+ * @member {string} [datePublished] The date on which the CreativeWork was
+ * published.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly datePublished?: string;
+ /**
+ * @member {string} [text] Text content of this creative work
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+ /**
+ * @member {string} [contentUrl] Original URL to retrieve the source (file)
+ * for the media object (e.g the source URL for the image).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly contentUrl?: string;
+ /**
+ * @member {string} [hostPageUrl] URL of the page that hosts the media
+ * object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly hostPageUrl?: string;
+ /**
+ * @member {string} [contentSize] Size of the media object content (use
+ * format "value unit" e.g "1024 B").
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly contentSize?: string;
+ /**
+ * @member {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg,
+ * etc).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly encodingFormat?: string;
+ /**
+ * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts
+ * the media object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly hostPageDisplayUrl?: string;
+ /**
+ * @member {number} [width] The width of the source media object, in pixels.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly width?: number;
+ /**
+ * @member {number} [height] The height of the source media object, in
+ * pixels.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly height?: number;
+}
+
+/**
+ * @interface
+ * An interface representing ImageObject.
+ * Defines an image
+ *
+ */
+export interface ImageObject {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "ImageObject";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {string} [thumbnailUrl] The URL to a thumbnail of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly thumbnailUrl?: string;
+ /**
+ * @member {ThingUnion[]} [provider] The source of the creative work.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provider?: ThingUnion[];
+ /**
+ * @member {string} [datePublished] The date on which the CreativeWork was
+ * published.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly datePublished?: string;
+ /**
+ * @member {string} [text] Text content of this creative work
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+ /**
+ * @member {string} [contentUrl] Original URL to retrieve the source (file)
+ * for the media object (e.g the source URL for the image).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly contentUrl?: string;
+ /**
+ * @member {string} [hostPageUrl] URL of the page that hosts the media
+ * object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly hostPageUrl?: string;
+ /**
+ * @member {string} [contentSize] Size of the media object content (use
+ * format "value unit" e.g "1024 B").
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly contentSize?: string;
+ /**
+ * @member {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg,
+ * etc).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly encodingFormat?: string;
+ /**
+ * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts
+ * the media object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly hostPageDisplayUrl?: string;
+ /**
+ * @member {number} [width] The width of the source media object, in pixels.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly width?: number;
+ /**
+ * @member {number} [height] The height of the source media object, in
+ * pixels.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly height?: number;
+ /**
+ * @member {ImageObject} [thumbnail] The URL to a thumbnail of the image
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly thumbnail?: ImageObject;
+ /**
+ * @member {string} [imageInsightsToken] The token that you use in a
+ * subsequent call to the Image Search API to get additional information
+ * about the image. For information about using this token, see the
+ * insightsToken query parameter.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly imageInsightsToken?: string;
+ /**
+ * @member {ImagesImageMetadata} [insightsMetadata] 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
+ * imageInisghtsToken to get the list of websites.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly insightsMetadata?: ImagesImageMetadata;
+ /**
+ * @member {string} [imageId] Unique Id for the image
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly imageId?: string;
+ /**
+ * @member {string} [accentColor] 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.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly accentColor?: string;
+ /**
+ * @member {string} [visualWords] Visual representation of the image. Used
+ * for getting more sizes
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly visualWords?: string;
+}
+
+/**
+ * @interface
+ * An interface representing Query.
+ * Defines a search query.
+ *
+ */
+export interface Query {
+ /**
+ * @member {string} text The query string. Use this string as the query term
+ * in a new search request.
+ */
+ text: string;
+ /**
+ * @member {string} [displayText] The display version of the query term. This
+ * version of the query term may contain special characters that highlight
+ * the search term found in the query string. The string contains the
+ * highlighting characters only if the query enabled hit highlighting
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly displayText?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL that takes the user to the Bing
+ * search results page for the query.Only related search results include this
+ * field.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [searchLink] 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.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly searchLink?: string;
+ /**
+ * @member {ImageObject} [thumbnail] The URL to a thumbnail of a related
+ * image.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly thumbnail?: ImageObject;
+}
+
+/**
+ * @interface
+ * An interface representing PivotSuggestions.
+ * Defines the pivot segment.
+ *
+ */
+export interface PivotSuggestions {
+ /**
+ * @member {string} pivot The segment from the original query to pivot on.
+ */
+ pivot: string;
+ /**
+ * @member {Query[]} suggestions A list of suggested queries for the pivot.
+ */
+ suggestions: Query[];
+}
+
+/**
+ * Contains the possible cases for Answer.
+ */
+export type AnswerUnion = Answer | SearchResultsAnswerUnion;
+
+/**
+ * @interface
+ * An interface representing Answer.
+ * Defines an answer.
+ *
+ */
+export interface Answer {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Answer";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+}
+
+/**
+ * Contains the possible cases for SearchResultsAnswer.
+ */
+export type SearchResultsAnswerUnion = SearchResultsAnswer | Images;
+
+/**
+ * @interface
+ * An interface representing SearchResultsAnswer.
+ * Defines a search result answer.
+ *
+ */
+export interface SearchResultsAnswer {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "SearchResultsAnswer";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {number} [totalEstimatedMatches] The estimated number of webpages
+ * that are relevant to the query. Use this number along with the count and
+ * offset query parameters to page the results.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly totalEstimatedMatches?: number;
+}
+
+/**
+ * @interface
+ * An interface representing Images.
+ * Defines an image answer
+ *
+ */
+export interface Images {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Images";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {number} [totalEstimatedMatches] The estimated number of webpages
+ * that are relevant to the query. Use this number along with the count and
+ * offset query parameters to page the results.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly totalEstimatedMatches?: number;
+ /**
+ * @member {number} [nextOffset] Used as part of deduping. Tells client the
+ * next offset that client should use in the next pagination request
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly nextOffset?: number;
+ /**
+ * @member {ImageObject[]} value A list of image objects that are relevant to
+ * the query. If there are no results, the List is empty.
+ */
+ value: ImageObject[];
+ /**
+ * @member {Query[]} [queryExpansions] A list of expanded queries that
+ * narrows the original query. For example, if the query was Microsoft
+ * Surface, the expanded queries might be: Microsoft Surface Pro 3, Microsoft
+ * Surface RT, Microsoft Surface Phone, and Microsoft Surface Hub.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly queryExpansions?: Query[];
+ /**
+ * @member {PivotSuggestions[]} [pivotSuggestions] A list of segments in the
+ * original query. For example, if the query was Red Flowers, Bing might
+ * segment the query into Red and Flowers. The Flowers pivot may contain
+ * query suggestions such as Red Peonies and Red Daisies, and the Red pivot
+ * may contain query suggestions such as Green Flowers and Yellow Flowers.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly pivotSuggestions?: PivotSuggestions[];
+ /**
+ * @member {Query[]} [similarTerms] A list of terms that are similar in
+ * meaning to the user's query term.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly similarTerms?: Query[];
+}
+
+/**
+ * @interface
+ * An interface representing ErrorModel.
+ * Defines the error that occurred.
+ *
+ */
+export interface ErrorModel {
+ /**
+ * @member {ErrorCode} code The error code that identifies the category of
+ * error. Possible values include: 'None', 'ServerError', 'InvalidRequest',
+ * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'.
+ * Default value: 'None' .
+ */
+ code: ErrorCode;
+ /**
+ * @member {ErrorSubCode} [subCode] The error code that further helps to
+ * identify the error. Possible values include: 'UnexpectedError',
+ * 'ResourceError', 'NotImplemented', 'ParameterMissing',
+ * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked',
+ * 'AuthorizationMissing', 'AuthorizationRedundancy',
+ * 'AuthorizationDisabled', 'AuthorizationExpired'
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly subCode?: ErrorSubCode;
+ /**
+ * @member {string} message A description of the error.
+ */
+ message: string;
+ /**
+ * @member {string} [moreDetails] A description that provides additional
+ * information about the error.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly moreDetails?: string;
+ /**
+ * @member {string} [parameter] The parameter in the request that caused the
+ * error.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly parameter?: string;
+ /**
+ * @member {string} [value] The parameter's value in the request that was not
+ * valid.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly value?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ErrorResponse.
+ * The top-level response that represents a failed request.
+ *
+ */
+export interface ErrorResponse {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "ErrorResponse";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {ErrorModel[]} errors A list of errors that describe the reasons
+ * why the request failed.
+ */
+ errors: ErrorModel[];
+}
+
+/**
+ * @interface
+ * An interface representing ImageInsightsImageCaption.
+ * Defines an image's caption.
+ *
+ */
+export interface ImageInsightsImageCaption {
+ /**
+ * @member {string} caption A caption about the image.
+ */
+ caption: string;
+ /**
+ * @member {string} dataSourceUrl The URL to the website where the caption
+ * was found. You must attribute the caption to the source. For example, by
+ * displaying the domain name from the URL next to the caption and using the
+ * URL to link to the source website.
+ */
+ dataSourceUrl: string;
+ /**
+ * @member {Query[]} relatedSearches A list of entities found in the caption.
+ * Use the contents of the Query object to find the entity in the caption and
+ * create a link. The link takes the user to images of the entity.
+ */
+ relatedSearches: Query[];
+}
+
+/**
+ * Contains the possible cases for WebPage.
+ */
+export type WebPageUnion = WebPage | CollectionPageUnion;
+
+/**
+ * @interface
+ * An interface representing WebPage.
+ * Defines a webpage that is relevant to the query.
+ *
+ */
+export interface WebPage {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "WebPage";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {string} [thumbnailUrl] The URL to a thumbnail of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly thumbnailUrl?: string;
+ /**
+ * @member {ThingUnion[]} [provider] The source of the creative work.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provider?: ThingUnion[];
+ /**
+ * @member {string} [datePublished] The date on which the CreativeWork was
+ * published.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly datePublished?: string;
+ /**
+ * @member {string} [text] Text content of this creative work
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+}
+
+/**
+ * Contains the possible cases for CollectionPage.
+ */
+export type CollectionPageUnion = CollectionPage | ImageGallery;
+
+/**
+ * @interface
+ * An interface representing CollectionPage.
+ * Defines a link to a webpage that contains a collection.
+ *
+ */
+export interface CollectionPage {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "CollectionPage";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {string} [thumbnailUrl] The URL to a thumbnail of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly thumbnailUrl?: string;
+ /**
+ * @member {ThingUnion[]} [provider] The source of the creative work.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provider?: ThingUnion[];
+ /**
+ * @member {string} [datePublished] The date on which the CreativeWork was
+ * published.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly datePublished?: string;
+ /**
+ * @member {string} [text] Text content of this creative work
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ImageGallery.
+ * Defines a link to a webpage that contains a collection of related images.
+ *
+ */
+export interface ImageGallery {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "ImageGallery";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {string} [thumbnailUrl] The URL to a thumbnail of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly thumbnailUrl?: string;
+ /**
+ * @member {ThingUnion[]} [provider] The source of the creative work.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provider?: ThingUnion[];
+ /**
+ * @member {string} [datePublished] The date on which the CreativeWork was
+ * published.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly datePublished?: string;
+ /**
+ * @member {string} [text] Text content of this creative work
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+ /**
+ * @member {string} [source] The publisher or social network where the images
+ * were found. You must attribute the publisher as the source where the
+ * collection was found.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly source?: string;
+ /**
+ * @member {number} [imagesCount] The number of related images found in the
+ * collection.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly imagesCount?: number;
+ /**
+ * @member {number} [followersCount] The number of users on the social
+ * network that follow the creator.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly followersCount?: number;
+}
+
+/**
+ * @interface
+ * An interface representing RelatedCollectionsModule.
+ * Defines a list of webpages that contain related images.
+ *
+ */
+export interface RelatedCollectionsModule {
+ /**
+ * @member {ImageGallery[]} [value] A list of webpages that contain related
+ * images.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly value?: ImageGallery[];
+}
+
+/**
+ * @interface
+ * An interface representing ImagesModule.
+ * Defines a list of images.
+ *
+ */
+export interface ImagesModule {
+ /**
+ * @member {ImageObject[]} [value] A list of images.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly value?: ImageObject[];
+}
+
+/**
+ * @interface
+ * An interface representing RelatedSearchesModule.
+ * Defines a list of related searches.
+ *
+ */
+export interface RelatedSearchesModule {
+ /**
+ * @member {Query[]} [value] A list of related searches.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly value?: Query[];
+}
+
+/**
+ * @interface
+ * An interface representing Recipe.
+ * Defines a cooking recipe.
+ *
+ */
+export interface Recipe {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Recipe";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {string} [thumbnailUrl] The URL to a thumbnail of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly thumbnailUrl?: string;
+ /**
+ * @member {ThingUnion[]} [provider] The source of the creative work.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly provider?: ThingUnion[];
+ /**
+ * @member {string} [datePublished] The date on which the CreativeWork was
+ * published.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly datePublished?: string;
+ /**
+ * @member {string} [text] Text content of this creative work
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly text?: string;
+ /**
+ * @member {string} [cookTime] 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.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly cookTime?: string;
+ /**
+ * @member {string} [prepTime] 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.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly prepTime?: string;
+ /**
+ * @member {string} [totalTime] 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.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly totalTime?: string;
+}
+
+/**
+ * @interface
+ * An interface representing RecipesModule.
+ * Defines a list of recipes.
+ *
+ */
+export interface RecipesModule {
+ /**
+ * @member {Recipe[]} [value] A list of recipes.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly value?: Recipe[];
+}
+
+/**
+ * Contains the possible cases for Intangible.
+ */
+export type IntangibleUnion = Intangible | StructuredValueUnion;
+
+/**
+ * @interface
+ * An interface representing Intangible.
+ * A utility class that serves as the umbrella for a number of 'intangible'
+ * things such as quantities, structured values, etc.
+ *
+ */
+export interface Intangible {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Intangible";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+}
+
+/**
+ * Contains the possible cases for StructuredValue.
+ */
+export type StructuredValueUnion = StructuredValue | NormalizedRectangle;
+
+/**
+ * @interface
+ * An interface representing StructuredValue.
+ */
+export interface StructuredValue {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "StructuredValue";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+}
+
+/**
+ * @interface
+ * An interface representing NormalizedRectangle.
+ * Defines a region of an image. The region is defined by the coordinates of
+ * the top, left corner and bottom, right corner of the region. The coordinates
+ * are fractional values of the original image's width and height in the range
+ * 0.0 through 1.0.
+ *
+ */
+export interface NormalizedRectangle {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "NormalizedRectangle";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {number} left The left coordinate.
+ */
+ left: number;
+ /**
+ * @member {number} top The top coordinate
+ */
+ top: number;
+ /**
+ * @member {number} right The right coordinate
+ */
+ right: number;
+ /**
+ * @member {number} bottom The bottom coordinate
+ */
+ bottom: number;
+}
+
+/**
+ * @interface
+ * An interface representing RecognizedEntity.
+ * Defines a recognized entity.
+ *
+ */
+export interface RecognizedEntity {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "RecognizedEntity";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {ThingUnion} [entity] The entity that was recognized. The
+ * following are the possible entity objects: Person
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly entity?: ThingUnion;
+ /**
+ * @member {number} [matchConfidence] The confidence that Bing has that the
+ * entity in the image matches this entity. The confidence ranges from 0.0
+ * through 1.0 with 1.0 being very confident.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly matchConfidence?: number;
+}
+
+/**
+ * @interface
+ * An interface representing RecognizedEntityRegion.
+ * Defines a region of the image where an entity was found and a list of
+ * entities that might match it.
+ *
+ */
+export interface RecognizedEntityRegion {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "RecognizedEntityRegion";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {NormalizedRectangle} [region] A region of the image that contains
+ * an entity. The values of the rectangle are relative to the width and
+ * height of the original image and are in the range 0.0 through 1.0. For
+ * example, if the image is 300x200 and the region's top, left corner is at
+ * point (10, 20) and the bottom, right corner is at point (290, 150), then
+ * the normalized rectangle is: Left = 0.0333333333333333, Top = 0.1, Right =
+ * 0.9666666666666667, Bottom = 0.75. For people, the region represents the
+ * person's face.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly region?: NormalizedRectangle;
+ /**
+ * @member {RecognizedEntity[]} [matchingEntities] A list of entities that
+ * Bing believes match the entity found in the region. The entities are in
+ * descending order of confidence (see the matchConfidence field of
+ * RecognizedEntity).
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly matchingEntities?: RecognizedEntity[];
+}
+
+/**
+ * @interface
+ * An interface representing RecognizedEntityGroup.
+ * Defines a group of previously recognized entities.
+ *
+ */
+export interface RecognizedEntityGroup {
+ /**
+ * @member {RecognizedEntityRegion[]} recognizedEntityRegions The regions of
+ * the image that contain entities.
+ */
+ recognizedEntityRegions: RecognizedEntityRegion[];
+ /**
+ * @member {string} name The name of the group where images of the entity
+ * were also found. The following are possible groups.
+ * CelebRecognitionAnnotations: Similar to CelebrityAnnotations but provides
+ * a higher probability of an accurate match. CelebrityAnnotations: Contains
+ * celebrities such as actors, politicians, athletes, and historical figures.
+ */
+ name: string;
+}
+
+/**
+ * @interface
+ * An interface representing RecognizedEntitiesModule.
+ * Defines a list of previously recognized entities.
+ *
+ */
+export interface RecognizedEntitiesModule {
+ /**
+ * @member {RecognizedEntityGroup[]} [value] A list of recognized entities.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly value?: RecognizedEntityGroup[];
+}
+
+/**
+ * @interface
+ * An interface representing InsightsTag.
+ * Defines a characteristic of the content found in the image.
+ *
+ */
+export interface InsightsTag {
+ /**
+ * @member {string} [name] The name of the characteristic. For example, cat,
+ * kitty, calico cat.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ImageTagsModule.
+ * Defines the characteristics of content found in an image.
+ *
+ */
+export interface ImageTagsModule {
+ /**
+ * @member {InsightsTag[]} value A list of tags that describe the
+ * characteristics of the content found in the image. For example, if the
+ * image is of a musical artist, the list might include Female, Dress, and
+ * Music to indicate the person is female music artist that's wearing a
+ * dress.
+ */
+ value: InsightsTag[];
+}
+
+/**
+ * @interface
+ * An interface representing ImageInsights.
+ * The top-level object that the response includes when an image insights
+ * request succeeds. For information about requesting image insights, see the
+ * [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken)
+ * query parameter. The modules query parameter affects the fields that Bing
+ * includes in the response. If you set
+ * [modules](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#modulesrequested)
+ * to only Caption, then this object includes only the imageCaption field.
+ *
+ */
+export interface ImageInsights {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "ImageInsights";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [imageInsightsToken] A token that you use in a subsequent
+ * call to the Image Search API to get more information about the image. For
+ * information about using this token, see the insightsToken query parameter.
+ * This token has the same usage as the token in the Image object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly imageInsightsToken?: string;
+ /**
+ * @member {Query} [bestRepresentativeQuery] The query term that best
+ * represents the image. Clicking the link in the Query object, takes the
+ * user to a webpage with more pictures of the image.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bestRepresentativeQuery?: Query;
+ /**
+ * @member {ImageInsightsImageCaption} [imageCaption] The caption to use for
+ * the image.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly imageCaption?: ImageInsightsImageCaption;
+ /**
+ * @member {RelatedCollectionsModule} [relatedCollections] A list of links to
+ * webpages that contain related images.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly relatedCollections?: RelatedCollectionsModule;
+ /**
+ * @member {ImagesModule} [pagesIncluding] A list of webpages that contain
+ * the image. To access the webpage, use the URL in the image's hostPageUrl
+ * field.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly pagesIncluding?: ImagesModule;
+ /**
+ * @member {AggregateOffer} [shoppingSources] A list of merchants that offer
+ * items related to the image. For example, if the image is of an apple pie,
+ * the list contains merchants that are selling apple pies.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly shoppingSources?: AggregateOffer;
+ /**
+ * @member {RelatedSearchesModule} [relatedSearches] A list of related
+ * queries made by others.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly relatedSearches?: RelatedSearchesModule;
+ /**
+ * @member {RecipesModule} [recipes] A list of recipes related to the image.
+ * For example, if the image is of an apple pie, the list contains recipes
+ * for making an apple pie.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly recipes?: RecipesModule;
+ /**
+ * @member {ImagesModule} [visuallySimilarImages] A list of images that are
+ * visually similar to the original image. For example, if the specified
+ * image is of a sunset over a body of water, the list of similar images are
+ * of a sunset over a body of water. If the specified image is of a person,
+ * similar images might be of the same person or they might be of persons
+ * dressed similarly or in a similar setting. The criteria for similarity
+ * continues to evolve.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly visuallySimilarImages?: ImagesModule;
+ /**
+ * @member {ImagesModule} [visuallySimilarProducts] A list of images that
+ * contain products that are visually similar to products found in the
+ * original image. For example, if the specified image contains a dress, the
+ * list of similar images contain a dress. The image provides summary
+ * information about offers that Bing found online for the product.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly visuallySimilarProducts?: ImagesModule;
+ /**
+ * @member {RecognizedEntitiesModule} [recognizedEntityGroups] A list of
+ * groups that contain images of entities that match the entity found in the
+ * specified image. For example, the response might include images from the
+ * general celebrity group if the entity was recognized in that group.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly recognizedEntityGroups?: RecognizedEntitiesModule;
+ /**
+ * @member {ImageTagsModule} [imageTags] A list of characteristics of the
+ * content found in the image. For example, if the image is of a person, the
+ * tags might indicate the person's gender and the type of clothes they're
+ * wearing.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly imageTags?: ImageTagsModule;
+}
+
+/**
+ * @interface
+ * An interface representing TrendingImagesTile.
+ * Defines an image tile.
+ *
+ */
+export interface TrendingImagesTile {
+ /**
+ * @member {Query} query A query that returns a Bing search results page with
+ * more images of the subject. For example, if the category is Popular People
+ * Searches, then the thumbnail is of a popular person. The query would
+ * return a Bing search results page with more images of that person.
+ */
+ query: Query;
+ /**
+ * @member {ImageObject} image The image's thumbnail.
+ */
+ image: ImageObject;
+}
+
+/**
+ * @interface
+ * An interface representing TrendingImagesCategory.
+ * Defines the category of trending images.
+ *
+ */
+export interface TrendingImagesCategory {
+ /**
+ * @member {string} title The name of the image category. For example,
+ * Popular People Searches.
+ */
+ title: string;
+ /**
+ * @member {TrendingImagesTile[]} tiles A list of images that are trending in
+ * the category. Each tile contains an image and a URL that returns more
+ * images of the subject. For example, if the category is Popular People
+ * Searches, the image is of a popular person and the URL would return more
+ * images of that person.
+ */
+ tiles: TrendingImagesTile[];
+}
+
+/**
+ * @interface
+ * An interface representing TrendingImages.
+ * The top-level object that the response includes when a trending images
+ * request succeeds.
+ *
+ */
+export interface TrendingImages {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "TrendingImages";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {TrendingImagesCategory[]} categories A list that identifies
+ * categories of images and a list of trending images in that category.
+ */
+ categories: TrendingImagesCategory[];
+}
+
+/**
+ * @interface
+ * An interface representing Person.
+ * Defines a person.
+ *
+ */
+export interface Person {
+ /**
+ * @member {string} _type Polymorphic Discriminator
+ */
+ _type: "Person";
+ /**
+ * @member {string} [id] A String identifier.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly id?: string;
+ /**
+ * @member {string} [readLink] The URL that returns this resource.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly readLink?: string;
+ /**
+ * @member {string} [webSearchUrl] The URL To Bing's search result for this
+ * item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly webSearchUrl?: string;
+ /**
+ * @member {string} [name] The name of the thing represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [url] The URL to get more information about the thing
+ * represented by this object.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly url?: string;
+ /**
+ * @member {ImageObject} [image] An image of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly image?: ImageObject;
+ /**
+ * @member {string} [description] A short description of the item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+ /**
+ * @member {string} [alternateName] An alias for the item
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly alternateName?: string;
+ /**
+ * @member {string} [bingId] An ID that uniquely identifies this item.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly bingId?: string;
+ /**
+ * @member {string} [jobTitle] The person's job title.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly jobTitle?: string;
+ /**
+ * @member {string} [twitterProfile] The URL of the person's twitter profile.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly twitterProfile?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ImageSearchAPIClientOptions.
+ * @extends ServiceClientOptions
+ */
+export interface ImageSearchAPIClientOptions extends ServiceClientOptions {
+ /**
+ * @member {string} [baseUri]
+ */
+ baseUri?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ImagesSearchOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface ImagesSearchOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [acceptLanguage] A comma-delimited list of one or more
+ * languages to use for user interface strings. The list is in decreasing
+ * order of preference. For additional information, including expected
+ * format, see
+ * [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This
+ * header and the
+ * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#setlang)
+ * query parameter are mutually exclusive; do not specify both. If you set
+ * this header, you must also specify the
+ * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#cc)
+ * query parameter. To determine the market to return results for, Bing uses
+ * the first supported language it finds from the list and combines it with
+ * the cc parameter value. If the list does not include a supported language,
+ * Bing finds the closest language and market that supports the request or it
+ * uses an aggregated or default market for the results. To determine the
+ * market that Bing used, see the BingAPIs-Market header. Use this header and
+ * the cc query parameter only if you specify multiple languages. Otherwise,
+ * use the
+ * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#mkt)
+ * and
+ * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#setlang)
+ * query parameters. A user interface string is a string that's used as a
+ * label in a user interface. There are few user interface strings in the
+ * JSON response objects. Any links to Bing.com properties in the response
+ * objects apply the specified language.
+ */
+ acceptLanguage?: string;
+ /**
+ * @member {string} [userAgent] The user agent originating the request. Bing
+ * uses the user agent to provide mobile users with an optimized experience.
+ * Although optional, you are encouraged to always specify this header. The
+ * user-agent should be the same string that any commonly used browser sends.
+ * For information about user agents, see [RFC
+ * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The
+ * following are examples of user-agent strings. Windows Phone: Mozilla/5.0
+ * (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0;
+ * ARM; Touch; NOKIA; Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android
+ * 2.3.5; en - us; SCH - I500 Build / GINGERBREAD) AppleWebKit / 533.1
+ * (KHTML; like Gecko) Version / 4.0 Mobile Safari / 533.1. iPhone: Mozilla /
+ * 5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit / 536.26 (KHTML;
+ * like Gecko) Mobile / 10B142 iPhone4; 1 BingWeb / 3.03.1428.20120423. PC:
+ * Mozilla / 5.0 (Windows NT 6.3; WOW64; Trident / 7.0; Touch; rv:11.0) like
+ * Gecko. iPad: Mozilla / 5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit /
+ * 537.51.1 (KHTML, like Gecko) Version / 7.0 Mobile / 11A465 Safari /
+ * 9537.53
+ */
+ userAgent?: string;
+ /**
+ * @member {string} [clientId] Bing uses this header to provide users with
+ * consistent behavior across Bing API calls. Bing often flights new features
+ * and improvements, and it uses the client ID as a key for assigning traffic
+ * on different flights. If you do not use the same client ID for a user
+ * across multiple requests, then Bing may assign the user to multiple
+ * conflicting flights. Being assigned to multiple conflicting flights can
+ * lead to an inconsistent user experience. For example, if the second
+ * request has a different flight assignment than the first, the experience
+ * may be unexpected. Also, Bing can use the client ID to tailor web results
+ * to that client ID’s search history, providing a richer experience for the
+ * user. Bing also uses this header to help improve result rankings by
+ * analyzing the activity generated by a client ID. The relevance
+ * improvements help with better quality of results delivered by Bing APIs
+ * and in turn enables higher click-through rates for the API consumer.
+ * IMPORTANT: Although optional, you should consider this header required.
+ * Persisting the client ID across multiple requests for the same end user
+ * and device combination enables 1) the API consumer to receive a consistent
+ * user experience, and 2) higher click-through rates via better quality of
+ * results from the Bing APIs. Each user that uses your application on the
+ * device must have a unique, Bing generated client ID. If you do not include
+ * this header in the request, Bing generates an ID and returns it in the
+ * X-MSEdge-ClientID response header. The only time that you should NOT
+ * include this header in a request is the first time the user uses your app
+ * on that device. Use the client ID for each Bing API request that your app
+ * makes for this user on the device. Persist the client ID. To persist the
+ * ID in a browser app, use a persistent HTTP cookie to ensure the ID is used
+ * across all sessions. Do not use a session cookie. For other apps such as
+ * mobile apps, use the device's persistent storage to persist the ID. The
+ * next time the user uses your app on that device, get the client ID that
+ * you persisted. Bing responses may or may not include this header. If the
+ * response includes this header, capture the client ID and use it for all
+ * subsequent Bing requests for the user on that device. If you include the
+ * X-MSEdge-ClientID, you must not include cookies in the request.
+ */
+ clientId?: string;
+ /**
+ * @member {string} [clientIp] The IPv4 or IPv6 address of the client device.
+ * The IP address is used to discover the user's location. Bing uses the
+ * location information to determine safe search behavior. Although optional,
+ * you are encouraged to always specify this header and the X-Search-Location
+ * header. Do not obfuscate the address (for example, by changing the last
+ * octet to 0). Obfuscating the address results in the location not being
+ * anywhere near the device's actual location, which may result in Bing
+ * serving erroneous results.
+ */
+ clientIp?: string;
+ /**
+ * @member {string} [location] A semicolon-delimited list of key/value pairs
+ * that describe the client's geographical location. Bing uses the location
+ * information to determine safe search behavior and to return relevant local
+ * content. Specify the key/value pair as :. The following are
+ * the keys that you use to specify the user's location. lat (required): The
+ * latitude of the client's location, in degrees. The latitude must be
+ * greater than or equal to -90.0 and less than or equal to +90.0. Negative
+ * values indicate southern latitudes and positive values indicate northern
+ * latitudes. long (required): The longitude of the client's location, in
+ * degrees. The longitude must be greater than or equal to -180.0 and less
+ * than or equal to +180.0. Negative values indicate western longitudes and
+ * positive values indicate eastern longitudes. re (required): The radius, in
+ * meters, which specifies the horizontal accuracy of the coordinates. Pass
+ * the value returned by the device's location service. Typical values might
+ * be 22m for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for
+ * reverse IP lookup. ts (optional): The UTC UNIX timestamp of when the
+ * client was at the location. (The UNIX timestamp is the number of seconds
+ * since January 1, 1970.) head (optional): The client's relative heading or
+ * direction of travel. Specify the direction of travel as degrees from 0
+ * through 360, counting clockwise relative to true north. Specify this key
+ * only if the sp key is nonzero. sp (optional): The horizontal velocity
+ * (speed), in meters per second, that the client device is traveling. alt
+ * (optional): The altitude of the client device, in meters. are (optional):
+ * The radius, in meters, that specifies the vertical accuracy of the
+ * coordinates. Specify this key only if you specify the alt key. Although
+ * many of the keys are optional, the more information that you provide, the
+ * more accurate the location results are. Although optional, you are
+ * encouraged to always specify the user's geographical location. Providing
+ * the location is especially important if the client's IP address does not
+ * accurately reflect the user's physical location (for example, if the
+ * client uses VPN). For optimal results, you should include this header and
+ * the X-MSEdge-ClientIP header, but at a minimum, you should include this
+ * header.
+ */
+ location?: string;
+ /**
+ * @member {ImageAspect} [aspect] Filter images by the following aspect
+ * ratios. All: Do not filter by aspect.Specifying this value is the same as
+ * not specifying the aspect parameter. Square: Return images with standard
+ * aspect ratio. Wide: Return images with wide screen aspect ratio. Tall:
+ * Return images with tall aspect ratio. Possible values include: 'All',
+ * 'Square', 'Wide', 'Tall'
+ */
+ aspect?: ImageAspect;
+ /**
+ * @member {ImageColor} [color] Filter images by the following color options.
+ * ColorOnly: Return color images. Monochrome: Return black and white images.
+ * Return images with one of the following dominant colors: Black, Blue,
+ * Brown, Gray, Green, Orange, Pink, Purple, Red, Teal, White, Yellow.
+ * Possible values include: 'ColorOnly', 'Monochrome', 'Black', 'Blue',
+ * 'Brown', 'Gray', 'Green', 'Orange', 'Pink', 'Purple', 'Red', 'Teal',
+ * 'White', 'Yellow'
+ */
+ color?: ImageColor;
+ /**
+ * @member {string} [countryCode] A 2-character country code of the country
+ * where the results come from. For a list of possible values, see [Market
+ * Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes).
+ * If you set this parameter, you must also specify the
+ * [Accept-Language](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#acceptlanguage)
+ * header. Bing uses the first supported language it finds from the languages
+ * list, and combine that language with the country code that you specify to
+ * determine the market to return results for. If the languages list does not
+ * include a supported language, Bing finds the closest language and market
+ * that supports the request, or it may use an aggregated or default market
+ * for the results instead of a specified one. You should use this query
+ * parameter and the Accept-Language query parameter only if you specify
+ * multiple languages; otherwise, you should use the mkt and setLang query
+ * parameters. This parameter and the
+ * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#mkt)
+ * query parameter are mutually exclusive—do not specify both.
+ */
+ countryCode?: string;
+ /**
+ * @member {number} [count] The number of images to return in the response.
+ * The actual number delivered may be less than requested. The default is 35.
+ * The maximum value is 150. You use this parameter along with the offset
+ * parameter to page results.For example, if your user interface displays 20
+ * images per page, set count to 20 and offset to 0 to get the first page of
+ * results.For each subsequent page, increment offset by 20 (for example, 0,
+ * 20, 40). Use this parameter only with the Image Search API.Do not specify
+ * this parameter when calling the Insights, Trending Images, or Web Search
+ * APIs.
+ */
+ count?: number;
+ /**
+ * @member {Freshness} [freshness] Filter images by the following discovery
+ * options. Day: Return images discovered by Bing within the last 24 hours.
+ * Week: Return images discovered by Bing within the last 7 days. Month:
+ * Return images discovered by Bing within the last 30 days. Possible values
+ * include: 'Day', 'Week', 'Month'
+ */
+ freshness?: Freshness;
+ /**
+ * @member {number} [height] Filter images that have the specified height, in
+ * pixels. You may use this filter with the size filter to return small
+ * images that have a height of 150 pixels.
+ */
+ height?: number;
+ /**
+ * @member {string} [id] An ID that uniquely identifies an image. Use this
+ * parameter to ensure that the specified image is the first image in the
+ * list of images that Bing returns. The
+ * [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image)
+ * object's imageId field contains the ID that you set this parameter to.
+ */
+ id?: string;
+ /**
+ * @member {ImageContent} [imageContent] Filter images by the following
+ * content types. Face: Return images that show only a person's face.
+ * Portrait: Return images that show only a person's head and shoulders.
+ * Possible values include: 'Face', 'Portrait'
+ */
+ imageContent?: ImageContent;
+ /**
+ * @member {ImageType} [imageType] Filter images by the following image
+ * types. AnimatedGif: Return only animated GIFs. Clipart: Return only clip
+ * art images. Line: Return only line drawings. Photo: Return only
+ * photographs(excluding line drawings, animated Gifs, and clip art).
+ * Shopping: Return only images that contain items where Bing knows of a
+ * merchant that is selling the items. This option is valid in the en - US
+ * market only.Transparent: Return only images with a transparent background.
+ * Possible values include: 'AnimatedGif', 'Clipart', 'Line', 'Photo',
+ * 'Shopping', 'Transparent'
+ */
+ imageType?: ImageType;
+ /**
+ * @member {ImageLicense} [license] Filter images by the following license
+ * types. All: Do not filter by license type.Specifying this value is the
+ * same as not specifying the license parameter. Any: Return images that are
+ * under any license type. The response doesn't include images that do not
+ * specify a license or the license is unknown. Public: Return images where
+ * the creator has waived their exclusive rights, to the fullest extent
+ * allowed by law. Share: Return images that may be shared with others.
+ * Changing or editing the image might not be allowed. Also, modifying,
+ * sharing, and using the image for commercial purposes might not be allowed.
+ * Typically, this option returns the most images. ShareCommercially: Return
+ * images that may be shared with others for personal or commercial purposes.
+ * Changing or editing the image might not be allowed. Modify: Return images
+ * that may be modified, shared, and used. Changing or editing the image
+ * might not be allowed. Modifying, sharing, and using the image for
+ * commercial purposes might not be allowed. ModifyCommercially: Return
+ * images that may be modified, shared, and used for personal or commercial
+ * purposes. Typically, this option returns the fewest images. For more
+ * information about these license types, see [Filter Images By License
+ * Type](http://go.microsoft.com/fwlink/?LinkId=309768). Possible values
+ * include: 'All', 'Any', 'Public', 'Share', 'ShareCommercially', 'Modify',
+ * 'ModifyCommercially'
+ */
+ license?: ImageLicense;
+ /**
+ * @member {string} [market] The market where the results come from.
+ * Typically, mkt is the country where the user is making the request from.
+ * However, it could be a different country if the user is not located in a
+ * country where Bing delivers results. The market must be in the form
+ * -. For example, en-US. The string is case
+ * insensitive. For a list of possible market values, see [Market
+ * Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes).
+ * NOTE: If known, you are encouraged to always specify the market.
+ * Specifying the market helps Bing route the request and return an
+ * appropriate and optimal response. If you specify a market that is not
+ * listed in [Market
+ * Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes),
+ * Bing uses a best fit market code based on an internal mapping that is
+ * subject to change. This parameter and the
+ * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#cc)
+ * query parameter are mutually exclusive—do not specify both.
+ */
+ market?: string;
+ /**
+ * @member {number} [maxFileSize] Filter images that are less than or equal
+ * to the specified file size. The maximum file size that you may specify is
+ * 520,192 bytes. If you specify a larger value, the API uses 520,192. It is
+ * possible that the response may include images that are slightly larger
+ * than the specified maximum. You may specify this filter and minFileSize to
+ * filter images within a range of file sizes.
+ */
+ maxFileSize?: number;
+ /**
+ * @member {number} [maxHeight] Filter images that have a height that is less
+ * than or equal to the specified height. Specify the height in pixels. You
+ * may specify this filter and minHeight to filter images within a range of
+ * heights. This filter and the height filter are mutually exclusive.
+ */
+ maxHeight?: number;
+ /**
+ * @member {number} [maxWidth] Filter images that have a width that is less
+ * than or equal to the specified width. Specify the width in pixels. You may
+ * specify this filter and maxWidth to filter images within a range of
+ * widths. This filter and the width filter are mutually exclusive.
+ */
+ maxWidth?: number;
+ /**
+ * @member {number} [minFileSize] Filter images that are greater than or
+ * equal to the specified file size. The maximum file size that you may
+ * specify is 520,192 bytes. If you specify a larger value, the API uses
+ * 520,192. It is possible that the response may include images that are
+ * slightly smaller than the specified minimum. You may specify this filter
+ * and maxFileSize to filter images within a range of file sizes.
+ */
+ minFileSize?: number;
+ /**
+ * @member {number} [minHeight] Filter images that have a height that is
+ * greater than or equal to the specified height. Specify the height in
+ * pixels. You may specify this filter and maxHeight to filter images within
+ * a range of heights. This filter and the height filter are mutually
+ * exclusive.
+ */
+ minHeight?: number;
+ /**
+ * @member {number} [minWidth] Filter images that have a width that is
+ * greater than or equal to the specified width. Specify the width in pixels.
+ * You may specify this filter and maxWidth to filter images within a range
+ * of widths. This filter and the width filter are mutually exclusive.
+ */
+ minWidth?: number;
+ /**
+ * @member {number} [offset] The zero-based offset that indicates the number
+ * of images to skip before returning images. The default is 0. The offset
+ * should be less than
+ * ([totalEstimatedMatches](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#totalestimatedmatches)
+ * - count). Use this parameter along with the count parameter to page
+ * results. For example, if your user interface displays 20 images per page,
+ * set count to 20 and offset to 0 to get the first page of results. For each
+ * subsequent page, increment offset by 20 (for example, 0, 20, 40). It is
+ * possible for multiple pages to include some overlap in results. To prevent
+ * duplicates, see
+ * [nextOffset](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#nextoffset).
+ * Use this parameter only with the Image API. Do not specify this parameter
+ * when calling the Trending Images API or the Web Search API.
+ */
+ offset?: number;
+ /**
+ * @member {SafeSearch} [safeSearch] Filter images for adult content. The
+ * following are the possible filter values. Off: May return images with
+ * adult content. If the request is through the Image Search API, the
+ * response includes thumbnail images that are clear (non-fuzzy). However, if
+ * the request is through the Web Search API, the response includes thumbnail
+ * images that are pixelated (fuzzy). Moderate: If the request is through the
+ * Image Search API, the response doesn't include images with adult content.
+ * If the request is through the Web Search API, the response may include
+ * images with adult content (the thumbnail images are pixelated (fuzzy)).
+ * Strict: Do not return images with adult content. The default is Moderate.
+ * If the request comes from a market that Bing's adult policy requires that
+ * safeSearch is set to Strict, Bing ignores the safeSearch value and uses
+ * Strict. If you use the site: query operator, there is the chance that the
+ * response may contain adult content regardless of what the safeSearch query
+ * parameter is set to. Use site: only if you are aware of the content on the
+ * site and your scenario supports the possibility of adult content. Possible
+ * values include: 'Off', 'Moderate', 'Strict'
+ */
+ safeSearch?: SafeSearch;
+ /**
+ * @member {ImageSize} [size] Filter images by the following sizes. All: Do
+ * not filter by size. Specifying this value is the same as not specifying
+ * the size parameter. Small: Return images that are less than 200x200
+ * pixels. Medium: Return images that are greater than or equal to 200x200
+ * pixels but less than 500x500 pixels. Large: Return images that are 500x500
+ * pixels or larger. Wallpaper: Return wallpaper images. You may use this
+ * parameter along with the height or width parameters. For example, you may
+ * use height and size to request small images that are 150 pixels tall.
+ * Possible values include: 'All', 'Small', 'Medium', 'Large', 'Wallpaper'
+ */
+ size?: ImageSize;
+ /**
+ * @member {string} [setLang] The language to use for user interface strings.
+ * Specify the language using the ISO 639-1 2-letter language code. For
+ * example, the language code for English is EN. The default is EN (English).
+ * Although optional, you should always specify the language. Typically, you
+ * set setLang to the same language specified by mkt unless the user wants
+ * the user interface strings displayed in a different language. This
+ * parameter and the
+ * [Accept-Language](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#acceptlanguage)
+ * header are mutually exclusive; do not specify both. A user interface
+ * string is a string that's used as a label in a user interface. There are
+ * few user interface strings in the JSON response objects. Also, any links
+ * to Bing.com properties in the response objects apply the specified
+ * language.
+ */
+ setLang?: string;
+ /**
+ * @member {number} [width] Filter images that have the specified width, in
+ * pixels. You may use this filter with the size filter to return small
+ * images that have a width of 150 pixels.
+ */
+ width?: number;
+}
+
+/**
+ * @interface
+ * An interface representing ImagesDetailsOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface ImagesDetailsOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [acceptLanguage] A comma-delimited list of one or more
+ * languages to use for user interface strings. The list is in decreasing
+ * order of preference. For additional information, including expected
+ * format, see
+ * [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This
+ * header and the
+ * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#setlang)
+ * query parameter are mutually exclusive; do not specify both. If you set
+ * this header, you must also specify the
+ * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#cc)
+ * query parameter. To determine the market to return results for, Bing uses
+ * the first supported language it finds from the list and combines it with
+ * the cc parameter value. If the list does not include a supported language,
+ * Bing finds the closest language and market that supports the request or it
+ * uses an aggregated or default market for the results. To determine the
+ * market that Bing used, see the BingAPIs-Market header. Use this header and
+ * the cc query parameter only if you specify multiple languages. Otherwise,
+ * use the
+ * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#mkt)
+ * and
+ * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#setlang)
+ * query parameters. A user interface string is a string that's used as a
+ * label in a user interface. There are few user interface strings in the
+ * JSON response objects. Any links to Bing.com properties in the response
+ * objects apply the specified language.
+ */
+ acceptLanguage?: string;
+ /**
+ * @member {string} [contentType] Optional request header. If you set the
+ * [modules](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#modulesrequested)
+ * query parameter to RecognizedEntities, you may specify the binary of an
+ * image in the body of a POST request. If you specify the image in the body
+ * of a POST request, you must specify this header and set its value to
+ * multipart/form-data. The maximum image size is 1 MB.
+ */
+ contentType?: string;
+ /**
+ * @member {string} [userAgent] The user agent originating the request. Bing
+ * uses the user agent to provide mobile users with an optimized experience.
+ * Although optional, you are encouraged to always specify this header. The
+ * user-agent should be the same string that any commonly used browser sends.
+ * For information about user agents, see [RFC
+ * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The
+ * following are examples of user-agent strings. Windows Phone: Mozilla/5.0
+ * (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0;
+ * ARM; Touch; NOKIA; Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android
+ * 2.3.5; en - us; SCH - I500 Build / GINGERBREAD) AppleWebKit / 533.1
+ * (KHTML; like Gecko) Version / 4.0 Mobile Safari / 533.1. iPhone: Mozilla /
+ * 5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit / 536.26 (KHTML;
+ * like Gecko) Mobile / 10B142 iPhone4; 1 BingWeb / 3.03.1428.20120423. PC:
+ * Mozilla / 5.0 (Windows NT 6.3; WOW64; Trident / 7.0; Touch; rv:11.0) like
+ * Gecko. iPad: Mozilla / 5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit /
+ * 537.51.1 (KHTML, like Gecko) Version / 7.0 Mobile / 11A465 Safari /
+ * 9537.53
+ */
+ userAgent?: string;
+ /**
+ * @member {string} [clientId] Bing uses this header to provide users with
+ * consistent behavior across Bing API calls. Bing often flights new features
+ * and improvements, and it uses the client ID as a key for assigning traffic
+ * on different flights. If you do not use the same client ID for a user
+ * across multiple requests, then Bing may assign the user to multiple
+ * conflicting flights. Being assigned to multiple conflicting flights can
+ * lead to an inconsistent user experience. For example, if the second
+ * request has a different flight assignment than the first, the experience
+ * may be unexpected. Also, Bing can use the client ID to tailor web results
+ * to that client ID’s search history, providing a richer experience for the
+ * user. Bing also uses this header to help improve result rankings by
+ * analyzing the activity generated by a client ID. The relevance
+ * improvements help with better quality of results delivered by Bing APIs
+ * and in turn enables higher click-through rates for the API consumer.
+ * IMPORTANT: Although optional, you should consider this header required.
+ * Persisting the client ID across multiple requests for the same end user
+ * and device combination enables 1) the API consumer to receive a consistent
+ * user experience, and 2) higher click-through rates via better quality of
+ * results from the Bing APIs. Each user that uses your application on the
+ * device must have a unique, Bing generated client ID. If you do not include
+ * this header in the request, Bing generates an ID and returns it in the
+ * X-MSEdge-ClientID response header. The only time that you should NOT
+ * include this header in a request is the first time the user uses your app
+ * on that device. Use the client ID for each Bing API request that your app
+ * makes for this user on the device. Persist the client ID. To persist the
+ * ID in a browser app, use a persistent HTTP cookie to ensure the ID is used
+ * across all sessions. Do not use a session cookie. For other apps such as
+ * mobile apps, use the device's persistent storage to persist the ID. The
+ * next time the user uses your app on that device, get the client ID that
+ * you persisted. Bing responses may or may not include this header. If the
+ * response includes this header, capture the client ID and use it for all
+ * subsequent Bing requests for the user on that device. If you include the
+ * X-MSEdge-ClientID, you must not include cookies in the request.
+ */
+ clientId?: string;
+ /**
+ * @member {string} [clientIp] The IPv4 or IPv6 address of the client device.
+ * The IP address is used to discover the user's location. Bing uses the
+ * location information to determine safe search behavior. Although optional,
+ * you are encouraged to always specify this header and the X-Search-Location
+ * header. Do not obfuscate the address (for example, by changing the last
+ * octet to 0). Obfuscating the address results in the location not being
+ * anywhere near the device's actual location, which may result in Bing
+ * serving erroneous results.
+ */
+ clientIp?: string;
+ /**
+ * @member {string} [location] A semicolon-delimited list of key/value pairs
+ * that describe the client's geographical location. Bing uses the location
+ * information to determine safe search behavior and to return relevant local
+ * content. Specify the key/value pair as :. The following are
+ * the keys that you use to specify the user's location. lat (required): The
+ * latitude of the client's location, in degrees. The latitude must be
+ * greater than or equal to -90.0 and less than or equal to +90.0. Negative
+ * values indicate southern latitudes and positive values indicate northern
+ * latitudes. long (required): The longitude of the client's location, in
+ * degrees. The longitude must be greater than or equal to -180.0 and less
+ * than or equal to +180.0. Negative values indicate western longitudes and
+ * positive values indicate eastern longitudes. re (required): The radius, in
+ * meters, which specifies the horizontal accuracy of the coordinates. Pass
+ * the value returned by the device's location service. Typical values might
+ * be 22m for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for
+ * reverse IP lookup. ts (optional): The UTC UNIX timestamp of when the
+ * client was at the location. (The UNIX timestamp is the number of seconds
+ * since January 1, 1970.) head (optional): The client's relative heading or
+ * direction of travel. Specify the direction of travel as degrees from 0
+ * through 360, counting clockwise relative to true north. Specify this key
+ * only if the sp key is nonzero. sp (optional): The horizontal velocity
+ * (speed), in meters per second, that the client device is traveling. alt
+ * (optional): The altitude of the client device, in meters. are (optional):
+ * The radius, in meters, that specifies the vertical accuracy of the
+ * coordinates. Specify this key only if you specify the alt key. Although
+ * many of the keys are optional, the more information that you provide, the
+ * more accurate the location results are. Although optional, you are
+ * encouraged to always specify the user's geographical location. Providing
+ * the location is especially important if the client's IP address does not
+ * accurately reflect the user's physical location (for example, if the
+ * client uses VPN). For optimal results, you should include this header and
+ * the X-MSEdge-ClientIP header, but at a minimum, you should include this
+ * header.
+ */
+ location?: string;
+ /**
+ * @member {number} [cropBottom] The bottom coordinate of the region to crop.
+ * The coordinate is a fractional value of the original image's height and is
+ * measured from the top, left corner of the image. Specify the coordinate as
+ * a value from 0.0 through 1.0. Use this parameter only with the Insights
+ * API. Do not specify this parameter when calling the Images, Trending
+ * Images, or Web Search APIs.
+ */
+ cropBottom?: number;
+ /**
+ * @member {number} [cropLeft] The left coordinate of the region to crop. The
+ * coordinate is a fractional value of the original image's height and is
+ * measured from the top, left corner of the image. Specify the coordinate as
+ * a value from 0.0 through 1.0. Use this parameter only with the Insights
+ * API. Do not specify this parameter when calling the Images, Trending
+ * Images, or Web Search APIs.
+ */
+ cropLeft?: number;
+ /**
+ * @member {number} [cropRight] The right coordinate of the region to crop.
+ * The coordinate is a fractional value of the original image's height and is
+ * measured from the top, left corner of the image. Specify the coordinate as
+ * a value from 0.0 through 1.0. Use this parameter only with the Insights
+ * API. Do not specify this parameter when calling the Images, Trending
+ * Images, or Web Search APIs.
+ */
+ cropRight?: number;
+ /**
+ * @member {number} [cropTop] The top coordinate of the region to crop. The
+ * coordinate is a fractional value of the original image's height and is
+ * measured from the top, left corner of the image. Specify the coordinate as
+ * a value from 0.0 through 1.0. Use this parameter only with the Insights
+ * API. Do not specify this parameter when calling the Images, Trending
+ * Images, or Web Search APIs.
+ */
+ cropTop?: number;
+ /**
+ * @member {ImageCropType} [cropType] The crop type to use when cropping the
+ * image based on the coordinates specified in the cal, cat, car, and cab
+ * parameters. The following are the possible values. 0: Rectangular
+ * (default). Use this parameter only with the Insights API. Do not specify
+ * this parameter when calling the Images, Trending Images, or Web Search
+ * APIs. Possible values include: 'Rectangular'
+ */
+ cropType?: ImageCropType;
+ /**
+ * @member {string} [countryCode] A 2-character country code of the country
+ * where the results come from. For a list of possible values, see [Market
+ * Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes).
+ * If you set this parameter, you must also specify the
+ * [Accept-Language](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#acceptlanguage)
+ * header. Bing uses the first supported language it finds from the languages
+ * list, and combine that language with the country code that you specify to
+ * determine the market to return results for. If the languages list does not
+ * include a supported language, Bing finds the closest language and market
+ * that supports the request, or it may use an aggregated or default market
+ * for the results instead of a specified one. You should use this query
+ * parameter and the Accept-Language query parameter only if you specify
+ * multiple languages; otherwise, you should use the mkt and setLang query
+ * parameters. This parameter and the
+ * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#mkt)
+ * query parameter are mutually exclusive—do not specify both.
+ */
+ countryCode?: string;
+ /**
+ * @member {string} [id] An ID that uniquely identifies an image. Use this
+ * parameter to ensure that the specified image is the first image in the
+ * list of images that Bing returns. The
+ * [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image)
+ * object's imageId field contains the ID that you set this parameter to.
+ */
+ id?: string;
+ /**
+ * @member {string} [imageUrl] The URL of an image that you want to get
+ * insights of. Use this parameter as an alternative to using the
+ * insightsToken parameter to specify the image. You may also specify the
+ * image by placing the binary of the image in the body of a POST request. If
+ * you use the binary option, see the
+ * [Content-Type](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#contenttype)
+ * header. The maximum supported image size is 1 MB. Use this parameter only
+ * with the Insights API. Do not specify this parameter when calling the
+ * Images, Trending Images, or Web Search APIs.
+ */
+ imageUrl?: string;
+ /**
+ * @member {string} [insightsToken] An image token. 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)
+ * contains the token. Specify this parameter to get additional information
+ * about an image, such as a caption or shopping source. For a list of the
+ * additional information about an image that you can get, see the
+ * [modules](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#modulesrequested)
+ * query parameter. Use this parameter only with the Insights API. Do not
+ * specify this parameter when calling the Images, Trending Images, or Web
+ * Search APIs.
+ */
+ insightsToken?: string;
+ /**
+ * @member {ImageInsightModule[]} [modules] A comma-delimited list of
+ * insights to request. The following are the possible case-insensitive
+ * values. All: Return all insights, if available, except RecognizedEntities.
+ * BRQ: Best representative query. The query term that best describes the
+ * image. Caption: A caption that provides information about the image. If
+ * the caption contains entities, the response may include links to images of
+ * those entities. Collections: A list of related images. Recipes: A list of
+ * recipes for cooking the food shown in the images. PagesIncluding: A list
+ * of webpages that include the image. RecognizedEntities: A list of entities
+ * (people) that were recognized in the image. NOTE: You may not specify this
+ * module with any other module. If you specify it with other modules, the
+ * response doesn't include recognized entities. RelatedSearches: A list of
+ * related searches made by others. ShoppingSources: A list of merchants
+ * where you can buy related offerings. SimilarImages: A list of images that
+ * are visually similar to the original image. SimilarProducts: A list of
+ * images that contain a product that is similar to a product found in the
+ * original image. Tags: Provides characteristics of the type of content
+ * found in the image. For example, if the image is of a person, the tags
+ * might indicate the person's gender and type of clothes they're wearing. If
+ * you specify a module and there is no data for the module, the response
+ * object doesn't include the related field. For example, if you specify
+ * Caption and it does not exist, the response doesn't include the
+ * imageCaption field. To include related searches, the request must include
+ * the original query string. Although the original query string is not
+ * required for similar images or products, you should always include it
+ * because it can help improve relevance and the results. Use this parameter
+ * only with the Insights API. Do not specify this parameter when calling the
+ * Images, Trending Images, or Web Search APIs.
+ */
+ modules?: ImageInsightModule[];
+ /**
+ * @member {string} [market] The market where the results come from.
+ * Typically, mkt is the country where the user is making the request from.
+ * However, it could be a different country if the user is not located in a
+ * country where Bing delivers results. The market must be in the form
+ * -. For example, en-US. The string is case
+ * insensitive. For a list of possible market values, see [Market
+ * Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes).
+ * NOTE: If known, you are encouraged to always specify the market.
+ * Specifying the market helps Bing route the request and return an
+ * appropriate and optimal response. If you specify a market that is not
+ * listed in [Market
+ * Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes),
+ * Bing uses a best fit market code based on an internal mapping that is
+ * subject to change. This parameter and the
+ * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#cc)
+ * query parameter are mutually exclusive—do not specify both.
+ */
+ market?: string;
+ /**
+ * @member {SafeSearch} [safeSearch] Filter images for adult content. The
+ * following are the possible filter values. Off: May return images with
+ * adult content. If the request is through the Image Search API, the
+ * response includes thumbnail images that are clear (non-fuzzy). However, if
+ * the request is through the Web Search API, the response includes thumbnail
+ * images that are pixelated (fuzzy). Moderate: If the request is through the
+ * Image Search API, the response doesn't include images with adult content.
+ * If the request is through the Web Search API, the response may include
+ * images with adult content (the thumbnail images are pixelated (fuzzy)).
+ * Strict: Do not return images with adult content. The default is Moderate.
+ * If the request comes from a market that Bing's adult policy requires that
+ * safeSearch is set to Strict, Bing ignores the safeSearch value and uses
+ * Strict. If you use the site: query operator, there is the chance that the
+ * response may contain adult content regardless of what the safeSearch query
+ * parameter is set to. Use site: only if you are aware of the content on the
+ * site and your scenario supports the possibility of adult content. Possible
+ * values include: 'Off', 'Moderate', 'Strict'
+ */
+ safeSearch?: SafeSearch;
+ /**
+ * @member {string} [setLang] The language to use for user interface strings.
+ * Specify the language using the ISO 639-1 2-letter language code. For
+ * example, the language code for English is EN. The default is EN (English).
+ * Although optional, you should always specify the language. Typically, you
+ * set setLang to the same language specified by mkt unless the user wants
+ * the user interface strings displayed in a different language. This
+ * parameter and the
+ * [Accept-Language](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#acceptlanguage)
+ * header are mutually exclusive; do not specify both. A user interface
+ * string is a string that's used as a label in a user interface. There are
+ * few user interface strings in the JSON response objects. Also, any links
+ * to Bing.com properties in the response objects apply the specified
+ * language.
+ */
+ setLang?: string;
+}
+
+/**
+ * @interface
+ * An interface representing ImagesTrendingOptionalParams.
+ * Optional Parameters.
+ *
+ * @extends RequestOptionsBase
+ */
+export interface ImagesTrendingOptionalParams extends msRest.RequestOptionsBase {
+ /**
+ * @member {string} [acceptLanguage] A comma-delimited list of one or more
+ * languages to use for user interface strings. The list is in decreasing
+ * order of preference. For additional information, including expected
+ * format, see
+ * [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This
+ * header and the
+ * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#setlang)
+ * query parameter are mutually exclusive; do not specify both. If you set
+ * this header, you must also specify the
+ * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#cc)
+ * query parameter. To determine the market to return results for, Bing uses
+ * the first supported language it finds from the list and combines it with
+ * the cc parameter value. If the list does not include a supported language,
+ * Bing finds the closest language and market that supports the request or it
+ * uses an aggregated or default market for the results. To determine the
+ * market that Bing used, see the BingAPIs-Market header. Use this header and
+ * the cc query parameter only if you specify multiple languages. Otherwise,
+ * use the
+ * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#mkt)
+ * and
+ * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#setlang)
+ * query parameters. A user interface string is a string that's used as a
+ * label in a user interface. There are few user interface strings in the
+ * JSON response objects. Any links to Bing.com properties in the response
+ * objects apply the specified language.
+ */
+ acceptLanguage?: string;
+ /**
+ * @member {string} [userAgent] The user agent originating the request. Bing
+ * uses the user agent to provide mobile users with an optimized experience.
+ * Although optional, you are encouraged to always specify this header. The
+ * user-agent should be the same string that any commonly used browser sends.
+ * For information about user agents, see [RFC
+ * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The
+ * following are examples of user-agent strings. Windows Phone: Mozilla/5.0
+ * (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0;
+ * ARM; Touch; NOKIA; Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android
+ * 2.3.5; en - us; SCH - I500 Build / GINGERBREAD) AppleWebKit / 533.1
+ * (KHTML; like Gecko) Version / 4.0 Mobile Safari / 533.1. iPhone: Mozilla /
+ * 5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit / 536.26 (KHTML;
+ * like Gecko) Mobile / 10B142 iPhone4; 1 BingWeb / 3.03.1428.20120423. PC:
+ * Mozilla / 5.0 (Windows NT 6.3; WOW64; Trident / 7.0; Touch; rv:11.0) like
+ * Gecko. iPad: Mozilla / 5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit /
+ * 537.51.1 (KHTML, like Gecko) Version / 7.0 Mobile / 11A465 Safari /
+ * 9537.53
+ */
+ userAgent?: string;
+ /**
+ * @member {string} [clientId] Bing uses this header to provide users with
+ * consistent behavior across Bing API calls. Bing often flights new features
+ * and improvements, and it uses the client ID as a key for assigning traffic
+ * on different flights. If you do not use the same client ID for a user
+ * across multiple requests, then Bing may assign the user to multiple
+ * conflicting flights. Being assigned to multiple conflicting flights can
+ * lead to an inconsistent user experience. For example, if the second
+ * request has a different flight assignment than the first, the experience
+ * may be unexpected. Also, Bing can use the client ID to tailor web results
+ * to that client ID’s search history, providing a richer experience for the
+ * user. Bing also uses this header to help improve result rankings by
+ * analyzing the activity generated by a client ID. The relevance
+ * improvements help with better quality of results delivered by Bing APIs
+ * and in turn enables higher click-through rates for the API consumer.
+ * IMPORTANT: Although optional, you should consider this header required.
+ * Persisting the client ID across multiple requests for the same end user
+ * and device combination enables 1) the API consumer to receive a consistent
+ * user experience, and 2) higher click-through rates via better quality of
+ * results from the Bing APIs. Each user that uses your application on the
+ * device must have a unique, Bing generated client ID. If you do not include
+ * this header in the request, Bing generates an ID and returns it in the
+ * X-MSEdge-ClientID response header. The only time that you should NOT
+ * include this header in a request is the first time the user uses your app
+ * on that device. Use the client ID for each Bing API request that your app
+ * makes for this user on the device. Persist the client ID. To persist the
+ * ID in a browser app, use a persistent HTTP cookie to ensure the ID is used
+ * across all sessions. Do not use a session cookie. For other apps such as
+ * mobile apps, use the device's persistent storage to persist the ID. The
+ * next time the user uses your app on that device, get the client ID that
+ * you persisted. Bing responses may or may not include this header. If the
+ * response includes this header, capture the client ID and use it for all
+ * subsequent Bing requests for the user on that device. If you include the
+ * X-MSEdge-ClientID, you must not include cookies in the request.
+ */
+ clientId?: string;
+ /**
+ * @member {string} [clientIp] The IPv4 or IPv6 address of the client device.
+ * The IP address is used to discover the user's location. Bing uses the
+ * location information to determine safe search behavior. Although optional,
+ * you are encouraged to always specify this header and the X-Search-Location
+ * header. Do not obfuscate the address (for example, by changing the last
+ * octet to 0). Obfuscating the address results in the location not being
+ * anywhere near the device's actual location, which may result in Bing
+ * serving erroneous results.
+ */
+ clientIp?: string;
+ /**
+ * @member {string} [location] A semicolon-delimited list of key/value pairs
+ * that describe the client's geographical location. Bing uses the location
+ * information to determine safe search behavior and to return relevant local
+ * content. Specify the key/value pair as :. The following are
+ * the keys that you use to specify the user's location. lat (required): The
+ * latitude of the client's location, in degrees. The latitude must be
+ * greater than or equal to -90.0 and less than or equal to +90.0. Negative
+ * values indicate southern latitudes and positive values indicate northern
+ * latitudes. long (required): The longitude of the client's location, in
+ * degrees. The longitude must be greater than or equal to -180.0 and less
+ * than or equal to +180.0. Negative values indicate western longitudes and
+ * positive values indicate eastern longitudes. re (required): The radius, in
+ * meters, which specifies the horizontal accuracy of the coordinates. Pass
+ * the value returned by the device's location service. Typical values might
+ * be 22m for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for
+ * reverse IP lookup. ts (optional): The UTC UNIX timestamp of when the
+ * client was at the location. (The UNIX timestamp is the number of seconds
+ * since January 1, 1970.) head (optional): The client's relative heading or
+ * direction of travel. Specify the direction of travel as degrees from 0
+ * through 360, counting clockwise relative to true north. Specify this key
+ * only if the sp key is nonzero. sp (optional): The horizontal velocity
+ * (speed), in meters per second, that the client device is traveling. alt
+ * (optional): The altitude of the client device, in meters. are (optional):
+ * The radius, in meters, that specifies the vertical accuracy of the
+ * coordinates. Specify this key only if you specify the alt key. Although
+ * many of the keys are optional, the more information that you provide, the
+ * more accurate the location results are. Although optional, you are
+ * encouraged to always specify the user's geographical location. Providing
+ * the location is especially important if the client's IP address does not
+ * accurately reflect the user's physical location (for example, if the
+ * client uses VPN). For optimal results, you should include this header and
+ * the X-MSEdge-ClientIP header, but at a minimum, you should include this
+ * header.
+ */
+ location?: string;
+ /**
+ * @member {string} [countryCode] A 2-character country code of the country
+ * where the results come from. This API supports only the United States,
+ * Canada, Australia, and China markets. If you specify this query parameter,
+ * it must be set to us, ca, au, or cn. If you set this parameter, you must
+ * also specify the Accept-Language header. Bing uses the first supported
+ * language it finds from the languages list, and combine that language with
+ * the country code that you specify to determine the market to return
+ * results for. If the languages list does not include a supported language,
+ * Bing finds the closest language and market that supports the request, or
+ * it may use an aggregated or default market for the results instead of a
+ * specified one. You should use this query parameter and the Accept-Language
+ * query parameter only if you specify multiple languages; otherwise, you
+ * should use the mkt and setLang query parameters. This parameter and the
+ * mkt query parameter are mutually exclusive—do not specify both.
+ */
+ countryCode?: string;
+ /**
+ * @member {string} [market] The market where the results come from.
+ * Typically, mkt is the country where the user is making the request from.
+ * However, it could be a different country if the user is not located in a
+ * country where Bing delivers results. The market must be in the form
+ * -. For example, en-US. The string is case
+ * insensitive. For a list of possible market values, see [Market
+ * Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes).
+ * NOTE: If known, you are encouraged to always specify the market.
+ * Specifying the market helps Bing route the request and return an
+ * appropriate and optimal response. If you specify a market that is not
+ * listed in [Market
+ * Codes](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#market-codes),
+ * Bing uses a best fit market code based on an internal mapping that is
+ * subject to change. This parameter and the
+ * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#cc)
+ * query parameter are mutually exclusive—do not specify both.
+ */
+ market?: string;
+ /**
+ * @member {SafeSearch} [safeSearch] Filter images for adult content. The
+ * following are the possible filter values. Off: May return images with
+ * adult content. If the request is through the Image Search API, the
+ * response includes thumbnail images that are clear (non-fuzzy). However, if
+ * the request is through the Web Search API, the response includes thumbnail
+ * images that are pixelated (fuzzy). Moderate: If the request is through the
+ * Image Search API, the response doesn't include images with adult content.
+ * If the request is through the Web Search API, the response may include
+ * images with adult content (the thumbnail images are pixelated (fuzzy)).
+ * Strict: Do not return images with adult content. The default is Moderate.
+ * If the request comes from a market that Bing's adult policy requires that
+ * safeSearch is set to Strict, Bing ignores the safeSearch value and uses
+ * Strict. If you use the site: query operator, there is the chance that the
+ * response may contain adult content regardless of what the safeSearch query
+ * parameter is set to. Use site: only if you are aware of the content on the
+ * site and your scenario supports the possibility of adult content. Possible
+ * values include: 'Off', 'Moderate', 'Strict'
+ */
+ safeSearch?: SafeSearch;
+ /**
+ * @member {string} [setLang] The language to use for user interface strings.
+ * Specify the language using the ISO 639-1 2-letter language code. For
+ * example, the language code for English is EN. The default is EN (English).
+ * Although optional, you should always specify the language. Typically, you
+ * set setLang to the same language specified by mkt unless the user wants
+ * the user interface strings displayed in a different language. This
+ * parameter and the
+ * [Accept-Language](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#acceptlanguage)
+ * header are mutually exclusive; do not specify both. A user interface
+ * string is a string that's used as a label in a user interface. There are
+ * few user interface strings in the JSON response objects. Also, any links
+ * to Bing.com properties in the response objects apply the specified
+ * language.
+ */
+ setLang?: string;
+}
+
+/**
+ * Defines values for Currency.
+ * 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'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: Currency = "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum Currency {
+ USD = 'USD',
+ CAD = 'CAD',
+ GBP = 'GBP',
+ EUR = 'EUR',
+ COP = 'COP',
+ JPY = 'JPY',
+ CNY = 'CNY',
+ AUD = 'AUD',
+ INR = 'INR',
+ AED = 'AED',
+ AFN = 'AFN',
+ ALL = 'ALL',
+ AMD = 'AMD',
+ ANG = 'ANG',
+ AOA = 'AOA',
+ ARS = 'ARS',
+ AWG = 'AWG',
+ AZN = 'AZN',
+ BAM = 'BAM',
+ BBD = 'BBD',
+ BDT = 'BDT',
+ BGN = 'BGN',
+ BHD = 'BHD',
+ BIF = 'BIF',
+ BMD = 'BMD',
+ BND = 'BND',
+ BOB = 'BOB',
+ BOV = 'BOV',
+ BRL = 'BRL',
+ BSD = 'BSD',
+ BTN = 'BTN',
+ BWP = 'BWP',
+ BYR = 'BYR',
+ BZD = 'BZD',
+ CDF = 'CDF',
+ CHE = 'CHE',
+ CHF = 'CHF',
+ CHW = 'CHW',
+ CLF = 'CLF',
+ CLP = 'CLP',
+ COU = 'COU',
+ CRC = 'CRC',
+ CUC = 'CUC',
+ CUP = 'CUP',
+ CVE = 'CVE',
+ CZK = 'CZK',
+ DJF = 'DJF',
+ DKK = 'DKK',
+ DOP = 'DOP',
+ DZD = 'DZD',
+ EGP = 'EGP',
+ ERN = 'ERN',
+ ETB = 'ETB',
+ FJD = 'FJD',
+ FKP = 'FKP',
+ GEL = 'GEL',
+ GHS = 'GHS',
+ GIP = 'GIP',
+ GMD = 'GMD',
+ GNF = 'GNF',
+ GTQ = 'GTQ',
+ GYD = 'GYD',
+ HKD = 'HKD',
+ HNL = 'HNL',
+ HRK = 'HRK',
+ HTG = 'HTG',
+ HUF = 'HUF',
+ IDR = 'IDR',
+ ILS = 'ILS',
+ IQD = 'IQD',
+ IRR = 'IRR',
+ ISK = 'ISK',
+ JMD = 'JMD',
+ JOD = 'JOD',
+ KES = 'KES',
+ KGS = 'KGS',
+ KHR = 'KHR',
+ KMF = 'KMF',
+ KPW = 'KPW',
+ KRW = 'KRW',
+ KWD = 'KWD',
+ KYD = 'KYD',
+ KZT = 'KZT',
+ LAK = 'LAK',
+ LBP = 'LBP',
+ LKR = 'LKR',
+ LRD = 'LRD',
+ LSL = 'LSL',
+ LYD = 'LYD',
+ MAD = 'MAD',
+ MDL = 'MDL',
+ MGA = 'MGA',
+ MKD = 'MKD',
+ MMK = 'MMK',
+ MNT = 'MNT',
+ MOP = 'MOP',
+ MRO = 'MRO',
+ MUR = 'MUR',
+ MVR = 'MVR',
+ MWK = 'MWK',
+ MXN = 'MXN',
+ MXV = 'MXV',
+ MYR = 'MYR',
+ MZN = 'MZN',
+ NAD = 'NAD',
+ NGN = 'NGN',
+ NIO = 'NIO',
+ NOK = 'NOK',
+ NPR = 'NPR',
+ NZD = 'NZD',
+ OMR = 'OMR',
+ PAB = 'PAB',
+ PEN = 'PEN',
+ PGK = 'PGK',
+ PHP = 'PHP',
+ PKR = 'PKR',
+ PLN = 'PLN',
+ PYG = 'PYG',
+ QAR = 'QAR',
+ RON = 'RON',
+ RSD = 'RSD',
+ RUB = 'RUB',
+ RWF = 'RWF',
+ SAR = 'SAR',
+ SBD = 'SBD',
+ SCR = 'SCR',
+ SDG = 'SDG',
+ SEK = 'SEK',
+ SGD = 'SGD',
+ SHP = 'SHP',
+ SLL = 'SLL',
+ SOS = 'SOS',
+ SRD = 'SRD',
+ SSP = 'SSP',
+ STD = 'STD',
+ SYP = 'SYP',
+ SZL = 'SZL',
+ THB = 'THB',
+ TJS = 'TJS',
+ TMT = 'TMT',
+ TND = 'TND',
+ TOP = 'TOP',
+ TRY = 'TRY',
+ TTD = 'TTD',
+ TWD = 'TWD',
+ TZS = 'TZS',
+ UAH = 'UAH',
+ UGX = 'UGX',
+ UYU = 'UYU',
+ UZS = 'UZS',
+ VEF = 'VEF',
+ VND = 'VND',
+ VUV = 'VUV',
+ WST = 'WST',
+ XAF = 'XAF',
+ XCD = 'XCD',
+ XOF = 'XOF',
+ XPF = 'XPF',
+ YER = 'YER',
+ ZAR = 'ZAR',
+ ZMW = 'ZMW',
+}
+
+/**
+ * Defines values for ItemAvailability.
+ * Possible values include: 'Discontinued', 'InStock', 'InStoreOnly',
+ * 'LimitedAvailability', 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ItemAvailability =
+ * "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ItemAvailability {
+ Discontinued = 'Discontinued',
+ InStock = 'InStock',
+ InStoreOnly = 'InStoreOnly',
+ LimitedAvailability = 'LimitedAvailability',
+ OnlineOnly = 'OnlineOnly',
+ OutOfStock = 'OutOfStock',
+ PreOrder = 'PreOrder',
+ SoldOut = 'SoldOut',
+}
+
+/**
+ * Defines values for ErrorCode.
+ * Possible values include: 'None', 'ServerError', 'InvalidRequest',
+ * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ErrorCode = "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ErrorCode {
+ None = 'None',
+ ServerError = 'ServerError',
+ InvalidRequest = 'InvalidRequest',
+ RateLimitExceeded = 'RateLimitExceeded',
+ InvalidAuthorization = 'InvalidAuthorization',
+ InsufficientAuthorization = 'InsufficientAuthorization',
+}
+
+/**
+ * Defines values for ErrorSubCode.
+ * Possible values include: 'UnexpectedError', 'ResourceError',
+ * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue',
+ * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing',
+ * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ErrorSubCode =
+ * "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ErrorSubCode {
+ UnexpectedError = 'UnexpectedError',
+ ResourceError = 'ResourceError',
+ NotImplemented = 'NotImplemented',
+ ParameterMissing = 'ParameterMissing',
+ ParameterInvalidValue = 'ParameterInvalidValue',
+ HttpNotAllowed = 'HttpNotAllowed',
+ Blocked = 'Blocked',
+ AuthorizationMissing = 'AuthorizationMissing',
+ AuthorizationRedundancy = 'AuthorizationRedundancy',
+ AuthorizationDisabled = 'AuthorizationDisabled',
+ AuthorizationExpired = 'AuthorizationExpired',
+}
+
+/**
+ * Defines values for ImageAspect.
+ * Possible values include: 'All', 'Square', 'Wide', 'Tall'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ImageAspect =
+ * "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ImageAspect {
+ All = 'All',
+ Square = 'Square',
+ Wide = 'Wide',
+ Tall = 'Tall',
+}
+
+/**
+ * Defines values for ImageColor.
+ * Possible values include: 'ColorOnly', 'Monochrome', 'Black', 'Blue',
+ * 'Brown', 'Gray', 'Green', 'Orange', 'Pink', 'Purple', 'Red', 'Teal',
+ * 'White', 'Yellow'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ImageColor = "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ImageColor {
+ ColorOnly = 'ColorOnly',
+ Monochrome = 'Monochrome',
+ Black = 'Black',
+ Blue = 'Blue',
+ Brown = 'Brown',
+ Gray = 'Gray',
+ Green = 'Green',
+ Orange = 'Orange',
+ Pink = 'Pink',
+ Purple = 'Purple',
+ Red = 'Red',
+ Teal = 'Teal',
+ White = 'White',
+ Yellow = 'Yellow',
+}
+
+/**
+ * Defines values for Freshness.
+ * Possible values include: 'Day', 'Week', 'Month'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: Freshness = "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum Freshness {
+ Day = 'Day',
+ Week = 'Week',
+ Month = 'Month',
+}
+
+/**
+ * Defines values for ImageContent.
+ * Possible values include: 'Face', 'Portrait'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ImageContent =
+ * "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ImageContent {
+ Face = 'Face',
+ Portrait = 'Portrait',
+}
+
+/**
+ * Defines values for ImageType.
+ * Possible values include: 'AnimatedGif', 'Clipart', 'Line', 'Photo',
+ * 'Shopping', 'Transparent'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ImageType = "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ImageType {
+ AnimatedGif = 'AnimatedGif',
+ Clipart = 'Clipart',
+ Line = 'Line',
+ Photo = 'Photo',
+ Shopping = 'Shopping',
+ Transparent = 'Transparent',
+}
+
+/**
+ * Defines values for ImageLicense.
+ * Possible values include: 'All', 'Any', 'Public', 'Share',
+ * 'ShareCommercially', 'Modify', 'ModifyCommercially'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ImageLicense =
+ * "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ImageLicense {
+ All = 'All',
+ Any = 'Any',
+ Public = 'Public',
+ Share = 'Share',
+ ShareCommercially = 'ShareCommercially',
+ Modify = 'Modify',
+ ModifyCommercially = 'ModifyCommercially',
+}
+
+/**
+ * Defines values for SafeSearch.
+ * Possible values include: 'Off', 'Moderate', 'Strict'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: SafeSearch = "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum SafeSearch {
+ Off = 'Off',
+ Moderate = 'Moderate',
+ Strict = 'Strict',
+}
+
+/**
+ * Defines values for ImageSize.
+ * Possible values include: 'All', 'Small', 'Medium', 'Large', 'Wallpaper'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ImageSize = "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ImageSize {
+ All = 'All',
+ Small = 'Small',
+ Medium = 'Medium',
+ Large = 'Large',
+ Wallpaper = 'Wallpaper',
+}
+
+/**
+ * Defines values for ImageCropType.
+ * Possible values include: 'Rectangular'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ImageCropType =
+ * "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ImageCropType {
+ Rectangular = 'Rectangular',
+}
+
+/**
+ * Defines values for ImageInsightModule.
+ * Possible values include: 'All', 'BRQ', 'Caption', 'Collections', 'Recipes',
+ * 'PagesIncluding', 'RecognizedEntities', 'RelatedSearches',
+ * 'ShoppingSources', 'SimilarImages', 'SimilarProducts', 'Tags'
+ * There could be more values for this enum apart from the ones defined here.If
+ * you want to set a value that is not from the known values then you can do
+ * the following:
+ * let param: ImageInsightModule =
+ * "someUnknownValueThatWillStillBeValid";
+ * @readonly
+ * @enum {string}
+ */
+export enum ImageInsightModule {
+ All = 'All',
+ BRQ = 'BRQ',
+ Caption = 'Caption',
+ Collections = 'Collections',
+ Recipes = 'Recipes',
+ PagesIncluding = 'PagesIncluding',
+ RecognizedEntities = 'RecognizedEntities',
+ RelatedSearches = 'RelatedSearches',
+ ShoppingSources = 'ShoppingSources',
+ SimilarImages = 'SimilarImages',
+ SimilarProducts = 'SimilarProducts',
+ Tags = 'Tags',
+}
+
+/**
+ * Contains response data for the search operation.
+ */
+export type ImagesSearchResponse = Images & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: Images;
+ };
+};
+
+/**
+ * Contains response data for the details operation.
+ */
+export type ImagesDetailsResponse = ImageInsights & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: ImageInsights;
+ };
+};
+
+/**
+ * Contains response data for the trending operation.
+ */
+export type ImagesTrendingResponse = TrendingImages & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: TrendingImages;
+ };
+};
diff --git a/packages/@azure/cognitiveservices-imagesearch/lib/models/mappers.ts b/packages/@azure/cognitiveservices-imagesearch/lib/models/mappers.ts
new file mode 100644
index 000000000000..ed37dc2ff159
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/lib/models/mappers.ts
@@ -0,0 +1,1498 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+
+
+export const ResponseBase: msRest.CompositeMapper = {
+ serializedName: "ResponseBase",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: {
+ serializedName: "_type",
+ clientName: "_type"
+ },
+ uberParent: "ResponseBase",
+ className: "ResponseBase",
+ modelProperties: {
+ _type: {
+ required: true,
+ serializedName: "_type",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Identifiable: msRest.CompositeMapper = {
+ serializedName: "Identifiable",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Identifiable",
+ modelProperties: {
+ ...ResponseBase.type.modelProperties,
+ id: {
+ readOnly: true,
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Response: msRest.CompositeMapper = {
+ serializedName: "Response",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Response",
+ modelProperties: {
+ ...Identifiable.type.modelProperties,
+ readLink: {
+ readOnly: true,
+ serializedName: "readLink",
+ type: {
+ name: "String"
+ }
+ },
+ webSearchUrl: {
+ readOnly: true,
+ serializedName: "webSearchUrl",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Thing: msRest.CompositeMapper = {
+ serializedName: "Thing",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Thing",
+ modelProperties: {
+ ...Response.type.modelProperties,
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ url: {
+ readOnly: true,
+ serializedName: "url",
+ type: {
+ name: "String"
+ }
+ },
+ image: {
+ readOnly: true,
+ serializedName: "image",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageObject"
+ }
+ },
+ description: {
+ readOnly: true,
+ serializedName: "description",
+ type: {
+ name: "String"
+ }
+ },
+ alternateName: {
+ readOnly: true,
+ serializedName: "alternateName",
+ type: {
+ name: "String"
+ }
+ },
+ bingId: {
+ readOnly: true,
+ serializedName: "bingId",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Organization: msRest.CompositeMapper = {
+ serializedName: "Organization",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Organization",
+ modelProperties: {
+ ...Thing.type.modelProperties
+ }
+ }
+};
+
+export const PropertiesItem: msRest.CompositeMapper = {
+ serializedName: "Properties/Item",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: {
+ serializedName: "_type",
+ clientName: "_type"
+ },
+ uberParent: "PropertiesItem",
+ className: "PropertiesItem",
+ modelProperties: {
+ text: {
+ readOnly: true,
+ serializedName: "text",
+ type: {
+ name: "String"
+ }
+ },
+ _type: {
+ required: true,
+ serializedName: "_type",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Rating: msRest.CompositeMapper = {
+ serializedName: "Rating",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: PropertiesItem.type.polymorphicDiscriminator,
+ uberParent: "PropertiesItem",
+ className: "Rating",
+ modelProperties: {
+ ...PropertiesItem.type.modelProperties,
+ ratingValue: {
+ required: true,
+ serializedName: "ratingValue",
+ type: {
+ name: "Number"
+ }
+ },
+ bestRating: {
+ readOnly: true,
+ serializedName: "bestRating",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const AggregateRating: msRest.CompositeMapper = {
+ serializedName: "AggregateRating",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: PropertiesItem.type.polymorphicDiscriminator,
+ uberParent: "PropertiesItem",
+ className: "AggregateRating",
+ modelProperties: {
+ ...Rating.type.modelProperties,
+ reviewCount: {
+ readOnly: true,
+ serializedName: "reviewCount",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const Offer: msRest.CompositeMapper = {
+ serializedName: "Offer",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Offer",
+ modelProperties: {
+ ...Thing.type.modelProperties,
+ seller: {
+ readOnly: true,
+ serializedName: "seller",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Organization"
+ }
+ },
+ price: {
+ readOnly: true,
+ serializedName: "price",
+ type: {
+ name: "Number"
+ }
+ },
+ priceCurrency: {
+ readOnly: true,
+ serializedName: "priceCurrency",
+ defaultValue: 'USD',
+ type: {
+ name: "String"
+ }
+ },
+ availability: {
+ readOnly: true,
+ serializedName: "availability",
+ type: {
+ name: "String"
+ }
+ },
+ aggregateRating: {
+ readOnly: true,
+ serializedName: "aggregateRating",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: PropertiesItem.type.polymorphicDiscriminator,
+ uberParent: "PropertiesItem",
+ className: "AggregateRating"
+ }
+ },
+ lastUpdated: {
+ readOnly: true,
+ serializedName: "lastUpdated",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const AggregateOffer: msRest.CompositeMapper = {
+ serializedName: "AggregateOffer",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "AggregateOffer",
+ modelProperties: {
+ ...Offer.type.modelProperties,
+ offers: {
+ readOnly: true,
+ serializedName: "offers",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Offer"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const ImagesImageMetadata: msRest.CompositeMapper = {
+ serializedName: "Images/ImageMetadata",
+ type: {
+ name: "Composite",
+ className: "ImagesImageMetadata",
+ modelProperties: {
+ shoppingSourcesCount: {
+ readOnly: true,
+ serializedName: "shoppingSourcesCount",
+ type: {
+ name: "Number"
+ }
+ },
+ recipeSourcesCount: {
+ readOnly: true,
+ serializedName: "recipeSourcesCount",
+ type: {
+ name: "Number"
+ }
+ },
+ aggregateOffer: {
+ readOnly: true,
+ serializedName: "aggregateOffer",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "AggregateOffer"
+ }
+ }
+ }
+ }
+};
+
+export const CreativeWork: msRest.CompositeMapper = {
+ serializedName: "CreativeWork",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "CreativeWork",
+ modelProperties: {
+ ...Thing.type.modelProperties,
+ thumbnailUrl: {
+ readOnly: true,
+ serializedName: "thumbnailUrl",
+ type: {
+ name: "String"
+ }
+ },
+ provider: {
+ readOnly: true,
+ serializedName: "provider",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Thing"
+ }
+ }
+ }
+ },
+ datePublished: {
+ readOnly: true,
+ serializedName: "datePublished",
+ type: {
+ name: "String"
+ }
+ },
+ text: {
+ readOnly: true,
+ serializedName: "text",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const MediaObject: msRest.CompositeMapper = {
+ serializedName: "MediaObject",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "MediaObject",
+ modelProperties: {
+ ...CreativeWork.type.modelProperties,
+ contentUrl: {
+ readOnly: true,
+ serializedName: "contentUrl",
+ type: {
+ name: "String"
+ }
+ },
+ hostPageUrl: {
+ readOnly: true,
+ serializedName: "hostPageUrl",
+ type: {
+ name: "String"
+ }
+ },
+ contentSize: {
+ readOnly: true,
+ serializedName: "contentSize",
+ type: {
+ name: "String"
+ }
+ },
+ encodingFormat: {
+ readOnly: true,
+ serializedName: "encodingFormat",
+ type: {
+ name: "String"
+ }
+ },
+ hostPageDisplayUrl: {
+ readOnly: true,
+ serializedName: "hostPageDisplayUrl",
+ type: {
+ name: "String"
+ }
+ },
+ width: {
+ readOnly: true,
+ serializedName: "width",
+ type: {
+ name: "Number"
+ }
+ },
+ height: {
+ readOnly: true,
+ serializedName: "height",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const ImageObject: msRest.CompositeMapper = {
+ serializedName: "ImageObject",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageObject",
+ modelProperties: {
+ ...MediaObject.type.modelProperties,
+ thumbnail: {
+ readOnly: true,
+ serializedName: "thumbnail",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageObject"
+ }
+ },
+ imageInsightsToken: {
+ readOnly: true,
+ serializedName: "imageInsightsToken",
+ type: {
+ name: "String"
+ }
+ },
+ insightsMetadata: {
+ readOnly: true,
+ serializedName: "insightsMetadata",
+ type: {
+ name: "Composite",
+ className: "ImagesImageMetadata"
+ }
+ },
+ imageId: {
+ readOnly: true,
+ serializedName: "imageId",
+ type: {
+ name: "String"
+ }
+ },
+ accentColor: {
+ readOnly: true,
+ serializedName: "accentColor",
+ type: {
+ name: "String"
+ }
+ },
+ visualWords: {
+ readOnly: true,
+ serializedName: "visualWords",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const Query: msRest.CompositeMapper = {
+ serializedName: "Query",
+ type: {
+ name: "Composite",
+ className: "Query",
+ modelProperties: {
+ text: {
+ required: true,
+ serializedName: "text",
+ type: {
+ name: "String"
+ }
+ },
+ displayText: {
+ readOnly: true,
+ serializedName: "displayText",
+ type: {
+ name: "String"
+ }
+ },
+ webSearchUrl: {
+ readOnly: true,
+ serializedName: "webSearchUrl",
+ type: {
+ name: "String"
+ }
+ },
+ searchLink: {
+ readOnly: true,
+ serializedName: "searchLink",
+ type: {
+ name: "String"
+ }
+ },
+ thumbnail: {
+ readOnly: true,
+ serializedName: "thumbnail",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageObject"
+ }
+ }
+ }
+ }
+};
+
+export const PivotSuggestions: msRest.CompositeMapper = {
+ serializedName: "PivotSuggestions",
+ type: {
+ name: "Composite",
+ className: "PivotSuggestions",
+ modelProperties: {
+ pivot: {
+ required: true,
+ serializedName: "pivot",
+ type: {
+ name: "String"
+ }
+ },
+ suggestions: {
+ required: true,
+ serializedName: "suggestions",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Query"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const Answer: msRest.CompositeMapper = {
+ serializedName: "Answer",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Answer",
+ modelProperties: {
+ ...Response.type.modelProperties
+ }
+ }
+};
+
+export const SearchResultsAnswer: msRest.CompositeMapper = {
+ serializedName: "SearchResultsAnswer",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "SearchResultsAnswer",
+ modelProperties: {
+ ...Answer.type.modelProperties,
+ totalEstimatedMatches: {
+ readOnly: true,
+ serializedName: "totalEstimatedMatches",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const Images: msRest.CompositeMapper = {
+ serializedName: "Images",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Images",
+ modelProperties: {
+ ...SearchResultsAnswer.type.modelProperties,
+ nextOffset: {
+ readOnly: true,
+ serializedName: "nextOffset",
+ type: {
+ name: "Number"
+ }
+ },
+ value: {
+ required: true,
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageObject"
+ }
+ }
+ }
+ },
+ queryExpansions: {
+ readOnly: true,
+ serializedName: "queryExpansions",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Query"
+ }
+ }
+ }
+ },
+ pivotSuggestions: {
+ readOnly: true,
+ serializedName: "pivotSuggestions",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "PivotSuggestions"
+ }
+ }
+ }
+ },
+ similarTerms: {
+ readOnly: true,
+ serializedName: "similarTerms",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Query"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const ErrorModel: msRest.CompositeMapper = {
+ serializedName: "Error",
+ type: {
+ name: "Composite",
+ className: "ErrorModel",
+ modelProperties: {
+ code: {
+ required: true,
+ serializedName: "code",
+ defaultValue: 'None',
+ type: {
+ name: "String"
+ }
+ },
+ subCode: {
+ readOnly: true,
+ serializedName: "subCode",
+ type: {
+ name: "String"
+ }
+ },
+ message: {
+ required: true,
+ serializedName: "message",
+ type: {
+ name: "String"
+ }
+ },
+ moreDetails: {
+ readOnly: true,
+ serializedName: "moreDetails",
+ type: {
+ name: "String"
+ }
+ },
+ parameter: {
+ readOnly: true,
+ serializedName: "parameter",
+ type: {
+ name: "String"
+ }
+ },
+ value: {
+ readOnly: true,
+ serializedName: "value",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ErrorResponse: msRest.CompositeMapper = {
+ serializedName: "ErrorResponse",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ErrorResponse",
+ modelProperties: {
+ ...Response.type.modelProperties,
+ errors: {
+ required: true,
+ serializedName: "errors",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ErrorModel"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const ImageInsightsImageCaption: msRest.CompositeMapper = {
+ serializedName: "ImageInsights/ImageCaption",
+ type: {
+ name: "Composite",
+ className: "ImageInsightsImageCaption",
+ modelProperties: {
+ caption: {
+ required: true,
+ serializedName: "caption",
+ type: {
+ name: "String"
+ }
+ },
+ dataSourceUrl: {
+ required: true,
+ serializedName: "dataSourceUrl",
+ type: {
+ name: "String"
+ }
+ },
+ relatedSearches: {
+ required: true,
+ serializedName: "relatedSearches",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Query"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const WebPage: msRest.CompositeMapper = {
+ serializedName: "WebPage",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "WebPage",
+ modelProperties: {
+ ...CreativeWork.type.modelProperties
+ }
+ }
+};
+
+export const CollectionPage: msRest.CompositeMapper = {
+ serializedName: "CollectionPage",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "CollectionPage",
+ modelProperties: {
+ ...WebPage.type.modelProperties
+ }
+ }
+};
+
+export const ImageGallery: msRest.CompositeMapper = {
+ serializedName: "ImageGallery",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageGallery",
+ modelProperties: {
+ ...CollectionPage.type.modelProperties,
+ source: {
+ readOnly: true,
+ serializedName: "source",
+ type: {
+ name: "String"
+ }
+ },
+ imagesCount: {
+ readOnly: true,
+ serializedName: "imagesCount",
+ type: {
+ name: "Number"
+ }
+ },
+ followersCount: {
+ readOnly: true,
+ serializedName: "followersCount",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const RelatedCollectionsModule: msRest.CompositeMapper = {
+ serializedName: "RelatedCollectionsModule",
+ type: {
+ name: "Composite",
+ className: "RelatedCollectionsModule",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageGallery"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const ImagesModule: msRest.CompositeMapper = {
+ serializedName: "ImagesModule",
+ type: {
+ name: "Composite",
+ className: "ImagesModule",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageObject"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const RelatedSearchesModule: msRest.CompositeMapper = {
+ serializedName: "RelatedSearchesModule",
+ type: {
+ name: "Composite",
+ className: "RelatedSearchesModule",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "Query"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const Recipe: msRest.CompositeMapper = {
+ serializedName: "Recipe",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Recipe",
+ modelProperties: {
+ ...CreativeWork.type.modelProperties,
+ cookTime: {
+ readOnly: true,
+ serializedName: "cookTime",
+ type: {
+ name: "String"
+ }
+ },
+ prepTime: {
+ readOnly: true,
+ serializedName: "prepTime",
+ type: {
+ name: "String"
+ }
+ },
+ totalTime: {
+ readOnly: true,
+ serializedName: "totalTime",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const RecipesModule: msRest.CompositeMapper = {
+ serializedName: "RecipesModule",
+ type: {
+ name: "Composite",
+ className: "RecipesModule",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Recipe"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const Intangible: msRest.CompositeMapper = {
+ serializedName: "Intangible",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Intangible",
+ modelProperties: {
+ ...Thing.type.modelProperties
+ }
+ }
+};
+
+export const StructuredValue: msRest.CompositeMapper = {
+ serializedName: "StructuredValue",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "StructuredValue",
+ modelProperties: {
+ ...Intangible.type.modelProperties
+ }
+ }
+};
+
+export const NormalizedRectangle: msRest.CompositeMapper = {
+ serializedName: "NormalizedRectangle",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "NormalizedRectangle",
+ modelProperties: {
+ ...StructuredValue.type.modelProperties,
+ left: {
+ required: true,
+ serializedName: "left",
+ type: {
+ name: "Number"
+ }
+ },
+ top: {
+ required: true,
+ serializedName: "top",
+ type: {
+ name: "Number"
+ }
+ },
+ right: {
+ required: true,
+ serializedName: "right",
+ type: {
+ name: "Number"
+ }
+ },
+ bottom: {
+ required: true,
+ serializedName: "bottom",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const RecognizedEntity: msRest.CompositeMapper = {
+ serializedName: "RecognizedEntity",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "RecognizedEntity",
+ modelProperties: {
+ ...Response.type.modelProperties,
+ entity: {
+ readOnly: true,
+ serializedName: "entity",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Thing"
+ }
+ },
+ matchConfidence: {
+ readOnly: true,
+ serializedName: "matchConfidence",
+ type: {
+ name: "Number"
+ }
+ }
+ }
+ }
+};
+
+export const RecognizedEntityRegion: msRest.CompositeMapper = {
+ serializedName: "RecognizedEntityRegion",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "RecognizedEntityRegion",
+ modelProperties: {
+ ...Response.type.modelProperties,
+ region: {
+ readOnly: true,
+ serializedName: "region",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "NormalizedRectangle"
+ }
+ },
+ matchingEntities: {
+ readOnly: true,
+ serializedName: "matchingEntities",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "RecognizedEntity"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const RecognizedEntityGroup: msRest.CompositeMapper = {
+ serializedName: "RecognizedEntityGroup",
+ type: {
+ name: "Composite",
+ className: "RecognizedEntityGroup",
+ modelProperties: {
+ recognizedEntityRegions: {
+ required: true,
+ serializedName: "recognizedEntityRegions",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "RecognizedEntityRegion"
+ }
+ }
+ }
+ },
+ name: {
+ required: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const RecognizedEntitiesModule: msRest.CompositeMapper = {
+ serializedName: "RecognizedEntitiesModule",
+ type: {
+ name: "Composite",
+ className: "RecognizedEntitiesModule",
+ modelProperties: {
+ value: {
+ readOnly: true,
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "RecognizedEntityGroup"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const InsightsTag: msRest.CompositeMapper = {
+ serializedName: "InsightsTag",
+ type: {
+ name: "Composite",
+ className: "InsightsTag",
+ modelProperties: {
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const ImageTagsModule: msRest.CompositeMapper = {
+ serializedName: "ImageTagsModule",
+ type: {
+ name: "Composite",
+ className: "ImageTagsModule",
+ modelProperties: {
+ value: {
+ required: true,
+ serializedName: "value",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "InsightsTag"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const ImageInsights: msRest.CompositeMapper = {
+ serializedName: "ImageInsights",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageInsights",
+ modelProperties: {
+ ...Response.type.modelProperties,
+ imageInsightsToken: {
+ readOnly: true,
+ serializedName: "imageInsightsToken",
+ type: {
+ name: "String"
+ }
+ },
+ bestRepresentativeQuery: {
+ readOnly: true,
+ serializedName: "bestRepresentativeQuery",
+ type: {
+ name: "Composite",
+ className: "Query"
+ }
+ },
+ imageCaption: {
+ readOnly: true,
+ serializedName: "imageCaption",
+ type: {
+ name: "Composite",
+ className: "ImageInsightsImageCaption"
+ }
+ },
+ relatedCollections: {
+ readOnly: true,
+ serializedName: "relatedCollections",
+ type: {
+ name: "Composite",
+ className: "RelatedCollectionsModule"
+ }
+ },
+ pagesIncluding: {
+ readOnly: true,
+ serializedName: "pagesIncluding",
+ type: {
+ name: "Composite",
+ className: "ImagesModule"
+ }
+ },
+ shoppingSources: {
+ readOnly: true,
+ serializedName: "shoppingSources",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "AggregateOffer"
+ }
+ },
+ relatedSearches: {
+ readOnly: true,
+ serializedName: "relatedSearches",
+ type: {
+ name: "Composite",
+ className: "RelatedSearchesModule"
+ }
+ },
+ recipes: {
+ readOnly: true,
+ serializedName: "recipes",
+ type: {
+ name: "Composite",
+ className: "RecipesModule"
+ }
+ },
+ visuallySimilarImages: {
+ readOnly: true,
+ serializedName: "visuallySimilarImages",
+ type: {
+ name: "Composite",
+ className: "ImagesModule"
+ }
+ },
+ visuallySimilarProducts: {
+ readOnly: true,
+ serializedName: "visuallySimilarProducts",
+ type: {
+ name: "Composite",
+ className: "ImagesModule"
+ }
+ },
+ recognizedEntityGroups: {
+ readOnly: true,
+ serializedName: "recognizedEntityGroups",
+ type: {
+ name: "Composite",
+ className: "RecognizedEntitiesModule"
+ }
+ },
+ imageTags: {
+ readOnly: true,
+ serializedName: "imageTags",
+ type: {
+ name: "Composite",
+ className: "ImageTagsModule"
+ }
+ }
+ }
+ }
+};
+
+export const TrendingImagesTile: msRest.CompositeMapper = {
+ serializedName: "TrendingImages/Tile",
+ type: {
+ name: "Composite",
+ className: "TrendingImagesTile",
+ modelProperties: {
+ query: {
+ required: true,
+ serializedName: "query",
+ type: {
+ name: "Composite",
+ className: "Query"
+ }
+ },
+ image: {
+ required: true,
+ serializedName: "image",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "ImageObject"
+ }
+ }
+ }
+ }
+};
+
+export const TrendingImagesCategory: msRest.CompositeMapper = {
+ serializedName: "TrendingImages/Category",
+ type: {
+ name: "Composite",
+ className: "TrendingImagesCategory",
+ modelProperties: {
+ title: {
+ required: true,
+ serializedName: "title",
+ type: {
+ name: "String"
+ }
+ },
+ tiles: {
+ required: true,
+ serializedName: "tiles",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "TrendingImagesTile"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const TrendingImages: msRest.CompositeMapper = {
+ serializedName: "TrendingImages",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "TrendingImages",
+ modelProperties: {
+ ...Response.type.modelProperties,
+ categories: {
+ required: true,
+ serializedName: "categories",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "TrendingImagesCategory"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const Person: msRest.CompositeMapper = {
+ serializedName: "Person",
+ type: {
+ name: "Composite",
+ polymorphicDiscriminator: ResponseBase.type.polymorphicDiscriminator,
+ uberParent: "ResponseBase",
+ className: "Person",
+ modelProperties: {
+ ...Thing.type.modelProperties,
+ jobTitle: {
+ readOnly: true,
+ serializedName: "jobTitle",
+ type: {
+ name: "String"
+ }
+ },
+ twitterProfile: {
+ readOnly: true,
+ serializedName: "twitterProfile",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const discriminators = {
+ 'ResponseBase.Organization' : Organization,
+ 'PropertiesItem.AggregateRating' : AggregateRating,
+ 'ResponseBase.Offer' : Offer,
+ 'ResponseBase.AggregateOffer' : AggregateOffer,
+ 'ResponseBase.ImageObject' : ImageObject,
+ 'ResponseBase.Images' : Images,
+ 'ResponseBase.SearchResultsAnswer' : SearchResultsAnswer,
+ 'ResponseBase.Answer' : Answer,
+ 'ResponseBase.MediaObject' : MediaObject,
+ 'ResponseBase.Response' : Response,
+ 'ResponseBase.Thing' : Thing,
+ 'ResponseBase.CreativeWork' : CreativeWork,
+ 'ResponseBase.Identifiable' : Identifiable,
+ 'ResponseBase.ErrorResponse' : ErrorResponse,
+ 'ResponseBase.ImageGallery' : ImageGallery,
+ 'ResponseBase.Recipe' : Recipe,
+ 'ResponseBase.NormalizedRectangle' : NormalizedRectangle,
+ 'ResponseBase.RecognizedEntity' : RecognizedEntity,
+ 'ResponseBase.RecognizedEntityRegion' : RecognizedEntityRegion,
+ 'ResponseBase.ImageInsights' : ImageInsights,
+ 'ResponseBase.TrendingImages' : TrendingImages,
+ 'Properties/Item' : PropertiesItem,
+ 'ResponseBase.WebPage' : WebPage,
+ 'ResponseBase' : ResponseBase,
+ 'ResponseBase.Person' : Person,
+ 'ResponseBase.Intangible' : Intangible,
+ 'PropertiesItem.Rating' : Rating,
+ 'ResponseBase.CollectionPage' : CollectionPage,
+ 'ResponseBase.StructuredValue' : StructuredValue
+};
diff --git a/packages/@azure/cognitiveservices-imagesearch/lib/models/parameters.ts b/packages/@azure/cognitiveservices-imagesearch/lib/models/parameters.ts
new file mode 100644
index 000000000000..ef9ce159e663
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/lib/models/parameters.ts
@@ -0,0 +1,472 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+
+export const acceptLanguage: msRest.OperationParameter = {
+ parameterPath: [
+ "options",
+ "acceptLanguage"
+ ],
+ mapper: {
+ serializedName: "Accept-Language",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const aspect: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "aspect"
+ ],
+ mapper: {
+ serializedName: "aspect",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const clientId: msRest.OperationParameter = {
+ parameterPath: [
+ "options",
+ "clientId"
+ ],
+ mapper: {
+ serializedName: "X-MSEdge-ClientID",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const clientIp: msRest.OperationParameter = {
+ parameterPath: [
+ "options",
+ "clientIp"
+ ],
+ mapper: {
+ serializedName: "X-MSEdge-ClientIP",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const color: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "color"
+ ],
+ mapper: {
+ serializedName: "color",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const contentType: msRest.OperationParameter = {
+ parameterPath: [
+ "options",
+ "contentType"
+ ],
+ mapper: {
+ serializedName: "Content-Type",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const count: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "count"
+ ],
+ mapper: {
+ serializedName: "count",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const countryCode: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "countryCode"
+ ],
+ mapper: {
+ serializedName: "cc",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const cropBottom: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "cropBottom"
+ ],
+ mapper: {
+ serializedName: "cab",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const cropLeft: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "cropLeft"
+ ],
+ mapper: {
+ serializedName: "cal",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const cropRight: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "cropRight"
+ ],
+ mapper: {
+ serializedName: "car",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const cropTop: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "cropTop"
+ ],
+ mapper: {
+ serializedName: "cat",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const cropType: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "cropType"
+ ],
+ mapper: {
+ serializedName: "ct",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const freshness: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "freshness"
+ ],
+ mapper: {
+ serializedName: "freshness",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const height: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "height"
+ ],
+ mapper: {
+ serializedName: "height",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const id: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "id"
+ ],
+ mapper: {
+ serializedName: "id",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const imageContent: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "imageContent"
+ ],
+ mapper: {
+ serializedName: "imageContent",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const imageType: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "imageType"
+ ],
+ mapper: {
+ serializedName: "imageType",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const imageUrl: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "imageUrl"
+ ],
+ mapper: {
+ serializedName: "imgUrl",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const insightsToken: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "insightsToken"
+ ],
+ mapper: {
+ serializedName: "insightsToken",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const license: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "license"
+ ],
+ mapper: {
+ serializedName: "license",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const location: msRest.OperationParameter = {
+ parameterPath: [
+ "options",
+ "location"
+ ],
+ mapper: {
+ serializedName: "X-Search-Location",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const market: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "market"
+ ],
+ mapper: {
+ serializedName: "mkt",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const maxFileSize: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "maxFileSize"
+ ],
+ mapper: {
+ serializedName: "maxFileSize",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const maxHeight: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "maxHeight"
+ ],
+ mapper: {
+ serializedName: "maxHeight",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const maxWidth: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "maxWidth"
+ ],
+ mapper: {
+ serializedName: "maxWidth",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const minFileSize: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "minFileSize"
+ ],
+ mapper: {
+ serializedName: "minFileSize",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const minHeight: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "minHeight"
+ ],
+ mapper: {
+ serializedName: "minHeight",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const minWidth: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "minWidth"
+ ],
+ mapper: {
+ serializedName: "minWidth",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const modules: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "modules"
+ ],
+ mapper: {
+ serializedName: "modules",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "String"
+ }
+ }
+ }
+ },
+ collectionFormat: msRest.QueryCollectionFormat.Csv
+};
+export const offset: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "offset"
+ ],
+ mapper: {
+ serializedName: "offset",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const query: msRest.OperationQueryParameter = {
+ parameterPath: "query",
+ mapper: {
+ required: true,
+ serializedName: "q",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const safeSearch: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "safeSearch"
+ ],
+ mapper: {
+ serializedName: "safeSearch",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const setLang: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "setLang"
+ ],
+ mapper: {
+ serializedName: "setLang",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const size: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "size"
+ ],
+ mapper: {
+ serializedName: "size",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const userAgent: msRest.OperationParameter = {
+ parameterPath: [
+ "options",
+ "userAgent"
+ ],
+ mapper: {
+ serializedName: "User-Agent",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const width: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "width"
+ ],
+ mapper: {
+ serializedName: "width",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const xBingApisSDK: msRest.OperationParameter = {
+ parameterPath: "xBingApisSDK",
+ mapper: {
+ required: true,
+ isConstant: true,
+ serializedName: "X-BingApis-SDK",
+ defaultValue: 'true',
+ type: {
+ name: "String"
+ }
+ }
+};
diff --git a/packages/@azure/cognitiveservices-imagesearch/lib/operations/imagesOperations.ts b/packages/@azure/cognitiveservices-imagesearch/lib/operations/imagesOperations.ts
new file mode 100644
index 000000000000..b2db6401a0a0
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/lib/operations/imagesOperations.ts
@@ -0,0 +1,273 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+import * as msRest from "ms-rest-js";
+import * as Models from "../models";
+import * as Mappers from "../models/imagesOperationsMappers";
+import * as Parameters from "../models/parameters";
+import { ImageSearchAPIClientContext } from "../imageSearchAPIClientContext";
+
+/** Class representing a ImagesOperations. */
+export class ImagesOperations {
+ private readonly client: ImageSearchAPIClientContext;
+
+ /**
+ * Create a ImagesOperations.
+ * @param {ImageSearchAPIClientContext} client Reference to the service client.
+ */
+ constructor(client: ImageSearchAPIClientContext) {
+ this.client = client;
+ }
+
+ /**
+ * @summary The Image Search API lets you send a search query to Bing and get back a list of
+ * relevant images. This section provides technical details about the query parameters and headers
+ * that you use to request images and the JSON response objects that contain them. For examples
+ * that show how to make requests, see [Searching the Web for
+ * Images](https://docs.microsoft.com/azure/cognitive-services/bing-image-search/search-the-web).
+ * @param query The user's search query term. The term cannot be empty. The term may contain [Bing
+ * Advanced Operators](http://msdn.microsoft.com/library/ff795620.aspx). For example, to limit
+ * images to a specific domain, use the [site:](http://msdn.microsoft.com/library/ff795613.aspx)
+ * operator. To help improve relevance of an insights query (see
+ * [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken)),
+ * you should always include the user's query term. Use this parameter only with the Image Search
+ * API.Do not specify this parameter when calling the Trending Images API.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ search(query: string, options?: Models.ImagesSearchOptionalParams): Promise;
+ /**
+ * @param query The user's search query term. The term cannot be empty. The term may contain [Bing
+ * Advanced Operators](http://msdn.microsoft.com/library/ff795620.aspx). For example, to limit
+ * images to a specific domain, use the [site:](http://msdn.microsoft.com/library/ff795613.aspx)
+ * operator. To help improve relevance of an insights query (see
+ * [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken)),
+ * you should always include the user's query term. Use this parameter only with the Image Search
+ * API.Do not specify this parameter when calling the Trending Images API.
+ * @param callback The callback
+ */
+ search(query: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param query The user's search query term. The term cannot be empty. The term may contain [Bing
+ * Advanced Operators](http://msdn.microsoft.com/library/ff795620.aspx). For example, to limit
+ * images to a specific domain, use the [site:](http://msdn.microsoft.com/library/ff795613.aspx)
+ * operator. To help improve relevance of an insights query (see
+ * [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken)),
+ * you should always include the user's query term. Use this parameter only with the Image Search
+ * API.Do not specify this parameter when calling the Trending Images API.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ search(query: string, options: Models.ImagesSearchOptionalParams, callback: msRest.ServiceCallback): void;
+ search(query: string, options?: Models.ImagesSearchOptionalParams, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ query,
+ options
+ },
+ searchOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * @summary The Image Detail Search API lets you search on Bing and get back insights about an
+ * image, such as webpages that include the image. This section provides technical details about
+ * the query parameters and headers that you use to request insights of images and the JSON
+ * response objects that contain them. For examples that show how to make requests, see [Searching
+ * the Web for
+ * Images](https://docs.microsoft.com/azure/cognitive-services/bing-image-search/search-the-web).
+ * @param query The user's search query term. The term cannot be empty. The term may contain [Bing
+ * Advanced Operators](http://msdn.microsoft.com/library/ff795620.aspx). For example, to limit
+ * images to a specific domain, use the [site:](http://msdn.microsoft.com/library/ff795613.aspx)
+ * operator. To help improve relevance of an insights query (see
+ * [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken)),
+ * you should always include the user's query term. Use this parameter only with the Image Search
+ * API.Do not specify this parameter when calling the Trending Images API.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ details(query: string, options?: Models.ImagesDetailsOptionalParams): Promise;
+ /**
+ * @param query The user's search query term. The term cannot be empty. The term may contain [Bing
+ * Advanced Operators](http://msdn.microsoft.com/library/ff795620.aspx). For example, to limit
+ * images to a specific domain, use the [site:](http://msdn.microsoft.com/library/ff795613.aspx)
+ * operator. To help improve relevance of an insights query (see
+ * [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken)),
+ * you should always include the user's query term. Use this parameter only with the Image Search
+ * API.Do not specify this parameter when calling the Trending Images API.
+ * @param callback The callback
+ */
+ details(query: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param query The user's search query term. The term cannot be empty. The term may contain [Bing
+ * Advanced Operators](http://msdn.microsoft.com/library/ff795620.aspx). For example, to limit
+ * images to a specific domain, use the [site:](http://msdn.microsoft.com/library/ff795613.aspx)
+ * operator. To help improve relevance of an insights query (see
+ * [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken)),
+ * you should always include the user's query term. Use this parameter only with the Image Search
+ * API.Do not specify this parameter when calling the Trending Images API.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ details(query: string, options: Models.ImagesDetailsOptionalParams, callback: msRest.ServiceCallback): void;
+ details(query: string, options?: Models.ImagesDetailsOptionalParams, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ query,
+ options
+ },
+ detailsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * @summary The Image Trending Search API lets you search on Bing and get back a list of images
+ * that are trending based on search requests made by others. The images are broken out into
+ * different categories. For example, Popular People Searches. For a list of markets that support
+ * trending images, see [Trending
+ * Images](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-image-search/trending-images).
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ trending(options?: Models.ImagesTrendingOptionalParams): Promise;
+ /**
+ * @param callback The callback
+ */
+ trending(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ trending(options: Models.ImagesTrendingOptionalParams, callback: msRest.ServiceCallback): void;
+ trending(options?: Models.ImagesTrendingOptionalParams, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ trendingOperationSpec,
+ callback) as Promise;
+ }
+}
+
+// Operation Specifications
+const serializer = new msRest.Serializer(Mappers);
+const searchOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "bing/v7.0/images/search",
+ queryParameters: [
+ Parameters.aspect,
+ Parameters.color,
+ Parameters.countryCode,
+ Parameters.count,
+ Parameters.freshness,
+ Parameters.height,
+ Parameters.id,
+ Parameters.imageContent,
+ Parameters.imageType,
+ Parameters.license,
+ Parameters.market,
+ Parameters.maxFileSize,
+ Parameters.maxHeight,
+ Parameters.maxWidth,
+ Parameters.minFileSize,
+ Parameters.minHeight,
+ Parameters.minWidth,
+ Parameters.offset,
+ Parameters.query,
+ Parameters.safeSearch,
+ Parameters.size,
+ Parameters.setLang,
+ Parameters.width
+ ],
+ headerParameters: [
+ Parameters.xBingApisSDK,
+ Parameters.acceptLanguage,
+ Parameters.userAgent,
+ Parameters.clientId,
+ Parameters.clientIp,
+ Parameters.location
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.Images
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const detailsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "bing/v7.0/images/details",
+ queryParameters: [
+ Parameters.cropBottom,
+ Parameters.cropLeft,
+ Parameters.cropRight,
+ Parameters.cropTop,
+ Parameters.cropType,
+ Parameters.countryCode,
+ Parameters.id,
+ Parameters.imageUrl,
+ Parameters.insightsToken,
+ Parameters.modules,
+ Parameters.market,
+ Parameters.query,
+ Parameters.safeSearch,
+ Parameters.setLang
+ ],
+ headerParameters: [
+ Parameters.xBingApisSDK,
+ Parameters.acceptLanguage,
+ Parameters.contentType,
+ Parameters.userAgent,
+ Parameters.clientId,
+ Parameters.clientIp,
+ Parameters.location
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.ImageInsights
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
+
+const trendingOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "bing/v7.0/images/trending",
+ queryParameters: [
+ Parameters.countryCode,
+ Parameters.market,
+ Parameters.safeSearch,
+ Parameters.setLang
+ ],
+ headerParameters: [
+ Parameters.xBingApisSDK,
+ Parameters.acceptLanguage,
+ Parameters.userAgent,
+ Parameters.clientId,
+ Parameters.clientIp,
+ Parameters.location
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.TrendingImages
+ },
+ default: {
+ bodyMapper: Mappers.ErrorResponse
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/cognitiveservices-imagesearch/lib/operations/index.ts b/packages/@azure/cognitiveservices-imagesearch/lib/operations/index.ts
new file mode 100644
index 000000000000..32124b394659
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/lib/operations/index.ts
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */
+
+export * from "./imagesOperations";
diff --git a/packages/@azure/cognitiveservices-imagesearch/package.json b/packages/@azure/cognitiveservices-imagesearch/package.json
new file mode 100644
index 000000000000..b87b0849832e
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "@azure/cognitiveservices-imagesearch",
+ "author": "Microsoft Corporation",
+ "description": "ImageSearchAPIClient Library with typescript type definitions for node.js and browser.",
+ "version": "1.0.0",
+ "dependencies": {
+ "ms-rest-js": "^1.0.443",
+ "tslib": "^1.9.3"
+ },
+ "keywords": [
+ "node",
+ "azure",
+ "typescript",
+ "browser",
+ "isomorphic"
+ ],
+ "license": "MIT",
+ "main": "./dist/cognitiveservices-imagesearch.js",
+ "module": "./esm/imageSearchAPIClient.js",
+ "types": "./esm/imageSearchAPIClient.d.ts",
+ "devDependencies": {
+ "typescript": "^3.1.1",
+ "rollup": "^0.66.2",
+ "rollup-plugin-node-resolve": "^3.4.0",
+ "uglify-js": "^3.4.9"
+ },
+ "homepage": "https://github.com/azure/azure-sdk-for-js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/azure/azure-sdk-for-js.git"
+ },
+ "bugs": {
+ "url": "https://github.com/azure/azure-sdk-for-js/issues"
+ },
+ "scripts": {
+ "build": "tsc && rollup -c rollup.config.js && npm run minify",
+ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-imagesearch.js.map'\" -o ./dist/cognitiveservices-imagesearch.min.js ./dist/cognitiveservices-imagesearch.js",
+ "prepare": "npm run build"
+ },
+ "sideEffects": false
+}
diff --git a/packages/@azure/cognitiveservices-imagesearch/rollup.config.js b/packages/@azure/cognitiveservices-imagesearch/rollup.config.js
new file mode 100644
index 000000000000..2f945ecc8c53
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/rollup.config.js
@@ -0,0 +1,31 @@
+import nodeResolve from "rollup-plugin-node-resolve";
+/**
+ * @type {import('rollup').RollupFileOptions}
+ */
+const config = {
+ input: './esm/imageSearchAPIClient.js',
+ external: ["ms-rest-js", "ms-rest-azure-js"],
+ output: {
+ file: "./dist/cognitiveservices-imagesearch.js",
+ format: "umd",
+ name: "Azure.CognitiveservicesImagesearch",
+ sourcemap: true,
+ globals: {
+ "ms-rest-js": "msRest",
+ "ms-rest-azure-js": "msRestAzure"
+ },
+ banner: `/*
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * Changes may cause incorrect behavior and will be lost if the code is
+ * regenerated.
+ */`
+ },
+ plugins: [
+ nodeResolve({ module: true })
+ ]
+};
+export default config;
diff --git a/packages/@azure/cognitiveservices-imagesearch/tsconfig.json b/packages/@azure/cognitiveservices-imagesearch/tsconfig.json
new file mode 100644
index 000000000000..f32d1664f320
--- /dev/null
+++ b/packages/@azure/cognitiveservices-imagesearch/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "compilerOptions": {
+ "module": "es6",
+ "moduleResolution": "node",
+ "strict": true,
+ "target": "es5",
+ "sourceMap": true,
+ "declarationMap": true,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "forceConsistentCasingInFileNames": true,
+ "lib": ["es6"],
+ "declaration": true,
+ "outDir": "./esm",
+ "importHelpers": true
+ },
+ "include": ["./lib/**/*"],
+ "exclude": ["node_modules"]
+}