示例#1
0
 /// <summary>
 /// Initializes a new instance of the Job class.
 /// </summary>
 /// <param name="type">Possible values include: 'read', 'write',
 /// 'profiling', 'qualityCheck'</param>
 public Job(string name, string id = default(string), int?version = default(int?), string description = default(string), Schedule schedule = default(Schedule), string connectionId = default(string), string schemaId = default(string), string shapeId = default(string), string agentId = default(string), bool?canRunInCloud = default(bool?), int?dataVersion = default(int?), IList <PropertyMapping> propertyMappings = default(IList <PropertyMapping>), JobType?type = default(JobType?), bool?isPaused = default(bool?), Writeback writeback = default(Writeback), Filter filter = default(Filter), JobStatus status = default(JobStatus), Batch latestBatch = default(Batch), System.DateTime?createdAt = default(System.DateTime?), string createdBy = default(string), System.DateTime?updatedAt = default(System.DateTime?), string updatedBy = default(string), System.DateTime?deletedAt = default(System.DateTime?), string deletedBy = default(string))
 {
     Id               = id;
     Version          = version;
     Name             = name;
     Description      = description;
     Schedule         = schedule;
     ConnectionId     = connectionId;
     SchemaId         = schemaId;
     ShapeId          = shapeId;
     AgentId          = agentId;
     CanRunInCloud    = canRunInCloud;
     DataVersion      = dataVersion;
     PropertyMappings = propertyMappings;
     Type             = type;
     IsPaused         = isPaused;
     Writeback        = writeback;
     Filter           = filter;
     Status           = status;
     LatestBatch      = latestBatch;
     CreatedAt        = createdAt;
     CreatedBy        = createdBy;
     UpdatedAt        = updatedAt;
     UpdatedBy        = updatedBy;
     DeletedAt        = deletedAt;
     DeletedBy        = deletedBy;
     CustomInit();
 }
示例#2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Name == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Name");
     }
     if (PropertyMappings != null)
     {
         foreach (var element in PropertyMappings)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (Writeback != null)
     {
         Writeback.Validate();
     }
     if (LatestBatch != null)
     {
         LatestBatch.Validate();
     }
 }