FrameAppWS

<back to all web services

GetFileItemRQ

Requires Authentication
The following routes are available for this service:
All Verbs/restfiles/GetFileItemRQ
<?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 FileItemRecursive implements JsonSerializable
{
    public function __construct(
        /** @var float|null */
        public ?float $idArchivo=null,
        /** @var float|null */
        public ?float $carp_carp=null,
        /** @var float|null */
        public ?float $carp_padre=null,
        /** @var bool|null */
        public ?bool $isDirectory=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var string|null */
        public ?string $usua_login=null,
        /** @var DateTime */
        public DateTime $fecha=new DateTime(),
        /** @var array<FileItemRecursive>|null */
        public ?array $items=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['idArchivo'])) $this->idArchivo = $o['idArchivo'];
        if (isset($o['carp_carp'])) $this->carp_carp = $o['carp_carp'];
        if (isset($o['carp_padre'])) $this->carp_padre = $o['carp_padre'];
        if (isset($o['isDirectory'])) $this->isDirectory = $o['isDirectory'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['usua_login'])) $this->usua_login = $o['usua_login'];
        if (isset($o['fecha'])) $this->fecha = JsonConverters::from('DateTime', $o['fecha']);
        if (isset($o['items'])) $this->items = JsonConverters::fromArray('FileItemRecursive', $o['items']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->idArchivo)) $o['idArchivo'] = $this->idArchivo;
        if (isset($this->carp_carp)) $o['carp_carp'] = $this->carp_carp;
        if (isset($this->carp_padre)) $o['carp_padre'] = $this->carp_padre;
        if (isset($this->isDirectory)) $o['isDirectory'] = $this->isDirectory;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->usua_login)) $o['usua_login'] = $this->usua_login;
        if (isset($this->fecha)) $o['fecha'] = JsonConverters::to('DateTime', $this->fecha);
        if (isset($this->items)) $o['items'] = JsonConverters::toArray('FileItemRecursive', $this->items);
        return empty($o) ? new class(){} : $o;
    }
}

class GetDirectoryRS implements JsonSerializable
{
    public function __construct(
        /** @var array<FileItemRecursive>|null */
        public ?array $FileItem=null
    ) {
    }

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

class GetFileItemRQ implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $carpeta=0.0,
        /** @var string|null */
        public ?string $usuario=null
    ) {
    }

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

PHP GetFileItemRQ DTOs

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

HTTP + JSV

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

POST /restfiles/GetFileItemRQ HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	carpeta: 0,
	usuario: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	FileItem: 
	[
		{
			
		}
	]
}