/// <summary>
 /// Initializes a new instance of the <see cref="EdFiSessionWritable" /> class.
 /// </summary>
 /// <param name="Id">Id (required).</param>
 /// <param name="SessionName">The identifier for the calendar for the academic session (e.g., 2010/11, 2011 Summer). (required).</param>
 /// <param name="SchoolReference">SchoolReference (required).</param>
 /// <param name="SchoolYearTypeReference">SchoolYearTypeReference (required).</param>
 /// <param name="BeginDate">Month, day, and year of the first day of the Session. (required).</param>
 /// <param name="EndDate">Month, day and year of the last day of the Session. (required).</param>
 /// <param name="TermDescriptor">An descriptor value indicating the term (e.g. &#39;Fall Semester&#39;, &#39;Second Quarter&#39;, &#39;Summer Semester&#39;, etc.). (required).</param>
 /// <param name="TotalInstructionalDays">The total number of instructional days in the school calendar. (required).</param>
 /// <param name="Etag">A unique system-generated value that identifies the version of the resource..</param>
 /// <param name="Ext">Ext.</param>
 public EdFiSessionWritable(string Id = default(string), string SessionName = default(string), EdFiSchoolReference SchoolReference = default(EdFiSchoolReference), EdFiSchoolYearTypeReference SchoolYearTypeReference = default(EdFiSchoolYearTypeReference), DateTime?BeginDate = default(DateTime?), DateTime?EndDate = default(DateTime?), string TermDescriptor = default(string), int?TotalInstructionalDays = default(int?), string Etag = default(string), SessionExtensionsWritable Ext = default(SessionExtensionsWritable))
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "SessionName" is required (not null)
     if (SessionName == null)
     {
         throw new InvalidDataException("SessionName is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.SessionName = SessionName;
     }
     // to ensure "SchoolReference" is required (not null)
     if (SchoolReference == null)
     {
         throw new InvalidDataException("SchoolReference is a required property for EdFiSessionWritable 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 EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.SchoolYearTypeReference = SchoolYearTypeReference;
     }
     // to ensure "BeginDate" is required (not null)
     if (BeginDate == null)
     {
         throw new InvalidDataException("BeginDate is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.BeginDate = BeginDate;
     }
     // to ensure "EndDate" is required (not null)
     if (EndDate == null)
     {
         throw new InvalidDataException("EndDate is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.EndDate = EndDate;
     }
     // to ensure "TermDescriptor" is required (not null)
     if (TermDescriptor == null)
     {
         throw new InvalidDataException("TermDescriptor is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.TermDescriptor = TermDescriptor;
     }
     // to ensure "TotalInstructionalDays" is required (not null)
     if (TotalInstructionalDays == null)
     {
         throw new InvalidDataException("TotalInstructionalDays is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.TotalInstructionalDays = TotalInstructionalDays;
     }
     this.Etag = Etag;
     this.Ext  = Ext;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EdFiSessionWritable" /> class.
 /// </summary>
 /// <param name="id">id.</param>
 /// <param name="sessionName">The identifier for the calendar for the academic session (e.g., 2010/11, 2011 Summer). (required).</param>
 /// <param name="schoolReference">schoolReference (required).</param>
 /// <param name="schoolYearTypeReference">schoolYearTypeReference (required).</param>
 /// <param name="beginDate">Month, day, and year of the first day of the Session. (required).</param>
 /// <param name="endDate">Month, day and year of the last day of the Session. (required).</param>
 /// <param name="termDescriptor">An descriptor value indicating the term (e.g. &#39;Semester&#39;, &#39;Quarter&#39;, etc.). (required).</param>
 /// <param name="totalInstructionalDays">The total number of instructional days in the school calendar. (required).</param>
 /// <param name="etag">A unique system-generated value that identifies the version of the resource..</param>
 /// <param name="ext">ext.</param>
 public EdFiSessionWritable(string id = default(string), string sessionName = default(string), EdFiSchoolReference schoolReference = default(EdFiSchoolReference), EdFiSchoolYearTypeReference schoolYearTypeReference = default(EdFiSchoolYearTypeReference), DateTime?beginDate = default(DateTime?), DateTime?endDate = default(DateTime?), string termDescriptor = default(string), int?totalInstructionalDays = default(int?), string etag = default(string), SessionExtensionsWritable ext = default(SessionExtensionsWritable))
 {
     // to ensure "sessionName" is required (not null)
     if (sessionName == null)
     {
         throw new InvalidDataException("sessionName is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.SessionName = sessionName;
     }
     // to ensure "schoolReference" is required (not null)
     if (schoolReference == null)
     {
         throw new InvalidDataException("schoolReference is a required property for EdFiSessionWritable 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 EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.SchoolYearTypeReference = schoolYearTypeReference;
     }
     // to ensure "beginDate" is required (not null)
     if (beginDate == null)
     {
         throw new InvalidDataException("beginDate is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.BeginDate = beginDate;
     }
     // to ensure "endDate" is required (not null)
     if (endDate == null)
     {
         throw new InvalidDataException("endDate is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.EndDate = endDate;
     }
     // to ensure "termDescriptor" is required (not null)
     if (termDescriptor == null)
     {
         throw new InvalidDataException("termDescriptor is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.TermDescriptor = termDescriptor;
     }
     // to ensure "totalInstructionalDays" is required (not null)
     if (totalInstructionalDays == null)
     {
         throw new InvalidDataException("totalInstructionalDays is a required property for EdFiSessionWritable and cannot be null");
     }
     else
     {
         this.TotalInstructionalDays = totalInstructionalDays;
     }
     this.Id   = id;
     this.Etag = etag;
     this.Ext  = ext;
 }