FrameAppWS

<back to all web services

DeleteFileRQ

Requires Authentication
The following routes are available for this service:
All Verbs/restfiles/DeleteFileRQ
<?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 DeleteFileRS implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $isDelete=null,
        /** @var string|null */
        public ?string $error=null
    ) {
    }

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

class RestFiles implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Path=null,
        /** @var string|null */
        public ?string $TextContents=null,
        /** @var bool|null */
        public ?bool $ForDownload=null
    ) {
    }

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

class DeleteFileRQ implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $idArchivo=0.0,
        /** @var string|null */
        public ?string $usua_login=null,
        /** @var float */
        public float $carp_carp=0.0,
        /** @var bool|null */
        public ?bool $isDirectory=null,
        /** @var int */
        public int $empr_empr=0,
        /** @var int */
        public int $sist_sist=0,
        /** @var string|null */
        public ?string $path=null,
        /** @var RestFiles|null */
        public ?RestFiles $dataDelete=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['idArchivo'])) $this->idArchivo = $o['idArchivo'];
        if (isset($o['usua_login'])) $this->usua_login = $o['usua_login'];
        if (isset($o['carp_carp'])) $this->carp_carp = $o['carp_carp'];
        if (isset($o['isDirectory'])) $this->isDirectory = $o['isDirectory'];
        if (isset($o['empr_empr'])) $this->empr_empr = $o['empr_empr'];
        if (isset($o['sist_sist'])) $this->sist_sist = $o['sist_sist'];
        if (isset($o['path'])) $this->path = $o['path'];
        if (isset($o['dataDelete'])) $this->dataDelete = JsonConverters::from('RestFiles', $o['dataDelete']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->idArchivo)) $o['idArchivo'] = $this->idArchivo;
        if (isset($this->usua_login)) $o['usua_login'] = $this->usua_login;
        if (isset($this->carp_carp)) $o['carp_carp'] = $this->carp_carp;
        if (isset($this->isDirectory)) $o['isDirectory'] = $this->isDirectory;
        if (isset($this->empr_empr)) $o['empr_empr'] = $this->empr_empr;
        if (isset($this->sist_sist)) $o['sist_sist'] = $this->sist_sist;
        if (isset($this->path)) $o['path'] = $this->path;
        if (isset($this->dataDelete)) $o['dataDelete'] = JsonConverters::to('RestFiles', $this->dataDelete);
        return empty($o) ? new class(){} : $o;
    }
}

PHP DeleteFileRQ DTOs

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

HTTP + XML

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

POST /restfiles/DeleteFileRQ HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<DeleteFileRQ xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Administrador.Modelo.Tipos">
  <carp_carp>0</carp_carp>
  <dataDelete>
    <ForDownload>false</ForDownload>
    <Path>String</Path>
    <TextContents>String</TextContents>
  </dataDelete>
  <empr_empr>0</empr_empr>
  <idArchivo>0</idArchivo>
  <isDirectory>false</isDirectory>
  <path>String</path>
  <sist_sist>0</sist_sist>
  <usua_login>String</usua_login>
</DeleteFileRQ>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DeleteFileRS xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Administrador.Modelo.Tipos">
  <error>String</error>
  <isDelete>false</isDelete>
</DeleteFileRS>