/// <summary>
 /// Creates the Dsc compilation job of the configuration.  (see
 /// http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IDscCompilationJobOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the create compilation job
 /// operation.
 /// </param>
 /// <returns>
 /// The response model for the create Dsc Compilation job operation.
 /// </returns>
 public static DscCompilationJobCreateResponse Create(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccount, DscCompilationJobCreateParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IDscCompilationJobOperations)s).CreateAsync(resourceGroupName, automationAccount, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Creates the Dsc compilation job of the configuration.  (see
 /// http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IDscCompilationJobOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the create compilation job
 /// operation.
 /// </param>
 /// <returns>
 /// The response model for the create Dsc Compilation job operation.
 /// </returns>
 public static Task<DscCompilationJobCreateResponse> CreateAsync(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccount, DscCompilationJobCreateParameters parameters)
 {
     return operations.CreateAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None);
 }
        public CompilationJob StartCompilationJob(string resourceGroupName, string automationAccountName, string configurationName, IDictionary parameters, IDictionary configurationData)
        {
            using (var request = new RequestSettings(this.automationManagementClient))
            {
                var createJobParameters = new DscCompilationJobCreateParameters()
                {
                    Properties = new DscCompilationJobCreateProperties()
                    {
                        Configuration = new DscConfigurationAssociationProperty()
                        {
                            Name = configurationName
                        },
                        Parameters = this.ProcessConfigurationParameters(parameters, configurationData)
                    }
                };

                var job = this.automationManagementClient.CompilationJobs.Create(resourceGroupName, automationAccountName, createJobParameters);

                return new Model.CompilationJob(resourceGroupName, automationAccountName, job.DscCompilationJob);
            }
        }