GPUdb C++ API  Version 5.2.0.0
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 
44  AlterUserRequest(const std::string& name, const std::string& action, const std::string& value, const std::map<std::string, std::string>& options):
45  name(name),
46  action(action),
47  value(value),
48  options(options)
49  {
50  }
51 
52  std::string name;
53  std::string action;
54  std::string value;
55  std::map<std::string, std::string> options;
56  };
57 }
58 
59 namespace avro
60 {
61  template<> struct codec_traits<gpudb::AlterUserRequest>
62  {
63  static void encode(Encoder& e, const gpudb::AlterUserRequest& v)
64  {
65  ::avro::encode(e, v.name);
66  ::avro::encode(e, v.action);
67  ::avro::encode(e, v.value);
68  ::avro::encode(e, v.options);
69  }
70 
71  static void decode(Decoder& d, gpudb::AlterUserRequest& v)
72  {
73  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
74  {
75  const std::vector<size_t> fo = rd->fieldOrder();
76 
77  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
78  {
79  switch (*it)
80  {
81  case 0:
82  ::avro::decode(d, v.name);
83  break;
84 
85  case 1:
86  ::avro::decode(d, v.action);
87  break;
88 
89  case 2:
90  ::avro::decode(d, v.value);
91  break;
92 
93  case 3:
94  ::avro::decode(d, v.options);
95  break;
96 
97  default:
98  break;
99  }
100  }
101  }
102  else
103  {
104  ::avro::decode(d, v.name);
105  ::avro::decode(d, v.action);
106  ::avro::decode(d, v.value);
107  ::avro::decode(d, v.options);
108  }
109  }
110  };
111 }
112 
113 namespace gpudb
114 {
115 
123  {
124 
130  name(std::string())
131  {
132  }
133 
134  std::string name;
135  };
136 }
137 
138 namespace avro
139 {
140  template<> struct codec_traits<gpudb::AlterUserResponse>
141  {
142  static void encode(Encoder& e, const gpudb::AlterUserResponse& v)
143  {
144  ::avro::encode(e, v.name);
145  }
146 
147  static void decode(Decoder& d, gpudb::AlterUserResponse& v)
148  {
149  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
150  {
151  const std::vector<size_t> fo = rd->fieldOrder();
152 
153  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
154  {
155  switch (*it)
156  {
157  case 0:
158  ::avro::decode(d, v.name);
159  break;
160 
161  default:
162  break;
163  }
164  }
165  }
166  else
167  {
168  ::avro::decode(d, v.name);
169  }
170  }
171  };
172 }
173 
174 #endif
std::map< std::string, std::string > options
Definition: alter_user.h:55
AlterUserRequest()
Constructs an AlterUserRequest object with default parameter values.
Definition: alter_user.h:24
A set of output parameters for alterUser(const AlterUserRequest&) const.
Definition: alter_user.h:122
A set of input parameters for alterUser(const AlterUserRequest&) const.
Definition: alter_user.h:18
AlterUserResponse()
Constructs an AlterUserResponse object with default parameter values.
Definition: alter_user.h:129
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:44