regis

<back to all web services

SectionCreateRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Sections/Admin/{reporting_term}/Create
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class InstructorResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var int */
        public int $regent_id=0,
        /** @var string|null */
        public ?string $regent_login=null,
        /** @var string|null */
        public ?string $preferred_name=null,
        /** @var string|null */
        public ?string $first_name=null,
        /** @var string|null */
        public ?string $last_name=null,
        /** @var string|null */
        public ?string $full_name=null,
        /** @var string|null */
        public ?string $email=null,
        /** @var string|null */
        public ?string $image_base64=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
        if (isset($o['regent_id'])) $this->regent_id = $o['regent_id'];
        if (isset($o['regent_login'])) $this->regent_login = $o['regent_login'];
        if (isset($o['preferred_name'])) $this->preferred_name = $o['preferred_name'];
        if (isset($o['first_name'])) $this->first_name = $o['first_name'];
        if (isset($o['last_name'])) $this->last_name = $o['last_name'];
        if (isset($o['full_name'])) $this->full_name = $o['full_name'];
        if (isset($o['email'])) $this->email = $o['email'];
        if (isset($o['image_base64'])) $this->image_base64 = $o['image_base64'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        if (isset($this->regent_id)) $o['regent_id'] = $this->regent_id;
        if (isset($this->regent_login)) $o['regent_login'] = $this->regent_login;
        if (isset($this->preferred_name)) $o['preferred_name'] = $this->preferred_name;
        if (isset($this->first_name)) $o['first_name'] = $this->first_name;
        if (isset($this->last_name)) $o['last_name'] = $this->last_name;
        if (isset($this->full_name)) $o['full_name'] = $this->full_name;
        if (isset($this->email)) $o['email'] = $this->email;
        if (isset($this->image_base64)) $o['image_base64'] = $this->image_base64;
        return empty($o) ? new class(){} : $o;
    }
}

class DocumentResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $code=null,
        /** @var string|null */
        public ?string $document_name=null,
        /** @var string|null */
        public ?string $document_description=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['code'])) $this->code = $o['code'];
        if (isset($o['document_name'])) $this->document_name = $o['document_name'];
        if (isset($o['document_description'])) $this->document_description = $o['document_description'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->code)) $o['code'] = $this->code;
        if (isset($this->document_name)) $o['document_name'] = $this->document_name;
        if (isset($this->document_description)) $o['document_description'] = $this->document_description;
        return empty($o) ? new class(){} : $o;
    }
}

class SectionResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var string|null */
        public ?string $secUUID=null,
        /** @var string|null */
        public ?string $course_name=null,
        /** @var string|null */
        public ?string $section_code=null,
        /** @var string|null */
        public ?string $course_title=null,
        /** @var string|null */
        public ?string $course_short_title=null,
        /** @var string|null */
        public ?string $course_description=null,
        /** @var string|null */
        public ?string $crosslist_description=null,
        /** @var string|null */
        public ?string $crosslist_course_name=null,
        /** @var string|null */
        public ?string $location_long_name=null,
        /** @var string|null */
        public ?string $room=null,
        /** @var array<InstructorResponse>|null */
        public ?array $instructors=null,
        /** @var array<DocumentResponse>|null */
        public ?array $required_documents=null,
        /** @var DateTime|null */
        public ?DateTime $start_date=null,
        /** @var DateTime|null */
        public ?DateTime $end_date=null,
        /** @var DateTime|null */
        public ?DateTime $first_meeting_date=null,
        /** @var DateTime|null */
        public ?DateTime $last_meeting_date=null,
        /** @var string|null */
        public ?string $meeting_days=null,
        /** @var array<string>|null */
        public ?array $start_times=null,
        /** @var array<string>|null */
        public ?array $end_times=null,
        /** @var bool|null */
        public ?bool $is_online_only=null,
        /** @var bool|null */
        public ?bool $is_weekend=null,
        /** @var bool|null */
        public ?bool $is_weekday=null,
        /** @var bool|null */
        public ?bool $is_evening=null,
        /** @var bool|null */
        public ?bool $is_waitlist=null,
        /** @var bool|null */
        public ?bool $has_special_requirements=null,
        /** @var string|null */
        public ?string $special_requirements=null,
        /** @var bool|null */
        public ?bool $is_unlisted=null,
        /** @var array<float>|null */
        public ?array $credit_amounts=null,
        /** @var array<float>|null */
        public ?array $audit_amounts=null,
        /** @var string|null */
        public ?string $audits_short_name=null,
        /** @var string|null */
        public ?string $audits_long_name=null,
        /** @var string|null */
        public ?string $credits_short_name=null,
        /** @var string|null */
        public ?string $credits_long_name=null,
        /** @var string|null */
        public ?string $distance_ed_materials=null,
        /** @var string|null */
        public ?string $prerequisites=null,
        /** @var string|null */
        public ?string $corequisites=null,
        /** @var int|null */
        public ?int $capacity=null,
        /** @var float|null */
        public ?float $flat_fee_amount=null,
        /** @var float|null */
        public ?float $additional_fee_amount=null,
        /** @var int */
        public int $registered_students=0,
        /** @var int */
        public int $three_credit_plus=0,
        /** @var int */
        public int $two_credit=0,
        /** @var int */
        public int $one_credit=0,
        /** @var int */
        public int $three_audit_plus=0,
        /** @var int */
        public int $two_audit=0,
        /** @var int */
        public int $one_audit=0,
        /** @var int */
        public int $crosslist_registered_students=0,
        /** @var int */
        public int $grades_received=0,
        /** @var int */
        public int $crosslist_grades_received=0,
        /** @var DateTime|null */
        public ?DateTime $registration_start_date=null,
        /** @var DateTime|null */
        public ?DateTime $registration_end_date=null,
        /** @var DateTime|null */
        public ?DateTime $add_start_date=null,
        /** @var DateTime|null */
        public ?DateTime $add_end_date=null,
        /** @var DateTime|null */
        public ?DateTime $drop_start_date=null,
        /** @var DateTime|null */
        public ?DateTime $drop_end_date=null,
        /** @var DateTime|null */
        public ?DateTime $grading_end_date=null,
        /** @var string|null */
        public ?string $term=null,
        /** @var string|null */
        public ?string $reporting_term=null,
        /** @var int */
        public int $reporting_year=0,
        /** @var string|null */
        public ?string $current_status=null,
        /** @var string|null */
        public ?string $added_by=null,
        /** @var DateTime|null */
        public ?DateTime $added_date=null,
        /** @var string|null */
        public ?string $changed_by=null,
        /** @var DateTime|null */
        public ?DateTime $changed_date=null,
        /** @var DateTime */
        public DateTime $timestamp=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
        if (isset($o['secUUID'])) $this->secUUID = $o['secUUID'];
        if (isset($o['course_name'])) $this->course_name = $o['course_name'];
        if (isset($o['section_code'])) $this->section_code = $o['section_code'];
        if (isset($o['course_title'])) $this->course_title = $o['course_title'];
        if (isset($o['course_short_title'])) $this->course_short_title = $o['course_short_title'];
        if (isset($o['course_description'])) $this->course_description = $o['course_description'];
        if (isset($o['crosslist_description'])) $this->crosslist_description = $o['crosslist_description'];
        if (isset($o['crosslist_course_name'])) $this->crosslist_course_name = $o['crosslist_course_name'];
        if (isset($o['location_long_name'])) $this->location_long_name = $o['location_long_name'];
        if (isset($o['room'])) $this->room = $o['room'];
        if (isset($o['instructors'])) $this->instructors = JsonConverters::fromArray('InstructorResponse', $o['instructors']);
        if (isset($o['required_documents'])) $this->required_documents = JsonConverters::fromArray('DocumentResponse', $o['required_documents']);
        if (isset($o['start_date'])) $this->start_date = JsonConverters::from('DateTime', $o['start_date']);
        if (isset($o['end_date'])) $this->end_date = JsonConverters::from('DateTime', $o['end_date']);
        if (isset($o['first_meeting_date'])) $this->first_meeting_date = JsonConverters::from('DateTime', $o['first_meeting_date']);
        if (isset($o['last_meeting_date'])) $this->last_meeting_date = JsonConverters::from('DateTime', $o['last_meeting_date']);
        if (isset($o['meeting_days'])) $this->meeting_days = $o['meeting_days'];
        if (isset($o['start_times'])) $this->start_times = JsonConverters::fromArray('string', $o['start_times']);
        if (isset($o['end_times'])) $this->end_times = JsonConverters::fromArray('string', $o['end_times']);
        if (isset($o['is_online_only'])) $this->is_online_only = $o['is_online_only'];
        if (isset($o['is_weekend'])) $this->is_weekend = $o['is_weekend'];
        if (isset($o['is_weekday'])) $this->is_weekday = $o['is_weekday'];
        if (isset($o['is_evening'])) $this->is_evening = $o['is_evening'];
        if (isset($o['is_waitlist'])) $this->is_waitlist = $o['is_waitlist'];
        if (isset($o['has_special_requirements'])) $this->has_special_requirements = $o['has_special_requirements'];
        if (isset($o['special_requirements'])) $this->special_requirements = $o['special_requirements'];
        if (isset($o['is_unlisted'])) $this->is_unlisted = $o['is_unlisted'];
        if (isset($o['credit_amounts'])) $this->credit_amounts = JsonConverters::fromArray('float', $o['credit_amounts']);
        if (isset($o['audit_amounts'])) $this->audit_amounts = JsonConverters::fromArray('float', $o['audit_amounts']);
        if (isset($o['audits_short_name'])) $this->audits_short_name = $o['audits_short_name'];
        if (isset($o['audits_long_name'])) $this->audits_long_name = $o['audits_long_name'];
        if (isset($o['credits_short_name'])) $this->credits_short_name = $o['credits_short_name'];
        if (isset($o['credits_long_name'])) $this->credits_long_name = $o['credits_long_name'];
        if (isset($o['distance_ed_materials'])) $this->distance_ed_materials = $o['distance_ed_materials'];
        if (isset($o['prerequisites'])) $this->prerequisites = $o['prerequisites'];
        if (isset($o['corequisites'])) $this->corequisites = $o['corequisites'];
        if (isset($o['capacity'])) $this->capacity = $o['capacity'];
        if (isset($o['flat_fee_amount'])) $this->flat_fee_amount = $o['flat_fee_amount'];
        if (isset($o['additional_fee_amount'])) $this->additional_fee_amount = $o['additional_fee_amount'];
        if (isset($o['registered_students'])) $this->registered_students = $o['registered_students'];
        if (isset($o['three_credit_plus'])) $this->three_credit_plus = $o['three_credit_plus'];
        if (isset($o['two_credit'])) $this->two_credit = $o['two_credit'];
        if (isset($o['one_credit'])) $this->one_credit = $o['one_credit'];
        if (isset($o['three_audit_plus'])) $this->three_audit_plus = $o['three_audit_plus'];
        if (isset($o['two_audit'])) $this->two_audit = $o['two_audit'];
        if (isset($o['one_audit'])) $this->one_audit = $o['one_audit'];
        if (isset($o['crosslist_registered_students'])) $this->crosslist_registered_students = $o['crosslist_registered_students'];
        if (isset($o['grades_received'])) $this->grades_received = $o['grades_received'];
        if (isset($o['crosslist_grades_received'])) $this->crosslist_grades_received = $o['crosslist_grades_received'];
        if (isset($o['registration_start_date'])) $this->registration_start_date = JsonConverters::from('DateTime', $o['registration_start_date']);
        if (isset($o['registration_end_date'])) $this->registration_end_date = JsonConverters::from('DateTime', $o['registration_end_date']);
        if (isset($o['add_start_date'])) $this->add_start_date = JsonConverters::from('DateTime', $o['add_start_date']);
        if (isset($o['add_end_date'])) $this->add_end_date = JsonConverters::from('DateTime', $o['add_end_date']);
        if (isset($o['drop_start_date'])) $this->drop_start_date = JsonConverters::from('DateTime', $o['drop_start_date']);
        if (isset($o['drop_end_date'])) $this->drop_end_date = JsonConverters::from('DateTime', $o['drop_end_date']);
        if (isset($o['grading_end_date'])) $this->grading_end_date = JsonConverters::from('DateTime', $o['grading_end_date']);
        if (isset($o['term'])) $this->term = $o['term'];
        if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
        if (isset($o['reporting_year'])) $this->reporting_year = $o['reporting_year'];
        if (isset($o['current_status'])) $this->current_status = $o['current_status'];
        if (isset($o['added_by'])) $this->added_by = $o['added_by'];
        if (isset($o['added_date'])) $this->added_date = JsonConverters::from('DateTime', $o['added_date']);
        if (isset($o['changed_by'])) $this->changed_by = $o['changed_by'];
        if (isset($o['changed_date'])) $this->changed_date = JsonConverters::from('DateTime', $o['changed_date']);
        if (isset($o['timestamp'])) $this->timestamp = JsonConverters::from('DateTime', $o['timestamp']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        if (isset($this->secUUID)) $o['secUUID'] = $this->secUUID;
        if (isset($this->course_name)) $o['course_name'] = $this->course_name;
        if (isset($this->section_code)) $o['section_code'] = $this->section_code;
        if (isset($this->course_title)) $o['course_title'] = $this->course_title;
        if (isset($this->course_short_title)) $o['course_short_title'] = $this->course_short_title;
        if (isset($this->course_description)) $o['course_description'] = $this->course_description;
        if (isset($this->crosslist_description)) $o['crosslist_description'] = $this->crosslist_description;
        if (isset($this->crosslist_course_name)) $o['crosslist_course_name'] = $this->crosslist_course_name;
        if (isset($this->location_long_name)) $o['location_long_name'] = $this->location_long_name;
        if (isset($this->room)) $o['room'] = $this->room;
        if (isset($this->instructors)) $o['instructors'] = JsonConverters::toArray('InstructorResponse', $this->instructors);
        if (isset($this->required_documents)) $o['required_documents'] = JsonConverters::toArray('DocumentResponse', $this->required_documents);
        if (isset($this->start_date)) $o['start_date'] = JsonConverters::to('DateTime', $this->start_date);
        if (isset($this->end_date)) $o['end_date'] = JsonConverters::to('DateTime', $this->end_date);
        if (isset($this->first_meeting_date)) $o['first_meeting_date'] = JsonConverters::to('DateTime', $this->first_meeting_date);
        if (isset($this->last_meeting_date)) $o['last_meeting_date'] = JsonConverters::to('DateTime', $this->last_meeting_date);
        if (isset($this->meeting_days)) $o['meeting_days'] = $this->meeting_days;
        if (isset($this->start_times)) $o['start_times'] = JsonConverters::toArray('string', $this->start_times);
        if (isset($this->end_times)) $o['end_times'] = JsonConverters::toArray('string', $this->end_times);
        if (isset($this->is_online_only)) $o['is_online_only'] = $this->is_online_only;
        if (isset($this->is_weekend)) $o['is_weekend'] = $this->is_weekend;
        if (isset($this->is_weekday)) $o['is_weekday'] = $this->is_weekday;
        if (isset($this->is_evening)) $o['is_evening'] = $this->is_evening;
        if (isset($this->is_waitlist)) $o['is_waitlist'] = $this->is_waitlist;
        if (isset($this->has_special_requirements)) $o['has_special_requirements'] = $this->has_special_requirements;
        if (isset($this->special_requirements)) $o['special_requirements'] = $this->special_requirements;
        if (isset($this->is_unlisted)) $o['is_unlisted'] = $this->is_unlisted;
        if (isset($this->credit_amounts)) $o['credit_amounts'] = JsonConverters::toArray('float', $this->credit_amounts);
        if (isset($this->audit_amounts)) $o['audit_amounts'] = JsonConverters::toArray('float', $this->audit_amounts);
        if (isset($this->audits_short_name)) $o['audits_short_name'] = $this->audits_short_name;
        if (isset($this->audits_long_name)) $o['audits_long_name'] = $this->audits_long_name;
        if (isset($this->credits_short_name)) $o['credits_short_name'] = $this->credits_short_name;
        if (isset($this->credits_long_name)) $o['credits_long_name'] = $this->credits_long_name;
        if (isset($this->distance_ed_materials)) $o['distance_ed_materials'] = $this->distance_ed_materials;
        if (isset($this->prerequisites)) $o['prerequisites'] = $this->prerequisites;
        if (isset($this->corequisites)) $o['corequisites'] = $this->corequisites;
        if (isset($this->capacity)) $o['capacity'] = $this->capacity;
        if (isset($this->flat_fee_amount)) $o['flat_fee_amount'] = $this->flat_fee_amount;
        if (isset($this->additional_fee_amount)) $o['additional_fee_amount'] = $this->additional_fee_amount;
        if (isset($this->registered_students)) $o['registered_students'] = $this->registered_students;
        if (isset($this->three_credit_plus)) $o['three_credit_plus'] = $this->three_credit_plus;
        if (isset($this->two_credit)) $o['two_credit'] = $this->two_credit;
        if (isset($this->one_credit)) $o['one_credit'] = $this->one_credit;
        if (isset($this->three_audit_plus)) $o['three_audit_plus'] = $this->three_audit_plus;
        if (isset($this->two_audit)) $o['two_audit'] = $this->two_audit;
        if (isset($this->one_audit)) $o['one_audit'] = $this->one_audit;
        if (isset($this->crosslist_registered_students)) $o['crosslist_registered_students'] = $this->crosslist_registered_students;
        if (isset($this->grades_received)) $o['grades_received'] = $this->grades_received;
        if (isset($this->crosslist_grades_received)) $o['crosslist_grades_received'] = $this->crosslist_grades_received;
        if (isset($this->registration_start_date)) $o['registration_start_date'] = JsonConverters::to('DateTime', $this->registration_start_date);
        if (isset($this->registration_end_date)) $o['registration_end_date'] = JsonConverters::to('DateTime', $this->registration_end_date);
        if (isset($this->add_start_date)) $o['add_start_date'] = JsonConverters::to('DateTime', $this->add_start_date);
        if (isset($this->add_end_date)) $o['add_end_date'] = JsonConverters::to('DateTime', $this->add_end_date);
        if (isset($this->drop_start_date)) $o['drop_start_date'] = JsonConverters::to('DateTime', $this->drop_start_date);
        if (isset($this->drop_end_date)) $o['drop_end_date'] = JsonConverters::to('DateTime', $this->drop_end_date);
        if (isset($this->grading_end_date)) $o['grading_end_date'] = JsonConverters::to('DateTime', $this->grading_end_date);
        if (isset($this->term)) $o['term'] = $this->term;
        if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
        if (isset($this->reporting_year)) $o['reporting_year'] = $this->reporting_year;
        if (isset($this->current_status)) $o['current_status'] = $this->current_status;
        if (isset($this->added_by)) $o['added_by'] = $this->added_by;
        if (isset($this->added_date)) $o['added_date'] = JsonConverters::to('DateTime', $this->added_date);
        if (isset($this->changed_by)) $o['changed_by'] = $this->changed_by;
        if (isset($this->changed_date)) $o['changed_date'] = JsonConverters::to('DateTime', $this->changed_date);
        if (isset($this->timestamp)) $o['timestamp'] = JsonConverters::to('DateTime', $this->timestamp);
        return empty($o) ? new class(){} : $o;
    }
}

class SectionCreateRequest implements JsonSerializable
{
    public function __construct(
        /** @var int|null */
        public ?int $course_id=null,
        /** @var string|null */
        public ?string $course_name=null,
        /** @var float|null */
        public ?float $min_credits=null,
        /** @var float|null */
        public ?float $max_credits=null,
        /** @var float|null */
        public ?float $credit_increments=null,
        /** @var float|null */
        public ?float $min_audits=null,
        /** @var float|null */
        public ?float $max_audits=null,
        /** @var float|null */
        public ?float $audit_increments=null,
        /** @var string|null */
        public ?string $section_code=null,
        /** @var string|null */
        public ?string $title=null,
        /** @var string|null */
        public ?string $pretty_title=null,
        /** @var string|null */
        public ?string $override_course_description=null,
        /** @var string|null */
        public ?string $current_status=null,
        /** @var string|null */
        public ?string $location=null,
        /** @var string|null */
        public ?string $room=null,
        /** @var bool|null */
        public ?bool $is_audio=null,
        /** @var bool|null */
        public ?bool $is_oncampus=null,
        /** @var string|null */
        public ?string $distance_ed_materials=null,
        /** @var DateTime|null */
        public ?DateTime $start_date=null,
        /** @var DateTime|null */
        public ?DateTime $end_date=null,
        /** @var DateTime|null */
        public ?DateTime $first_meeting_date=null,
        /** @var DateTime|null */
        public ?DateTime $last_meeting_date=null,
        /** @var string|null */
        public ?string $start_times=null,
        /** @var string|null */
        public ?string $end_times=null,
        /** @var string|null */
        public ?string $meeting_days=null,
        /** @var bool|null */
        public ?bool $is_pass_fail=null,
        /** @var bool|null */
        public ?bool $is_waitlist=null,
        /** @var bool|null */
        public ?bool $has_special_requirements=null,
        /** @var string|null */
        public ?string $special_requirements=null,
        /** @var bool|null */
        public ?bool $is_unlisted=null,
        /** @var int|null */
        public ?int $capacity=null,
        /** @var float|null */
        public ?float $flat_fee_amount=null,
        /** @var float|null */
        public ?float $additional_fee_amount=null,
        /** @var DateTime|null */
        public ?DateTime $override_registration_start_date=null,
        /** @var DateTime|null */
        public ?DateTime $override_registration_end_date=null,
        /** @var DateTime|null */
        public ?DateTime $override_add_start_date=null,
        /** @var DateTime|null */
        public ?DateTime $override_add_end_date=null,
        /** @var DateTime|null */
        public ?DateTime $override_drop_start_date=null,
        /** @var DateTime|null */
        public ?DateTime $override_drop_end_date=null,
        /** @var DateTime|null */
        public ?DateTime $override_grading_end_date=null,
        /** @var string|null */
        public ?string $term=null,
        /** @var string|null */
        public ?string $reporting_term=null,
        /** @var string|null */
        public ?string $authorizing_uuid=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['course_id'])) $this->course_id = $o['course_id'];
        if (isset($o['course_name'])) $this->course_name = $o['course_name'];
        if (isset($o['min_credits'])) $this->min_credits = $o['min_credits'];
        if (isset($o['max_credits'])) $this->max_credits = $o['max_credits'];
        if (isset($o['credit_increments'])) $this->credit_increments = $o['credit_increments'];
        if (isset($o['min_audits'])) $this->min_audits = $o['min_audits'];
        if (isset($o['max_audits'])) $this->max_audits = $o['max_audits'];
        if (isset($o['audit_increments'])) $this->audit_increments = $o['audit_increments'];
        if (isset($o['section_code'])) $this->section_code = $o['section_code'];
        if (isset($o['title'])) $this->title = $o['title'];
        if (isset($o['pretty_title'])) $this->pretty_title = $o['pretty_title'];
        if (isset($o['override_course_description'])) $this->override_course_description = $o['override_course_description'];
        if (isset($o['current_status'])) $this->current_status = $o['current_status'];
        if (isset($o['location'])) $this->location = $o['location'];
        if (isset($o['room'])) $this->room = $o['room'];
        if (isset($o['is_audio'])) $this->is_audio = $o['is_audio'];
        if (isset($o['is_oncampus'])) $this->is_oncampus = $o['is_oncampus'];
        if (isset($o['distance_ed_materials'])) $this->distance_ed_materials = $o['distance_ed_materials'];
        if (isset($o['start_date'])) $this->start_date = JsonConverters::from('DateTime', $o['start_date']);
        if (isset($o['end_date'])) $this->end_date = JsonConverters::from('DateTime', $o['end_date']);
        if (isset($o['first_meeting_date'])) $this->first_meeting_date = JsonConverters::from('DateTime', $o['first_meeting_date']);
        if (isset($o['last_meeting_date'])) $this->last_meeting_date = JsonConverters::from('DateTime', $o['last_meeting_date']);
        if (isset($o['start_times'])) $this->start_times = $o['start_times'];
        if (isset($o['end_times'])) $this->end_times = $o['end_times'];
        if (isset($o['meeting_days'])) $this->meeting_days = $o['meeting_days'];
        if (isset($o['is_pass_fail'])) $this->is_pass_fail = $o['is_pass_fail'];
        if (isset($o['is_waitlist'])) $this->is_waitlist = $o['is_waitlist'];
        if (isset($o['has_special_requirements'])) $this->has_special_requirements = $o['has_special_requirements'];
        if (isset($o['special_requirements'])) $this->special_requirements = $o['special_requirements'];
        if (isset($o['is_unlisted'])) $this->is_unlisted = $o['is_unlisted'];
        if (isset($o['capacity'])) $this->capacity = $o['capacity'];
        if (isset($o['flat_fee_amount'])) $this->flat_fee_amount = $o['flat_fee_amount'];
        if (isset($o['additional_fee_amount'])) $this->additional_fee_amount = $o['additional_fee_amount'];
        if (isset($o['override_registration_start_date'])) $this->override_registration_start_date = JsonConverters::from('DateTime', $o['override_registration_start_date']);
        if (isset($o['override_registration_end_date'])) $this->override_registration_end_date = JsonConverters::from('DateTime', $o['override_registration_end_date']);
        if (isset($o['override_add_start_date'])) $this->override_add_start_date = JsonConverters::from('DateTime', $o['override_add_start_date']);
        if (isset($o['override_add_end_date'])) $this->override_add_end_date = JsonConverters::from('DateTime', $o['override_add_end_date']);
        if (isset($o['override_drop_start_date'])) $this->override_drop_start_date = JsonConverters::from('DateTime', $o['override_drop_start_date']);
        if (isset($o['override_drop_end_date'])) $this->override_drop_end_date = JsonConverters::from('DateTime', $o['override_drop_end_date']);
        if (isset($o['override_grading_end_date'])) $this->override_grading_end_date = JsonConverters::from('DateTime', $o['override_grading_end_date']);
        if (isset($o['term'])) $this->term = $o['term'];
        if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
        if (isset($o['authorizing_uuid'])) $this->authorizing_uuid = $o['authorizing_uuid'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->course_id)) $o['course_id'] = $this->course_id;
        if (isset($this->course_name)) $o['course_name'] = $this->course_name;
        if (isset($this->min_credits)) $o['min_credits'] = $this->min_credits;
        if (isset($this->max_credits)) $o['max_credits'] = $this->max_credits;
        if (isset($this->credit_increments)) $o['credit_increments'] = $this->credit_increments;
        if (isset($this->min_audits)) $o['min_audits'] = $this->min_audits;
        if (isset($this->max_audits)) $o['max_audits'] = $this->max_audits;
        if (isset($this->audit_increments)) $o['audit_increments'] = $this->audit_increments;
        if (isset($this->section_code)) $o['section_code'] = $this->section_code;
        if (isset($this->title)) $o['title'] = $this->title;
        if (isset($this->pretty_title)) $o['pretty_title'] = $this->pretty_title;
        if (isset($this->override_course_description)) $o['override_course_description'] = $this->override_course_description;
        if (isset($this->current_status)) $o['current_status'] = $this->current_status;
        if (isset($this->location)) $o['location'] = $this->location;
        if (isset($this->room)) $o['room'] = $this->room;
        if (isset($this->is_audio)) $o['is_audio'] = $this->is_audio;
        if (isset($this->is_oncampus)) $o['is_oncampus'] = $this->is_oncampus;
        if (isset($this->distance_ed_materials)) $o['distance_ed_materials'] = $this->distance_ed_materials;
        if (isset($this->start_date)) $o['start_date'] = JsonConverters::to('DateTime', $this->start_date);
        if (isset($this->end_date)) $o['end_date'] = JsonConverters::to('DateTime', $this->end_date);
        if (isset($this->first_meeting_date)) $o['first_meeting_date'] = JsonConverters::to('DateTime', $this->first_meeting_date);
        if (isset($this->last_meeting_date)) $o['last_meeting_date'] = JsonConverters::to('DateTime', $this->last_meeting_date);
        if (isset($this->start_times)) $o['start_times'] = $this->start_times;
        if (isset($this->end_times)) $o['end_times'] = $this->end_times;
        if (isset($this->meeting_days)) $o['meeting_days'] = $this->meeting_days;
        if (isset($this->is_pass_fail)) $o['is_pass_fail'] = $this->is_pass_fail;
        if (isset($this->is_waitlist)) $o['is_waitlist'] = $this->is_waitlist;
        if (isset($this->has_special_requirements)) $o['has_special_requirements'] = $this->has_special_requirements;
        if (isset($this->special_requirements)) $o['special_requirements'] = $this->special_requirements;
        if (isset($this->is_unlisted)) $o['is_unlisted'] = $this->is_unlisted;
        if (isset($this->capacity)) $o['capacity'] = $this->capacity;
        if (isset($this->flat_fee_amount)) $o['flat_fee_amount'] = $this->flat_fee_amount;
        if (isset($this->additional_fee_amount)) $o['additional_fee_amount'] = $this->additional_fee_amount;
        if (isset($this->override_registration_start_date)) $o['override_registration_start_date'] = JsonConverters::to('DateTime', $this->override_registration_start_date);
        if (isset($this->override_registration_end_date)) $o['override_registration_end_date'] = JsonConverters::to('DateTime', $this->override_registration_end_date);
        if (isset($this->override_add_start_date)) $o['override_add_start_date'] = JsonConverters::to('DateTime', $this->override_add_start_date);
        if (isset($this->override_add_end_date)) $o['override_add_end_date'] = JsonConverters::to('DateTime', $this->override_add_end_date);
        if (isset($this->override_drop_start_date)) $o['override_drop_start_date'] = JsonConverters::to('DateTime', $this->override_drop_start_date);
        if (isset($this->override_drop_end_date)) $o['override_drop_end_date'] = JsonConverters::to('DateTime', $this->override_drop_end_date);
        if (isset($this->override_grading_end_date)) $o['override_grading_end_date'] = JsonConverters::to('DateTime', $this->override_grading_end_date);
        if (isset($this->term)) $o['term'] = $this->term;
        if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
        if (isset($this->authorizing_uuid)) $o['authorizing_uuid'] = $this->authorizing_uuid;
        return empty($o) ? new class(){} : $o;
    }
}

PHP SectionCreateRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Sections/Admin/{reporting_term}/Create HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	course_id: 0,
	course_name: String,
	min_credits: 0,
	max_credits: 0,
	credit_increments: 0,
	min_audits: 0,
	max_audits: 0,
	audit_increments: 0,
	section_code: String,
	title: String,
	pretty_title: String,
	override_course_description: String,
	current_status: String,
	location: String,
	room: String,
	is_audio: False,
	is_oncampus: False,
	distance_ed_materials: String,
	start_date: 0001-01-01,
	end_date: 0001-01-01,
	first_meeting_date: 0001-01-01,
	last_meeting_date: 0001-01-01,
	start_times: String,
	end_times: String,
	meeting_days: String,
	is_pass_fail: False,
	is_waitlist: False,
	has_special_requirements: False,
	special_requirements: String,
	is_unlisted: False,
	capacity: 0,
	flat_fee_amount: 0,
	additional_fee_amount: 0,
	override_registration_start_date: 0001-01-01,
	override_registration_end_date: 0001-01-01,
	override_add_start_date: 0001-01-01,
	override_add_end_date: 0001-01-01,
	override_drop_start_date: 0001-01-01,
	override_drop_end_date: 0001-01-01,
	override_grading_end_date: 0001-01-01,
	term: String,
	reporting_term: String,
	authorizing_uuid: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	},
	secUUID: String,
	course_name: String,
	section_code: String,
	course_title: String,
	course_short_title: String,
	course_description: String,
	crosslist_description: String,
	crosslist_course_name: String,
	location_long_name: String,
	room: String,
	instructors: 
	[
		{
			responseStatus: 
			{
				errorCode: String,
				message: String,
				stackTrace: String,
				errors: 
				[
					{
						errorCode: String,
						fieldName: String,
						message: String,
						meta: 
						{
							String: String
						}
					}
				],
				meta: 
				{
					String: String
				}
			},
			regent_id: 0,
			regent_login: String,
			preferred_name: String,
			first_name: String,
			last_name: String,
			full_name: String,
			email: String,
			image_base64: String
		}
	],
	required_documents: 
	[
		{
			code: String,
			document_name: String,
			document_description: String
		}
	],
	start_date: 0001-01-01,
	end_date: 0001-01-01,
	first_meeting_date: 0001-01-01,
	last_meeting_date: 0001-01-01,
	meeting_days: String,
	start_times: 
	[
		String
	],
	end_times: 
	[
		String
	],
	is_online_only: False,
	is_weekend: False,
	is_weekday: False,
	is_evening: False,
	is_waitlist: False,
	has_special_requirements: False,
	special_requirements: String,
	is_unlisted: False,
	credit_amounts: 
	[
		0
	],
	audit_amounts: 
	[
		0
	],
	audits_short_name: String,
	audits_long_name: String,
	credits_short_name: String,
	credits_long_name: String,
	distance_ed_materials: String,
	prerequisites: String,
	corequisites: String,
	capacity: 0,
	flat_fee_amount: 0,
	additional_fee_amount: 0,
	registered_students: 0,
	three_credit_plus: 0,
	two_credit: 0,
	one_credit: 0,
	three_audit_plus: 0,
	two_audit: 0,
	one_audit: 0,
	crosslist_registered_students: 0,
	grades_received: 0,
	crosslist_grades_received: 0,
	registration_start_date: 0001-01-01,
	registration_end_date: 0001-01-01,
	add_start_date: 0001-01-01,
	add_end_date: 0001-01-01,
	drop_start_date: 0001-01-01,
	drop_end_date: 0001-01-01,
	grading_end_date: 0001-01-01,
	term: String,
	reporting_term: String,
	reporting_year: 0,
	current_status: String,
	added_by: String,
	added_date: 0001-01-01,
	changed_by: String,
	changed_date: 0001-01-01,
	timestamp: 0001-01-01
}