GPUdb C++ API  Version 7.2.2.4
create_state_table.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 __CREATE_STATE_TABLE_H__
7 #define __CREATE_STATE_TABLE_H__
8 
9 namespace gpudb
10 {
12  struct CreateStateTableRequest
13  {
14  CreateStateTableRequest() :
15  tableName(std::string()),
16  inputTableName(std::string()),
17  initTableName(std::string()),
18  options(std::map<std::string, std::string>())
19  {
20  }
21 
22  CreateStateTableRequest(const std::string& tableName_, const std::string& inputTableName_, const std::string& initTableName_, const std::map<std::string, std::string>& options_):
23  tableName( tableName_ ),
24  inputTableName( inputTableName_ ),
25  initTableName( initTableName_ ),
26  options( options_ )
27  {
28  }
29 
30  std::string tableName;
31  std::string inputTableName;
32  std::string initTableName;
33  std::map<std::string, std::string> options;
34  };
35 } // end namespace gpudb
36 
37 namespace avro
38 {
39  template<> struct codec_traits<gpudb::CreateStateTableRequest>
40  {
41  static void encode(Encoder& e, const gpudb::CreateStateTableRequest& v)
42  {
43  ::avro::encode(e, v.tableName);
44  ::avro::encode(e, v.inputTableName);
45  ::avro::encode(e, v.initTableName);
46  ::avro::encode(e, v.options);
47  }
48 
49  static void decode(Decoder& d, gpudb::CreateStateTableRequest& 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.tableName);
61  break;
62 
63  case 1:
64  ::avro::decode(d, v.inputTableName);
65  break;
66 
67  case 2:
68  ::avro::decode(d, v.initTableName);
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.tableName);
83  ::avro::decode(d, v.inputTableName);
84  ::avro::decode(d, v.initTableName);
85  ::avro::decode(d, v.options);
86  }
87  }
88  };
89 } // end namespace avro
90 
91 namespace gpudb
92 {
94  struct CreateStateTableResponse
95  {
96  CreateStateTableResponse() :
97  tableName(std::string()),
98  info(std::map<std::string, std::string>())
99  {
100  }
101 
102  std::string tableName;
103  std::map<std::string, std::string> info;
104  };
105 } // end namespace gpudb
106 
107 namespace avro
108 {
109  template<> struct codec_traits<gpudb::CreateStateTableResponse>
110  {
111  static void encode(Encoder& e, const gpudb::CreateStateTableResponse& v)
112  {
113  ::avro::encode(e, v.tableName);
114  ::avro::encode(e, v.info);
115  }
116 
117  static void decode(Decoder& d, gpudb::CreateStateTableResponse& v)
118  {
119  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
120  {
121  const std::vector<size_t> fo = rd->fieldOrder();
122 
123  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
124  {
125  switch (*it)
126  {
127  case 0:
128  ::avro::decode(d, v.tableName);
129  break;
130 
131  case 1:
132  ::avro::decode(d, v.info);
133  break;
134 
135  default:
136  break;
137  }
138  }
139  }
140  else
141  {
142  ::avro::decode(d, v.tableName);
143  ::avro::decode(d, v.info);
144  }
145  }
146  };
147 } // end namespace avro
148 
149 #endif // __CREATE_STATE_TABLE_H__