/// <summary> /// Gets the number of models trained on this Cognitive Services Account and the account limits. /// </summary> /// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param> /// <returns>A <see cref="Response{T}"/> representing the result of the operation. It can be cast to an <see cref="AccountProperties"/> containing /// the account properties.</returns> public virtual async Task <Response <AccountProperties> > GetAccountPropertiesAsync(CancellationToken cancellationToken = default) { using DiagnosticScope scope = Diagnostics.CreateScope($"{nameof(FormTrainingClient)}.{nameof(GetAccountProperties)}"); scope.Start(); try { Response <Models.Models> response = await ServiceClient.GetCustomModelsAsync(cancellationToken).ConfigureAwait(false); return(Response.FromValue(new AccountProperties(response.Value.Summary), response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } }