Required role: | REGISUserRole |
POST | /AppSettings |
---|
<?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 EmailAddresses implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $helpdesk=null,
/** @var string|null */
public ?string $registration=null,
/** @var string|null */
public ?string $developer=null,
/** @var string|null */
public ?string $financialAid=null,
/** @var string|null */
public ?string $noReply=null,
/** @var string|null */
public ?string $carbonCopy=null,
/** @var string|null */
public ?string $distanceEducation=null,
/** @var string|null */
public ?string $studentServices=null,
/** @var string|null */
public ?string $admissions=null,
/** @var string|null */
public ?string $admissionsSE=null,
/** @var string|null */
public ?string $academicAdvising=null,
/** @var string|null */
public ?string $summerProgram=null,
/** @var string|null */
public ?string $libraryHold=null,
/** @var string|null */
public ?string $noEmail=null,
/** @var string|null */
public ?string $academicAdministrator=null,
/** @var string|null */
public ?string $accountant=null,
/** @var string|null */
public ?string $deanOfStudents=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['helpdesk'])) $this->helpdesk = $o['helpdesk'];
if (isset($o['registration'])) $this->registration = $o['registration'];
if (isset($o['developer'])) $this->developer = $o['developer'];
if (isset($o['financialAid'])) $this->financialAid = $o['financialAid'];
if (isset($o['noReply'])) $this->noReply = $o['noReply'];
if (isset($o['carbonCopy'])) $this->carbonCopy = $o['carbonCopy'];
if (isset($o['distanceEducation'])) $this->distanceEducation = $o['distanceEducation'];
if (isset($o['studentServices'])) $this->studentServices = $o['studentServices'];
if (isset($o['admissions'])) $this->admissions = $o['admissions'];
if (isset($o['admissionsSE'])) $this->admissionsSE = $o['admissionsSE'];
if (isset($o['academicAdvising'])) $this->academicAdvising = $o['academicAdvising'];
if (isset($o['summerProgram'])) $this->summerProgram = $o['summerProgram'];
if (isset($o['libraryHold'])) $this->libraryHold = $o['libraryHold'];
if (isset($o['noEmail'])) $this->noEmail = $o['noEmail'];
if (isset($o['academicAdministrator'])) $this->academicAdministrator = $o['academicAdministrator'];
if (isset($o['accountant'])) $this->accountant = $o['accountant'];
if (isset($o['deanOfStudents'])) $this->deanOfStudents = $o['deanOfStudents'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->helpdesk)) $o['helpdesk'] = $this->helpdesk;
if (isset($this->registration)) $o['registration'] = $this->registration;
if (isset($this->developer)) $o['developer'] = $this->developer;
if (isset($this->financialAid)) $o['financialAid'] = $this->financialAid;
if (isset($this->noReply)) $o['noReply'] = $this->noReply;
if (isset($this->carbonCopy)) $o['carbonCopy'] = $this->carbonCopy;
if (isset($this->distanceEducation)) $o['distanceEducation'] = $this->distanceEducation;
if (isset($this->studentServices)) $o['studentServices'] = $this->studentServices;
if (isset($this->admissions)) $o['admissions'] = $this->admissions;
if (isset($this->admissionsSE)) $o['admissionsSE'] = $this->admissionsSE;
if (isset($this->academicAdvising)) $o['academicAdvising'] = $this->academicAdvising;
if (isset($this->summerProgram)) $o['summerProgram'] = $this->summerProgram;
if (isset($this->libraryHold)) $o['libraryHold'] = $this->libraryHold;
if (isset($this->noEmail)) $o['noEmail'] = $this->noEmail;
if (isset($this->academicAdministrator)) $o['academicAdministrator'] = $this->academicAdministrator;
if (isset($this->accountant)) $o['accountant'] = $this->accountant;
if (isset($this->deanOfStudents)) $o['deanOfStudents'] = $this->deanOfStudents;
return empty($o) ? new class(){} : $o;
}
}
class AppSettingsResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null,
/** @var string|null */
public ?string $collegeName=null,
/** @var string|null */
public ?string $collegeID=null,
/** @var string|null */
public ?string $regisurl=null,
/** @var array<string>|null */
public ?array $staffIPAddresses=null,
/** @var EmailAddresses|null */
public ?EmailAddresses $emailAddresses=null,
/** @var string|null */
public ?string $currentTerm=null,
/** @var string|null */
public ?string $previousTerm=null,
/** @var int */
public int $currentAcademicYear=0,
/** @var string|null */
public ?string $externalSSOURL=null,
/** @var string|null */
public ?string $externalSSOCookieName=null,
/** @var string|null */
public ?string $externalSSOCookieDomain=null,
/** @var string|null */
public ?string $ldapurl=null,
/** @var string|null */
public ?string $ldapSecondaryURL=null,
/** @var string|null */
public ?string $demoCredential=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
if (isset($o['collegeName'])) $this->collegeName = $o['collegeName'];
if (isset($o['collegeID'])) $this->collegeID = $o['collegeID'];
if (isset($o['regisurl'])) $this->regisurl = $o['regisurl'];
if (isset($o['staffIPAddresses'])) $this->staffIPAddresses = JsonConverters::fromArray('string', $o['staffIPAddresses']);
if (isset($o['emailAddresses'])) $this->emailAddresses = JsonConverters::from('EmailAddresses', $o['emailAddresses']);
if (isset($o['currentTerm'])) $this->currentTerm = $o['currentTerm'];
if (isset($o['previousTerm'])) $this->previousTerm = $o['previousTerm'];
if (isset($o['currentAcademicYear'])) $this->currentAcademicYear = $o['currentAcademicYear'];
if (isset($o['externalSSOURL'])) $this->externalSSOURL = $o['externalSSOURL'];
if (isset($o['externalSSOCookieName'])) $this->externalSSOCookieName = $o['externalSSOCookieName'];
if (isset($o['externalSSOCookieDomain'])) $this->externalSSOCookieDomain = $o['externalSSOCookieDomain'];
if (isset($o['ldapurl'])) $this->ldapurl = $o['ldapurl'];
if (isset($o['ldapSecondaryURL'])) $this->ldapSecondaryURL = $o['ldapSecondaryURL'];
if (isset($o['demoCredential'])) $this->demoCredential = $o['demoCredential'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
if (isset($this->collegeName)) $o['collegeName'] = $this->collegeName;
if (isset($this->collegeID)) $o['collegeID'] = $this->collegeID;
if (isset($this->regisurl)) $o['regisurl'] = $this->regisurl;
if (isset($this->staffIPAddresses)) $o['staffIPAddresses'] = JsonConverters::toArray('string', $this->staffIPAddresses);
if (isset($this->emailAddresses)) $o['emailAddresses'] = JsonConverters::to('EmailAddresses', $this->emailAddresses);
if (isset($this->currentTerm)) $o['currentTerm'] = $this->currentTerm;
if (isset($this->previousTerm)) $o['previousTerm'] = $this->previousTerm;
if (isset($this->currentAcademicYear)) $o['currentAcademicYear'] = $this->currentAcademicYear;
if (isset($this->externalSSOURL)) $o['externalSSOURL'] = $this->externalSSOURL;
if (isset($this->externalSSOCookieName)) $o['externalSSOCookieName'] = $this->externalSSOCookieName;
if (isset($this->externalSSOCookieDomain)) $o['externalSSOCookieDomain'] = $this->externalSSOCookieDomain;
if (isset($this->ldapurl)) $o['ldapurl'] = $this->ldapurl;
if (isset($this->ldapSecondaryURL)) $o['ldapSecondaryURL'] = $this->ldapSecondaryURL;
if (isset($this->demoCredential)) $o['demoCredential'] = $this->demoCredential;
return empty($o) ? new class(){} : $o;
}
}
class AppSettingsRequest implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /AppSettings HTTP/1.1
Host: data.regent-college.edu
Accept: application/json
Content-Type: application/json
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"collegeName":"String","collegeID":"String","regisurl":"String","emailAddresses":{"helpdesk":"String","registration":"String","developer":"String","financialAid":"String","noReply":"String","carbonCopy":"String","distanceEducation":"String","studentServices":"String","admissions":"String","admissionsSE":"String","academicAdvising":"String","summerProgram":"String","libraryHold":"String","noEmail":"String","academicAdministrator":"String","accountant":"String","deanOfStudents":"String"},"currentTerm":"String","previousTerm":"String","currentAcademicYear":0,"externalSSOURL":"String","externalSSOCookieName":"String","externalSSOCookieDomain":"String","ldapurl":"String","ldapSecondaryURL":"String","demoCredential":"String"}