GPUdb C++ API  Version 7.2.2.4
alter_user.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_USER_H__
7 #define __ALTER_USER_H__
8 
9 namespace gpudb
10 {
18  {
23  name(std::string()),
24  action(std::string()),
25  value(std::string()),
26  options(std::map<std::string, std::string>())
27  {
28  }
29 
72  AlterUserRequest(const std::string& name_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
73  name( name_ ),
74  action( action_ ),
75  value( value_ ),
76  options( options_ )
77  {
78  }
79 
83  std::string name;
84 
111  std::string action;
112 
116  std::string value;
117 
121  std::map<std::string, std::string> options;
122  };
123 } // end namespace gpudb
124 
125 namespace avro
126 {
127  template<> struct codec_traits<gpudb::AlterUserRequest>
128  {
129  static void encode(Encoder& e, const gpudb::AlterUserRequest& v)
130  {
131  ::avro::encode(e, v.name);
132  ::avro::encode(e, v.action);
133  ::avro::encode(e, v.value);
134  ::avro::encode(e, v.options);
135  }
136 
137  static void decode(Decoder& d, gpudb::AlterUserRequest& v)
138  {
139  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
140  {
141  const std::vector<size_t> fo = rd->fieldOrder();
142 
143  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
144  {
145  switch (*it)
146  {
147  case 0:
148  ::avro::decode(d, v.name);
149  break;
150 
151  case 1:
152  ::avro::decode(d, v.action);
153  break;
154 
155  case 2:
156  ::avro::decode(d, v.value);
157  break;
158 
159  case 3:
160  ::avro::decode(d, v.options);
161  break;
162 
163  default:
164  break;
165  }
166  }
167  }
168  else
169  {
170  ::avro::decode(d, v.name);
171  ::avro::decode(d, v.action);
172  ::avro::decode(d, v.value);
173  ::avro::decode(d, v.options);
174  }
175  }
176  };
177 } // end namespace avro
178 
179 namespace gpudb
180 {
186  {
191  name(std::string()),
192  info(std::map<std::string, std::string>())
193  {
194  }
195 
199  std::string name;
200 
204  std::map<std::string, std::string> info;
205  };
206 } // end namespace gpudb
207 
208 namespace avro
209 {
210  template<> struct codec_traits<gpudb::AlterUserResponse>
211  {
212  static void encode(Encoder& e, const gpudb::AlterUserResponse& v)
213  {
214  ::avro::encode(e, v.name);
215  ::avro::encode(e, v.info);
216  }
217 
218  static void decode(Decoder& d, gpudb::AlterUserResponse& v)
219  {
220  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
221  {
222  const std::vector<size_t> fo = rd->fieldOrder();
223 
224  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
225  {
226  switch (*it)
227  {
228  case 0:
229  ::avro::decode(d, v.name);
230  break;
231 
232  case 1:
233  ::avro::decode(d, v.info);
234  break;
235 
236  default:
237  break;
238  }
239  }
240  }
241  else
242  {
243  ::avro::decode(d, v.name);
244  ::avro::decode(d, v.info);
245  }
246  }
247  };
248 } // end namespace avro
249 
250 #endif // __ALTER_USER_H__
std::map< std::string, std::string > info
Additional information.
Definition: alter_user.h:204
std::string action
Modification operation to be applied to the user.
Definition: alter_user.h:111
std::string name
Name of the user to be altered.
Definition: alter_user.h:83
std::map< std::string, std::string > options
Optional parameters.
Definition: alter_user.h:121
AlterUserRequest()
Constructs an AlterUserRequest object with default parameters.
Definition: alter_user.h:22
A set of results returned by GPUdb::alterUser.
Definition: alter_user.h:185
A set of parameters for GPUdb::alterUser.
Definition: alter_user.h:17
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:72
std::string name
Value of name.
Definition: alter_user.h:199
AlterUserResponse()
Constructs an AlterUserResponse object with default parameters.
Definition: alter_user.h:190
std::string value
The value of the modification, depending on action.
Definition: alter_user.h:116