| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/Rfp/{RfpDocumentUID}/Brief |
|---|
<?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 RfpLocation implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $City=null,
/** @var string|null */
public ?string $State=null,
/** @var string|null */
public ?string $Identifier=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['City'])) $this->City = $o['City'];
if (isset($o['State'])) $this->State = $o['State'];
if (isset($o['Identifier'])) $this->Identifier = $o['Identifier'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->City)) $o['City'] = $this->City;
if (isset($this->State)) $o['State'] = $this->State;
if (isset($this->Identifier)) $o['Identifier'] = $this->Identifier;
return empty($o) ? new class(){} : $o;
}
}
class RfpSchedule implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $BidDueDate=null,
/** @var string|null */
public ?string $EstimatedStartDate=null,
/** @var string|null */
public ?string $QuestionsDueDate=null,
/** @var int|null */
public ?int $ContractDurationDays=null,
/** @var string|null */
public ?string $Notes=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['BidDueDate'])) $this->BidDueDate = $o['BidDueDate'];
if (isset($o['EstimatedStartDate'])) $this->EstimatedStartDate = $o['EstimatedStartDate'];
if (isset($o['QuestionsDueDate'])) $this->QuestionsDueDate = $o['QuestionsDueDate'];
if (isset($o['ContractDurationDays'])) $this->ContractDurationDays = $o['ContractDurationDays'];
if (isset($o['Notes'])) $this->Notes = $o['Notes'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->BidDueDate)) $o['BidDueDate'] = $this->BidDueDate;
if (isset($this->EstimatedStartDate)) $o['EstimatedStartDate'] = $this->EstimatedStartDate;
if (isset($this->QuestionsDueDate)) $o['QuestionsDueDate'] = $this->QuestionsDueDate;
if (isset($this->ContractDurationDays)) $o['ContractDurationDays'] = $this->ContractDurationDays;
if (isset($this->Notes)) $o['Notes'] = $this->Notes;
return empty($o) ? new class(){} : $o;
}
}
class RfpLineItem implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $ItemNumber=null,
/** @var string|null */
public ?string $Description=null,
/** @var float|null */
public ?float $Quantity=null,
/** @var string|null */
public ?string $Unit=null,
/** @var string|null */
public ?string $Category=null,
/** @var string|null */
public ?string $SourceReference=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ItemNumber'])) $this->ItemNumber = $o['ItemNumber'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['Unit'])) $this->Unit = $o['Unit'];
if (isset($o['Category'])) $this->Category = $o['Category'];
if (isset($o['SourceReference'])) $this->SourceReference = $o['SourceReference'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ItemNumber)) $o['ItemNumber'] = $this->ItemNumber;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->Unit)) $o['Unit'] = $this->Unit;
if (isset($this->Category)) $o['Category'] = $this->Category;
if (isset($this->SourceReference)) $o['SourceReference'] = $this->SourceReference;
return empty($o) ? new class(){} : $o;
}
}
class RfpBidConstraint implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Constraint=null,
/** @var string|null */
public ?string $Detail=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Constraint'])) $this->Constraint = $o['Constraint'];
if (isset($o['Detail'])) $this->Detail = $o['Detail'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Constraint)) $o['Constraint'] = $this->Constraint;
if (isset($this->Detail)) $o['Detail'] = $this->Detail;
return empty($o) ? new class(){} : $o;
}
}
class RfpBrief implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $ProjectTitle=null,
/** @var string|null */
public ?string $SolicitationNumber=null,
/** @var string|null */
public ?string $IssuingOrganization=null,
/** @var string|null */
public ?string $ProjectType=null,
/** @var string|null */
public ?string $Summary=null,
/** @var array<RfpLocation>|null */
public ?array $Locations=null,
/** @var RfpSchedule|null */
public ?RfpSchedule $Schedule=null,
/** @var array<RfpLineItem>|null */
public ?array $LineItems=null,
/** @var array<RfpBidConstraint>|null */
public ?array $BidConstraints=null,
/** @var array<string>|null */
public ?array $SpecialRequirements=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ProjectTitle'])) $this->ProjectTitle = $o['ProjectTitle'];
if (isset($o['SolicitationNumber'])) $this->SolicitationNumber = $o['SolicitationNumber'];
if (isset($o['IssuingOrganization'])) $this->IssuingOrganization = $o['IssuingOrganization'];
if (isset($o['ProjectType'])) $this->ProjectType = $o['ProjectType'];
if (isset($o['Summary'])) $this->Summary = $o['Summary'];
if (isset($o['Locations'])) $this->Locations = JsonConverters::fromArray('RfpLocation', $o['Locations']);
if (isset($o['Schedule'])) $this->Schedule = JsonConverters::from('RfpSchedule', $o['Schedule']);
if (isset($o['LineItems'])) $this->LineItems = JsonConverters::fromArray('RfpLineItem', $o['LineItems']);
if (isset($o['BidConstraints'])) $this->BidConstraints = JsonConverters::fromArray('RfpBidConstraint', $o['BidConstraints']);
if (isset($o['SpecialRequirements'])) $this->SpecialRequirements = JsonConverters::fromArray('string', $o['SpecialRequirements']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ProjectTitle)) $o['ProjectTitle'] = $this->ProjectTitle;
if (isset($this->SolicitationNumber)) $o['SolicitationNumber'] = $this->SolicitationNumber;
if (isset($this->IssuingOrganization)) $o['IssuingOrganization'] = $this->IssuingOrganization;
if (isset($this->ProjectType)) $o['ProjectType'] = $this->ProjectType;
if (isset($this->Summary)) $o['Summary'] = $this->Summary;
if (isset($this->Locations)) $o['Locations'] = JsonConverters::toArray('RfpLocation', $this->Locations);
if (isset($this->Schedule)) $o['Schedule'] = JsonConverters::to('RfpSchedule', $this->Schedule);
if (isset($this->LineItems)) $o['LineItems'] = JsonConverters::toArray('RfpLineItem', $this->LineItems);
if (isset($this->BidConstraints)) $o['BidConstraints'] = JsonConverters::toArray('RfpBidConstraint', $this->BidConstraints);
if (isset($this->SpecialRequirements)) $o['SpecialRequirements'] = JsonConverters::toArray('string', $this->SpecialRequirements);
return empty($o) ? new class(){} : $o;
}
}
class RfpBriefResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var int */
public int $RfpDocumentID=0,
/** @var RfpBrief|null */
public ?RfpBrief $Brief=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['RfpDocumentID'])) $this->RfpDocumentID = $o['RfpDocumentID'];
if (isset($o['Brief'])) $this->Brief = JsonConverters::from('RfpBrief', $o['Brief']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->RfpDocumentID)) $o['RfpDocumentID'] = $this->RfpDocumentID;
if (isset($this->Brief)) $o['Brief'] = JsonConverters::to('RfpBrief', $this->Brief);
return empty($o) ? new class(){} : $o;
}
}
class RfpBriefRequest implements JsonSerializable
{
public function __construct(
/** @var string */
public string $RfpDocumentUID=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['RfpDocumentUID'])) $this->RfpDocumentUID = $o['RfpDocumentUID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->RfpDocumentUID)) $o['RfpDocumentUID'] = $this->RfpDocumentUID;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Rfp/{RfpDocumentUID}/Brief HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
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"}},"RfpDocumentID":0,"Brief":{"ProjectTitle":"String","SolicitationNumber":"String","IssuingOrganization":"String","ProjectType":"String","Summary":"String","Locations":[{"Description":"String","City":"String","State":"String","Identifier":"String"}],"Schedule":{"BidDueDate":"String","EstimatedStartDate":"String","QuestionsDueDate":"String","ContractDurationDays":0,"Notes":"String"},"LineItems":[{"ItemNumber":"String","Description":"String","Quantity":0,"Unit":"String","Category":"String","SourceReference":"String"}],"BidConstraints":[{"Constraint":"String","Detail":"String"}],"SpecialRequirements":["String"]}}