| GET | /clients/{Id}/gpg45/ | Get the GPG 45 (DVS data schema v1.0) projection for a client |
|---|
<?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};
// @DataContract
class Authentication implements JsonSerializable
{
public function __construct(
/** @description The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User) */
// @DataMember
// @ApiMember(Description="The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)", IsRequired=true, ParameterType="header, body")
/** @var string */
public string $apiUserId='',
/** @description The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key) */
// @DataMember
// @ApiMember(Description="The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)", IsRequired=true, ParameterType="header, body")
/** @var string */
public string $apiUserKey='',
/** @description The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id). */
// @DataMember
// @ApiMember(Description="The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).", ParameterType="header, body")
/** @var string|null */
public ?string $userId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['apiUserId'])) $this->apiUserId = $o['apiUserId'];
if (isset($o['apiUserKey'])) $this->apiUserKey = $o['apiUserKey'];
if (isset($o['userId'])) $this->userId = $o['userId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->apiUserId)) $o['apiUserId'] = $this->apiUserId;
if (isset($this->apiUserKey)) $o['apiUserKey'] = $this->apiUserKey;
if (isset($this->userId)) $o['userId'] = $this->userId;
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class BaseRequest implements IBaseRequest, JsonSerializable
{
public function __construct(
/** @description The authentication credentials */
// @DataMember
// @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
/** @var Authentication|null */
public ?Authentication $authentication=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['authentication'])) $this->authentication = JsonConverters::from('Authentication', $o['authentication']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->authentication)) $o['authentication'] = JsonConverters::to('Authentication', $this->authentication);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class ResponseError implements JsonSerializable
{
public function __construct(
// @DataMember(Order=1)
/** @var string|null */
public ?string $errorCode=null,
// @DataMember(Order=2)
/** @var string|null */
public ?string $fieldName=null,
// @DataMember(Order=3)
/** @var string|null */
public ?string $message=null,
// @DataMember(Order=4)
/** @var array<string,string>|null */
public ?array $meta=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['errorCode'])) $this->errorCode = $o['errorCode'];
if (isset($o['fieldName'])) $this->fieldName = $o['fieldName'];
if (isset($o['message'])) $this->message = $o['message'];
if (isset($o['meta'])) $this->meta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['meta']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->errorCode)) $o['errorCode'] = $this->errorCode;
if (isset($this->fieldName)) $o['fieldName'] = $this->fieldName;
if (isset($this->message)) $o['message'] = $this->message;
if (isset($this->meta)) $o['meta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->meta);
return empty($o) ? new class(){} : $o;
}
}
/**
* @template array of ResponseError
*/
class ArrayOfResponseError extends \ArrayObject implements JsonSerializable
{
public function __construct(ResponseError ...$items) {
parent::__construct($items, \ArrayObject::STD_PROP_LIST);
}
/** @throws \Exception */
public function append($value): void {
if ($value instanceof ResponseError)
parent::append($value);
else
throw new \Exception("Can only append a ResponseError to " . __CLASS__);
}
/** @throws Exception */
public function fromMap($o): void {
foreach ($o as $item) {
$el = new ResponseError();
$el->fromMap($item);
$this->append($el);
}
}
/** @throws Exception */
public function jsonSerialize(): array {
return parent::getArrayCopy();
}
}
// @DataContract
class ResponseStatus implements JsonSerializable
{
public function __construct(
// @DataMember(Order=1)
/** @var string|null */
public ?string $errorCode=null,
// @DataMember(Order=2)
/** @var string|null */
public ?string $message=null,
// @DataMember(Order=3)
/** @var string|null */
public ?string $stackTrace=null,
// @DataMember(Order=4)
/** @var ArrayOfResponseError|null */
public ?ArrayOfResponseError $errors=null,
// @DataMember(Order=5)
/** @var array<string,string>|null */
public ?array $meta=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['errorCode'])) $this->errorCode = $o['errorCode'];
if (isset($o['message'])) $this->message = $o['message'];
if (isset($o['stackTrace'])) $this->stackTrace = $o['stackTrace'];
if (isset($o['errors'])) $this->errors = JsonConverters::from('ArrayOfResponseError', $o['errors']);
if (isset($o['meta'])) $this->meta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['meta']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->errorCode)) $o['errorCode'] = $this->errorCode;
if (isset($this->message)) $o['message'] = $this->message;
if (isset($this->stackTrace)) $o['stackTrace'] = $this->stackTrace;
if (isset($this->errors)) $o['errors'] = JsonConverters::to('ArrayOfResponseError', $this->errors);
if (isset($this->meta)) $o['meta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->meta);
return empty($o) ? new class(){} : $o;
}
}
class BaseResponse implements IBaseDataResponse, IHasResponseStatus, JsonSerializable
{
public function __construct(
/** @description The status of the response */
// @ApiMember(Description="The status of the response")
/** @var ResponseStatus|null */
public ?ResponseStatus $responseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
return empty($o) ? new class(){} : $o;
}
}
class Links implements JsonSerializable
{
public function __construct(
// @ApiMember()
/** @var string|null */
public ?string $self=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['self'])) $this->self = $o['self'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->self)) $o['self'] = $this->self;
return empty($o) ? new class(){} : $o;
}
}
class gpg45_address implements JsonSerializable
{
public function __construct(
/** @description Street address lines, most specific first */
// @ApiMember(Description="Street address lines, most specific first")
/** @var array<string>|null */
public ?array $street=null,
/** @description City / town / district */
// @ApiMember(Description="City / town / district")
/** @var string|null */
public ?string $locality=null,
/** @description Postcode */
// @ApiMember(Description="Postcode")
/** @var string|null */
public ?string $postal_code=null,
/** @description Country code (ISO 3166-1 alpha-3) */
// @ApiMember(Description="Country code (ISO 3166-1 alpha-3)")
/** @var string|null */
public ?string $country_code=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['street'])) $this->street = JsonConverters::fromArray('string', $o['street']);
if (isset($o['locality'])) $this->locality = $o['locality'];
if (isset($o['postal_code'])) $this->postal_code = $o['postal_code'];
if (isset($o['country_code'])) $this->country_code = $o['country_code'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->street)) $o['street'] = JsonConverters::toArray('string', $this->street);
if (isset($this->locality)) $o['locality'] = $this->locality;
if (isset($this->postal_code)) $o['postal_code'] = $this->postal_code;
if (isset($this->country_code)) $o['country_code'] = $this->country_code;
return empty($o) ? new class(){} : $o;
}
}
class gpg45_attachment implements JsonSerializable
{
public function __construct(
/** @description A description of the attachment */
// @ApiMember(Description="A description of the attachment")
/** @var string|null */
public ?string $desc=null,
/** @description The IANA media type of the data (e.g. image/jpeg) */
// @ApiMember(Description="The IANA media type of the data (e.g. image/jpeg)")
/** @var string|null */
public ?string $content_type=null,
/** @description The encoding format: base64 or byte_data */
// @ApiMember(Description="The encoding format: base64 or byte_data")
/** @var string|null */
public ?string $content_format=null,
/** @description The base64-encoded data */
// @ApiMember(Description="The base64-encoded data")
/** @var string|null */
public ?string $content=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['desc'])) $this->desc = $o['desc'];
if (isset($o['content_type'])) $this->content_type = $o['content_type'];
if (isset($o['content_format'])) $this->content_format = $o['content_format'];
if (isset($o['content'])) $this->content = $o['content'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->desc)) $o['desc'] = $this->desc;
if (isset($this->content_type)) $o['content_type'] = $this->content_type;
if (isset($this->content_format)) $o['content_format'] = $this->content_format;
if (isset($this->content)) $o['content'] = $this->content;
return empty($o) ? new class(){} : $o;
}
}
class gpg45_biometric_information implements JsonSerializable
{
public function __construct(
/** @description The biometric modality: face, fingerprint, voice or iris */
// @ApiMember(Description="The biometric modality: face, fingerprint, voice or iris")
/** @var string|null */
public ?string $biometric_modality=null,
/** @description The captured biometric data */
// @ApiMember(Description="The captured biometric data")
/** @var array<gpg45_attachment>|null */
public ?array $attachments=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['biometric_modality'])) $this->biometric_modality = $o['biometric_modality'];
if (isset($o['attachments'])) $this->attachments = JsonConverters::fromArray('gpg45_attachment', $o['attachments']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->biometric_modality)) $o['biometric_modality'] = $this->biometric_modality;
if (isset($this->attachments)) $o['attachments'] = JsonConverters::toArray('gpg45_attachment', $this->attachments);
return empty($o) ? new class(){} : $o;
}
}
class gpg45_claims implements JsonSerializable
{
public function __construct(
/** @description The individual's given name(s) */
// @ApiMember(Description="The individual's given name(s)")
/** @var string|null */
public ?string $given_name=null,
/** @description The individual's family / surname */
// @ApiMember(Description="The individual's family / surname")
/** @var string|null */
public ?string $family_name=null,
/** @description The individual's date of birth (ISO 8601, yyyy-MM-dd) */
// @ApiMember(Description="The individual's date of birth (ISO 8601, yyyy-MM-dd)")
/** @var string|null */
public ?string $birthdate=null,
/** @description Countries of citizenship (ISO 3166-1 alpha-3) */
// @ApiMember(Description="Countries of citizenship (ISO 3166-1 alpha-3)")
/** @var array<string>|null */
public ?array $nationalities=null,
/** @description The individual's address */
// @ApiMember(Description="The individual's address")
/** @var gpg45_address|null */
public ?gpg45_address $address=null,
/** @description Biometric characteristics of the person making the claim */
// @ApiMember(Description="Biometric characteristics of the person making the claim")
/** @var array<gpg45_biometric_information>|null */
public ?array $biometric_information=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['given_name'])) $this->given_name = $o['given_name'];
if (isset($o['family_name'])) $this->family_name = $o['family_name'];
if (isset($o['birthdate'])) $this->birthdate = $o['birthdate'];
if (isset($o['nationalities'])) $this->nationalities = JsonConverters::fromArray('string', $o['nationalities']);
if (isset($o['address'])) $this->address = JsonConverters::from('gpg45_address', $o['address']);
if (isset($o['biometric_information'])) $this->biometric_information = JsonConverters::fromArray('gpg45_biometric_information', $o['biometric_information']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->given_name)) $o['given_name'] = $this->given_name;
if (isset($this->family_name)) $o['family_name'] = $this->family_name;
if (isset($this->birthdate)) $o['birthdate'] = $this->birthdate;
if (isset($this->nationalities)) $o['nationalities'] = JsonConverters::toArray('string', $this->nationalities);
if (isset($this->address)) $o['address'] = JsonConverters::to('gpg45_address', $this->address);
if (isset($this->biometric_information)) $o['biometric_information'] = JsonConverters::toArray('gpg45_biometric_information', $this->biometric_information);
return empty($o) ? new class(){} : $o;
}
}
class gpg45_dvs_registration implements JsonSerializable
{
public function __construct(
/** @description The service's DVS register reference */
// @ApiMember(Description="The service's DVS register reference")
/** @var string|null */
public ?string $registration_id=null,
/** @description The registered name of the certified service */
// @ApiMember(Description="The registered name of the certified service")
/** @var string|null */
public ?string $name=null,
/** @description Contact email for the certified service */
// @ApiMember(Description="Contact email for the certified service")
/** @var string|null */
public ?string $contact_email=null,
/** @description Website of the certified service */
// @ApiMember(Description="Website of the certified service")
/** @var string|null */
public ?string $website=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['registration_id'])) $this->registration_id = $o['registration_id'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['contact_email'])) $this->contact_email = $o['contact_email'];
if (isset($o['website'])) $this->website = $o['website'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->registration_id)) $o['registration_id'] = $this->registration_id;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->contact_email)) $o['contact_email'] = $this->contact_email;
if (isset($this->website)) $o['website'] = $this->website;
return empty($o) ? new class(){} : $o;
}
}
class gpg45_authority implements JsonSerializable
{
public function __construct(
/** @description The name of the authority */
// @ApiMember(Description="The name of the authority")
/** @var string|null */
public ?string $name=null,
/** @description The country code where the authority is based (ISO 3166-1 alpha-2) */
// @ApiMember(Description="The country code where the authority is based (ISO 3166-1 alpha-2)")
/** @var string|null */
public ?string $country_code=null,
/** @description The authority's jurisdiction */
// @ApiMember(Description="The authority's jurisdiction")
/** @var string|null */
public ?string $jurisdiction=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['country_code'])) $this->country_code = $o['country_code'];
if (isset($o['jurisdiction'])) $this->jurisdiction = $o['jurisdiction'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->country_code)) $o['country_code'] = $this->country_code;
if (isset($this->jurisdiction)) $o['jurisdiction'] = $this->jurisdiction;
return empty($o) ? new class(){} : $o;
}
}
class gpg45_document_details implements JsonSerializable
{
public function __construct(
/** @description The GPG 45 document_type enumeration value */
// @ApiMember(Description="The GPG 45 document_type enumeration value")
/** @var string|null */
public ?string $type=null,
/** @description The document's reference / identification number */
// @ApiMember(Description="The document's reference / identification number")
/** @var string|null */
public ?string $document_number=null,
/** @description The date the document was issued (ISO 8601) */
// @ApiMember(Description="The date the document was issued (ISO 8601)")
/** @var string|null */
public ?string $date_of_issuance=null,
/** @description The date the document expires (ISO 8601) */
// @ApiMember(Description="The date the document expires (ISO 8601)")
/** @var string|null */
public ?string $date_of_expiry=null,
/** @description The authority that issued the document */
// @ApiMember(Description="The authority that issued the document")
/** @var gpg45_authority|null */
public ?gpg45_authority $issuer=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['type'])) $this->type = $o['type'];
if (isset($o['document_number'])) $this->document_number = $o['document_number'];
if (isset($o['date_of_issuance'])) $this->date_of_issuance = $o['date_of_issuance'];
if (isset($o['date_of_expiry'])) $this->date_of_expiry = $o['date_of_expiry'];
if (isset($o['issuer'])) $this->issuer = JsonConverters::from('gpg45_authority', $o['issuer']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->type)) $o['type'] = $this->type;
if (isset($this->document_number)) $o['document_number'] = $this->document_number;
if (isset($this->date_of_issuance)) $o['date_of_issuance'] = $this->date_of_issuance;
if (isset($this->date_of_expiry)) $o['date_of_expiry'] = $this->date_of_expiry;
if (isset($this->issuer)) $o['issuer'] = JsonConverters::to('gpg45_authority', $this->issuer);
return empty($o) ? new class(){} : $o;
}
}
class gpg45_check_details implements JsonSerializable
{
public function __construct(
/** @description The GPG 45 check_method: auth, token, kbv, pvp, pvr, bvp, bvr, vpip, vpiruv, vri, vdig, vcrypt or data */
// @ApiMember(Description="The GPG 45 check_method: auth, token, kbv, pvp, pvr, bvp, bvr, vpip, vpiruv, vri, vdig, vcrypt or data")
/** @var string|null */
public ?string $check_method=null,
/** @description A unique reference for this check, matched by assurance_details evidence_ref entries */
// @ApiMember(Description="A unique reference for this check, matched by assurance_details evidence_ref entries")
/** @var string|null */
public ?string $check_id=null,
/** @description When the check was performed (ISO 8601 timestamp) */
// @ApiMember(Description="When the check was performed (ISO 8601 timestamp)")
/** @var string|null */
public ?string $time=null,
/** @description The organisation that performed the check */
// @ApiMember(Description="The organisation that performed the check")
/** @var string|null */
public ?string $organisation=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['check_method'])) $this->check_method = $o['check_method'];
if (isset($o['check_id'])) $this->check_id = $o['check_id'];
if (isset($o['time'])) $this->time = $o['time'];
if (isset($o['organisation'])) $this->organisation = $o['organisation'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->check_method)) $o['check_method'] = $this->check_method;
if (isset($this->check_id)) $o['check_id'] = $this->check_id;
if (isset($this->time)) $o['time'] = $this->time;
if (isset($this->organisation)) $o['organisation'] = $this->organisation;
return empty($o) ? new class(){} : $o;
}
}
class gpg45_document implements JsonSerializable
{
public function __construct(
/** @description Always 'document' */
// @ApiMember(Description="Always 'document'")
/** @var string|null */
public ?string $type=null,
/** @description Details about the document itself */
// @ApiMember(Description="Details about the document itself")
/** @var gpg45_document_details|null */
public ?gpg45_document_details $document_details=null,
/** @description Copies of the document */
// @ApiMember(Description="Copies of the document")
/** @var array<gpg45_attachment>|null */
public ?array $attachments=null,
/** @description The checks performed on the document */
// @ApiMember(Description="The checks performed on the document")
/** @var array<gpg45_check_details>|null */
public ?array $check_details=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['type'])) $this->type = $o['type'];
if (isset($o['document_details'])) $this->document_details = JsonConverters::from('gpg45_document_details', $o['document_details']);
if (isset($o['attachments'])) $this->attachments = JsonConverters::fromArray('gpg45_attachment', $o['attachments']);
if (isset($o['check_details'])) $this->check_details = JsonConverters::fromArray('gpg45_check_details', $o['check_details']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->type)) $o['type'] = $this->type;
if (isset($this->document_details)) $o['document_details'] = JsonConverters::to('gpg45_document_details', $this->document_details);
if (isset($this->attachments)) $o['attachments'] = JsonConverters::toArray('gpg45_attachment', $this->attachments);
if (isset($this->check_details)) $o['check_details'] = JsonConverters::toArray('gpg45_check_details', $this->check_details);
return empty($o) ? new class(){} : $o;
}
}
class gpg45_evidence implements JsonSerializable
{
public function __construct(
/** @description The document used to prove the claim */
// @ApiMember(Description="The document used to prove the claim")
/** @var gpg45_document|null */
public ?gpg45_document $document=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['document'])) $this->document = JsonConverters::from('gpg45_document', $o['document']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->document)) $o['document'] = JsonConverters::to('gpg45_document', $this->document);
return empty($o) ? new class(){} : $o;
}
}
class gpg45_evidence_metadata implements JsonSerializable
{
public function __construct(
/** @description The evidence classification, where applicable */
// @ApiMember(Description="The evidence classification, where applicable")
/** @var string|null */
public ?string $evidence_classification=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['evidence_classification'])) $this->evidence_classification = $o['evidence_classification'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->evidence_classification)) $o['evidence_classification'] = $this->evidence_classification;
return empty($o) ? new class(){} : $o;
}
}
class gpg45_evidence_ref implements JsonSerializable
{
public function __construct(
/** @description The check_id of the check that produced this assurance */
// @ApiMember(Description="The check_id of the check that produced this assurance")
/** @var string|null */
public ?string $check_id=null,
/** @description Additional metadata about how the evidence supports the assurance */
// @ApiMember(Description="Additional metadata about how the evidence supports the assurance")
/** @var gpg45_evidence_metadata|null */
public ?gpg45_evidence_metadata $evidence_ref=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['check_id'])) $this->check_id = $o['check_id'];
if (isset($o['evidence_ref'])) $this->evidence_ref = JsonConverters::from('gpg45_evidence_metadata', $o['evidence_ref']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->check_id)) $o['check_id'] = $this->check_id;
if (isset($this->evidence_ref)) $o['evidence_ref'] = JsonConverters::to('gpg45_evidence_metadata', $this->evidence_ref);
return empty($o) ? new class(){} : $o;
}
}
class gpg45_assurance_details implements JsonSerializable
{
public function __construct(
/** @description The type of check: validation, verification, counter_fraud or activity_history */
// @ApiMember(Description="The type of check: validation, verification, counter_fraud or activity_history")
/** @var string|null */
public ?string $assurance_type=null,
/** @description The GPG 45 score achieved for this check: score_1 to score_4 */
// @ApiMember(Description="The GPG 45 score achieved for this check: score_1 to score_4")
/** @var string|null */
public ?string $assurance_classification=null,
/** @description The checks that produced this assurance, matched by check_id */
// @ApiMember(Description="The checks that produced this assurance, matched by check_id")
/** @var array<gpg45_evidence_ref>|null */
public ?array $evidence_ref=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['assurance_type'])) $this->assurance_type = $o['assurance_type'];
if (isset($o['assurance_classification'])) $this->assurance_classification = $o['assurance_classification'];
if (isset($o['evidence_ref'])) $this->evidence_ref = JsonConverters::fromArray('gpg45_evidence_ref', $o['evidence_ref']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->assurance_type)) $o['assurance_type'] = $this->assurance_type;
if (isset($this->assurance_classification)) $o['assurance_classification'] = $this->assurance_classification;
if (isset($this->evidence_ref)) $o['evidence_ref'] = JsonConverters::toArray('gpg45_evidence_ref', $this->evidence_ref);
return empty($o) ? new class(){} : $o;
}
}
class gpg45_assurance_process implements JsonSerializable
{
public function __construct(
/** @description Always 'gpg45' for the DVS trust framework */
// @ApiMember(Description="Always 'gpg45' for the DVS trust framework")
/** @var string|null */
public ?string $policy=null,
/** @description The GPG 45 identity profile code that was met (e.g. M1A, H1A). Null if no profile's requirements were fully met */
// @ApiMember(Description="The GPG 45 identity profile code that was met (e.g. M1A, H1A). Null if no profile's requirements were fully met")
/** @var string|null */
public ?string $procedure=null,
/** @description How each assurance process was satisfied */
// @ApiMember(Description="How each assurance process was satisfied")
/** @var array<gpg45_assurance_details>|null */
public ?array $assurance_details=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['policy'])) $this->policy = $o['policy'];
if (isset($o['procedure'])) $this->procedure = $o['procedure'];
if (isset($o['assurance_details'])) $this->assurance_details = JsonConverters::fromArray('gpg45_assurance_details', $o['assurance_details']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->policy)) $o['policy'] = $this->policy;
if (isset($this->procedure)) $o['procedure'] = $this->procedure;
if (isset($this->assurance_details)) $o['assurance_details'] = JsonConverters::toArray('gpg45_assurance_details', $this->assurance_details);
return empty($o) ? new class(){} : $o;
}
}
class gpg45_verification implements JsonSerializable
{
public function __construct(
/** @description Always 'uk_dvstf' for the UK DVS trust framework */
// @ApiMember(Description="Always 'uk_dvstf' for the UK DVS trust framework")
/** @var string|null */
public ?string $trust_framework=null,
/** @description The certified service's entry in the DVS register */
// @ApiMember(Description="The certified service's entry in the DVS register")
/** @var gpg45_dvs_registration|null */
public ?gpg45_dvs_registration $dvs_registration=null,
/** @description The evidence used to prove the claim */
// @ApiMember(Description="The evidence used to prove the claim")
/** @var array<gpg45_evidence>|null */
public ?array $evidence=null,
/** @description The GPG 45 confidence level achieved: low, medium, high or very_high */
// @ApiMember(Description="The GPG 45 confidence level achieved: low, medium, high or very_high")
/** @var string|null */
public ?string $assurance_level=null,
/** @description The assurance policy and procedure followed */
// @ApiMember(Description="The assurance policy and procedure followed")
/** @var gpg45_assurance_process|null */
public ?gpg45_assurance_process $assurance_process=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['trust_framework'])) $this->trust_framework = $o['trust_framework'];
if (isset($o['dvs_registration'])) $this->dvs_registration = JsonConverters::from('gpg45_dvs_registration', $o['dvs_registration']);
if (isset($o['evidence'])) $this->evidence = JsonConverters::fromArray('gpg45_evidence', $o['evidence']);
if (isset($o['assurance_level'])) $this->assurance_level = $o['assurance_level'];
if (isset($o['assurance_process'])) $this->assurance_process = JsonConverters::from('gpg45_assurance_process', $o['assurance_process']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->trust_framework)) $o['trust_framework'] = $this->trust_framework;
if (isset($this->dvs_registration)) $o['dvs_registration'] = JsonConverters::to('gpg45_dvs_registration', $this->dvs_registration);
if (isset($this->evidence)) $o['evidence'] = JsonConverters::toArray('gpg45_evidence', $this->evidence);
if (isset($this->assurance_level)) $o['assurance_level'] = $this->assurance_level;
if (isset($this->assurance_process)) $o['assurance_process'] = JsonConverters::to('gpg45_assurance_process', $this->assurance_process);
return empty($o) ? new class(){} : $o;
}
}
class Gpg45Projection implements JsonSerializable
{
public function __construct(
/** @description The claimed identity information (GPG 45 'claims') */
// @ApiMember(Description="The claimed identity information (GPG 45 'claims')")
/** @var gpg45_claims|null */
public ?gpg45_claims $claims=null,
/** @description How the claims were proven (GPG 45 'verification'). Null until the client is Verified */
// @ApiMember(Description="How the claims were proven (GPG 45 'verification'). Null until the client is Verified")
/** @var gpg45_verification|null */
public ?gpg45_verification $verification=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['claims'])) $this->claims = JsonConverters::from('gpg45_claims', $o['claims']);
if (isset($o['verification'])) $this->verification = JsonConverters::from('gpg45_verification', $o['verification']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->claims)) $o['claims'] = JsonConverters::to('gpg45_claims', $this->claims);
if (isset($this->verification)) $o['verification'] = JsonConverters::to('gpg45_verification', $this->verification);
return empty($o) ? new class(){} : $o;
}
}
class GetClientGpg45Data extends BaseResponse implements JsonSerializable
{
/**
* @param ResponseStatus|null $responseStatus
*/
public function __construct(
?ResponseStatus $responseStatus=null,
/** @description Links related to this client's GPG 45 projection */
// @ApiMember(Description="Links related to this client's GPG 45 projection")
/** @var Links|null */
public ?Links $links=null,
/** @description The GPG 45 (DVS data schema v1.0) projection: 'claims' and, once Verified, 'verification' */
// @ApiMember(Description="The GPG 45 (DVS data schema v1.0) projection: 'claims' and, once Verified, 'verification'")
/** @var Gpg45Projection|null */
public ?Gpg45Projection $gpg45=null
) {
parent::__construct($responseStatus);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['links'])) $this->links = JsonConverters::from('Links', $o['links']);
if (isset($o['gpg45'])) $this->gpg45 = JsonConverters::from('Gpg45Projection', $o['gpg45']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->links)) $o['links'] = JsonConverters::to('Links', $this->links);
if (isset($this->gpg45)) $o['gpg45'] = JsonConverters::to('Gpg45Projection', $this->gpg45);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class GetClientGpg45Response implements JsonSerializable
{
public function __construct(
// @DataMember
/** @var GetClientGpg45Data|null */
public ?GetClientGpg45Data $data=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['data'])) $this->data = JsonConverters::from('GetClientGpg45Data', $o['data']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->data)) $o['data'] = JsonConverters::to('GetClientGpg45Data', $this->data);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class GetClientGpg45 extends BaseRequest implements JsonSerializable
{
/**
* @param Authentication|null $authentication
*/
public function __construct(
?Authentication $authentication=null,
// @DataMember
// @ApiMember(IsRequired=true, ParameterType="path")
/** @var int */
public int $id=0
) {
parent::__construct($authentication);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['id'])) $this->id = $o['id'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->id)) $o['id'] = $this->id;
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.
GET /clients/{Id}/gpg45/ HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetClientGpg45Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<Data>
<ResponseStatus>
<ErrorCode>String</ErrorCode>
<Message>String</Message>
<StackTrace>String</StackTrace>
<Errors>
<ResponseError>
<ErrorCode>String</ErrorCode>
<FieldName>String</FieldName>
<Message>String</Message>
<Meta xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:KeyValueOfstringstring>
<d6p1:Key>String</d6p1:Key>
<d6p1:Value>String</d6p1:Value>
</d6p1:KeyValueOfstringstring>
</Meta>
</ResponseError>
</Errors>
<Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:KeyValueOfstringstring>
<d4p1:Key>String</d4p1:Key>
<d4p1:Value>String</d4p1:Value>
</d4p1:KeyValueOfstringstring>
</Meta>
</ResponseStatus>
<Gpg45>
<claims>
<address>
<country_code>String</country_code>
<locality>String</locality>
<postal_code>String</postal_code>
<street xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>String</d6p1:string>
</street>
</address>
<biometric_information>
<gpg45_biometric_information>
<attachments>
<gpg45_attachment>
<content>String</content>
<content_format>String</content_format>
<content_type>String</content_type>
<desc>String</desc>
</gpg45_attachment>
</attachments>
<biometric_modality>String</biometric_modality>
</gpg45_biometric_information>
</biometric_information>
<birthdate>String</birthdate>
<family_name>String</family_name>
<given_name>String</given_name>
<nationalities xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</nationalities>
</claims>
<verification>
<assurance_level>String</assurance_level>
<assurance_process>
<assurance_details>
<gpg45_assurance_details>
<assurance_classification>String</assurance_classification>
<assurance_type>String</assurance_type>
<evidence_ref>
<gpg45_evidence_ref>
<check_id>String</check_id>
<evidence_ref>
<evidence_classification>String</evidence_classification>
</evidence_ref>
</gpg45_evidence_ref>
</evidence_ref>
</gpg45_assurance_details>
</assurance_details>
<policy>String</policy>
<procedure>String</procedure>
</assurance_process>
<dvs_registration>
<contact_email>String</contact_email>
<name>String</name>
<registration_id>String</registration_id>
<website>String</website>
</dvs_registration>
<evidence>
<gpg45_evidence>
<document>
<attachments>
<gpg45_attachment>
<content>String</content>
<content_format>String</content_format>
<content_type>String</content_type>
<desc>String</desc>
</gpg45_attachment>
</attachments>
<check_details>
<gpg45_check_details>
<check_id>String</check_id>
<check_method>String</check_method>
<organisation>String</organisation>
<time>String</time>
</gpg45_check_details>
</check_details>
<document_details>
<date_of_expiry>String</date_of_expiry>
<date_of_issuance>String</date_of_issuance>
<document_number>String</document_number>
<issuer>
<country_code>String</country_code>
<jurisdiction>String</jurisdiction>
<name>String</name>
</issuer>
<type>String</type>
</document_details>
<type>String</type>
</document>
</gpg45_evidence>
</evidence>
<trust_framework>String</trust_framework>
</verification>
</Gpg45>
<Links>
<Self>String</Self>
</Links>
</Data>
</GetClientGpg45Response>