GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_state_table.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 __CREATE_STATE_TABLE_H__
7 #define __CREATE_STATE_TABLE_H__
8 
9 namespace gpudb
10 {
11 
18  struct CreateStateTableRequest
19  {
20 
26  CreateStateTableRequest() :
27  tableName(std::string()),
28  inputTableName(std::string()),
29  initTableName(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
45  CreateStateTableRequest(const std::string& tableName_, const std::string& inputTableName_, const std::string& initTableName_, const std::map<std::string, std::string>& options_):
46  tableName( tableName_ ),
47  inputTableName( inputTableName_ ),
48  initTableName( initTableName_ ),
49  options( options_ )
50  {
51  }
52 
53  std::string tableName;
54  std::string inputTableName;
55  std::string initTableName;
56  std::map<std::string, std::string> options;
57  };
58 }
59 
64 namespace avro
65 {
66  template<> struct codec_traits<gpudb::CreateStateTableRequest>
67  {
68  static void encode(Encoder& e, const gpudb::CreateStateTableRequest& v)
69  {
70  ::avro::encode(e, v.tableName);
71  ::avro::encode(e, v.inputTableName);
72  ::avro::encode(e, v.initTableName);
73  ::avro::encode(e, v.options);
74  }
75 
76  static void decode(Decoder& d, gpudb::CreateStateTableRequest& v)
77  {
78  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
79  {
80  const std::vector<size_t> fo = rd->fieldOrder();
81 
82  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
83  {
84  switch (*it)
85  {
86  case 0:
87  ::avro::decode(d, v.tableName);
88  break;
89 
90  case 1:
91  ::avro::decode(d, v.inputTableName);
92  break;
93 
94  case 2:
95  ::avro::decode(d, v.initTableName);
96  break;
97 
98  case 3:
99  ::avro::decode(d, v.options);
100  break;
101 
102  default:
103  break;
104  }
105  }
106  }
107  else
108  {
109  ::avro::decode(d, v.tableName);
110  ::avro::decode(d, v.inputTableName);
111  ::avro::decode(d, v.initTableName);
112  ::avro::decode(d, v.options);
113  }
114  }
115  };
116 }
117 
118 namespace gpudb
119 {
120 
127  struct CreateStateTableResponse
128  {
129 
135  CreateStateTableResponse() :
136  tableName(std::string()),
137  info(std::map<std::string, std::string>())
138  {
139  }
140 
141  std::string tableName;
142  std::map<std::string, std::string> info;
143  };
144 }
145 
150 namespace avro
151 {
152  template<> struct codec_traits<gpudb::CreateStateTableResponse>
153  {
154  static void encode(Encoder& e, const gpudb::CreateStateTableResponse& v)
155  {
156  ::avro::encode(e, v.tableName);
157  ::avro::encode(e, v.info);
158  }
159 
160  static void decode(Decoder& d, gpudb::CreateStateTableResponse& v)
161  {
162  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
163  {
164  const std::vector<size_t> fo = rd->fieldOrder();
165 
166  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
167  {
168  switch (*it)
169  {
170  case 0:
171  ::avro::decode(d, v.tableName);
172  break;
173 
174  case 1:
175  ::avro::decode(d, v.info);
176  break;
177 
178  default:
179  break;
180  }
181  }
182  }
183  else
184  {
185  ::avro::decode(d, v.tableName);
186  ::avro::decode(d, v.info);
187  }
188  }
189  };
190 }
191 
192 #endif