/// <summary>
 /// apps - Get LUIS Azure accounts assigned to the application
 /// </summary>
 /// <remarks>
 /// Gets the LUIS Azure accounts assigned to the application for the user using
 /// his ARM token.
 /// </remarks>
 /// <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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <AzureAccountInfoObject> > GetAssignedAsync(this IAzureAccounts operations, AzureRegions azureRegion, AzureClouds azureCloud, System.Guid appId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAssignedWithHttpMessagesAsync(azureRegion, azureCloud, appId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// apps - Assign a LUIS Azure account to an application
 /// </summary>
 /// <remarks>
 /// Assigns an Azure account to the application.
 /// </remarks>
 /// <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='azureAccountInfoObject'>
 /// The Azure account information object.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <OperationStatus> AssignToAppAsync(this IAzureAccounts operations, AzureRegions azureRegion, AzureClouds azureCloud, System.Guid appId, AzureAccountInfoObject azureAccountInfoObject = default(AzureAccountInfoObject), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AssignToAppWithHttpMessagesAsync(azureRegion, azureCloud, appId, azureAccountInfoObject, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// apps - Removes an assigned LUIS Azure account from an application
 /// </summary>
 /// <remarks>
 /// Removes assigned Azure account from the application.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='appId'>
 /// The application ID.
 /// </param>
 /// <param name='armToken'>
 /// The custom arm token header to use; containing the user's ARM token used to
 /// validate azure accounts information.
 /// </param>
 /// <param name='azureAccountInfoObject'>
 /// The Azure account information object.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <OperationStatus> RemoveFromAppAsync(this IAzureAccounts operations, System.Guid appId, string armToken = default(string), AzureAccountInfoObject azureAccountInfoObject = default(AzureAccountInfoObject), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RemoveFromAppWithHttpMessagesAsync(appId, armToken, azureAccountInfoObject, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Features              = new Features(this);
     Examples              = new Examples(this);
     Model                 = new Model(this);
     Apps                  = new Apps(this);
     Versions              = new Versions(this);
     Train                 = new Train(this);
     Permissions           = new Permissions(this);
     Pattern               = new Pattern(this);
     Settings              = new Settings(this);
     AzureAccounts         = new AzureAccounts(this);
     BaseUri               = "http://{AzureRegion}.api.cognitive.microsoft.{AzureCloud}/luis/api/v2.0";
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new  List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
Exemple #5
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Features              = new Features(this);
     Examples              = new Examples(this);
     Model                 = new Model(this);
     Apps                  = new Apps(this);
     Versions              = new Versions(this);
     Train                 = new Train(this);
     Pattern               = new Pattern(this);
     Settings              = new Settings(this);
     AzureAccounts         = new AzureAccounts(this);
     BaseUri               = "{Endpoint}/luis/authoring/v3.0-preview";
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new  List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
 /// <summary>
 /// user - Get LUIS Azure accounts
 /// </summary>
 /// <remarks>
 /// Gets the LUIS Azure accounts for the user using his ARM token.
 /// </remarks>
 /// <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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <AzureAccountInfoObject> > ListUserLUISAccountsAsync(this IAzureAccounts operations, AzureRegions azureRegion, AzureClouds azureCloud, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListUserLUISAccountsWithHttpMessagesAsync(azureRegion, azureCloud, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }