regis

<back to all web services

StudentGraduationRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/StudentGraduation/{uuid}/{year}
<?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 StudentGraduationProgramResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $program_code=null,
        /** @var string|null */
        public ?string $concentration_code=null,
        /** @var string|null */
        public ?string $program_details=null,
        /** @var string|null */
        public ?string $comments=null
    ) {
    }

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

class StudentGraduationResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var int */
        public int $regent_id=0,
        /** @var string|null */
        public ?string $uuid=null,
        /** @var string|null */
        public ?string $first_name=null,
        /** @var string|null */
        public ?string $preferred_name=null,
        /** @var string|null */
        public ?string $middle_name=null,
        /** @var string|null */
        public ?string $last_name=null,
        /** @var string|null */
        public ?string $email=null,
        /** @var string|null */
        public ?string $phonetic_first_name=null,
        /** @var string|null */
        public ?string $phonetic_middle_name=null,
        /** @var string|null */
        public ?string $phonetic_last_name=null,
        /** @var string|null */
        public ?string $placement=null,
        /** @var string|null */
        public ?string $placement_other=null,
        /** @var string|null */
        public ?string $addr1=null,
        /** @var string|null */
        public ?string $addr2=null,
        /** @var string|null */
        public ?string $city=null,
        /** @var string|null */
        public ?string $state=null,
        /** @var string|null */
        public ?string $country=null,
        /** @var string|null */
        public ?string $code=null,
        /** @var string|null */
        public ?string $citizenship=null,
        /** @var string|null */
        public ?string $citizenship_other=null,
        /** @var string|null */
        public ?string $permanent_resident=null,
        /** @var string|null */
        public ?string $previous_degrees=null,
        /** @var int|null */
        public ?int $gown_size=null,
        /** @var string|null */
        public ?string $project_title=null,
        /** @var string|null */
        public ?string $supervisor=null,
        /** @var bool|null */
        public ?bool $is_attending=null,
        /** @var bool|null */
        public ?bool $is_hood_requested=null,
        /** @var bool|null */
        public ?bool $is_hood_paid=null,
        /** @var bool|null */
        public ?bool $is_paid=null,
        /** @var bool|null */
        public ?bool $is_late=null,
        /** @var int|null */
        public ?int $year=null,
        /** @var string|null */
        public ?string $comments=null,
        /** @var string|null */
        public ?string $current_status=null,
        /** @var DateTime|null */
        public ?DateTime $current_status_date=null,
        /** @var DateTime|null */
        public ?DateTime $added_date=null,
        /** @var array<StudentGraduationProgramResponse>|null */
        public ?array $applied_programs=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['uuid'])) $this->uuid = $o['uuid'];
        if (isset($o['first_name'])) $this->first_name = $o['first_name'];
        if (isset($o['preferred_name'])) $this->preferred_name = $o['preferred_name'];
        if (isset($o['middle_name'])) $this->middle_name = $o['middle_name'];
        if (isset($o['last_name'])) $this->last_name = $o['last_name'];
        if (isset($o['email'])) $this->email = $o['email'];
        if (isset($o['phonetic_first_name'])) $this->phonetic_first_name = $o['phonetic_first_name'];
        if (isset($o['phonetic_middle_name'])) $this->phonetic_middle_name = $o['phonetic_middle_name'];
        if (isset($o['phonetic_last_name'])) $this->phonetic_last_name = $o['phonetic_last_name'];
        if (isset($o['placement'])) $this->placement = $o['placement'];
        if (isset($o['placement_other'])) $this->placement_other = $o['placement_other'];
        if (isset($o['addr1'])) $this->addr1 = $o['addr1'];
        if (isset($o['addr2'])) $this->addr2 = $o['addr2'];
        if (isset($o['city'])) $this->city = $o['city'];
        if (isset($o['state'])) $this->state = $o['state'];
        if (isset($o['country'])) $this->country = $o['country'];
        if (isset($o['code'])) $this->code = $o['code'];
        if (isset($o['citizenship'])) $this->citizenship = $o['citizenship'];
        if (isset($o['citizenship_other'])) $this->citizenship_other = $o['citizenship_other'];
        if (isset($o['permanent_resident'])) $this->permanent_resident = $o['permanent_resident'];
        if (isset($o['previous_degrees'])) $this->previous_degrees = $o['previous_degrees'];
        if (isset($o['gown_size'])) $this->gown_size = $o['gown_size'];
        if (isset($o['project_title'])) $this->project_title = $o['project_title'];
        if (isset($o['supervisor'])) $this->supervisor = $o['supervisor'];
        if (isset($o['is_attending'])) $this->is_attending = $o['is_attending'];
        if (isset($o['is_hood_requested'])) $this->is_hood_requested = $o['is_hood_requested'];
        if (isset($o['is_hood_paid'])) $this->is_hood_paid = $o['is_hood_paid'];
        if (isset($o['is_paid'])) $this->is_paid = $o['is_paid'];
        if (isset($o['is_late'])) $this->is_late = $o['is_late'];
        if (isset($o['year'])) $this->year = $o['year'];
        if (isset($o['comments'])) $this->comments = $o['comments'];
        if (isset($o['current_status'])) $this->current_status = $o['current_status'];
        if (isset($o['current_status_date'])) $this->current_status_date = JsonConverters::from('DateTime', $o['current_status_date']);
        if (isset($o['added_date'])) $this->added_date = JsonConverters::from('DateTime', $o['added_date']);
        if (isset($o['applied_programs'])) $this->applied_programs = JsonConverters::fromArray('StudentGraduationProgramResponse', $o['applied_programs']);
    }
    
    /** @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->uuid)) $o['uuid'] = $this->uuid;
        if (isset($this->first_name)) $o['first_name'] = $this->first_name;
        if (isset($this->preferred_name)) $o['preferred_name'] = $this->preferred_name;
        if (isset($this->middle_name)) $o['middle_name'] = $this->middle_name;
        if (isset($this->last_name)) $o['last_name'] = $this->last_name;
        if (isset($this->email)) $o['email'] = $this->email;
        if (isset($this->phonetic_first_name)) $o['phonetic_first_name'] = $this->phonetic_first_name;
        if (isset($this->phonetic_middle_name)) $o['phonetic_middle_name'] = $this->phonetic_middle_name;
        if (isset($this->phonetic_last_name)) $o['phonetic_last_name'] = $this->phonetic_last_name;
        if (isset($this->placement)) $o['placement'] = $this->placement;
        if (isset($this->placement_other)) $o['placement_other'] = $this->placement_other;
        if (isset($this->addr1)) $o['addr1'] = $this->addr1;
        if (isset($this->addr2)) $o['addr2'] = $this->addr2;
        if (isset($this->city)) $o['city'] = $this->city;
        if (isset($this->state)) $o['state'] = $this->state;
        if (isset($this->country)) $o['country'] = $this->country;
        if (isset($this->code)) $o['code'] = $this->code;
        if (isset($this->citizenship)) $o['citizenship'] = $this->citizenship;
        if (isset($this->citizenship_other)) $o['citizenship_other'] = $this->citizenship_other;
        if (isset($this->permanent_resident)) $o['permanent_resident'] = $this->permanent_resident;
        if (isset($this->previous_degrees)) $o['previous_degrees'] = $this->previous_degrees;
        if (isset($this->gown_size)) $o['gown_size'] = $this->gown_size;
        if (isset($this->project_title)) $o['project_title'] = $this->project_title;
        if (isset($this->supervisor)) $o['supervisor'] = $this->supervisor;
        if (isset($this->is_attending)) $o['is_attending'] = $this->is_attending;
        if (isset($this->is_hood_requested)) $o['is_hood_requested'] = $this->is_hood_requested;
        if (isset($this->is_hood_paid)) $o['is_hood_paid'] = $this->is_hood_paid;
        if (isset($this->is_paid)) $o['is_paid'] = $this->is_paid;
        if (isset($this->is_late)) $o['is_late'] = $this->is_late;
        if (isset($this->year)) $o['year'] = $this->year;
        if (isset($this->comments)) $o['comments'] = $this->comments;
        if (isset($this->current_status)) $o['current_status'] = $this->current_status;
        if (isset($this->current_status_date)) $o['current_status_date'] = JsonConverters::to('DateTime', $this->current_status_date);
        if (isset($this->added_date)) $o['added_date'] = JsonConverters::to('DateTime', $this->added_date);
        if (isset($this->applied_programs)) $o['applied_programs'] = JsonConverters::toArray('StudentGraduationProgramResponse', $this->applied_programs);
        return empty($o) ? new class(){} : $o;
    }
}

class StudentGraduationRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $uuid=null,
        /** @var int */
        public int $year=0
    ) {
    }

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

PHP StudentGraduationRequest DTOs

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

HTTP + OTHER

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

POST /StudentGraduation/{uuid}/{year} HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"uuid":"String","year":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"regent_id":0,"uuid":"String","first_name":"String","preferred_name":"String","middle_name":"String","last_name":"String","email":"String","phonetic_first_name":"String","phonetic_middle_name":"String","phonetic_last_name":"String","placement":"String","placement_other":"String","addr1":"String","addr2":"String","city":"String","state":"String","country":"String","code":"String","citizenship":"String","citizenship_other":"String","permanent_resident":"String","previous_degrees":"String","gown_size":0,"project_title":"String","supervisor":"String","is_attending":false,"is_hood_requested":false,"is_hood_paid":false,"is_paid":false,"is_late":false,"year":0,"comments":"String","current_status":"String","current_status_date":"0001-01-01T00:00:00.0000000","added_date":"0001-01-01T00:00:00.0000000","applied_programs":[{"program_code":"String","concentration_code":"String","program_details":"String","comments":"String"}]}