<back to all web services

GetTranslationsActualSourceLanguage

The following routes are available for this service:
GET/RestApi/translations/translations/actualSourceLanguages
<?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};


enum TranslationStatus : int
{
    case Marked = 101;
    case Sending = 201;
    case Sent = 202;
    case Received = 301;
    case Importing = 302;
    case Imported = 303;
    case Completed = 304;
    case Archived = 401;
    case Deleted = 402;
    case Rejected = 403;
    case SendingError = 501;
    case ImportingError = 502;
    case ReceivingError = 503;
}

class GetTranslationsActualSourceLanguage implements ITranslationsFilter, JsonSerializable
{
    public function __construct(
        /** @var string[]|null */
        public ?array $Type=null,
        /** @var string|null */
        public ?string $SearchText=null,
        /** @var string|null */
        public ?string $ActualSourceLanguage=null,
        /** @var string[]|null */
        public ?array $TargetLanguage=null,
        /** @var string[]|null */
        public ?array $Service=null,
        /** @var TranslationStatus[]|null */
        public ?array $TranslationStatus=null,
        /** @var string[]|null */
        public ?array $Status=null,
        /** @var string[]|null */
        public ?array $ProjectIds=null,
        /** @var DateTime|null */
        public ?DateTime $StartDate=null,
        /** @var DateTime|null */
        public ?DateTime $EndDate=null,
        /** @var bool|null */
        public ?bool $ErrorsOnly=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Type'])) $this->Type = JsonConverters::fromArray('string', $o['Type']);
        if (isset($o['SearchText'])) $this->SearchText = $o['SearchText'];
        if (isset($o['ActualSourceLanguage'])) $this->ActualSourceLanguage = $o['ActualSourceLanguage'];
        if (isset($o['TargetLanguage'])) $this->TargetLanguage = JsonConverters::fromArray('string', $o['TargetLanguage']);
        if (isset($o['Service'])) $this->Service = JsonConverters::fromArray('string', $o['Service']);
        if (isset($o['TranslationStatus'])) $this->TranslationStatus = JsonConverters::fromArray('TranslationStatus', $o['TranslationStatus']);
        if (isset($o['Status'])) $this->Status = JsonConverters::fromArray('string', $o['Status']);
        if (isset($o['ProjectIds'])) $this->ProjectIds = JsonConverters::fromArray('string', $o['ProjectIds']);
        if (isset($o['StartDate'])) $this->StartDate = JsonConverters::from('DateTime', $o['StartDate']);
        if (isset($o['EndDate'])) $this->EndDate = JsonConverters::from('DateTime', $o['EndDate']);
        if (isset($o['ErrorsOnly'])) $this->ErrorsOnly = $o['ErrorsOnly'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Type)) $o['Type'] = JsonConverters::toArray('string', $this->Type);
        if (isset($this->SearchText)) $o['SearchText'] = $this->SearchText;
        if (isset($this->ActualSourceLanguage)) $o['ActualSourceLanguage'] = $this->ActualSourceLanguage;
        if (isset($this->TargetLanguage)) $o['TargetLanguage'] = JsonConverters::toArray('string', $this->TargetLanguage);
        if (isset($this->Service)) $o['Service'] = JsonConverters::toArray('string', $this->Service);
        if (isset($this->TranslationStatus)) $o['TranslationStatus'] = JsonConverters::toArray('TranslationStatus', $this->TranslationStatus);
        if (isset($this->Status)) $o['Status'] = JsonConverters::toArray('string', $this->Status);
        if (isset($this->ProjectIds)) $o['ProjectIds'] = JsonConverters::toArray('string', $this->ProjectIds);
        if (isset($this->StartDate)) $o['StartDate'] = JsonConverters::to('DateTime', $this->StartDate);
        if (isset($this->EndDate)) $o['EndDate'] = JsonConverters::to('DateTime', $this->EndDate);
        if (isset($this->ErrorsOnly)) $o['ErrorsOnly'] = $this->ErrorsOnly;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetTranslationsActualSourceLanguage 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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /RestApi/translations/translations/actualSourceLanguages HTTP/1.1 
Host: www.imglobal.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

[{"Code":"String","Name":"String","Count":0}]