GPUdb C++ API  Version 7.2.2.4
show_security.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 __SHOW_SECURITY_H__
7 #define __SHOW_SECURITY_H__
8 
9 namespace gpudb
10 {
21  {
26  names(std::vector<std::string>()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
60  ShowSecurityRequest(const std::vector<std::string>& names_, const std::map<std::string, std::string>& options_):
61  names( names_ ),
62  options( options_ )
63  {
64  }
65 
71  std::vector<std::string> names;
72 
91  std::map<std::string, std::string> options;
92  };
93 } // end namespace gpudb
94 
95 namespace avro
96 {
97  template<> struct codec_traits<gpudb::ShowSecurityRequest>
98  {
99  static void encode(Encoder& e, const gpudb::ShowSecurityRequest& v)
100  {
101  ::avro::encode(e, v.names);
102  ::avro::encode(e, v.options);
103  }
104 
105  static void decode(Decoder& d, gpudb::ShowSecurityRequest& v)
106  {
107  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
108  {
109  const std::vector<size_t> fo = rd->fieldOrder();
110 
111  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
112  {
113  switch (*it)
114  {
115  case 0:
116  ::avro::decode(d, v.names);
117  break;
118 
119  case 1:
120  ::avro::decode(d, v.options);
121  break;
122 
123  default:
124  break;
125  }
126  }
127  }
128  else
129  {
130  ::avro::decode(d, v.names);
131  ::avro::decode(d, v.options);
132  }
133  }
134  };
135 } // end namespace avro
136 
137 namespace gpudb
138 {
145  {
150  types(std::map<std::string, std::string>()),
151  roles(std::map<std::string, std::vector<std::string> >()),
152  permissions(std::map<std::string, std::vector<std::map<std::string, std::string> > >()),
153  resourceGroups(std::map<std::string, std::string>()),
154  info(std::map<std::string, std::string>())
155  {
156  }
157 
171  std::map<std::string, std::string> types;
172 
177  std::map<std::string, std::vector<std::string> > roles;
178 
183  std::map<std::string, std::vector<std::map<std::string, std::string> > > permissions;
184 
188  std::map<std::string, std::string> resourceGroups;
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::ShowSecurityResponse>
200  {
201  static void encode(Encoder& e, const gpudb::ShowSecurityResponse& v)
202  {
203  ::avro::encode(e, v.types);
204  ::avro::encode(e, v.roles);
205  ::avro::encode(e, v.permissions);
206  ::avro::encode(e, v.resourceGroups);
207  ::avro::encode(e, v.info);
208  }
209 
210  static void decode(Decoder& d, gpudb::ShowSecurityResponse& v)
211  {
212  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
213  {
214  const std::vector<size_t> fo = rd->fieldOrder();
215 
216  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
217  {
218  switch (*it)
219  {
220  case 0:
221  ::avro::decode(d, v.types);
222  break;
223 
224  case 1:
225  ::avro::decode(d, v.roles);
226  break;
227 
228  case 2:
229  ::avro::decode(d, v.permissions);
230  break;
231 
232  case 3:
233  ::avro::decode(d, v.resourceGroups);
234  break;
235 
236  case 4:
237  ::avro::decode(d, v.info);
238  break;
239 
240  default:
241  break;
242  }
243  }
244  }
245  else
246  {
247  ::avro::decode(d, v.types);
248  ::avro::decode(d, v.roles);
249  ::avro::decode(d, v.permissions);
250  ::avro::decode(d, v.resourceGroups);
251  ::avro::decode(d, v.info);
252  }
253  }
254  };
255 } // end namespace avro
256 
257 #endif // __SHOW_SECURITY_H__
std::map< std::string, std::vector< std::map< std::string, std::string > > > permissions
Map of user/role name to a list of permissions directly granted to that user/role.
std::map< std::string, std::string > options
Optional parameters.
Definition: show_security.h:91
A set of results returned by GPUdb::showSecurity.
std::map< std::string, std::vector< std::string > > roles
Map of user/role name to a list of names of roles of which that user/role is a member.
std::map< std::string, std::string > resourceGroups
Map of user name to resource group name.
ShowSecurityResponse()
Constructs a ShowSecurityResponse object with default parameters.
std::map< std::string, std::string > types
Map of user/role name to the type of that user/role.
std::map< std::string, std::string > info
Additional information.
A set of parameters for GPUdb::showSecurity.
Definition: show_security.h:20
ShowSecurityRequest()
Constructs a ShowSecurityRequest object with default parameters.
Definition: show_security.h:25
ShowSecurityRequest(const std::vector< std::string > &names_, const std::map< std::string, std::string > &options_)
Constructs a ShowSecurityRequest object with the specified parameters.
Definition: show_security.h:60
std::vector< std::string > names
A list of names of users and/or roles about which security information is requested.
Definition: show_security.h:71