Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Generated from 0f5faf9b3f417c79e23b5360aed6c7d56d5dea91 (#4243)
Browse files Browse the repository at this point in the history
typo: cognitiveservices/data-plane/EntitySearch

- countr -> country
  • Loading branch information
AutorestCI authored Dec 3, 2018
1 parent 54ccef4 commit 4d37ef1
Show file tree
Hide file tree
Showing 34 changed files with 434 additions and 630 deletions.
42 changes: 21 additions & 21 deletions lib/services/entitySearch/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +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.
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.
18 changes: 15 additions & 3 deletions lib/services/entitySearch/lib/entitySearchAPIClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'm
import * as models from "./models";
import * as operations from "./operations";

/**
* EntitySearchAPIClientOptions for EntitySearchAPIClient.
*/
declare interface EntitySearchAPIClientOptions extends ServiceClientOptions {
/**
* @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com").
*/
endpoint?: string;
}

export default class EntitySearchAPIClient extends ServiceClient {
/**
* @class
Expand All @@ -20,8 +30,6 @@ export default class EntitySearchAPIClient extends ServiceClient {
*
* @param {credentials} credentials - Subscription credentials which uniquely identify client subscription.
*
* @param {string} [baseUri] - The base URI of the service.
*
* @param {object} [options] - The parameter options
*
* @param {Array} [options.filters] - Filters to be added to the request pipeline
Expand All @@ -31,11 +39,15 @@ export default class EntitySearchAPIClient extends ServiceClient {
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com").
*
*/
constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: ServiceClientOptions);
constructor(credentials: ServiceClientCredentials, options?: EntitySearchAPIClientOptions);

credentials: ServiceClientCredentials;

endpoint: string;

// Operation groups
entitiesOperations: operations.EntitiesOperations;
}
Expand Down
13 changes: 7 additions & 6 deletions lib/services/entitySearch/lib/entitySearchAPIClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class EntitySearchAPIClient extends ServiceClient {
/**
* Create a EntitySearchAPIClient.
* @param {credentials} credentials - Subscription credentials which uniquely identify client subscription.
* @param {string} [baseUri] - The base URI of the service.
* @param {object} [options] - The parameter options
* @param {Array} [options.filters] - Filters to be added to the request pipeline
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com").
*/
constructor(credentials, baseUri, options) {
constructor(credentials, options) {
if (credentials === null || credentials === undefined) {
throw new Error('\'credentials\' cannot be null.');
}
Expand All @@ -42,14 +42,15 @@ class EntitySearchAPIClient extends ServiceClient {

super(credentials, options);

this.baseUri = baseUri;
if (!this.baseUri) {
this.baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0';
}
this.endpoint = 'https://api.cognitive.microsoft.com';
this.baseUri = '{Endpoint}/bing/v7.0';
this.credentials = credentials;

let packageInfo = this.getPackageJsonInfo(__dirname);
this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`);
if(options.endpoint !== null && options.endpoint !== undefined) {
this.endpoint = options.endpoint;
}
this.entitiesOperations = new operations.EntitiesOperations(this);
this.models = models;
msRest.addSerializationMixin(this);
Expand Down
4 changes: 2 additions & 2 deletions lib/services/entitySearch/lib/models/airport.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const models = require('./index');
class Airport extends models['CivicStructure'] {
/**
* Create a Airport.
* @member {string} [iataCode]
* @member {string} [icaoCode]
* @property {string} [iataCode]
* @property {string} [icaoCode]
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const models = require('./index');
class ContractualRulesAttribution extends models['ContractualRulesContractualRule'] {
/**
* Create a ContractualRulesAttribution.
* @member {boolean} [mustBeCloseToContent] A Boolean value that determines
* @property {boolean} [mustBeCloseToContent] A Boolean value that determines
* whether the contents of the rule must be placed in close proximity to the
* field that the rule applies to. If true, the contents must be placed in
* close proximity. If false, or this field does not exist, the contents may
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
class ContractualRulesContractualRule {
/**
* Create a ContractualRulesContractualRule.
* @member {string} [targetPropertyName] The name of the field that the rule
* applies to.
* @member {string} _type Polymorphic Discriminator
* @property {string} [targetPropertyName] The name of the field that the
* rule applies to.
* @property {string} _type Polymorphic Discriminator
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const models = require('./index');
class ContractualRulesLicenseAttribution extends models['ContractualRulesAttribution'] {
/**
* Create a ContractualRulesLicenseAttribution.
* @member {object} [license] The license under which the content may be
* @property {object} [license] The license under which the content may be
* used.
* @member {string} [licenseNotice] The license to display next to the
* @property {string} [licenseNotice] The license to display next to the
* targeted field.
*/
constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ const models = require('./index');
class ContractualRulesLinkAttribution extends models['ContractualRulesAttribution'] {
/**
* Create a ContractualRulesLinkAttribution.
* @member {string} text The attribution text.
* @member {string} url The URL to the provider's website. Use text and URL
* @property {string} text The attribution text.
* @property {string} url The URL to the provider's website. Use text and URL
* to create the hyperlink.
* @member {boolean} [optionalForListDisplay] Indicates whether this
* @property {boolean} [optionalForListDisplay] Indicates whether this
* provider's attribution is optional.
*/
constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const models = require('./index');
class ContractualRulesMediaAttribution extends models['ContractualRulesAttribution'] {
/**
* Create a ContractualRulesMediaAttribution.
* @member {string} [url] The URL that you use to create of hyperlink of the
* media content. For example, if the target is an image, you would use the
* URL to make the image clickable.
* @property {string} [url] The URL that you use to create of hyperlink of
* the media content. For example, if the target is an image, you would use
* the URL to make the image clickable.
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const models = require('./index');
class ContractualRulesTextAttribution extends models['ContractualRulesAttribution'] {
/**
* Create a ContractualRulesTextAttribution.
* @member {string} text The attribution text. Text attribution applies to
* @property {string} text The attribution text. Text attribution applies to
* the entity as a whole and should be displayed immediately following the
* entity presentation. If there are multiple text or link attribution rules
* that do not specify a target, you should concatenate them and display them
* using a "Data from:" label.
* @member {boolean} [optionalForListDisplay] Indicates whether this
* @property {boolean} [optionalForListDisplay] Indicates whether this
* provider's attribution is optional.
*/
constructor() {
Expand Down
6 changes: 3 additions & 3 deletions lib/services/entitySearch/lib/models/creativeWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const models = require('./index');
class CreativeWork extends models['Thing'] {
/**
* Create a CreativeWork.
* @member {string} [thumbnailUrl] The URL to a thumbnail of the item.
* @member {array} [provider] The source of the creative work.
* @member {string} [text]
* @property {string} [thumbnailUrl] The URL to a thumbnail of the item.
* @property {array} [provider] The source of the creative work.
* @property {string} [text]
*/
constructor() {
super();
Expand Down
6 changes: 3 additions & 3 deletions lib/services/entitySearch/lib/models/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const models = require('./index');
class Entities extends models['SearchResultsAnswer'] {
/**
* Create a Entities.
* @member {string} [queryScenario] The supported query scenario. This field
* is set to DominantEntity or DisambiguationItem. The field is set to
* @property {string} [queryScenario] The supported query scenario. This
* field is set to DominantEntity or DisambiguationItem. The field is set to
* DominantEntity if Bing determines that only a single entity satisfies the
* request. For example, a book, movie, person, or attraction. If multiple
* entities could satisfy the request, the field is set to
Expand All @@ -31,7 +31,7 @@ class Entities extends models['SearchResultsAnswer'] {
* entity's type would likely be DominantEntity. Possible values include:
* 'DominantEntity', 'DominantEntityWithDisambiguation', 'Disambiguation',
* 'List', 'ListWithPivot'. Default value: 'DominantEntity' .
* @member {array} value A list of entities.
* @property {array} value A list of entities.
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
class EntitiesEntityPresentationInfo {
/**
* Create a EntitiesEntityPresentationInfo.
* @member {string} entityScenario The supported scenario. Possible values
* @property {string} entityScenario The supported scenario. Possible values
* include: 'DominantEntity', 'DisambiguationItem', 'ListItem'. Default
* value: 'DominantEntity' .
* @member {array} [entityTypeHints] A list of hints that indicate the
* @property {array} [entityTypeHints] A list of hints that indicate the
* entity's type. The list could contain a single hint such as Movie or a
* list of hints such as Place, LocalBusiness, Restaurant. Each successive
* hint in the array narrows the entity's type.
* @member {string} [entityTypeDisplayHint] A display version of the entity
* @property {string} [entityTypeDisplayHint] A display version of the entity
* hint. For example, if entityTypeHints is Artist, this field may be set to
* American Singer.
*/
Expand Down Expand Up @@ -61,7 +61,7 @@ class EntitiesEntityPresentationInfo {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
serializedName: 'EntityTypeElementType',
type: {
name: 'String'
}
Expand Down
16 changes: 8 additions & 8 deletions lib/services/entitySearch/lib/models/errorModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
class ErrorModel {
/**
* Create a ErrorModel.
* @member {string} code The error code that identifies the category of
* @property {string} code The error code that identifies the category of
* error. Possible values include: 'None', 'ServerError', 'InvalidRequest',
* 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'.
* Default value: 'None' .
* @member {string} [subCode] The error code that further helps to identify
* @property {string} [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'
* @member {string} message A description of the error.
* @member {string} [moreDetails] A description that provides additional
* @property {string} message A description of the error.
* @property {string} [moreDetails] A description that provides additional
* information about the error.
* @member {string} [parameter] The parameter in the request that caused the
* error.
* @member {string} [value] The parameter's value in the request that was not
* valid.
* @property {string} [parameter] The parameter in the request that caused
* the error.
* @property {string} [value] The parameter's value in the request that was
* not valid.
*/
constructor() {
}
Expand Down
4 changes: 2 additions & 2 deletions lib/services/entitySearch/lib/models/errorResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const models = require('./index');
class ErrorResponse extends models['Response'] {
/**
* Create a ErrorResponse.
* @member {array} errors A list of errors that describe the reasons why the
* request failed.
* @property {array} errors A list of errors that describe the reasons why
* the request failed.
*/
constructor() {
super();
Expand Down
4 changes: 2 additions & 2 deletions lib/services/entitySearch/lib/models/hotel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const models = require('./index');
class Hotel extends models['LodgingBusiness'] {
/**
* Create a Hotel.
* @member {string} [hotelClass]
* @member {array} [amenities]
* @property {string} [hotelClass]
* @property {array} [amenities]
*/
constructor() {
super();
Expand Down
2 changes: 1 addition & 1 deletion lib/services/entitySearch/lib/models/identifiable.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const models = require('./index');
class Identifiable extends models['ResponseBase'] {
/**
* Create a Identifiable.
* @member {string} [id] A String identifier.
* @property {string} [id] A String identifier.
*/
constructor() {
super();
Expand Down
2 changes: 1 addition & 1 deletion lib/services/entitySearch/lib/models/imageObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const models = require('./index');
class ImageObject extends models['MediaObject'] {
/**
* Create a ImageObject.
* @member {object} [thumbnail] The URL to a thumbnail of the image
* @property {object} [thumbnail] The URL to a thumbnail of the image
*/
constructor() {
super();
Expand Down
Loading

0 comments on commit 4d37ef1

Please sign in to comment.