Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the CloudJob class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the Job within
 /// the Account.</param>
 /// <param name="displayName">The display name for the Job.</param>
 /// <param name="usesTaskDependencies">Whether Tasks in the Job can
 /// define dependencies on each other. The default is false.</param>
 /// <param name="url">The URL of the Job.</param>
 /// <param name="eTag">The ETag of the Job.</param>
 /// <param name="lastModified">The last modified time of the
 /// Job.</param>
 /// <param name="creationTime">The creation time of the Job.</param>
 /// <param name="state">The current state of the Job.</param>
 /// <param name="stateTransitionTime">The time at which the Job entered
 /// its current state.</param>
 /// <param name="previousState">The previous state of the Job.</param>
 /// <param name="previousStateTransitionTime">The time at which the Job
 /// entered its previous state.</param>
 /// <param name="priority">The priority of the Job.</param>
 /// <param name="maxParallelTasks">The maximum number of tasks that can
 /// be executed in parallel for the job.</param>
 /// <param name="constraints">The execution constraints for the
 /// Job.</param>
 /// <param name="jobManagerTask">Details of a Job Manager Task to be
 /// launched when the Job is started.</param>
 /// <param name="jobPreparationTask">The Job Preparation Task.</param>
 /// <param name="jobReleaseTask">The Job Release Task.</param>
 /// <param name="commonEnvironmentSettings">The list of common
 /// environment variable settings. These environment variables are set
 /// for all Tasks in the Job (including the Job Manager, Job
 /// Preparation and Job Release Tasks).</param>
 /// <param name="poolInfo">The Pool settings associated with the
 /// Job.</param>
 /// <param name="onAllTasksComplete">The action the Batch service
 /// should take when all Tasks in the Job are in the completed
 /// state.</param>
 /// <param name="onTaskFailure">The action the Batch service should
 /// take when any Task in the Job fails.</param>
 /// <param name="networkConfiguration">The network configuration for
 /// the Job.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the Job as metadata.</param>
 /// <param name="executionInfo">The execution information for the
 /// Job.</param>
 /// <param name="stats">Resource usage statistics for the entire
 /// lifetime of the Job.</param>
 public CloudJob(string id = default(string), string displayName = default(string), bool?usesTaskDependencies = default(bool?), string url = default(string), string eTag = default(string), System.DateTime?lastModified = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), JobState?state = default(JobState?), System.DateTime?stateTransitionTime = default(System.DateTime?), JobState?previousState = default(JobState?), System.DateTime?previousStateTransitionTime = default(System.DateTime?), int?priority = default(int?), int?maxParallelTasks = default(int?), JobConstraints constraints = default(JobConstraints), JobManagerTask jobManagerTask = default(JobManagerTask), JobPreparationTask jobPreparationTask = default(JobPreparationTask), JobReleaseTask jobReleaseTask = default(JobReleaseTask), IList <EnvironmentSetting> commonEnvironmentSettings = default(IList <EnvironmentSetting>), PoolInformation poolInfo = default(PoolInformation), OnAllTasksComplete?onAllTasksComplete = default(OnAllTasksComplete?), OnTaskFailure?onTaskFailure = default(OnTaskFailure?), JobNetworkConfiguration networkConfiguration = default(JobNetworkConfiguration), IList <MetadataItem> metadata = default(IList <MetadataItem>), JobExecutionInformation executionInfo = default(JobExecutionInformation), JobStatistics stats = default(JobStatistics))
 {
     Id                          = id;
     DisplayName                 = displayName;
     UsesTaskDependencies        = usesTaskDependencies;
     Url                         = url;
     ETag                        = eTag;
     LastModified                = lastModified;
     CreationTime                = creationTime;
     State                       = state;
     StateTransitionTime         = stateTransitionTime;
     PreviousState               = previousState;
     PreviousStateTransitionTime = previousStateTransitionTime;
     Priority                    = priority;
     MaxParallelTasks            = maxParallelTasks;
     Constraints                 = constraints;
     JobManagerTask              = jobManagerTask;
     JobPreparationTask          = jobPreparationTask;
     JobReleaseTask              = jobReleaseTask;
     CommonEnvironmentSettings   = commonEnvironmentSettings;
     PoolInfo                    = poolInfo;
     OnAllTasksComplete          = onAllTasksComplete;
     OnTaskFailure               = onTaskFailure;
     NetworkConfiguration        = networkConfiguration;
     Metadata                    = metadata;
     ExecutionInfo               = executionInfo;
     Stats                       = stats;
     CustomInit();
 }
Esempio n. 2
0
 public PropertyContainer(Models.JobPreparationTask protocolObject) : base(BindingState.Bound)
 {
     this.CommandLineProperty = this.CreatePropertyAccessor(
         protocolObject.CommandLine,
         "CommandLine",
         BindingAccess.Read | BindingAccess.Write);
     this.ConstraintsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Constraints, o => new TaskConstraints(o)),
         "Constraints",
         BindingAccess.Read | BindingAccess.Write);
     this.EnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollection(protocolObject.EnvironmentSettings),
         "EnvironmentSettings",
         BindingAccess.Read | BindingAccess.Write);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         "Id",
         BindingAccess.Read | BindingAccess.Write);
     this.RerunOnComputeNodeRebootAfterSuccessProperty = this.CreatePropertyAccessor(
         protocolObject.RerunOnNodeRebootAfterSuccess,
         "RerunOnComputeNodeRebootAfterSuccess",
         BindingAccess.Read | BindingAccess.Write);
     this.ResourceFilesProperty = this.CreatePropertyAccessor(
         ResourceFile.ConvertFromProtocolCollection(protocolObject.ResourceFiles),
         "ResourceFiles",
         BindingAccess.Read | BindingAccess.Write);
     this.RunElevatedProperty = this.CreatePropertyAccessor(
         protocolObject.RunElevated,
         "RunElevated",
         BindingAccess.Read | BindingAccess.Write);
     this.WaitForSuccessProperty = this.CreatePropertyAccessor(
         protocolObject.WaitForSuccess,
         "WaitForSuccess",
         BindingAccess.Read | BindingAccess.Write);
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the JobSpecification class.
 /// </summary>
 /// <param name="poolInfo">The pool on which the Batch service runs
 /// the tasks of jobs created under this schedule.</param>
 /// <param name="priority">The priority of jobs created under this
 /// schedule.</param>
 /// <param name="displayName">The display name for jobs created under
 /// this schedule.</param>
 /// <param name="usesTaskDependencies">The flag that determines if
 /// this job will use tasks with dependencies.</param>
 /// <param name="constraints">The execution constraints for jobs
 /// created under this schedule.</param>
 /// <param name="jobManagerTask">The details of a Job Manager task to
 /// be launched when a job is started under this schedule.</param>
 /// <param name="jobPreparationTask">The Job Preparation task for jobs
 /// created under this schedule.</param>
 /// <param name="jobReleaseTask">The Job Release task for jobs created
 /// under this schedule.</param>
 /// <param name="commonEnvironmentSettings">A list of common
 /// environment variable settings. These environment variables are
 /// set for all tasks in jobs created under this schedule (including
 /// the Job Manager, Job Preparation and Job Release tasks).</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// each job created under this schedule as metadata.</param>
 public JobSpecification(PoolInformation poolInfo, int?priority = default(int?), string displayName = default(string), bool?usesTaskDependencies = default(bool?), JobConstraints constraints = default(JobConstraints), JobManagerTask jobManagerTask = default(JobManagerTask), JobPreparationTask jobPreparationTask = default(JobPreparationTask), JobReleaseTask jobReleaseTask = default(JobReleaseTask), System.Collections.Generic.IList <EnvironmentSetting> commonEnvironmentSettings = default(System.Collections.Generic.IList <EnvironmentSetting>), System.Collections.Generic.IList <MetadataItem> metadata = default(System.Collections.Generic.IList <MetadataItem>))
 {
     Priority                  = priority;
     DisplayName               = displayName;
     UsesTaskDependencies      = usesTaskDependencies;
     Constraints               = constraints;
     JobManagerTask            = jobManagerTask;
     JobPreparationTask        = jobPreparationTask;
     JobReleaseTask            = jobReleaseTask;
     CommonEnvironmentSettings = commonEnvironmentSettings;
     PoolInfo                  = poolInfo;
     Metadata                  = metadata;
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the JobAddParameter class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the job within
 /// the account.</param>
 /// <param name="poolInfo">The pool on which the Batch service runs
 /// the job's tasks.</param>
 /// <param name="displayName">The display name for the job.</param>
 /// <param name="priority">The priority of the job.</param>
 /// <param name="constraints">The execution constraints for the
 /// job.</param>
 /// <param name="jobManagerTask">Details of a Job Manager task to be
 /// launched when the job is started.</param>
 /// <param name="jobPreparationTask">The Job Preparation task.</param>
 /// <param name="jobReleaseTask">The Job Release task.</param>
 /// <param name="commonEnvironmentSettings">The list of common
 /// environment variable settings. These environment variables are
 /// set for all tasks in the job (including the Job Manager, Job
 /// Preparation and Job Release tasks).</param>
 /// <param name="onAllTasksComplete">The action the Batch service
 /// should take when all tasks in the job are in the completed state.
 /// Possible values include: 'noAction', 'terminateJob'</param>
 /// <param name="onTaskFailure">The action the Batch service should
 /// take when any task in the job fails. A task is considered to have
 /// failed if it completes with a non-zero exit code and has
 /// exhausted its retry count, or if it had a scheduling error.
 /// Possible values include: 'noAction',
 /// 'performExitOptionsJobAction'</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the job as metadata.</param>
 /// <param name="usesTaskDependencies">The flag that determines if
 /// this job will use tasks with dependencies.</param>
 public JobAddParameter(string id, PoolInformation poolInfo, string displayName = default(string), int?priority = default(int?), JobConstraints constraints = default(JobConstraints), JobManagerTask jobManagerTask = default(JobManagerTask), JobPreparationTask jobPreparationTask = default(JobPreparationTask), JobReleaseTask jobReleaseTask = default(JobReleaseTask), System.Collections.Generic.IList <EnvironmentSetting> commonEnvironmentSettings = default(System.Collections.Generic.IList <EnvironmentSetting>), OnAllTasksComplete?onAllTasksComplete = default(OnAllTasksComplete?), OnTaskFailure?onTaskFailure = default(OnTaskFailure?), System.Collections.Generic.IList <MetadataItem> metadata = default(System.Collections.Generic.IList <MetadataItem>), bool?usesTaskDependencies = default(bool?))
 {
     Id                        = id;
     DisplayName               = displayName;
     Priority                  = priority;
     Constraints               = constraints;
     JobManagerTask            = jobManagerTask;
     JobPreparationTask        = jobPreparationTask;
     JobReleaseTask            = jobReleaseTask;
     CommonEnvironmentSettings = commonEnvironmentSettings;
     PoolInfo                  = poolInfo;
     OnAllTasksComplete        = onAllTasksComplete;
     OnTaskFailure             = onTaskFailure;
     Metadata                  = metadata;
     UsesTaskDependencies      = usesTaskDependencies;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the JobSpecification class.
 /// </summary>
 /// <param name="poolInfo">The Pool on which the Batch service runs the
 /// Tasks of Jobs created under this schedule.</param>
 /// <param name="priority">The priority of Jobs created under this
 /// schedule.</param>
 /// <param name="displayName">The display name for Jobs created under
 /// this schedule.</param>
 /// <param name="usesTaskDependencies">Whether Tasks in the Job can
 /// define dependencies on each other. The default is false.</param>
 /// <param name="onAllTasksComplete">The action the Batch service
 /// should take when all Tasks in a Job created under this schedule are
 /// in the completed state.</param>
 /// <param name="onTaskFailure">The action the Batch service should
 /// take when any Task fails in a Job created under this schedule. A
 /// Task is considered to have failed if it have failed if has a
 /// failureInfo. A failureInfo is set if the Task completes with a
 /// non-zero exit code after exhausting its retry count, or if there
 /// was an error starting the Task, for example due to a resource file
 /// download error.</param>
 /// <param name="networkConfiguration">The network configuration for
 /// the Job.</param>
 /// <param name="constraints">The execution constraints for Jobs
 /// created under this schedule.</param>
 /// <param name="jobManagerTask">The details of a Job Manager Task to
 /// be launched when a Job is started under this schedule.</param>
 /// <param name="jobPreparationTask">The Job Preparation Task for Jobs
 /// created under this schedule.</param>
 /// <param name="jobReleaseTask">The Job Release Task for Jobs created
 /// under this schedule.</param>
 /// <param name="commonEnvironmentSettings">A list of common
 /// environment variable settings. These environment variables are set
 /// for all Tasks in Jobs created under this schedule (including the
 /// Job Manager, Job Preparation and Job Release Tasks).</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// each Job created under this schedule as metadata.</param>
 public JobSpecification(PoolInformation poolInfo, int?priority = default(int?), string displayName = default(string), bool?usesTaskDependencies = default(bool?), OnAllTasksComplete?onAllTasksComplete = default(OnAllTasksComplete?), OnTaskFailure?onTaskFailure = default(OnTaskFailure?), JobNetworkConfiguration networkConfiguration = default(JobNetworkConfiguration), JobConstraints constraints = default(JobConstraints), JobManagerTask jobManagerTask = default(JobManagerTask), JobPreparationTask jobPreparationTask = default(JobPreparationTask), JobReleaseTask jobReleaseTask = default(JobReleaseTask), IList <EnvironmentSetting> commonEnvironmentSettings = default(IList <EnvironmentSetting>), IList <MetadataItem> metadata = default(IList <MetadataItem>))
 {
     Priority                  = priority;
     DisplayName               = displayName;
     UsesTaskDependencies      = usesTaskDependencies;
     OnAllTasksComplete        = onAllTasksComplete;
     OnTaskFailure             = onTaskFailure;
     NetworkConfiguration      = networkConfiguration;
     Constraints               = constraints;
     JobManagerTask            = jobManagerTask;
     JobPreparationTask        = jobPreparationTask;
     JobReleaseTask            = jobReleaseTask;
     CommonEnvironmentSettings = commonEnvironmentSettings;
     PoolInfo                  = poolInfo;
     Metadata                  = metadata;
     CustomInit();
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the JobAddParameter class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the Job within
 /// the Account.</param>
 /// <param name="poolInfo">The Pool on which the Batch service runs the
 /// Job's Tasks.</param>
 /// <param name="displayName">The display name for the Job.</param>
 /// <param name="priority">The priority of the Job.</param>
 /// <param name="maxParallelTasks">The maximum number of tasks that can
 /// be executed in parallel for the job.</param>
 /// <param name="allowTaskPreemption">Whether Tasks in this job can be
 /// preempted by other high priority jobs</param>
 /// <param name="constraints">The execution constraints for the
 /// Job.</param>
 /// <param name="jobManagerTask">Details of a Job Manager Task to be
 /// launched when the Job is started.</param>
 /// <param name="jobPreparationTask">The Job Preparation Task.</param>
 /// <param name="jobReleaseTask">The Job Release Task.</param>
 /// <param name="commonEnvironmentSettings">The list of common
 /// environment variable settings. These environment variables are set
 /// for all Tasks in the Job (including the Job Manager, Job
 /// Preparation and Job Release Tasks).</param>
 /// <param name="onAllTasksComplete">The action the Batch service
 /// should take when all Tasks in the Job are in the completed
 /// state.</param>
 /// <param name="onTaskFailure">The action the Batch service should
 /// take when any Task in the Job fails.</param>
 /// <param name="metadata">A list of name-value pairs associated with
 /// the Job as metadata.</param>
 /// <param name="usesTaskDependencies">Whether Tasks in the Job can
 /// define dependencies on each other. The default is false.</param>
 /// <param name="networkConfiguration">The network configuration for
 /// the Job.</param>
 public JobAddParameter(string id, PoolInformation poolInfo, string displayName = default(string), int?priority = default(int?), int?maxParallelTasks = default(int?), bool?allowTaskPreemption = default(bool?), JobConstraints constraints = default(JobConstraints), JobManagerTask jobManagerTask = default(JobManagerTask), JobPreparationTask jobPreparationTask = default(JobPreparationTask), JobReleaseTask jobReleaseTask = default(JobReleaseTask), IList <EnvironmentSetting> commonEnvironmentSettings = default(IList <EnvironmentSetting>), OnAllTasksComplete?onAllTasksComplete = default(OnAllTasksComplete?), OnTaskFailure?onTaskFailure = default(OnTaskFailure?), IList <MetadataItem> metadata = default(IList <MetadataItem>), bool?usesTaskDependencies = default(bool?), JobNetworkConfiguration networkConfiguration = default(JobNetworkConfiguration))
 {
     Id                        = id;
     DisplayName               = displayName;
     Priority                  = priority;
     MaxParallelTasks          = maxParallelTasks;
     AllowTaskPreemption       = allowTaskPreemption;
     Constraints               = constraints;
     JobManagerTask            = jobManagerTask;
     JobPreparationTask        = jobPreparationTask;
     JobReleaseTask            = jobReleaseTask;
     CommonEnvironmentSettings = commonEnvironmentSettings;
     PoolInfo                  = poolInfo;
     OnAllTasksComplete        = onAllTasksComplete;
     OnTaskFailure             = onTaskFailure;
     Metadata                  = metadata;
     UsesTaskDependencies      = usesTaskDependencies;
     NetworkConfiguration      = networkConfiguration;
     CustomInit();
 }
 public PropertyContainer(Models.JobPreparationTask protocolObject) : base(BindingState.Bound)
 {
     this.CommandLineProperty = this.CreatePropertyAccessor(
         protocolObject.CommandLine,
         nameof(CommandLine),
         BindingAccess.Read | BindingAccess.Write);
     this.ConstraintsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.Constraints, o => new TaskConstraints(o)),
         nameof(Constraints),
         BindingAccess.Read | BindingAccess.Write);
     this.ContainerSettingsProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.ContainerSettings, o => new TaskContainerSettings(o).Freeze()),
         nameof(ContainerSettings),
         BindingAccess.Read);
     this.EnvironmentSettingsProperty = this.CreatePropertyAccessor(
         EnvironmentSetting.ConvertFromProtocolCollection(protocolObject.EnvironmentSettings),
         nameof(EnvironmentSettings),
         BindingAccess.Read | BindingAccess.Write);
     this.IdProperty = this.CreatePropertyAccessor(
         protocolObject.Id,
         nameof(Id),
         BindingAccess.Read | BindingAccess.Write);
     this.RerunOnComputeNodeRebootAfterSuccessProperty = this.CreatePropertyAccessor(
         protocolObject.RerunOnNodeRebootAfterSuccess,
         nameof(RerunOnComputeNodeRebootAfterSuccess),
         BindingAccess.Read | BindingAccess.Write);
     this.ResourceFilesProperty = this.CreatePropertyAccessor(
         ResourceFile.ConvertFromProtocolCollection(protocolObject.ResourceFiles),
         nameof(ResourceFiles),
         BindingAccess.Read | BindingAccess.Write);
     this.UserIdentityProperty = this.CreatePropertyAccessor(
         UtilitiesInternal.CreateObjectWithNullCheck(protocolObject.UserIdentity, o => new UserIdentity(o).Freeze()),
         nameof(UserIdentity),
         BindingAccess.Read);
     this.WaitForSuccessProperty = this.CreatePropertyAccessor(
         protocolObject.WaitForSuccess,
         nameof(WaitForSuccess),
         BindingAccess.Read | BindingAccess.Write);
 }