-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoPR cognitiveservices/data-plane/QnAMaker] Adding missing docs fo…
…r existing routes for QnA Maker APIM (#3393) * Generated from 6d3acf9fe3af2f4fab75e59df444dfed9763cae1 fix metadata ref * Generated from 8ae17e91d45e1fc5c0db23826c2c0ca20d3b886d spellcheck
- Loading branch information
1 parent
324b388
commit dc292c4
Showing
9 changed files
with
306 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
sdk/cognitiveservices/cognitiveservices-qnamaker/src/models/endpointSettingsMappers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* 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 { | ||
ActiveLearningSettingsDTO, | ||
EndpointSettingsDTO, | ||
EndpointSettingsDTOActiveLearning, | ||
ErrorModel, | ||
ErrorResponse, | ||
ErrorResponseError, | ||
InnerErrorModel | ||
} from "../models/mappers"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
sdk/cognitiveservices/cognitiveservices-qnamaker/src/operations/endpointSettings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
/* | ||
* 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 "@azure/ms-rest-js"; | ||
import * as Models from "../models"; | ||
import * as Mappers from "../models/endpointSettingsMappers"; | ||
import * as Parameters from "../models/parameters"; | ||
import { QnAMakerClientContext } from "../qnAMakerClientContext"; | ||
|
||
/** Class representing a EndpointSettings. */ | ||
export class EndpointSettings { | ||
private readonly client: QnAMakerClientContext; | ||
|
||
/** | ||
* Create a EndpointSettings. | ||
* @param {QnAMakerClientContext} client Reference to the service client. | ||
*/ | ||
constructor(client: QnAMakerClientContext) { | ||
this.client = client; | ||
} | ||
|
||
/** | ||
* @summary Gets endpoint settings for an endpoint. | ||
* @param [options] The optional parameters | ||
* @returns Promise<Models.EndpointSettingsGetSettingsResponse> | ||
*/ | ||
getSettings(options?: msRest.RequestOptionsBase): Promise<Models.EndpointSettingsGetSettingsResponse>; | ||
/** | ||
* @param callback The callback | ||
*/ | ||
getSettings(callback: msRest.ServiceCallback<Models.EndpointSettingsDTO>): void; | ||
/** | ||
* @param options The optional parameters | ||
* @param callback The callback | ||
*/ | ||
getSettings(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.EndpointSettingsDTO>): void; | ||
getSettings(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.EndpointSettingsDTO>, callback?: msRest.ServiceCallback<Models.EndpointSettingsDTO>): Promise<Models.EndpointSettingsGetSettingsResponse> { | ||
return this.client.sendOperationRequest( | ||
{ | ||
options | ||
}, | ||
getSettingsOperationSpec, | ||
callback) as Promise<Models.EndpointSettingsGetSettingsResponse>; | ||
} | ||
|
||
/** | ||
* @summary Updates endpoint settings for an endpoint. | ||
* @param endpointSettingsPayload Post body of the request. | ||
* @param [options] The optional parameters | ||
* @returns Promise<Models.EndpointSettingsUpdateSettingsResponse> | ||
*/ | ||
updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options?: msRest.RequestOptionsBase): Promise<Models.EndpointSettingsUpdateSettingsResponse>; | ||
/** | ||
* @param endpointSettingsPayload Post body of the request. | ||
* @param callback The callback | ||
*/ | ||
updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, callback: msRest.ServiceCallback<string>): void; | ||
/** | ||
* @param endpointSettingsPayload Post body of the request. | ||
* @param options The optional parameters | ||
* @param callback The callback | ||
*/ | ||
updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<string>): void; | ||
updateSettings(endpointSettingsPayload: Models.EndpointSettingsDTO, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<string>, callback?: msRest.ServiceCallback<string>): Promise<Models.EndpointSettingsUpdateSettingsResponse> { | ||
return this.client.sendOperationRequest( | ||
{ | ||
endpointSettingsPayload, | ||
options | ||
}, | ||
updateSettingsOperationSpec, | ||
callback) as Promise<Models.EndpointSettingsUpdateSettingsResponse>; | ||
} | ||
} | ||
|
||
// Operation Specifications | ||
const serializer = new msRest.Serializer(Mappers); | ||
const getSettingsOperationSpec: msRest.OperationSpec = { | ||
httpMethod: "GET", | ||
path: "endpointSettings", | ||
urlParameters: [ | ||
Parameters.endpoint | ||
], | ||
responses: { | ||
200: { | ||
bodyMapper: Mappers.EndpointSettingsDTO | ||
}, | ||
default: { | ||
bodyMapper: Mappers.ErrorResponse | ||
} | ||
}, | ||
serializer | ||
}; | ||
|
||
const updateSettingsOperationSpec: msRest.OperationSpec = { | ||
httpMethod: "PATCH", | ||
path: "endpointSettings", | ||
urlParameters: [ | ||
Parameters.endpoint | ||
], | ||
requestBody: { | ||
parameterPath: "endpointSettingsPayload", | ||
mapper: { | ||
...Mappers.EndpointSettingsDTO, | ||
required: true | ||
} | ||
}, | ||
responses: { | ||
200: { | ||
bodyMapper: { | ||
serializedName: "parsedResponse", | ||
type: { | ||
name: "String" | ||
} | ||
} | ||
}, | ||
default: { | ||
bodyMapper: Mappers.ErrorResponse | ||
} | ||
}, | ||
serializer | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.