regis

<back to all web services

RegentDegreesRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Academic/{uuid}/RegentDegrees
<?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 RegentDegreeResponse implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $program_code=null,
        /** @var string|null */
        public ?string $program_name=null,
        /** @var string|null */
        public ?string $concentration_code=null,
        /** @var string|null */
        public ?string $concentration_name=null,
        /** @var DateTime|null */
        public ?DateTime $graduation_month=null,
        /** @var DateTime|null */
        public ?DateTime $start_date=null,
        /** @var DateTime|null */
        public ?DateTime $end_date=null,
        /** @var float|null */
        public ?float $gpa=null,
        /** @var string|null */
        public ?string $academic_level=null,
        /** @var DateTime|null */
        public ?DateTime $commencement_date=null,
        /** @var DateTime|null */
        public ?DateTime $added_date=null,
        /** @var string|null */
        public ?string $added_by=null,
        /** @var DateTime|null */
        public ?DateTime $changed_date=null,
        /** @var string|null */
        public ?string $changed_by=null,
        /** @var DateTime */
        public DateTime $timestamp=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['program_code'])) $this->program_code = $o['program_code'];
        if (isset($o['program_name'])) $this->program_name = $o['program_name'];
        if (isset($o['concentration_code'])) $this->concentration_code = $o['concentration_code'];
        if (isset($o['concentration_name'])) $this->concentration_name = $o['concentration_name'];
        if (isset($o['graduation_month'])) $this->graduation_month = JsonConverters::from('DateTime', $o['graduation_month']);
        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['gpa'])) $this->gpa = $o['gpa'];
        if (isset($o['academic_level'])) $this->academic_level = $o['academic_level'];
        if (isset($o['commencement_date'])) $this->commencement_date = JsonConverters::from('DateTime', $o['commencement_date']);
        if (isset($o['added_date'])) $this->added_date = JsonConverters::from('DateTime', $o['added_date']);
        if (isset($o['added_by'])) $this->added_by = $o['added_by'];
        if (isset($o['changed_date'])) $this->changed_date = JsonConverters::from('DateTime', $o['changed_date']);
        if (isset($o['changed_by'])) $this->changed_by = $o['changed_by'];
        if (isset($o['timestamp'])) $this->timestamp = JsonConverters::from('DateTime', $o['timestamp']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->program_code)) $o['program_code'] = $this->program_code;
        if (isset($this->program_name)) $o['program_name'] = $this->program_name;
        if (isset($this->concentration_code)) $o['concentration_code'] = $this->concentration_code;
        if (isset($this->concentration_name)) $o['concentration_name'] = $this->concentration_name;
        if (isset($this->graduation_month)) $o['graduation_month'] = JsonConverters::to('DateTime', $this->graduation_month);
        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->gpa)) $o['gpa'] = $this->gpa;
        if (isset($this->academic_level)) $o['academic_level'] = $this->academic_level;
        if (isset($this->commencement_date)) $o['commencement_date'] = JsonConverters::to('DateTime', $this->commencement_date);
        if (isset($this->added_date)) $o['added_date'] = JsonConverters::to('DateTime', $this->added_date);
        if (isset($this->added_by)) $o['added_by'] = $this->added_by;
        if (isset($this->changed_date)) $o['changed_date'] = JsonConverters::to('DateTime', $this->changed_date);
        if (isset($this->changed_by)) $o['changed_by'] = $this->changed_by;
        if (isset($this->timestamp)) $o['timestamp'] = JsonConverters::to('DateTime', $this->timestamp);
        return empty($o) ? new class(){} : $o;
    }
}

class ProgramResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $program_code=null,
        /** @var string|null */
        public ?string $program_pretty_code=null,
        /** @var string|null */
        public ?string $program_long_name=null,
        /** @var string|null */
        public ?string $available_concentrations=null,
        /** @var bool|null */
        public ?bool $is_active=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['id'])) $this->id = $o['id'];
        if (isset($o['program_code'])) $this->program_code = $o['program_code'];
        if (isset($o['program_pretty_code'])) $this->program_pretty_code = $o['program_pretty_code'];
        if (isset($o['program_long_name'])) $this->program_long_name = $o['program_long_name'];
        if (isset($o['available_concentrations'])) $this->available_concentrations = $o['available_concentrations'];
        if (isset($o['is_active'])) $this->is_active = $o['is_active'];
        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->id)) $o['id'] = $this->id;
        if (isset($this->program_code)) $o['program_code'] = $this->program_code;
        if (isset($this->program_pretty_code)) $o['program_pretty_code'] = $this->program_pretty_code;
        if (isset($this->program_long_name)) $o['program_long_name'] = $this->program_long_name;
        if (isset($this->available_concentrations)) $o['available_concentrations'] = $this->available_concentrations;
        if (isset($this->is_active)) $o['is_active'] = $this->is_active;
        if (isset($this->timestamp)) $o['timestamp'] = JsonConverters::to('DateTime', $this->timestamp);
        return empty($o) ? new class(){} : $o;
    }
}

class ConcentrationResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $concentration_code=null,
        /** @var string|null */
        public ?string $concentration_name=null,
        /** @var bool|null */
        public ?bool $is_active=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['concentration_code'])) $this->concentration_code = $o['concentration_code'];
        if (isset($o['concentration_name'])) $this->concentration_name = $o['concentration_name'];
        if (isset($o['is_active'])) $this->is_active = $o['is_active'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->concentration_code)) $o['concentration_code'] = $this->concentration_code;
        if (isset($this->concentration_name)) $o['concentration_name'] = $this->concentration_name;
        if (isset($this->is_active)) $o['is_active'] = $this->is_active;
        return empty($o) ? new class(){} : $o;
    }
}

class CatalogResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null,
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $catalog_code=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['catalog_code'])) $this->catalog_code = $o['catalog_code'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->catalog_code)) $o['catalog_code'] = $this->catalog_code;
        return empty($o) ? new class(){} : $o;
    }
}

class RegentDegreesResponse 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 array<RegentDegreeResponse>|null */
        public ?array $regent_degrees=null,
        /** @var array<ProgramResponse>|null */
        public ?array $valid_programs=null,
        /** @var array<ConcentrationResponse>|null */
        public ?array $valid_concentrations=null,
        /** @var array<CatalogResponse>|null */
        public ?array $valid_catalogs=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['regent_degrees'])) $this->regent_degrees = JsonConverters::fromArray('RegentDegreeResponse', $o['regent_degrees']);
        if (isset($o['valid_programs'])) $this->valid_programs = JsonConverters::fromArray('ProgramResponse', $o['valid_programs']);
        if (isset($o['valid_concentrations'])) $this->valid_concentrations = JsonConverters::fromArray('ConcentrationResponse', $o['valid_concentrations']);
        if (isset($o['valid_catalogs'])) $this->valid_catalogs = JsonConverters::fromArray('CatalogResponse', $o['valid_catalogs']);
    }
    
    /** @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->regent_degrees)) $o['regent_degrees'] = JsonConverters::toArray('RegentDegreeResponse', $this->regent_degrees);
        if (isset($this->valid_programs)) $o['valid_programs'] = JsonConverters::toArray('ProgramResponse', $this->valid_programs);
        if (isset($this->valid_concentrations)) $o['valid_concentrations'] = JsonConverters::toArray('ConcentrationResponse', $this->valid_concentrations);
        if (isset($this->valid_catalogs)) $o['valid_catalogs'] = JsonConverters::toArray('CatalogResponse', $this->valid_catalogs);
        return empty($o) ? new class(){} : $o;
    }
}

class RegentDegreesRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $uuid=null
    ) {
    }

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

PHP RegentDegreesRequest DTOs

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

HTTP + XML

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

POST /Academic/{uuid}/RegentDegrees HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<RegentDegreesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
  <uuid>String</uuid>
</RegentDegreesRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<RegentDegreesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses">
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <regent_degrees>
    <RegentDegreeResponse>
      <academic_level>String</academic_level>
      <added_by>String</added_by>
      <added_date>0001-01-01T00:00:00</added_date>
      <changed_by>String</changed_by>
      <changed_date>0001-01-01T00:00:00</changed_date>
      <commencement_date>0001-01-01T00:00:00</commencement_date>
      <concentration_code>String</concentration_code>
      <concentration_name>String</concentration_name>
      <end_date>0001-01-01T00:00:00</end_date>
      <gpa>0</gpa>
      <graduation_month>0001-01-01T00:00:00</graduation_month>
      <id>0</id>
      <program_code>String</program_code>
      <program_name>String</program_name>
      <start_date>0001-01-01T00:00:00</start_date>
      <timestamp>0001-01-01T00:00:00</timestamp>
    </RegentDegreeResponse>
  </regent_degrees>
  <regent_id>0</regent_id>
  <uuid>String</uuid>
  <valid_catalogs>
    <CatalogResponse>
      <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types">
        <d4p1:ErrorCode>String</d4p1:ErrorCode>
        <d4p1:Message>String</d4p1:Message>
        <d4p1:StackTrace>String</d4p1:StackTrace>
        <d4p1:Errors>
          <d4p1:ResponseError>
            <d4p1:ErrorCode>String</d4p1:ErrorCode>
            <d4p1:FieldName>String</d4p1:FieldName>
            <d4p1:Message>String</d4p1:Message>
            <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:KeyValueOfstringstring>
                <d7p1:Key>String</d7p1:Key>
                <d7p1:Value>String</d7p1:Value>
              </d7p1:KeyValueOfstringstring>
            </d4p1:Meta>
          </d4p1:ResponseError>
        </d4p1:Errors>
        <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d4p1:Meta>
      </ResponseStatus>
      <catalog_code>String</catalog_code>
      <id>0</id>
    </CatalogResponse>
  </valid_catalogs>
  <valid_concentrations>
    <ConcentrationResponse>
      <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types">
        <d4p1:ErrorCode>String</d4p1:ErrorCode>
        <d4p1:Message>String</d4p1:Message>
        <d4p1:StackTrace>String</d4p1:StackTrace>
        <d4p1:Errors>
          <d4p1:ResponseError>
            <d4p1:ErrorCode>String</d4p1:ErrorCode>
            <d4p1:FieldName>String</d4p1:FieldName>
            <d4p1:Message>String</d4p1:Message>
            <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:KeyValueOfstringstring>
                <d7p1:Key>String</d7p1:Key>
                <d7p1:Value>String</d7p1:Value>
              </d7p1:KeyValueOfstringstring>
            </d4p1:Meta>
          </d4p1:ResponseError>
        </d4p1:Errors>
        <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d4p1:Meta>
      </ResponseStatus>
      <concentration_code>String</concentration_code>
      <concentration_name>String</concentration_name>
      <id>0</id>
      <is_active>false</is_active>
    </ConcentrationResponse>
  </valid_concentrations>
  <valid_programs>
    <ProgramResponse>
      <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types">
        <d4p1:ErrorCode>String</d4p1:ErrorCode>
        <d4p1:Message>String</d4p1:Message>
        <d4p1:StackTrace>String</d4p1:StackTrace>
        <d4p1:Errors>
          <d4p1:ResponseError>
            <d4p1:ErrorCode>String</d4p1:ErrorCode>
            <d4p1:FieldName>String</d4p1:FieldName>
            <d4p1:Message>String</d4p1:Message>
            <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:KeyValueOfstringstring>
                <d7p1:Key>String</d7p1:Key>
                <d7p1:Value>String</d7p1:Value>
              </d7p1:KeyValueOfstringstring>
            </d4p1:Meta>
          </d4p1:ResponseError>
        </d4p1:Errors>
        <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d4p1:Meta>
      </ResponseStatus>
      <available_concentrations>String</available_concentrations>
      <id>0</id>
      <is_active>false</is_active>
      <program_code>String</program_code>
      <program_long_name>String</program_long_name>
      <program_pretty_code>String</program_pretty_code>
      <timestamp>0001-01-01T00:00:00</timestamp>
    </ProgramResponse>
  </valid_programs>
</RegentDegreesResponse>