<?php

/**
 * CometVisu Manager backend
 * PHP version 7.4
 *
 * @package OpenAPIServer
 * @author  OpenAPI Generator team
 * @link    https://github.com/openapitools/openapi-generator
 */

/**
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 * The version of the OpenAPI document: 1.0.0
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */

/**
 * NOTE: This class is auto generated by the openapi generator program.
 * https://github.com/openapitools/openapi-generator
 * Do not edit the class manually.
 */
namespace OpenAPIServer\Api;

use Psr\Container\ContainerInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Slim\Exception\HttpNotImplementedException;

/**
 * AbstractFsApi Class Doc Comment
 *
 * @package OpenAPIServer\Api
 * @author  OpenAPI Generator team
 * @link    https://github.com/openapitools/openapi-generator
 */
abstract class AbstractFsApi
{

    /**
     * @var ContainerInterface|null Slim app container instance
     */
    protected $container;

    /**
     * Route Controller constructor receives container
     *
     * @param ContainerInterface|null $container Slim app container instance
     */
    public function __construct(ContainerInterface $container = null)
    {
        $this->container = $container;
    }


    /**
     * GET checkEnvironment
     * Summary: Check filesystem environment (access rights, etc)
     * Output-Formats: [application/json]
     *
     * @param ServerRequestInterface $request  Request
     * @param ResponseInterface      $response Response
     * @param array|null             $args     Path arguments
     *
     * @return ResponseInterface
     * @throws HttpNotImplementedException to force implementation class to override this method
     */
    public function checkEnvironment(ServerRequestInterface $request, ResponseInterface $response, array $args)
    {
        $message = "How about implementing checkEnvironment as a GET method in OpenAPIServer\Api\FsApi class?";
        throw new HttpNotImplementedException($request, $message);
    }

    /**
     * POST create
     * Summary: Create a new file or folder on the host
     *
     * @param ServerRequestInterface $request  Request
     * @param ResponseInterface      $response Response
     * @param array|null             $args     Path arguments
     *
     * @return ResponseInterface
     * @throws HttpNotImplementedException to force implementation class to override this method
     */
    public function create(ServerRequestInterface $request, ResponseInterface $response, array $args)
    {
        $queryParams = $request->getQueryParams();
        $path = (key_exists('path', $queryParams)) ? $queryParams['path'] : null;
        $hash = (key_exists('hash', $queryParams)) ? $queryParams['hash'] : null;
        $type = (key_exists('type', $queryParams)) ? $queryParams['type'] : null;
        $body = $request->getParsedBody();
        $file = (key_exists('file', $request->getUploadedFiles())) ? $request->getUploadedFiles()['file'] : null;
        $filename = (isset($body['filename'])) ? $body['filename'] : null;
        $force = (isset($body['force'])) ? $body['force'] : null;
        $message = "How about implementing create as a POST method in OpenAPIServer\Api\FsApi class?";
        throw new HttpNotImplementedException($request, $message);
    }

    /**
     * DELETE delete
     * Summary: Deletes a file/folder
     *
     * @param ServerRequestInterface $request  Request
     * @param ResponseInterface      $response Response
     * @param array|null             $args     Path arguments
     *
     * @return ResponseInterface
     * @throws HttpNotImplementedException to force implementation class to override this method
     */
    public function delete(ServerRequestInterface $request, ResponseInterface $response, array $args)
    {
        $queryParams = $request->getQueryParams();
        $path = (key_exists('path', $queryParams)) ? $queryParams['path'] : null;
        $hash = (key_exists('hash', $queryParams)) ? $queryParams['hash'] : null;
        $force = (key_exists('force', $queryParams)) ? $queryParams['force'] : null;
        $message = "How about implementing delete as a DELETE method in OpenAPIServer\Api\FsApi class?";
        throw new HttpNotImplementedException($request, $message);
    }

    /**
     * PUT move
     * Summary: Move folder or file to a new place
     *
     * @param ServerRequestInterface $request  Request
     * @param ResponseInterface      $response Response
     * @param array|null             $args     Path arguments
     *
     * @return ResponseInterface
     * @throws HttpNotImplementedException to force implementation class to override this method
     */
    public function move(ServerRequestInterface $request, ResponseInterface $response, array $args)
    {
        $queryParams = $request->getQueryParams();
        $src = (key_exists('src', $queryParams)) ? $queryParams['src'] : null;
        $target = (key_exists('target', $queryParams)) ? $queryParams['target'] : null;
        $message = "How about implementing move as a PUT method in OpenAPIServer\Api\FsApi class?";
        throw new HttpNotImplementedException($request, $message);
    }

    /**
     * GET read
     * Summary: Return directory listing or file content
     * Notes: Returns a list of files/directories if the requested path pointed to a directory or the content of the file otherwise
     * Output-Formats: [application/json, text/_*]
     *
     * @param ServerRequestInterface $request  Request
     * @param ResponseInterface      $response Response
     * @param array|null             $args     Path arguments
     *
     * @return ResponseInterface
     * @throws HttpNotImplementedException to force implementation class to override this method
     */
    public function read(ServerRequestInterface $request, ResponseInterface $response, array $args)
    {
        $queryParams = $request->getQueryParams();
        $path = (key_exists('path', $queryParams)) ? $queryParams['path'] : null;
        $hash = (key_exists('hash', $queryParams)) ? $queryParams['hash'] : null;
        $download = (key_exists('download', $queryParams)) ? $queryParams['download'] : null;
        $recursive = (key_exists('recursive', $queryParams)) ? $queryParams['recursive'] : null;
        $message = "How about implementing read as a GET method in OpenAPIServer\Api\FsApi class?";
        throw new HttpNotImplementedException($request, $message);
    }

    /**
     * PUT update
     * Summary: Update an existing file
     *
     * @param ServerRequestInterface $request  Request
     * @param ResponseInterface      $response Response
     * @param array|null             $args     Path arguments
     *
     * @return ResponseInterface
     * @throws HttpNotImplementedException to force implementation class to override this method
     */
    public function update(ServerRequestInterface $request, ResponseInterface $response, array $args)
    {
        $queryParams = $request->getQueryParams();
        $path = (key_exists('path', $queryParams)) ? $queryParams['path'] : null;
        $hash = (key_exists('hash', $queryParams)) ? $queryParams['hash'] : null;
        $body = $request->getParsedBody();
        $message = "How about implementing update as a PUT method in OpenAPIServer\Api\FsApi class?";
        throw new HttpNotImplementedException($request, $message);
    }
}
