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 .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<AppSettingsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Settings" />
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <AppSettingsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Settings"> <CollegeID>String</CollegeID> <CollegeName>String</CollegeName> <CurrentAcademicYear>0</CurrentAcademicYear> <CurrentTerm>String</CurrentTerm> <DemoCredential>String</DemoCredential> <EmailAddresses> <academicAdministrator>String</academicAdministrator> <academicAdvising>String</academicAdvising> <accountant>String</accountant> <admissions>String</admissions> <admissionsSE>String</admissionsSE> <carbonCopy>String</carbonCopy> <deanOfStudents>String</deanOfStudents> <developer>String</developer> <distanceEducation>String</distanceEducation> <financialAid>String</financialAid> <helpdesk>String</helpdesk> <libraryHold>String</libraryHold> <noEmail>String</noEmail> <noReply>String</noReply> <registration>String</registration> <studentServices>String</studentServices> <summerProgram>String</summerProgram> </EmailAddresses> <ExternalSSOCookieDomain>String</ExternalSSOCookieDomain> <ExternalSSOCookieName>String</ExternalSSOCookieName> <ExternalSSOURL>String</ExternalSSOURL> <LDAPSecondaryURL>String</LDAPSecondaryURL> <LDAPURL>String</LDAPURL> <PreviousTerm>String</PreviousTerm> <REGISURL>String</REGISURL> <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> <StaffIPAddresses xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" /> </AppSettingsResponse>