GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
has_role.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 __HAS_ROLE_H__
7 #define __HAS_ROLE_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
25  principal(std::string()),
26  role(std::string()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
63  HasRoleRequest(const std::string& principal_, const std::string& role_, const std::map<std::string, std::string>& options_):
64  principal( principal_ ),
65  role( role_ ),
66  options( options_ )
67  {
68  }
69 
70  std::string principal;
71  std::string role;
72  std::map<std::string, std::string> options;
73  };
74 }
75 
76 namespace avro
77 {
78  template<> struct codec_traits<gpudb::HasRoleRequest>
79  {
80  static void encode(Encoder& e, const gpudb::HasRoleRequest& v)
81  {
82  ::avro::encode(e, v.principal);
83  ::avro::encode(e, v.role);
84  ::avro::encode(e, v.options);
85  }
86 
87  static void decode(Decoder& d, gpudb::HasRoleRequest& 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.principal);
99  break;
100 
101  case 1:
102  ::avro::decode(d, v.role);
103  break;
104 
105  case 2:
106  ::avro::decode(d, v.options);
107  break;
108 
109  default:
110  break;
111  }
112  }
113  }
114  else
115  {
116  ::avro::decode(d, v.principal);
117  ::avro::decode(d, v.role);
118  ::avro::decode(d, v.options);
119  }
120  }
121  };
122 }
123 
124 namespace gpudb
125 {
126 
134  {
135 
140  principal(std::string()),
141  role(std::string()),
142  hasRole(bool()),
143  info(std::map<std::string, std::string>())
144  {
145  }
146 
147  std::string principal;
148  std::string role;
149  bool hasRole;
150  std::map<std::string, std::string> info;
151  };
152 }
153 
154 namespace avro
155 {
156  template<> struct codec_traits<gpudb::HasRoleResponse>
157  {
158  static void encode(Encoder& e, const gpudb::HasRoleResponse& v)
159  {
160  ::avro::encode(e, v.principal);
161  ::avro::encode(e, v.role);
162  ::avro::encode(e, v.hasRole);
163  ::avro::encode(e, v.info);
164  }
165 
166  static void decode(Decoder& d, gpudb::HasRoleResponse& 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.principal);
178  break;
179 
180  case 1:
181  ::avro::decode(d, v.role);
182  break;
183 
184  case 2:
185  ::avro::decode(d, v.hasRole);
186  break;
187 
188  case 3:
189  ::avro::decode(d, v.info);
190  break;
191 
192  default:
193  break;
194  }
195  }
196  }
197  else
198  {
199  ::avro::decode(d, v.principal);
200  ::avro::decode(d, v.role);
201  ::avro::decode(d, v.hasRole);
202  ::avro::decode(d, v.info);
203  }
204  }
205  };
206 }
207 
208 #endif
A set of output parameters for const.
Definition: has_role.h:133
A set of input parameters for const.
Definition: has_role.h:18
std::string principal
Definition: has_role.h:147
HasRoleRequest()
Constructs a HasRoleRequest object with default parameter values.
Definition: has_role.h:24
std::string role
Definition: has_role.h:148
std::string principal
Definition: has_role.h:70
HasRoleResponse()
Constructs a HasRoleResponse object with default parameter values.
Definition: has_role.h:139
std::string role
Definition: has_role.h:71
std::map< std::string, std::string > info
Definition: has_role.h:150
std::map< std::string, std::string > options
Definition: has_role.h:72
HasRoleRequest(const std::string &principal_, const std::string &role_, const std::map< std::string, std::string > &options_)
Constructs a HasRoleRequest object with the specified parameters.
Definition: has_role.h:63