GPUdb C++ API  Version 7.2.2.4
alter_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 __ALTER_MODEL_H__
7 #define __ALTER_MODEL_H__
8 
9 namespace gpudb
10 {
12  struct AlterModelRequest
13  {
14  AlterModelRequest() :
15  modelName(std::string()),
16  action(std::string()),
17  value(std::string()),
18  options(std::map<std::string, std::string>())
19  {
20  }
21 
22  AlterModelRequest(const std::string& modelName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
23  modelName( modelName_ ),
24  action( action_ ),
25  value( value_ ),
26  options( options_ )
27  {
28  }
29 
30  std::string modelName;
31  std::string action;
32  std::string value;
33  std::map<std::string, std::string> options;
34  };
35 } // end namespace gpudb
36 
37 namespace avro
38 {
39  template<> struct codec_traits<gpudb::AlterModelRequest>
40  {
41  static void encode(Encoder& e, const gpudb::AlterModelRequest& v)
42  {
43  ::avro::encode(e, v.modelName);
44  ::avro::encode(e, v.action);
45  ::avro::encode(e, v.value);
46  ::avro::encode(e, v.options);
47  }
48 
49  static void decode(Decoder& d, gpudb::AlterModelRequest& v)
50  {
51  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
52  {
53  const std::vector<size_t> fo = rd->fieldOrder();
54 
55  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
56  {
57  switch (*it)
58  {
59  case 0:
60  ::avro::decode(d, v.modelName);
61  break;
62 
63  case 1:
64  ::avro::decode(d, v.action);
65  break;
66 
67  case 2:
68  ::avro::decode(d, v.value);
69  break;
70 
71  case 3:
72  ::avro::decode(d, v.options);
73  break;
74 
75  default:
76  break;
77  }
78  }
79  }
80  else
81  {
82  ::avro::decode(d, v.modelName);
83  ::avro::decode(d, v.action);
84  ::avro::decode(d, v.value);
85  ::avro::decode(d, v.options);
86  }
87  }
88  };
89 } // end namespace avro
90 
91 namespace gpudb
92 {
94  struct AlterModelResponse
95  {
96  AlterModelResponse() :
97  modelName(std::string()),
98  action(std::string()),
99  value(std::string()),
100  info(std::map<std::string, std::string>())
101  {
102  }
103 
104  std::string modelName;
105  std::string action;
106  std::string value;
107  std::map<std::string, std::string> info;
108  };
109 } // end namespace gpudb
110 
111 namespace avro
112 {
113  template<> struct codec_traits<gpudb::AlterModelResponse>
114  {
115  static void encode(Encoder& e, const gpudb::AlterModelResponse& v)
116  {
117  ::avro::encode(e, v.modelName);
118  ::avro::encode(e, v.action);
119  ::avro::encode(e, v.value);
120  ::avro::encode(e, v.info);
121  }
122 
123  static void decode(Decoder& d, gpudb::AlterModelResponse& v)
124  {
125  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
126  {
127  const std::vector<size_t> fo = rd->fieldOrder();
128 
129  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
130  {
131  switch (*it)
132  {
133  case 0:
134  ::avro::decode(d, v.modelName);
135  break;
136 
137  case 1:
138  ::avro::decode(d, v.action);
139  break;
140 
141  case 2:
142  ::avro::decode(d, v.value);
143  break;
144 
145  case 3:
146  ::avro::decode(d, v.info);
147  break;
148 
149  default:
150  break;
151  }
152  }
153  }
154  else
155  {
156  ::avro::decode(d, v.modelName);
157  ::avro::decode(d, v.action);
158  ::avro::decode(d, v.value);
159  ::avro::decode(d, v.info);
160  }
161  }
162  };
163 } // end namespace avro
164 
165 #endif // __ALTER_MODEL_H__