/// <summary> /// Gets a list of versions for this application ID. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='appId'> /// The application ID. /// </param> /// <param name='skip'> /// The number of entries to skip. Default value is 0. /// </param> /// <param name='take'> /// The number of entries to return. Maximum page size is 500. Default is 100. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <VersionInfo> > ListAsync(this IVersions operations, System.Guid appId, int?skip = 0, int?take = 100, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(appId, skip, take, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the version information such as date created, last modified date, /// endpoint URL, count of intents and entities, training and publishing /// status. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='appId'> /// The application ID. /// </param> /// <param name='versionId'> /// The version ID. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VersionInfo> GetAsync(this IVersions operations, System.Guid appId, string versionId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(appId, versionId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Exports a LUIS application to text format. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='appId'> /// The application ID. /// </param> /// <param name='versionId'> /// The version ID. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Stream> ExportLuFormatAsync(this IVersions operations, System.Guid appId, string versionId, CancellationToken cancellationToken = default(CancellationToken)) { var _result = await operations.ExportLuFormatWithHttpMessagesAsync(appId, versionId, null, cancellationToken).ConfigureAwait(false); _result.Request.Dispose(); return(_result.Body); }
/// <summary> /// Creates a new version from the selected version. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='appId'> /// The application ID. /// </param> /// <param name='versionId'> /// The version ID. /// </param> /// <param name='versionCloneObject'> /// A model containing the new version ID. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <string> CloneAsync(this IVersions operations, System.Guid appId, string versionId, TaskUpdateObject versionCloneObject, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CloneWithHttpMessagesAsync(appId, versionId, versionCloneObject, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deleted an unlabelled utterance in a version of the application. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='appId'> /// The application ID. /// </param> /// <param name='versionId'> /// The version ID. /// </param> /// <param name='utterance'> /// The utterance text to delete. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OperationStatus> DeleteUnlabelledUtteranceAsync(this IVersions operations, System.Guid appId, string versionId, string utterance, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteUnlabelledUtteranceWithHttpMessagesAsync(appId, versionId, utterance, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Imports a new version into a LUIS application. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='appId'> /// The application ID. /// </param> /// <param name='luisAppLu'> /// An LU representing the LUIS application structure. /// </param> /// <param name='versionId'> /// The new versionId to import. If not specified, the versionId will be read /// from the imported object. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <string> ImportLuFormatAsync(this IVersions operations, System.Guid appId, string luisAppLu, string versionId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ImportLuFormatWithHttpMessagesAsync(appId, luisAppLu, versionId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Imports a new version into a LUIS application. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope', 'southeastasia', 'eastus2', /// 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', /// 'eastasia', 'australiaeast', 'brazilsouth', 'virginia' /// </param> /// <param name='azureCloud'> /// Supported Azure Clouds for Cognitive Services endpoints. Possible values /// include: 'com', 'us' /// </param> /// <param name='appId'> /// The application ID. /// </param> /// <param name='luisApp'> /// A LUIS application structure. /// </param> /// <param name='versionId'> /// The new versionId to import. If not specified, the versionId will be read /// from the imported object. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <string> ImportAsync(this IVersions operations, AzureRegions azureRegion, AzureClouds azureCloud, System.Guid appId, LuisApp luisApp, string versionId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ImportWithHttpMessagesAsync(azureRegion, azureCloud, appId, luisApp, versionId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes an application version. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope', 'southeastasia', 'eastus2', /// 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', /// 'eastasia', 'australiaeast', 'brazilsouth', 'virginia' /// </param> /// <param name='azureCloud'> /// Supported Azure Clouds for Cognitive Services endpoints. Possible values /// include: 'com', 'us' /// </param> /// <param name='appId'> /// The application ID. /// </param> /// <param name='versionId'> /// The version ID. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OperationStatus> DeleteAsync(this IVersions operations, AzureRegions azureRegion, AzureClouds azureCloud, System.Guid appId, string versionId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(azureRegion, azureCloud, appId, versionId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the task info. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope' /// </param> /// <param name='appId'> /// Format - guid. The application ID. /// </param> /// <param name='versionId'> /// The version ID of the task. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task GetApplicationVersionAsync(this IVersions operations, AzureRegions azureRegion, string appId, string versionId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.GetApplicationVersionWithHttpMessagesAsync(azureRegion, appId, versionId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Creates a new version equivalent to the current snapshot of the selected /// application version. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope' /// </param> /// <param name='appId'> /// Format - guid. The application ID. /// </param> /// <param name='versionId'> /// The version ID of the task. /// </param> /// <param name='taskUpdateObject'> /// An object containing the new version ID. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task CloneVersionAsync(this IVersions operations, AzureRegions azureRegion, string appId, string versionId, TaskUpdateObject taskUpdateObject = default(TaskUpdateObject), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.CloneVersionWithHttpMessagesAsync(azureRegion, appId, versionId, taskUpdateObject, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deleted an unlabelled utterance. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope' /// </param> /// <param name='appId'> /// Format - guid. The application ID. /// </param> /// <param name='versionId'> /// The version ID of the task. /// </param> /// <param name='body'> /// The utterance text to delete /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteUnlabelledUtteranceAsync(this IVersions operations, AzureRegions azureRegion, string appId, string versionId, object body = default(object), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteUnlabelledUtteranceWithHttpMessagesAsync(azureRegion, appId, versionId, body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Imports a new version into a LUIS application, the version's JSON should be /// included in in the request body. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope' /// </param> /// <param name='appId'> /// Format - guid. The application ID. /// </param> /// <param name='versionId'> /// The imported versionId. /// </param> /// <param name='jSONApp'> /// A JSON representing the LUIS application structure. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ImportVersionToApplicationAsync(this IVersions operations, AzureRegions azureRegion, string appId, string versionId = default(string), JSONApp jSONApp = default(JSONApp), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ImportVersionToApplicationWithHttpMessagesAsync(azureRegion, appId, versionId, jSONApp, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes an external API key currently associated to the given application /// according for the specified key type. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope' /// </param> /// <param name='appId'> /// Format - guid. The application ID. /// </param> /// <param name='versionId'> /// The version ID of the task. /// </param> /// <param name='keyType'> /// The external key type. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteApplicationVersionExternalKeyAsync(this IVersions operations, AzureRegions azureRegion, string appId, string versionId, string keyType, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteApplicationVersionExternalKeyWithHttpMessagesAsync(azureRegion, appId, versionId, keyType, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Assigns an external API key to the given application according to the /// specified key type. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope' /// </param> /// <param name='appId'> /// Format - guid. The application ID. /// </param> /// <param name='versionId'> /// The version ID of the task. /// </param> /// <param name='externalKeyUpdateObject'> /// The external api key to be assigned. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateApplicationVersionExternalKeyAsync(this IVersions operations, AzureRegions azureRegion, string appId, string versionId, ExternalKeyUpdateObject externalKeyUpdateObject = default(ExternalKeyUpdateObject), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateApplicationVersionExternalKeyWithHttpMessagesAsync(azureRegion, appId, versionId, externalKeyUpdateObject, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Assigns a subscription key to the given application version. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='azureRegion'> /// Supported Azure regions for Cognitive Services endpoints. Possible values /// include: 'westus', 'westeurope' /// </param> /// <param name='appId'> /// Format - guid. The application ID. /// </param> /// <param name='versionId'> /// The version ID of the task. /// </param> /// <param name='keyValue'> /// The value of the endpoint key to assign to the application. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AssignSubscriptionKeyToVersionAsync(this IVersions operations, AzureRegions azureRegion, string appId, string versionId, string keyValue = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.AssignSubscriptionKeyToVersionWithHttpMessagesAsync(azureRegion, appId, versionId, keyValue, null, cancellationToken).ConfigureAwait(false)).Dispose(); }