GPUdb C++ API  Version 7.2.2.4
grant_permission_proc.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_PROC_H__
7 #define __GRANT_PERMISSION_PROC_H__
8 
9 namespace gpudb
10 {
19  {
25  name(std::string()),
26  permission(std::string()),
27  procName(std::string()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
56  GrantPermissionProcRequest(const std::string& name_, const std::string& permission_, const std::string& procName_, const std::map<std::string, std::string>& options_):
57  name( name_ ),
58  permission( permission_ ),
59  procName( procName_ ),
60  options( options_ )
61  {
62  }
63 
68  std::string name;
69 
82  std::string permission;
83 
88  std::string procName;
89 
93  std::map<std::string, std::string> options;
94  };
95 } // end namespace gpudb
96 
97 namespace avro
98 {
99  template<> struct codec_traits<gpudb::GrantPermissionProcRequest>
100  {
101  static void encode(Encoder& e, const gpudb::GrantPermissionProcRequest& v)
102  {
103  ::avro::encode(e, v.name);
104  ::avro::encode(e, v.permission);
105  ::avro::encode(e, v.procName);
106  ::avro::encode(e, v.options);
107  }
108 
109  static void decode(Decoder& d, gpudb::GrantPermissionProcRequest& v)
110  {
111  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
112  {
113  const std::vector<size_t> fo = rd->fieldOrder();
114 
115  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
116  {
117  switch (*it)
118  {
119  case 0:
120  ::avro::decode(d, v.name);
121  break;
122 
123  case 1:
124  ::avro::decode(d, v.permission);
125  break;
126 
127  case 2:
128  ::avro::decode(d, v.procName);
129  break;
130 
131  case 3:
132  ::avro::decode(d, v.options);
133  break;
134 
135  default:
136  break;
137  }
138  }
139  }
140  else
141  {
142  ::avro::decode(d, v.name);
143  ::avro::decode(d, v.permission);
144  ::avro::decode(d, v.procName);
145  ::avro::decode(d, v.options);
146  }
147  }
148  };
149 } // end namespace avro
150 
151 namespace gpudb
152 {
159  {
165  name(std::string()),
166  permission(std::string()),
167  procName(std::string()),
168  info(std::map<std::string, std::string>())
169  {
170  }
171 
175  std::string name;
176 
181  std::string permission;
182 
187  std::string procName;
188 
192  std::map<std::string, std::string> info;
193  };
194 } // end namespace gpudb
195 
196 namespace avro
197 {
198  template<> struct codec_traits<gpudb::GrantPermissionProcResponse>
199  {
200  static void encode(Encoder& e, const gpudb::GrantPermissionProcResponse& v)
201  {
202  ::avro::encode(e, v.name);
203  ::avro::encode(e, v.permission);
204  ::avro::encode(e, v.procName);
205  ::avro::encode(e, v.info);
206  }
207 
208  static void decode(Decoder& d, gpudb::GrantPermissionProcResponse& 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.procName);
228  break;
229 
230  case 3:
231  ::avro::decode(d, v.info);
232  break;
233 
234  default:
235  break;
236  }
237  }
238  }
239  else
240  {
241  ::avro::decode(d, v.name);
242  ::avro::decode(d, v.permission);
243  ::avro::decode(d, v.procName);
244  ::avro::decode(d, v.info);
245  }
246  }
247  };
248 } // end namespace avro
249 
250 #endif // __GRANT_PERMISSION_PROC_H__
A set of parameters for GPUdb::grantPermissionProc.
GrantPermissionProcRequest(const std::string &name_, const std::string &permission_, const std::string &procName_, const std::map< std::string, std::string > &options_)
Constructs a GrantPermissionProcRequest object with the specified parameters.
GrantPermissionProcResponse()
Constructs a GrantPermissionProcResponse object with default parameters.
std::string name
Name of the user or role to which the permission will be granted.
std::string procName
Name of the proc to which the permission grants access.
std::string permission
Value of permission.
std::string permission
Permission to grant to the user or role.
A set of results returned by GPUdb::grantPermissionProc.
std::map< std::string, std::string > info
Additional information.
std::map< std::string, std::string > options
Optional parameters.
GrantPermissionProcRequest()
Constructs a GrantPermissionProcRequest object with default parameters.
std::string procName
Value of procName.