UNPKG

azure

Version:
130 lines (124 loc) 4.25 kB
/* * 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. */ 'use strict'; const models = require('./index'); /** * Defines the top-level object that the response includes when the request * succeeds. * * @extends models['Response'] */ class SearchResponse extends models['Response'] { /** * Create a SearchResponse. * @member {object} [queryContext] An object that contains the query string * that Bing used for the request. This object contains the query string as * entered by the user. It may also contain an altered query string that Bing * used for the query if the query string contained a spelling mistake. * @member {string} [queryContext.originalQuery] The query string as * specified in the request. * @member {string} [queryContext.alteredQuery] The query string used by Bing * to perform the query. Bing uses the altered query string if the original * query string contained spelling mistakes. For example, if the query string * is "saling downwind", the altered query string will be "sailing downwind". * This field is included only if the original query string contains a * spelling mistake. * @member {string} [queryContext.alterationOverrideQuery] The query string * to use to force Bing to use the original string. For example, if the query * string is "saling downwind", the override query string will be "+saling * downwind". Remember to encode the query string which results in * "%2Bsaling+downwind". This field is included only if the original query * string contains a spelling mistake. * @member {boolean} [queryContext.adultIntent] A Boolean value that * indicates whether the specified query has adult intent. The value is true * if the query has adult intent; otherwise, false. * @member {object} [webPages] A list of webpages that are relevant to the * search query. * @member {array} [webPages.value] A list of webpages that are relevant to * the query. * @member {boolean} [webPages.someResultsRemoved] A Boolean value that * indicates whether the response excluded some results from the answer. If * Bing excluded some results, the value is true. */ constructor() { super(); } /** * Defines the metadata of SearchResponse * * @returns {object} metadata of SearchResponse * */ mapper() { return { required: false, serializedName: 'SearchResponse', type: { name: 'Composite', polymorphicDiscriminator: { serializedName: '_type', clientName: '_type' }, uberParent: 'ResponseBase', className: 'SearchResponse', modelProperties: { _type: { required: true, serializedName: '_type', isPolymorphicDiscriminator: true, type: { name: 'String' } }, id: { required: false, readOnly: true, serializedName: 'id', type: { name: 'String' } }, webSearchUrl: { required: false, readOnly: true, serializedName: 'webSearchUrl', type: { name: 'String' } }, queryContext: { required: false, readOnly: true, serializedName: 'queryContext', type: { name: 'Composite', className: 'QueryContext' } }, webPages: { required: false, readOnly: true, serializedName: 'webPages', type: { name: 'Composite', polymorphicDiscriminator: { serializedName: '_type', clientName: '_type' }, uberParent: 'ResponseBase', className: 'WebWebAnswer' } } } } }; } } module.exports = SearchResponse;