GPUdb C++ API  Version 7.2.2.4
revoke_permission_datasource.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 __REVOKE_PERMISSION_DATASOURCE_H__
7 #define __REVOKE_PERMISSION_DATASOURCE_H__
8 
9 namespace gpudb
10 {
20  {
26  name(std::string()),
27  permission(std::string()),
28  datasourceName(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
61  RevokePermissionDatasourceRequest(const std::string& name_, const std::string& permission_, const std::string& datasourceName_, const std::map<std::string, std::string>& options_):
62  name( name_ ),
63  permission( permission_ ),
64  datasourceName( datasourceName_ ),
65  options( options_ )
66  {
67  }
68 
73  std::string name;
74 
87  std::string permission;
88 
94  std::string datasourceName;
95 
99  std::map<std::string, std::string> options;
100  };
101 } // end namespace gpudb
102 
103 namespace avro
104 {
105  template<> struct codec_traits<gpudb::RevokePermissionDatasourceRequest>
106  {
107  static void encode(Encoder& e, const gpudb::RevokePermissionDatasourceRequest& v)
108  {
109  ::avro::encode(e, v.name);
110  ::avro::encode(e, v.permission);
111  ::avro::encode(e, v.datasourceName);
112  ::avro::encode(e, v.options);
113  }
114 
115  static void decode(Decoder& d, gpudb::RevokePermissionDatasourceRequest& v)
116  {
117  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
118  {
119  const std::vector<size_t> fo = rd->fieldOrder();
120 
121  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
122  {
123  switch (*it)
124  {
125  case 0:
126  ::avro::decode(d, v.name);
127  break;
128 
129  case 1:
130  ::avro::decode(d, v.permission);
131  break;
132 
133  case 2:
134  ::avro::decode(d, v.datasourceName);
135  break;
136 
137  case 3:
138  ::avro::decode(d, v.options);
139  break;
140 
141  default:
142  break;
143  }
144  }
145  }
146  else
147  {
148  ::avro::decode(d, v.name);
149  ::avro::decode(d, v.permission);
150  ::avro::decode(d, v.datasourceName);
151  ::avro::decode(d, v.options);
152  }
153  }
154  };
155 } // end namespace avro
156 
157 namespace gpudb
158 {
165  {
171  name(std::string()),
172  permission(std::string()),
173  datasourceName(std::string()),
174  info(std::map<std::string, std::string>())
175  {
176  }
177 
181  std::string name;
182 
187  std::string permission;
188 
194  std::string datasourceName;
195 
199  std::map<std::string, std::string> info;
200  };
201 } // end namespace gpudb
202 
203 namespace avro
204 {
205  template<> struct codec_traits<gpudb::RevokePermissionDatasourceResponse>
206  {
207  static void encode(Encoder& e, const gpudb::RevokePermissionDatasourceResponse& v)
208  {
209  ::avro::encode(e, v.name);
210  ::avro::encode(e, v.permission);
211  ::avro::encode(e, v.datasourceName);
212  ::avro::encode(e, v.info);
213  }
214 
215  static void decode(Decoder& d, gpudb::RevokePermissionDatasourceResponse& v)
216  {
217  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
218  {
219  const std::vector<size_t> fo = rd->fieldOrder();
220 
221  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
222  {
223  switch (*it)
224  {
225  case 0:
226  ::avro::decode(d, v.name);
227  break;
228 
229  case 1:
230  ::avro::decode(d, v.permission);
231  break;
232 
233  case 2:
234  ::avro::decode(d, v.datasourceName);
235  break;
236 
237  case 3:
238  ::avro::decode(d, v.info);
239  break;
240 
241  default:
242  break;
243  }
244  }
245  }
246  else
247  {
248  ::avro::decode(d, v.name);
249  ::avro::decode(d, v.permission);
250  ::avro::decode(d, v.datasourceName);
251  ::avro::decode(d, v.info);
252  }
253  }
254  };
255 } // end namespace avro
256 
257 #endif // __REVOKE_PERMISSION_DATASOURCE_H__
RevokePermissionDatasourceResponse()
Constructs a RevokePermissionDatasourceResponse object with default parameters.
std::string name
Name of the user or role from which the permission will be revoked.
RevokePermissionDatasourceRequest()
Constructs a RevokePermissionDatasourceRequest object with default parameters.
std::string permission
Permission to revoke from the user or role.
std::map< std::string, std::string > options
Optional parameters.
A set of parameters for GPUdb::revokePermissionDatasource.
std::map< std::string, std::string > info
Additional information.
std::string datasourceName
Value of datasourceName.
RevokePermissionDatasourceRequest(const std::string &name_, const std::string &permission_, const std::string &datasourceName_, const std::map< std::string, std::string > &options_)
Constructs a RevokePermissionDatasourceRequest object with the specified parameters.
A set of results returned by GPUdb::revokePermissionDatasource.
std::string datasourceName
Name of the data source on which the permission will be revoked.