/// <summary>
 /// Creates or update the diagnostic settings for the specified storage
 /// service.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Insights.IStorageDiagnosticSettingsOperations.
 /// </param>
 /// <param name='resourceUri'>
 /// Required. The resource identifier of the storage service.
 /// </param>
 /// <param name='parameters'>
 /// Required. The storage diagnostic settings parameters.
 /// </param>
 /// <returns>
 /// Generic empty response. We only pass it to ensure json error
 /// handling
 /// </returns>
 public static EmptyResponse Put(this IStorageDiagnosticSettingsOperations operations, string resourceUri, StorageDiagnosticSettingsPutParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IStorageDiagnosticSettingsOperations)s).PutAsync(resourceUri, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the InsightsManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public InsightsManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._agentDiagnosticSettingsOperations = new AgentDiagnosticSettingsOperations(this);
     this._alertOperations     = new AlertOperations(this);
     this._autoscaleOperations = new AutoscaleOperations(this);
     this._monitoringConfigurationOperations   = new MonitoringConfigurationOperations(this);
     this._serviceDiagnosticSettingsOperations = new ServiceDiagnosticSettingsOperations(this);
     this._storageDiagnosticSettingsOperations = new StorageDiagnosticSettingsOperations(this);
     this._apiVersion = "2014-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Gets the diagnostic settings for the specified storage service.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Insights.IStorageDiagnosticSettingsOperations.
 /// </param>
 /// <param name='resourceUri'>
 /// Required. The resource identifier of the storage service.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <StorageDiagnosticSettingsGetResponse> GetAsync(this IStorageDiagnosticSettingsOperations operations, string resourceUri)
 {
     return(operations.GetAsync(resourceUri, CancellationToken.None));
 }
 /// <summary>
 /// Creates or update the diagnostic settings for the specified storage
 /// service.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Insights.IStorageDiagnosticSettingsOperations.
 /// </param>
 /// <param name='resourceUri'>
 /// Required. The resource identifier of the storage service.
 /// </param>
 /// <param name='parameters'>
 /// Required. The storage diagnostic settings parameters.
 /// </param>
 /// <returns>
 /// Generic empty response. We only pass it to ensure json error
 /// handling
 /// </returns>
 public static Task <EmptyResponse> PutAsync(this IStorageDiagnosticSettingsOperations operations, string resourceUri, StorageDiagnosticSettingsPutParameters parameters)
 {
     return(operations.PutAsync(resourceUri, parameters, CancellationToken.None));
 }