public Incident Clone(bool includeLocalProperties)
 {
     var c = new Incident
             {
                 AffectedVersions = AffectedVersions,
                 AssignedTo = AssignedTo,
                 AssignedToId = AssignedToId,
                 Components = Components,
                 CreatedAt = CreatedAt,
                 CreatedBy = CreatedBy,
                 CreatedById = CreatedById,
                 Description = Description,
                 ExternalKeys = ExternalKeys,
                 FieldValues = FieldValues,
                 FixedVersions = FixedVersions,
                 HasAttachments = HasAttachments,
                 Id = Id,
                 IncidentNumber = IncidentNumber,
                 InternalId = InternalId,
                 LastComment = LastComment,
                 LastUpdatedAt = LastUpdatedAt,
                 LastUpdatedBy = LastUpdatedBy,
                 LastUpdatedById = LastUpdatedById,
                 Priority = Priority,
                 PriorityId = PriorityId,
                 Project = Project,
                 ProjectId = ProjectId,
                 ProjectName = ProjectName,
                 Resolution = Resolution,
                 ResolutionId = ResolutionId,
                 Status = Status,
                 StatusId = StatusId,
                 Summary = Summary,
                 Type = Type,
                 TypeId = TypeId,
                 VersionNumber = VersionNumber,
                 AffectedVersionIds = AffectedVersionIds.ToList(),
                 Attachments = Attachments.Select(x=>x.Clone(includeLocalProperties)).ToList(),
                 Comments = Comments.Select(x=>x.Clone(includeLocalProperties)).ToList(),
                 ComponentIds = ComponentIds.ToList(),
                 ExternalSystemLinkIds = ExternalSystemLinkIds.ToList(),
                 ExternalSystemLinks = ExternalSystemLinks.Select(x=>x.Clone(includeLocalProperties)).ToList(),
                 FixedVersionIds = FixedVersionIds.ToList(),
                 Widgets = Widgets.Select(x=>x.Clone(includeLocalProperties)).ToList(),
             };
     CopyExtraPropertiesToClone(c, includeLocalProperties);
     return c;
 }
partial         void CopyExtraPropertiesToClone(Incident clone, bool includeLocalProperties);
 public Incident Clone(bool includeLocalProperties)
 {
     var c = new Incident
             {
                 AssignedTo = AssignedTo,
                 AssignedToId = AssignedToId,
                 CreatedAt = CreatedAt,
                 CreatedBy = CreatedBy,
                 CreatedById = CreatedById,
                 Description = Description,
                 FieldControls = FieldControls,
                 FieldValues = FieldValues,
                 HasAttachments = HasAttachments,
                 Id = Id,
                 IncidentNumber = IncidentNumber,
                 InternalId = InternalId,
                 LastUpdatedAt = LastUpdatedAt,
                 LastUpdatedBy = LastUpdatedBy,
                 LastUpdatedById = LastUpdatedById,
                 PriorityId = PriorityId,
                 Project = Project,
                 ProjectId = ProjectId,
                 ProjectName = ProjectName,
                 ResolutionId = ResolutionId,
                 StatusId = StatusId,
                 Summary = Summary,
                 TicketId = TicketId,
                 TicketKey = TicketKey,
                 TicketUrl = TicketUrl,
                 TypeId = TypeId,
                 AffectedVersionIds = AffectedVersionIds.ToList(),
                 Comments = Comments.Select(x=>x.Clone(includeLocalProperties)).ToList(),
                 ComponentIds = ComponentIds.ToList(),
                 FixedVersionIds = FixedVersionIds.ToList(),
             };
     CopyExtraPropertiesToClone(c, includeLocalProperties);
     return c;
 }