/// <summary>
 /// Initializes a new instance of the <see cref="EdFiCalendarWritable" /> class.
 /// </summary>
 /// <param name="Id">Id (required).</param>
 /// <param name="CalendarCode">The identifier for the Calendar. (required).</param>
 /// <param name="SchoolReference">SchoolReference (required).</param>
 /// <param name="SchoolYearTypeReference">SchoolYearTypeReference (required).</param>
 /// <param name="CalendarTypeDescriptor">Indicates the type of Calendar. (required).</param>
 /// <param name="GradeLevels">An unordered collection of calendarGradeLevels. Indicates the GradeLevel associated with the Calendar..</param>
 /// <param name="Etag">A unique system-generated value that identifies the version of the resource..</param>
 /// <param name="Ext">Ext.</param>
 public EdFiCalendarWritable(string Id = default(string), string CalendarCode = default(string), EdFiSchoolReference SchoolReference = default(EdFiSchoolReference), EdFiSchoolYearTypeReference SchoolYearTypeReference = default(EdFiSchoolYearTypeReference), string CalendarTypeDescriptor = default(string), List <EdFiCalendarGradeLevelWritable> GradeLevels = default(List <EdFiCalendarGradeLevelWritable>), string Etag = default(string), CalendarExtensionsWritable Ext = default(CalendarExtensionsWritable))
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for EdFiCalendarWritable and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "CalendarCode" is required (not null)
     if (CalendarCode == null)
     {
         throw new InvalidDataException("CalendarCode is a required property for EdFiCalendarWritable and cannot be null");
     }
     else
     {
         this.CalendarCode = CalendarCode;
     }
     // to ensure "SchoolReference" is required (not null)
     if (SchoolReference == null)
     {
         throw new InvalidDataException("SchoolReference is a required property for EdFiCalendarWritable and cannot be null");
     }
     else
     {
         this.SchoolReference = SchoolReference;
     }
     // to ensure "SchoolYearTypeReference" is required (not null)
     if (SchoolYearTypeReference == null)
     {
         throw new InvalidDataException("SchoolYearTypeReference is a required property for EdFiCalendarWritable and cannot be null");
     }
     else
     {
         this.SchoolYearTypeReference = SchoolYearTypeReference;
     }
     // to ensure "CalendarTypeDescriptor" is required (not null)
     if (CalendarTypeDescriptor == null)
     {
         throw new InvalidDataException("CalendarTypeDescriptor is a required property for EdFiCalendarWritable and cannot be null");
     }
     else
     {
         this.CalendarTypeDescriptor = CalendarTypeDescriptor;
     }
     this.GradeLevels = GradeLevels;
     this.Etag        = Etag;
     this.Ext         = Ext;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EdFiCalendarWritable" /> class.
 /// </summary>
 /// <param name="id">id.</param>
 /// <param name="calendarCode">The identifier for the Calendar. (required).</param>
 /// <param name="schoolReference">schoolReference (required).</param>
 /// <param name="schoolYearTypeReference">schoolYearTypeReference (required).</param>
 /// <param name="calendarTypeDescriptor">Indicates the type of Calendar. (required).</param>
 /// <param name="gradeLevels">An unordered collection of calendarGradeLevels. Indicates the GradeLevel associated with the Calendar..</param>
 /// <param name="etag">A unique system-generated value that identifies the version of the resource..</param>
 /// <param name="ext">ext.</param>
 public EdFiCalendarWritable(string id = default(string), string calendarCode = default(string), EdFiSchoolReference schoolReference = default(EdFiSchoolReference), EdFiSchoolYearTypeReference schoolYearTypeReference = default(EdFiSchoolYearTypeReference), string calendarTypeDescriptor = default(string), List <EdFiCalendarGradeLevelWritable> gradeLevels = default(List <EdFiCalendarGradeLevelWritable>), string etag = default(string), CalendarExtensionsWritable ext = default(CalendarExtensionsWritable))
 {
     // to ensure "calendarCode" is required (not null)
     if (calendarCode == null)
     {
         throw new InvalidDataException("calendarCode is a required property for EdFiCalendarWritable and cannot be null");
     }
     else
     {
         this.CalendarCode = calendarCode;
     }
     // to ensure "schoolReference" is required (not null)
     if (schoolReference == null)
     {
         throw new InvalidDataException("schoolReference is a required property for EdFiCalendarWritable and cannot be null");
     }
     else
     {
         this.SchoolReference = schoolReference;
     }
     // to ensure "schoolYearTypeReference" is required (not null)
     if (schoolYearTypeReference == null)
     {
         throw new InvalidDataException("schoolYearTypeReference is a required property for EdFiCalendarWritable and cannot be null");
     }
     else
     {
         this.SchoolYearTypeReference = schoolYearTypeReference;
     }
     // to ensure "calendarTypeDescriptor" is required (not null)
     if (calendarTypeDescriptor == null)
     {
         throw new InvalidDataException("calendarTypeDescriptor is a required property for EdFiCalendarWritable and cannot be null");
     }
     else
     {
         this.CalendarTypeDescriptor = calendarTypeDescriptor;
     }
     this.Id          = id;
     this.GradeLevels = gradeLevels;
     this.Etag        = etag;
     this.Ext         = ext;
 }