winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

SearchRequestSerializer.h (921B)


      1 // Copyright (c) Microsoft Corporation.
      2 // Licensed under the MIT License.
      3 #pragma once
      4 #include <cpprest/json.h>
      5 #include "Rest/Schema/IRestClient.h"
      6 
      7 namespace AppInstaller::Repository::Rest::Schema::V1_0::Json
      8 {
      9     // Search Result Serializer.
     10     struct SearchRequestSerializer
     11     {
     12         web::json::value Serialize(const SearchRequest& searchRequest) const;
     13 
     14     protected:
     15         std::optional<web::json::value> SerializeSearchRequest(const SearchRequest& searchRequest) const;
     16 
     17         std::optional<web::json::value> GetRequestMatchJsonObject(const AppInstaller::Repository::RequestMatch& requestMatch) const;
     18 
     19         std::optional<web::json::value> GetPackageMatchFilterJsonObject(const PackageMatchFilter& packageMatchFilter) const;
     20 
     21         virtual std::optional<std::string_view> ConvertPackageMatchFieldToString(AppInstaller::Repository::PackageMatchField field) const;
     22     };
     23 }