/// <summary>
 /// Initializes a new instance of the AutomationManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public AutomationManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._activities = new ActivityOperations(this);
     this._agentRegistrationInformation = new AgentRegistrationOperation(this);
     this._automationAccounts           = new AutomationAccountOperations(this);
     this._certificates       = new CertificateOperations(this);
     this._connections        = new ConnectionOperations(this);
     this._connectionTypes    = new ConnectionTypeOperations(this);
     this._psCredentials      = new CredentialOperations(this);
     this._compilationJobs    = new DscCompilationJobOperations(this);
     this._configurations     = new DscConfigurationOperations(this);
     this._nodeConfigurations = new DscNodeConfigurationOperations(this);
     this._nodes       = new DscNodeOperations(this);
     this._nodeReports = new DscNodeReportsOperations(this);
     this._hybridRunbookWorkerGroups = new HybridRunbookWorkerGroupOperations(this);
     this._jobs              = new JobOperations(this);
     this._jobSchedules      = new JobScheduleOperations(this);
     this._jobStreams        = new JobStreamOperations(this);
     this._modules           = new ModuleOperations(this);
     this._runbookDraft      = new RunbookDraftOperations(this);
     this._runbooks          = new RunbookOperations(this);
     this._schedules         = new ScheduleOperations(this);
     this._statistics        = new StatisticsOperations(this);
     this._testJobs          = new TestJobOperations(this);
     this._typeFields        = new TypeFieldOperations(this);
     this._usages            = new UsageOperations(this);
     this._variables         = new VariableOperations(this);
     this._webhooks          = new WebhookOperations(this);
     this._resourceNamespace = "Microsoft.Automation";
     this._apiVersion        = "2014-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Creates the Dsc compilation job of the configuration.
 /// <see href="http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='compilationJobName'>
 /// The the DSC configuration Id.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the create compilation job operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DscCompilationJob> CreateAsync(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccountName, string compilationJobName, DscCompilationJobCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, automationAccountName, compilationJobName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieve the job stream identified by job stream id.
 /// <see href="http://aka.ms/azureautomationsdk/jobstreamoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='jobId'>
 /// The job id.
 /// </param>
 /// <param name='jobStreamId'>
 /// The job stream id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <JobStream> GetStreamAsync(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccountName, System.Guid jobId, string jobStreamId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetStreamWithHttpMessagesAsync(resourceGroupName, automationAccountName, jobId, jobStreamId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <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>
 /// Retrieve next list of dsc compilation jobs.  (see
 /// http://aka.ms/azureautomationsdk/compilationjoboperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IDscCompilationJobOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list job operation.
 /// </returns>
 public static DscCompilationJobListResponse ListNext(this IDscCompilationJobOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDscCompilationJobOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve the job stream identified by job stream id.  (see
 /// http://aka.ms/azureautomationsdk/jobstreamoperations 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='jobId'>
 /// Required. The job id.
 /// </param>
 /// <param name='jobStreamId'>
 /// Required. The job stream id.
 /// </param>
 /// <returns>
 /// The response model for the get job stream operation.
 /// </returns>
 public static JobStreamGetResponse GetOutput(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccount, Guid jobId, string jobStreamId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IDscCompilationJobOperations)s).GetOutputAsync(resourceGroupName, automationAccount, jobId, jobStreamId);
     }
                                  , 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));
 }
 /// <summary>
 /// Retrieve next list of dsc compilation jobs.  (see
 /// http://aka.ms/azureautomationsdk/compilationjoboperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IDscCompilationJobOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list job operation.
 /// </returns>
 public static Task <DscCompilationJobListResponse> ListNextAsync(this IDscCompilationJobOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve the job stream identified by job stream id.  (see
 /// http://aka.ms/azureautomationsdk/jobstreamoperations 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='jobId'>
 /// Required. The job id.
 /// </param>
 /// <param name='jobStreamId'>
 /// Required. The job stream id.
 /// </param>
 /// <returns>
 /// The response model for the get job stream operation.
 /// </returns>
 public static Task <JobStreamGetResponse> GetOutputAsync(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccount, Guid jobId, string jobStreamId)
 {
     return(operations.GetOutputAsync(resourceGroupName, automationAccount, jobId, jobStreamId, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve the Dsc configuration compilation job identified by job id.
 /// <see href="http://aka.ms/azureautomationsdk/dsccompilationjoboperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='compilationJobName'>
 /// The the DSC configuration Id.
 /// </param>
 public static DscCompilationJob Get(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccountName, string compilationJobName)
 {
     return(operations.GetAsync(resourceGroupName, automationAccountName, compilationJobName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates the Dsc compilation job of the configuration.
 /// <see href="http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='compilationJobName'>
 /// The the DSC configuration Id.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the create compilation job operation.
 /// </param>
 public static DscCompilationJob Create(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccountName, string compilationJobName, DscCompilationJobCreateParameters parameters)
 {
     return(operations.CreateAsync(resourceGroupName, automationAccountName, compilationJobName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve a list of dsc compilation jobs.
 /// <see href="http://aka.ms/azureautomationsdk/compilationjoboperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <DscCompilationJob> > ListByAutomationAccountNextAsync(this IDscCompilationJobOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAutomationAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieve a list of dsc compilation jobs.
 /// <see href="http://aka.ms/azureautomationsdk/compilationjoboperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <DscCompilationJob> ListByAutomationAccountNext(this IDscCompilationJobOperations operations, string nextPageLink)
 {
     return(operations.ListByAutomationAccountNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve the job stream identified by job stream id.
 /// <see href="http://aka.ms/azureautomationsdk/jobstreamoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='jobId'>
 /// The job id.
 /// </param>
 /// <param name='jobStreamId'>
 /// The job stream id.
 /// </param>
 public static JobStream GetStream(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccountName, System.Guid jobId, string jobStreamId)
 {
     return(operations.GetStreamAsync(resourceGroupName, automationAccountName, jobId, jobStreamId).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve a list of dsc compilation jobs.
 /// <see href="http://aka.ms/azureautomationsdk/compilationjoboperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <DscCompilationJob> > ListByAutomationAccountAsync(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccountName, ODataQuery <DscCompilationJob> odataQuery = default(ODataQuery <DscCompilationJob>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAutomationAccountWithHttpMessagesAsync(resourceGroupName, automationAccountName, odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieve a list of dsc compilation jobs.
 /// <see href="http://aka.ms/azureautomationsdk/compilationjoboperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <DscCompilationJob> ListByAutomationAccount(this IDscCompilationJobOperations operations, string resourceGroupName, string automationAccountName, ODataQuery <DscCompilationJob> odataQuery = default(ODataQuery <DscCompilationJob>))
 {
     return(operations.ListByAutomationAccountAsync(resourceGroupName, automationAccountName, odataQuery).GetAwaiter().GetResult());
 }