GPUdb C++ API  Version 7.2.2.4
grant_permission_system.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 __GRANT_PERMISSION_SYSTEM_H__
7 #define __GRANT_PERMISSION_SYSTEM_H__
8 
9 namespace gpudb
10 {
19  {
25  name(std::string()),
26  permission(std::string()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
67  GrantPermissionSystemRequest(const std::string& name_, const std::string& permission_, const std::map<std::string, std::string>& options_):
68  name( name_ ),
69  permission( permission_ ),
70  options( options_ )
71  {
72  }
73 
78  std::string name;
79 
102  std::string permission;
103 
107  std::map<std::string, std::string> options;
108  };
109 } // end namespace gpudb
110 
111 namespace avro
112 {
113  template<> struct codec_traits<gpudb::GrantPermissionSystemRequest>
114  {
115  static void encode(Encoder& e, const gpudb::GrantPermissionSystemRequest& v)
116  {
117  ::avro::encode(e, v.name);
118  ::avro::encode(e, v.permission);
119  ::avro::encode(e, v.options);
120  }
121 
122  static void decode(Decoder& d, gpudb::GrantPermissionSystemRequest& v)
123  {
124  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
125  {
126  const std::vector<size_t> fo = rd->fieldOrder();
127 
128  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
129  {
130  switch (*it)
131  {
132  case 0:
133  ::avro::decode(d, v.name);
134  break;
135 
136  case 1:
137  ::avro::decode(d, v.permission);
138  break;
139 
140  case 2:
141  ::avro::decode(d, v.options);
142  break;
143 
144  default:
145  break;
146  }
147  }
148  }
149  else
150  {
151  ::avro::decode(d, v.name);
152  ::avro::decode(d, v.permission);
153  ::avro::decode(d, v.options);
154  }
155  }
156  };
157 } // end namespace avro
158 
159 namespace gpudb
160 {
167  {
173  name(std::string()),
174  permission(std::string()),
175  info(std::map<std::string, std::string>())
176  {
177  }
178 
182  std::string name;
183 
188  std::string permission;
189 
193  std::map<std::string, std::string> info;
194  };
195 } // end namespace gpudb
196 
197 namespace avro
198 {
199  template<> struct codec_traits<gpudb::GrantPermissionSystemResponse>
200  {
201  static void encode(Encoder& e, const gpudb::GrantPermissionSystemResponse& v)
202  {
203  ::avro::encode(e, v.name);
204  ::avro::encode(e, v.permission);
205  ::avro::encode(e, v.info);
206  }
207 
208  static void decode(Decoder& d, gpudb::GrantPermissionSystemResponse& v)
209  {
210  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
211  {
212  const std::vector<size_t> fo = rd->fieldOrder();
213 
214  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
215  {
216  switch (*it)
217  {
218  case 0:
219  ::avro::decode(d, v.name);
220  break;
221 
222  case 1:
223  ::avro::decode(d, v.permission);
224  break;
225 
226  case 2:
227  ::avro::decode(d, v.info);
228  break;
229 
230  default:
231  break;
232  }
233  }
234  }
235  else
236  {
237  ::avro::decode(d, v.name);
238  ::avro::decode(d, v.permission);
239  ::avro::decode(d, v.info);
240  }
241  }
242  };
243 } // end namespace avro
244 
245 #endif // __GRANT_PERMISSION_SYSTEM_H__
std::map< std::string, std::string > info
Additional information.
std::string name
Name of the user or role to which the permission will be granted.
GrantPermissionSystemRequest(const std::string &name_, const std::string &permission_, const std::map< std::string, std::string > &options_)
Constructs a GrantPermissionSystemRequest object with the specified parameters.
A set of parameters for GPUdb::grantPermissionSystem.
std::map< std::string, std::string > options
Optional parameters.
GrantPermissionSystemRequest()
Constructs a GrantPermissionSystemRequest object with default parameters.
std::string permission
Value of permission.
std::string permission
Permission to grant to the user or role.
A set of results returned by GPUdb::grantPermissionSystem.
GrantPermissionSystemResponse()
Constructs a GrantPermissionSystemResponse object with default parameters.