GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
alter_user.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_USER_H__
7 #define __ALTER_USER_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
25  name(std::string()),
26  action(std::string()),
27  value(std::string()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
60  AlterUserRequest(const std::string& name_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
61  name( name_ ),
62  action( action_ ),
63  value( value_ ),
64  options( options_ )
65  {
66  }
67 
68  std::string name;
69  std::string action;
70  std::string value;
71  std::map<std::string, std::string> options;
72  };
73 }
74 
75 namespace avro
76 {
77  template<> struct codec_traits<gpudb::AlterUserRequest>
78  {
79  static void encode(Encoder& e, const gpudb::AlterUserRequest& v)
80  {
81  ::avro::encode(e, v.name);
82  ::avro::encode(e, v.action);
83  ::avro::encode(e, v.value);
84  ::avro::encode(e, v.options);
85  }
86 
87  static void decode(Decoder& d, gpudb::AlterUserRequest& v)
88  {
89  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
90  {
91  const std::vector<size_t> fo = rd->fieldOrder();
92 
93  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
94  {
95  switch (*it)
96  {
97  case 0:
98  ::avro::decode(d, v.name);
99  break;
100 
101  case 1:
102  ::avro::decode(d, v.action);
103  break;
104 
105  case 2:
106  ::avro::decode(d, v.value);
107  break;
108 
109  case 3:
110  ::avro::decode(d, v.options);
111  break;
112 
113  default:
114  break;
115  }
116  }
117  }
118  else
119  {
120  ::avro::decode(d, v.name);
121  ::avro::decode(d, v.action);
122  ::avro::decode(d, v.value);
123  ::avro::decode(d, v.options);
124  }
125  }
126  };
127 }
128 
129 namespace gpudb
130 {
131 
139  {
140 
146  name(std::string()),
147  info(std::map<std::string, std::string>())
148  {
149  }
150 
151  std::string name;
152  std::map<std::string, std::string> info;
153  };
154 }
155 
156 namespace avro
157 {
158  template<> struct codec_traits<gpudb::AlterUserResponse>
159  {
160  static void encode(Encoder& e, const gpudb::AlterUserResponse& v)
161  {
162  ::avro::encode(e, v.name);
163  ::avro::encode(e, v.info);
164  }
165 
166  static void decode(Decoder& d, gpudb::AlterUserResponse& v)
167  {
168  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
169  {
170  const std::vector<size_t> fo = rd->fieldOrder();
171 
172  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
173  {
174  switch (*it)
175  {
176  case 0:
177  ::avro::decode(d, v.name);
178  break;
179 
180  case 1:
181  ::avro::decode(d, v.info);
182  break;
183 
184  default:
185  break;
186  }
187  }
188  }
189  else
190  {
191  ::avro::decode(d, v.name);
192  ::avro::decode(d, v.info);
193  }
194  }
195  };
196 }
197 
198 #endif
std::map< std::string, std::string > info
Definition: alter_user.h:152
std::map< std::string, std::string > options
Definition: alter_user.h:71
AlterUserRequest()
Constructs an AlterUserRequest object with default parameter values.
Definition: alter_user.h:24
A set of output parameters for const.
Definition: alter_user.h:138
A set of input parameters for const.
Definition: alter_user.h:18
AlterUserRequest(const std::string &name_, const std::string &action_, const std::string &value_, const std::map< std::string, std::string > &options_)
Constructs an AlterUserRequest object with the specified parameters.
Definition: alter_user.h:60
AlterUserResponse()
Constructs an AlterUserResponse object with default parameter values.
Definition: alter_user.h:145