/**
* Nudsf_DataRepository
* Nudsf Data Repository Service. © 2021, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. 
*
* The version of the OpenAPI document: 1.1.0-alpha.2
* 
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
 * BlockCRUDApi.h
 *
 * 
 */

#ifndef BlockCRUDApi_H_
#define BlockCRUDApi_H_


#include <pistache/http.h>
#include <pistache/router.h>
#include <pistache/http_headers.h>
#include <pistache/optional.h>


//#include "AnyType.h"
#include "Inline_response_200.h"
#include "ProblemDetails.h"
#include <string>

namespace org {
namespace openapitools {
namespace server {
namespace api {

using namespace org::openapitools::server::model;

class  BlockCRUDApi {
public:
    BlockCRUDApi(std::shared_ptr<Pistache::Rest::Router>);
    virtual ~BlockCRUDApi() {}
    void init();

    const std::string base = "/nudsf-dr/v1";

private:
    void setupRoutes();

    void create_or_modify_block_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
    void delete_block_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
    void get_block_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
    void get_block_list_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
    void block_crud_api_default_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);

    std::shared_ptr<Pistache::Rest::Router> router;

    /// <summary>
    /// Create or Update a specific Block in a Record.
    /// </summary>
    /// <remarks>
    /// Create or update a specific Block, related to a Record
    /// </remarks>
    /// <param name="realmId">Identifier of the Realm</param>
    /// <param name="storageId">Identifier of the Storage</param>
    /// <param name="recordId">Identifier of the Record</param>
    /// <param name="blockId">Id of the Block</param>
    /// <param name="body">information on the Block to create</param>
    /// <param name="getPrevious">Retrieve the Block before update (optional, default to false)</param>
    /// <param name="ifNoneMatch">Validator for conditional requests, as described in RFC 7232, 3.2 (optional, default to &quot;&quot;)</param>
    /// <param name="ifMatch">Record validator for conditional requests, as described in RFC 7232, 3.2 (optional, default to &quot;&quot;)</param>
    /// <param name="supportedFeatures">Features required to be supported by the target NF (optional, default to &quot;&quot;)</param>
    //virtual void create_or_modify_block(const std::string &realmId, const std::string &storageId, const std::string &recordId, const std::string &blockId, const AnyType &body, const Pistache::Optional<bool> &getPrevious, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, const Pistache::Optional<Pistache::Http::Header::Raw> &ifMatch, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response) = 0;

    /// <summary>
    /// Delete a specific Block. Then update the Record
    /// </summary>
    /// <remarks>
    /// delete a specific Block, related to a Record
    /// </remarks>
    /// <param name="realmId">Identifier of the Realm</param>
    /// <param name="storageId">Identifier of the Storage</param>
    /// <param name="recordId">Identifier of the Record</param>
    /// <param name="blockId">Id of the Block</param>
    /// <param name="getPrevious">Retrieve the Block before delete (optional, default to false)</param>
    /// <param name="ifMatch">Record validator for conditional requests, as described in RFC 7232, 3.2 (optional, default to &quot;&quot;)</param>
    /// <param name="supportedFeatures">Features required to be supported by the target NF (optional, default to &quot;&quot;)</param>
    virtual void delete_block(const std::string &realmId, const std::string &storageId, const std::string &recordId, const std::string &blockId, const Pistache::Optional<bool> &getPrevious, const Pistache::Optional<Pistache::Http::Header::Raw> &ifMatch, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response) = 0;

    /// <summary>
    /// Retrieve a specific Block
    /// </summary>
    /// <remarks>
    /// retrieve a specific Block
    /// </remarks>
    /// <param name="realmId">Identifier of the Realm</param>
    /// <param name="storageId">Identifier of the Storage</param>
    /// <param name="recordId">Identifier of the Record</param>
    /// <param name="blockId">Id of the Block</param>
    /// <param name="ifNoneMatch">Validator for conditional requests, as described in RFC 7232, 3.2 (optional, default to &quot;&quot;)</param>
    /// <param name="ifModifiedSince">Validator for conditional requests, as described in RFC 7232, 3.3 (optional, default to &quot;&quot;)</param>
    /// <param name="supportedFeatures">Features required to be supported by the target NF (optional, default to &quot;&quot;)</param>
    virtual void get_block(const std::string &realmId, const std::string &storageId, const std::string &recordId, const std::string &blockId, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, const Pistache::Optional<Pistache::Http::Header::Raw> &ifModifiedSince, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response) = 0;

    /// <summary>
    /// Record&#39;s Blocks access
    /// </summary>
    /// <remarks>
    /// retrieve all Blocks of a specific Record
    /// </remarks>
    /// <param name="realmId">Identifier of the Realm</param>
    /// <param name="storageId">Identifier of the Storage</param>
    /// <param name="recordId">Identifier of the Record</param>
    /// <param name="supportedFeatures">Features required to be supported by the target NF (optional, default to &quot;&quot;)</param>
    virtual void get_block_list(const std::string &realmId, const std::string &storageId, const std::string &recordId, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response) = 0;

};

}
}
}
}

#endif /* BlockCRUDApi_H_ */

