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