GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
drop_model.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __DROP_MODEL_H__
7 #define __DROP_MODEL_H__
8 
9 namespace gpudb
10 {
11 
18  struct DropModelRequest
19  {
20 
25  DropModelRequest() :
26  modelName(std::string()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
39  DropModelRequest(const std::string& modelName_, const std::map<std::string, std::string>& options_):
40  modelName( modelName_ ),
41  options( options_ )
42  {
43  }
44 
45  std::string modelName;
46  std::map<std::string, std::string> options;
47  };
48 }
49 
54 namespace avro
55 {
56  template<> struct codec_traits<gpudb::DropModelRequest>
57  {
58  static void encode(Encoder& e, const gpudb::DropModelRequest& v)
59  {
60  ::avro::encode(e, v.modelName);
61  ::avro::encode(e, v.options);
62  }
63 
64  static void decode(Decoder& d, gpudb::DropModelRequest& v)
65  {
66  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
67  {
68  const std::vector<size_t> fo = rd->fieldOrder();
69 
70  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
71  {
72  switch (*it)
73  {
74  case 0:
75  ::avro::decode(d, v.modelName);
76  break;
77 
78  case 1:
79  ::avro::decode(d, v.options);
80  break;
81 
82  default:
83  break;
84  }
85  }
86  }
87  else
88  {
89  ::avro::decode(d, v.modelName);
90  ::avro::decode(d, v.options);
91  }
92  }
93  };
94 }
95 
96 namespace gpudb
97 {
98 
105  struct DropModelResponse
106  {
107 
112  DropModelResponse() :
113  modelName(std::string()),
114  info(std::map<std::string, std::string>())
115  {
116  }
117 
118  std::string modelName;
119  std::map<std::string, std::string> info;
120  };
121 }
122 
127 namespace avro
128 {
129  template<> struct codec_traits<gpudb::DropModelResponse>
130  {
131  static void encode(Encoder& e, const gpudb::DropModelResponse& v)
132  {
133  ::avro::encode(e, v.modelName);
134  ::avro::encode(e, v.info);
135  }
136 
137  static void decode(Decoder& d, gpudb::DropModelResponse& v)
138  {
139  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
140  {
141  const std::vector<size_t> fo = rd->fieldOrder();
142 
143  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
144  {
145  switch (*it)
146  {
147  case 0:
148  ::avro::decode(d, v.modelName);
149  break;
150 
151  case 1:
152  ::avro::decode(d, v.info);
153  break;
154 
155  default:
156  break;
157  }
158  }
159  }
160  else
161  {
162  ::avro::decode(d, v.modelName);
163  ::avro::decode(d, v.info);
164  }
165  }
166  };
167 }
168 
169 #endif