GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
alter_graph.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 __ALTER_GRAPH_H__
7 #define __ALTER_GRAPH_H__
8 
9 namespace gpudb
10 {
11 
18  struct AlterGraphRequest
19  {
20 
26  AlterGraphRequest() :
27  graphName(std::string()),
28  action(std::string()),
29  actionArg(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
60  AlterGraphRequest(const std::string& graphName_, const std::string& action_, const std::string& actionArg_, const std::map<std::string, std::string>& options_):
61  graphName( graphName_ ),
62  action( action_ ),
63  actionArg( actionArg_ ),
64  options( options_ )
65  {
66  }
67 
68  std::string graphName;
69  std::string action;
70  std::string actionArg;
71  std::map<std::string, std::string> options;
72  };
73 }
74 
79 namespace avro
80 {
81  template<> struct codec_traits<gpudb::AlterGraphRequest>
82  {
83  static void encode(Encoder& e, const gpudb::AlterGraphRequest& v)
84  {
85  ::avro::encode(e, v.graphName);
86  ::avro::encode(e, v.action);
87  ::avro::encode(e, v.actionArg);
88  ::avro::encode(e, v.options);
89  }
90 
91  static void decode(Decoder& d, gpudb::AlterGraphRequest& v)
92  {
93  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
94  {
95  const std::vector<size_t> fo = rd->fieldOrder();
96 
97  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
98  {
99  switch (*it)
100  {
101  case 0:
102  ::avro::decode(d, v.graphName);
103  break;
104 
105  case 1:
106  ::avro::decode(d, v.action);
107  break;
108 
109  case 2:
110  ::avro::decode(d, v.actionArg);
111  break;
112 
113  case 3:
114  ::avro::decode(d, v.options);
115  break;
116 
117  default:
118  break;
119  }
120  }
121  }
122  else
123  {
124  ::avro::decode(d, v.graphName);
125  ::avro::decode(d, v.action);
126  ::avro::decode(d, v.actionArg);
127  ::avro::decode(d, v.options);
128  }
129  }
130  };
131 }
132 
133 namespace gpudb
134 {
135 
142  struct AlterGraphResponse
143  {
144 
150  AlterGraphResponse() :
151  action(std::string()),
152  actionArg(std::string()),
153  info(std::map<std::string, std::string>())
154  {
155  }
156 
157  std::string action;
158  std::string actionArg;
159  std::map<std::string, std::string> info;
160  };
161 }
162 
167 namespace avro
168 {
169  template<> struct codec_traits<gpudb::AlterGraphResponse>
170  {
171  static void encode(Encoder& e, const gpudb::AlterGraphResponse& v)
172  {
173  ::avro::encode(e, v.action);
174  ::avro::encode(e, v.actionArg);
175  ::avro::encode(e, v.info);
176  }
177 
178  static void decode(Decoder& d, gpudb::AlterGraphResponse& v)
179  {
180  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
181  {
182  const std::vector<size_t> fo = rd->fieldOrder();
183 
184  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
185  {
186  switch (*it)
187  {
188  case 0:
189  ::avro::decode(d, v.action);
190  break;
191 
192  case 1:
193  ::avro::decode(d, v.actionArg);
194  break;
195 
196  case 2:
197  ::avro::decode(d, v.info);
198  break;
199 
200  default:
201  break;
202  }
203  }
204  }
205  else
206  {
207  ::avro::decode(d, v.action);
208  ::avro::decode(d, v.actionArg);
209  ::avro::decode(d, v.info);
210  }
211  }
212  };
213 }
214 
215 #endif