Required permission: | ReadInstructorAndTAEmail |
POST | /Sections/InstructorAndTA/{uuid} |
---|
<?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 SectionInstructorAndTAEmailResponse implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $uuid=null,
/** @var string|null */
public ?string $course_name=null,
/** @var string|null */
public ?string $title=null,
/** @var string|null */
public ?string $term=null,
/** @var string|null */
public ?string $reporting_term=null,
/** @var array<string>|null */
public ?array $taEmailList=null,
/** @var array<string>|null */
public ?array $instructorEmailList=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['uuid'])) $this->uuid = $o['uuid'];
if (isset($o['course_name'])) $this->course_name = $o['course_name'];
if (isset($o['title'])) $this->title = $o['title'];
if (isset($o['term'])) $this->term = $o['term'];
if (isset($o['reporting_term'])) $this->reporting_term = $o['reporting_term'];
if (isset($o['taEmailList'])) $this->taEmailList = JsonConverters::fromArray('string', $o['taEmailList']);
if (isset($o['instructorEmailList'])) $this->instructorEmailList = JsonConverters::fromArray('string', $o['instructorEmailList']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->uuid)) $o['uuid'] = $this->uuid;
if (isset($this->course_name)) $o['course_name'] = $this->course_name;
if (isset($this->title)) $o['title'] = $this->title;
if (isset($this->term)) $o['term'] = $this->term;
if (isset($this->reporting_term)) $o['reporting_term'] = $this->reporting_term;
if (isset($this->taEmailList)) $o['taEmailList'] = JsonConverters::toArray('string', $this->taEmailList);
if (isset($this->instructorEmailList)) $o['instructorEmailList'] = JsonConverters::toArray('string', $this->instructorEmailList);
return empty($o) ? new class(){} : $o;
}
}
class SectionInstructorAndTAEmailRequest 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 SectionInstructorAndTAEmailRequest DTOs
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 /Sections/InstructorAndTA/{uuid} HTTP/1.1
Host: data.regent-college.edu
Accept: application/json
Content-Type: application/json
Content-Length: length
{"uuid":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"uuid":"String","course_name":"String","title":"String","term":"String","reporting_term":"String","taEmailList":["String"],"instructorEmailList":["String"]}