FrameAppWS

<back to all web services

ShareFileRQ

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

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

class ShareFileRQ implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $idArchivo=0.0,
        /** @var string[]|null */
        public ?array $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
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['idArchivo'])) $this->idArchivo = $o['idArchivo'];
        if (isset($o['usua_login'])) $this->usua_login = JsonConverters::fromArray('string', $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'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->idArchivo)) $o['idArchivo'] = $this->idArchivo;
        if (isset($this->usua_login)) $o['usua_login'] = JsonConverters::toArray('string', $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;
        return empty($o) ? new class(){} : $o;
    }
}

PHP ShareFileRQ 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/ShareFileRQ HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ShareFileRQ xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Administrador.Modelo.Tipos">
  <carp_carp>0</carp_carp>
  <empr_empr>0</empr_empr>
  <idArchivo>0</idArchivo>
  <isDirectory>false</isDirectory>
  <sist_sist>0</sist_sist>
  <usua_login xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </usua_login>
</ShareFileRQ>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

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