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