<back to all web services

SpecificListsGetRequest

The following routes are available for this service:
PUT/RestApi/lists-api/items
<?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 SpecificListsGetRequest implements JsonSerializable
{
    public function __construct(
        /** @var string[]|null */
        public ?array $Ids=null,
        /** @var string|null */
        public ?string $Provider=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Ids'])) $this->Ids = JsonConverters::fromArray('string', $o['Ids']);
        if (isset($o['Provider'])) $this->Provider = $o['Provider'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Ids)) $o['Ids'] = JsonConverters::toArray('string', $this->Ids);
        if (isset($this->Provider)) $o['Provider'] = $this->Provider;
        return empty($o) ? new class(){} : $o;
    }
}

class ItemsTargetLanguageStatusProxy implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Code=null,
        /** @var string|null */
        public ?string $Name=null,
        /** @var bool|null */
        public ?bool $SomeItemsHaveIncompatiblePendingTranslations=null,
        /** @var bool|null */
        public ?bool $AllItemsHaveIncompatiblePendingTranslations=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Code'])) $this->Code = $o['Code'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['SomeItemsHaveIncompatiblePendingTranslations'])) $this->SomeItemsHaveIncompatiblePendingTranslations = $o['SomeItemsHaveIncompatiblePendingTranslations'];
        if (isset($o['AllItemsHaveIncompatiblePendingTranslations'])) $this->AllItemsHaveIncompatiblePendingTranslations = $o['AllItemsHaveIncompatiblePendingTranslations'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Code)) $o['Code'] = $this->Code;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->SomeItemsHaveIncompatiblePendingTranslations)) $o['SomeItemsHaveIncompatiblePendingTranslations'] = $this->SomeItemsHaveIncompatiblePendingTranslations;
        if (isset($this->AllItemsHaveIncompatiblePendingTranslations)) $o['AllItemsHaveIncompatiblePendingTranslations'] = $this->AllItemsHaveIncompatiblePendingTranslations;
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
/**
 * @template T
 */
class CollectionContext implements JsonSerializable
{
    public array $genericArgs = [];
    public static function create(array $genericArgs=[]): CollectionContext {
        $to = new CollectionContext();
        $to->genericArgs = $genericArgs;
        return $to;
    }

    public function __construct(
        // @DataMember
        /** @var int */
        public mixed $TotalCount=0,

        // @DataMember
        /** @var bool|null */
        public mixed $IsGeneric=null,

        // @DataMember
        /** @var array<string,string>|null */
        public mixed $Context=null,

        // @DataMember
        /** @var array<ItemsTargetLanguageStatusProxy>|null */
        public mixed $Items=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['TotalCount'])) $this->TotalCount = $o['TotalCount'];
        if (isset($o['IsGeneric'])) $this->IsGeneric = $o['IsGeneric'];
        if (isset($o['Context'])) $this->Context = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['Context']);
        if (isset($o['Items'])) $this->Items = JsonConverters::fromArray('ItemsTargetLanguageStatusProxy', $o['Items']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->TotalCount)) $o['TotalCount'] = $this->TotalCount;
        if (isset($this->IsGeneric)) $o['IsGeneric'] = $this->IsGeneric;
        if (isset($this->Context)) $o['Context'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->Context);
        if (isset($this->Items)) $o['Items'] = JsonConverters::toArray('ItemsTargetLanguageStatusProxy', $this->Items);
        return empty($o) ? new class(){} : $o;
    }
}

PHP SpecificListsGetRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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

PUT /RestApi/lists-api/items HTTP/1.1 
Host: www.imglobal.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Ids":["00000000-0000-0000-0000-000000000000"],"Provider":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"TotalCount":0,"IsGeneric":false,"Items":[]}