#pragma once // A reasoning engine (Agent Engine) as Google returns it, plus the input // types for create and update. #include #include #include #include "clients/body/json.h" #include "google/runtime/deployment_spec.h" namespace molo::google::runtime { struct Engine { std::string name; // projects/{p}/locations/{l}/reasoningEngines/{id} std::string display_name; std::string description; std::string etag; std::string create_time; std::string update_time; std::map labels; EngineSpec spec; std::string kms_key_name; // encryptionSpec.kmsKeyName clients::body::Json raw; // the full response document std::string id() const; // last segment of name static Engine from_json(const clients::body::Json& doc); }; struct EngineDraft { std::string display_name; // required std::string description; std::map labels; EngineSpec spec; std::string kms_key_name; // optional customer-managed key void validate() const; clients::body::Json to_json() const; }; // Only the set fields are sent; updateMask is derived from them. struct EngineUpdate { std::optional display_name; std::optional description; std::optional> labels; std::optional spec; void validate() const; clients::body::Json to_json() const; std::string update_mask() const; // comma separated, never empty after validate() }; } // namespace molo::google::runtime