GPUdb C++ API  Version 7.2.2.4
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 
87  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_):
88  credentialName( credentialName_ ),
89  type( type_ ),
90  identity( identity_ ),
91  secret( secret_ ),
92  options( options_ )
93  {
94  }
95 
101  std::string credentialName;
102 
137  std::string type;
138 
142  std::string identity;
143 
147  std::string secret;
148 
152  std::map<std::string, std::string> options;
153  };
154 } // end namespace gpudb
155 
156 namespace avro
157 {
158  template<> struct codec_traits<gpudb::CreateCredentialRequest>
159  {
160  static void encode(Encoder& e, const gpudb::CreateCredentialRequest& v)
161  {
162  ::avro::encode(e, v.credentialName);
163  ::avro::encode(e, v.type);
164  ::avro::encode(e, v.identity);
165  ::avro::encode(e, v.secret);
166  ::avro::encode(e, v.options);
167  }
168 
169  static void decode(Decoder& d, gpudb::CreateCredentialRequest& v)
170  {
171  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
172  {
173  const std::vector<size_t> fo = rd->fieldOrder();
174 
175  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
176  {
177  switch (*it)
178  {
179  case 0:
180  ::avro::decode(d, v.credentialName);
181  break;
182 
183  case 1:
184  ::avro::decode(d, v.type);
185  break;
186 
187  case 2:
188  ::avro::decode(d, v.identity);
189  break;
190 
191  case 3:
192  ::avro::decode(d, v.secret);
193  break;
194 
195  case 4:
196  ::avro::decode(d, v.options);
197  break;
198 
199  default:
200  break;
201  }
202  }
203  }
204  else
205  {
206  ::avro::decode(d, v.credentialName);
207  ::avro::decode(d, v.type);
208  ::avro::decode(d, v.identity);
209  ::avro::decode(d, v.secret);
210  ::avro::decode(d, v.options);
211  }
212  }
213  };
214 } // end namespace avro
215 
216 namespace gpudb
217 {
224  {
230  credentialName(std::string()),
231  info(std::map<std::string, std::string>())
232  {
233  }
234 
239  std::string credentialName;
240 
244  std::map<std::string, std::string> info;
245  };
246 } // end namespace gpudb
247 
248 namespace avro
249 {
250  template<> struct codec_traits<gpudb::CreateCredentialResponse>
251  {
252  static void encode(Encoder& e, const gpudb::CreateCredentialResponse& v)
253  {
254  ::avro::encode(e, v.credentialName);
255  ::avro::encode(e, v.info);
256  }
257 
258  static void decode(Decoder& d, gpudb::CreateCredentialResponse& v)
259  {
260  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
261  {
262  const std::vector<size_t> fo = rd->fieldOrder();
263 
264  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
265  {
266  switch (*it)
267  {
268  case 0:
269  ::avro::decode(d, v.credentialName);
270  break;
271 
272  case 1:
273  ::avro::decode(d, v.info);
274  break;
275 
276  default:
277  break;
278  }
279  }
280  }
281  else
282  {
283  ::avro::decode(d, v.credentialName);
284  ::avro::decode(d, v.info);
285  }
286  }
287  };
288 } // end namespace avro
289 
290 #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.