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

Commit

Permalink
Generated from bd6c66b615b94480a1458dde3a8bc42f3a689548
Browse files Browse the repository at this point in the history
ComputerVision - collection of fixes

* fix ocr language parameter to fix [bug](Azure/azure-sdk-for-net#4083)
* language parameter missing for /tag path
* language parameter missing for /models/*/analyze path
* make /models/*/analyze return a more generic type
* add specific types for /models/*/analyze to return for current models
  • Loading branch information
AutorestCI committed May 29, 2018
1 parent 619b71d commit c7b3e8e
Show file tree
Hide file tree
Showing 9 changed files with 430 additions and 46 deletions.
60 changes: 47 additions & 13 deletions lib/services/computerVision/lib/computerVisionAPIClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,13 +555,18 @@ export default class ComputerVisionAPIClient extends ServiceClient {
* If the request failed, the response will contain an error code and a message
* to help understand what went wrong.
*
* @param {string} model The domain-specific content to recognize. Possible
* values include: 'Celebrities', 'Landmarks'
* @param {string} model The domain-specific content to recognize.
*
* @param {string} url Publicly reachable URL of an image
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.language] The desired language for output
* generation. If this parameter is not specified, the default value is
* "en".Supported languages:en - English, Default.ja - Japanese pt -
* Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja',
* 'pt', 'zh'
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -571,7 +576,7 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* @reject {Error|ServiceError} - The error object.
*/
analyzeImageByDomainWithHttpOperationResponse(model: string, url: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.DomainModelResults>>;
analyzeImageByDomainWithHttpOperationResponse(model: string, url: string, options?: { language? : string, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.DomainModelResults>>;

/**
* This operation recognizes content within an image by applying a
Expand All @@ -583,13 +588,18 @@ export default class ComputerVisionAPIClient extends ServiceClient {
* If the request failed, the response will contain an error code and a message
* to help understand what went wrong.
*
* @param {string} model The domain-specific content to recognize. Possible
* values include: 'Celebrities', 'Landmarks'
* @param {string} model The domain-specific content to recognize.
*
* @param {string} url Publicly reachable URL of an image
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.language] The desired language for output
* generation. If this parameter is not specified, the default value is
* &quot;en&quot;.Supported languages:en - English, Default.ja - Japanese pt -
* Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja',
* 'pt', 'zh'
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -615,9 +625,9 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
analyzeImageByDomain(model: string, url: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.DomainModelResults>;
analyzeImageByDomain(model: string, url: string, options?: { language? : string, customHeaders? : { [headerName: string]: string; } }): Promise<models.DomainModelResults>;
analyzeImageByDomain(model: string, url: string, callback: ServiceCallback<models.DomainModelResults>): void;
analyzeImageByDomain(model: string, url: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.DomainModelResults>): void;
analyzeImageByDomain(model: string, url: string, options: { language? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.DomainModelResults>): void;


/**
Expand Down Expand Up @@ -1125,6 +1135,12 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.language] The desired language for output
* generation. If this parameter is not specified, the default value is
* &quot;en&quot;.Supported languages:en - English, Default.ja - Japanese pt -
* Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja',
* 'pt', 'zh'
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -1134,7 +1150,7 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* @reject {Error|ServiceError} - The error object.
*/
tagImageInStreamWithHttpOperationResponse(image: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.TagResult>>;
tagImageInStreamWithHttpOperationResponse(image: stream.Readable, options?: { language? : string, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.TagResult>>;

/**
* This operation generates a list of words, or tags, that are relevant to the
Expand All @@ -1149,6 +1165,12 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.language] The desired language for output
* generation. If this parameter is not specified, the default value is
* &quot;en&quot;.Supported languages:en - English, Default.ja - Japanese pt -
* Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja',
* 'pt', 'zh'
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -1174,9 +1196,9 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
tagImageInStream(image: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.TagResult>;
tagImageInStream(image: stream.Readable, options?: { language? : string, customHeaders? : { [headerName: string]: string; } }): Promise<models.TagResult>;
tagImageInStream(image: stream.Readable, callback: ServiceCallback<models.TagResult>): void;
tagImageInStream(image: stream.Readable, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.TagResult>): void;
tagImageInStream(image: stream.Readable, options: { language? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.TagResult>): void;


/**
Expand All @@ -1195,6 +1217,12 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.language] The desired language for output
* generation. If this parameter is not specified, the default value is
* &quot;en&quot;.Supported languages:en - English, Default.ja - Japanese pt -
* Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja',
* 'pt', 'zh'
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -1204,7 +1232,7 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* @reject {Error|ServiceError} - The error object.
*/
analyzeImageByDomainInStreamWithHttpOperationResponse(model: string, image: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.DomainModelResults>>;
analyzeImageByDomainInStreamWithHttpOperationResponse(model: string, image: stream.Readable, options?: { language? : string, customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.DomainModelResults>>;

/**
* This operation recognizes content within an image by applying a
Expand All @@ -1222,6 +1250,12 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* @param {object} [options] Optional Parameters.
*
* @param {string} [options.language] The desired language for output
* generation. If this parameter is not specified, the default value is
* &quot;en&quot;.Supported languages:en - English, Default.ja - Japanese pt -
* Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja',
* 'pt', 'zh'
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
Expand All @@ -1247,9 +1281,9 @@ export default class ComputerVisionAPIClient extends ServiceClient {
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
analyzeImageByDomainInStream(model: string, image: stream.Readable, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.DomainModelResults>;
analyzeImageByDomainInStream(model: string, image: stream.Readable, options?: { language? : string, customHeaders? : { [headerName: string]: string; } }): Promise<models.DomainModelResults>;
analyzeImageByDomainInStream(model: string, image: stream.Readable, callback: ServiceCallback<models.DomainModelResults>): void;
analyzeImageByDomainInStream(model: string, image: stream.Readable, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.DomainModelResults>): void;
analyzeImageByDomainInStream(model: string, image: stream.Readable, options: { language? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.DomainModelResults>): void;


/**
Expand Down
Loading

0 comments on commit c7b3e8e

Please sign in to comment.