GPUdb C++ API  Version 7.2.3.0
create_credential.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 __CREATE_CREDENTIAL_H__
7 #define __CREATE_CREDENTIAL_H__
8 
9 namespace gpudb
10 {
20  {
25  credentialName(std::string()),
26  type(std::string()),
27  identity(std::string()),
28  secret(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
89  CreateCredentialRequest(const std::string& credentialName_, const std::string& type_, const std::string& identity_, const std::string& secret_, const std::map<std::string, std::string>& options_):
90  credentialName( credentialName_ ),
91  type( type_ ),
92  identity( identity_ ),
93  secret( secret_ ),
94  options( options_ )
95  {
96  }
97 
103  std::string credentialName;
104 
140  std::string type;
141 
145  std::string identity;
146 
150  std::string secret;
151 
155  std::map<std::string, std::string> options;
156  };
157 } // end namespace gpudb
158 
159 namespace avro
160 {
161  template<> struct codec_traits<gpudb::CreateCredentialRequest>
162  {
163  static void encode(Encoder& e, const gpudb::CreateCredentialRequest& v)
164  {
165  ::avro::encode(e, v.credentialName);
166  ::avro::encode(e, v.type);
167  ::avro::encode(e, v.identity);
168  ::avro::encode(e, v.secret);
169  ::avro::encode(e, v.options);
170  }
171 
172  static void decode(Decoder& d, gpudb::CreateCredentialRequest& v)
173  {
174  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
175  {
176  const std::vector<size_t> fo = rd->fieldOrder();
177 
178  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
179  {
180  switch (*it)
181  {
182  case 0:
183  ::avro::decode(d, v.credentialName);
184  break;
185 
186  case 1:
187  ::avro::decode(d, v.type);
188  break;
189 
190  case 2:
191  ::avro::decode(d, v.identity);
192  break;
193 
194  case 3:
195  ::avro::decode(d, v.secret);
196  break;
197 
198  case 4:
199  ::avro::decode(d, v.options);
200  break;
201 
202  default:
203  break;
204  }
205  }
206  }
207  else
208  {
209  ::avro::decode(d, v.credentialName);
210  ::avro::decode(d, v.type);
211  ::avro::decode(d, v.identity);
212  ::avro::decode(d, v.secret);
213  ::avro::decode(d, v.options);
214  }
215  }
216  };
217 } // end namespace avro
218 
219 namespace gpudb
220 {
227  {
233  credentialName(std::string()),
234  info(std::map<std::string, std::string>())
235  {
236  }
237 
242  std::string credentialName;
243 
247  std::map<std::string, std::string> info;
248  };
249 } // end namespace gpudb
250 
251 namespace avro
252 {
253  template<> struct codec_traits<gpudb::CreateCredentialResponse>
254  {
255  static void encode(Encoder& e, const gpudb::CreateCredentialResponse& v)
256  {
257  ::avro::encode(e, v.credentialName);
258  ::avro::encode(e, v.info);
259  }
260 
261  static void decode(Decoder& d, gpudb::CreateCredentialResponse& v)
262  {
263  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
264  {
265  const std::vector<size_t> fo = rd->fieldOrder();
266 
267  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
268  {
269  switch (*it)
270  {
271  case 0:
272  ::avro::decode(d, v.credentialName);
273  break;
274 
275  case 1:
276  ::avro::decode(d, v.info);
277  break;
278 
279  default:
280  break;
281  }
282  }
283  }
284  else
285  {
286  ::avro::decode(d, v.credentialName);
287  ::avro::decode(d, v.info);
288  }
289  }
290  };
291 } // end namespace avro
292 
293 #endif // __CREATE_CREDENTIAL_H__
std::string credentialName
Value of credentialName.
CreateCredentialRequest()
Constructs a CreateCredentialRequest object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
std::string type
Type of the credential to be created.
std::map< std::string, std::string > info
Additional information.
A set of parameters for GPUdb::createCredential.
std::string secret
Password of the credential to be created.
std::string credentialName
Name of the credential to be created.
CreateCredentialRequest(const std::string &credentialName_, const std::string &type_, const std::string &identity_, const std::string &secret_, const std::map< std::string, std::string > &options_)
Constructs a CreateCredentialRequest object with the specified parameters.
A set of results returned by GPUdb::createCredential.
std::string identity
User of the credential to be created.
CreateCredentialResponse()
Constructs a CreateCredentialResponse object with default parameters.