GPUdb C++ API  Version 7.2.2.4
drop_model.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __DROP_MODEL_H__
7 #define __DROP_MODEL_H__
8 
9 namespace gpudb
10 {
12  struct DropModelRequest
13  {
14  DropModelRequest() :
15  modelName(std::string()),
16  options(std::map<std::string, std::string>())
17  {
18  }
19 
20  DropModelRequest(const std::string& modelName_, const std::map<std::string, std::string>& options_):
21  modelName( modelName_ ),
22  options( options_ )
23  {
24  }
25 
26  std::string modelName;
27  std::map<std::string, std::string> options;
28  };
29 } // end namespace gpudb
30 
31 namespace avro
32 {
33  template<> struct codec_traits<gpudb::DropModelRequest>
34  {
35  static void encode(Encoder& e, const gpudb::DropModelRequest& v)
36  {
37  ::avro::encode(e, v.modelName);
38  ::avro::encode(e, v.options);
39  }
40 
41  static void decode(Decoder& d, gpudb::DropModelRequest& v)
42  {
43  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
44  {
45  const std::vector<size_t> fo = rd->fieldOrder();
46 
47  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
48  {
49  switch (*it)
50  {
51  case 0:
52  ::avro::decode(d, v.modelName);
53  break;
54 
55  case 1:
56  ::avro::decode(d, v.options);
57  break;
58 
59  default:
60  break;
61  }
62  }
63  }
64  else
65  {
66  ::avro::decode(d, v.modelName);
67  ::avro::decode(d, v.options);
68  }
69  }
70  };
71 } // end namespace avro
72 
73 namespace gpudb
74 {
76  struct DropModelResponse
77  {
78  DropModelResponse() :
79  modelName(std::string()),
80  info(std::map<std::string, std::string>())
81  {
82  }
83 
84  std::string modelName;
85  std::map<std::string, std::string> info;
86  };
87 } // end namespace gpudb
88 
89 namespace avro
90 {
91  template<> struct codec_traits<gpudb::DropModelResponse>
92  {
93  static void encode(Encoder& e, const gpudb::DropModelResponse& v)
94  {
95  ::avro::encode(e, v.modelName);
96  ::avro::encode(e, v.info);
97  }
98 
99  static void decode(Decoder& d, gpudb::DropModelResponse& v)
100  {
101  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
102  {
103  const std::vector<size_t> fo = rd->fieldOrder();
104 
105  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
106  {
107  switch (*it)
108  {
109  case 0:
110  ::avro::decode(d, v.modelName);
111  break;
112 
113  case 1:
114  ::avro::decode(d, v.info);
115  break;
116 
117  default:
118  break;
119  }
120  }
121  }
122  else
123  {
124  ::avro::decode(d, v.modelName);
125  ::avro::decode(d, v.info);
126  }
127  }
128  };
129 } // end namespace avro
130 
131 #endif // __DROP_MODEL_H__