GPUdb C++ API  Version 7.2.3.0
create_backup.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_BACKUP_H__
7 #define __CREATE_BACKUP_H__
8 
9 namespace gpudb
10 {
20  {
25  backupName(std::string()),
26  backupType(std::string()),
27  backupObjectsMap(std::map<std::string, std::string>()),
28  datasinkName(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
209  CreateBackupRequest(const std::string& backupName_, const std::string& backupType_, const std::map<std::string, std::string>& backupObjectsMap_, const std::string& datasinkName_, const std::map<std::string, std::string>& options_):
210  backupName( backupName_ ),
211  backupType( backupType_ ),
212  backupObjectsMap( backupObjectsMap_ ),
213  datasinkName( datasinkName_ ),
214  options( options_ )
215  {
216  }
217 
223  std::string backupName;
224 
236  std::string backupType;
237 
280  std::map<std::string, std::string> backupObjectsMap;
281 
285  std::string datasinkName;
286 
354  std::map<std::string, std::string> options;
355  };
356 } // end namespace gpudb
357 
358 namespace avro
359 {
360  template<> struct codec_traits<gpudb::CreateBackupRequest>
361  {
362  static void encode(Encoder& e, const gpudb::CreateBackupRequest& v)
363  {
364  ::avro::encode(e, v.backupName);
365  ::avro::encode(e, v.backupType);
366  ::avro::encode(e, v.backupObjectsMap);
367  ::avro::encode(e, v.datasinkName);
368  ::avro::encode(e, v.options);
369  }
370 
371  static void decode(Decoder& d, gpudb::CreateBackupRequest& v)
372  {
373  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
374  {
375  const std::vector<size_t> fo = rd->fieldOrder();
376 
377  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
378  {
379  switch (*it)
380  {
381  case 0:
382  ::avro::decode(d, v.backupName);
383  break;
384 
385  case 1:
386  ::avro::decode(d, v.backupType);
387  break;
388 
389  case 2:
390  ::avro::decode(d, v.backupObjectsMap);
391  break;
392 
393  case 3:
394  ::avro::decode(d, v.datasinkName);
395  break;
396 
397  case 4:
398  ::avro::decode(d, v.options);
399  break;
400 
401  default:
402  break;
403  }
404  }
405  }
406  else
407  {
408  ::avro::decode(d, v.backupName);
409  ::avro::decode(d, v.backupType);
410  ::avro::decode(d, v.backupObjectsMap);
411  ::avro::decode(d, v.datasinkName);
412  ::avro::decode(d, v.options);
413  }
414  }
415  };
416 } // end namespace avro
417 
418 namespace gpudb
419 {
426  {
431  backupName(std::string()),
432  backupId(int64_t()),
433  copiedBytes(int64_t()),
434  copiedFiles(int64_t()),
435  copiedRecords(int64_t()),
436  totalNumberOfRecords(int64_t()),
437  info(std::map<std::string, std::string>())
438  {
439  }
440 
444  std::string backupName;
445 
449  int64_t backupId;
450 
454  int64_t copiedBytes;
455 
459  int64_t copiedFiles;
460 
464  int64_t copiedRecords;
465 
470 
474  std::map<std::string, std::string> info;
475  };
476 } // end namespace gpudb
477 
478 namespace avro
479 {
480  template<> struct codec_traits<gpudb::CreateBackupResponse>
481  {
482  static void encode(Encoder& e, const gpudb::CreateBackupResponse& v)
483  {
484  ::avro::encode(e, v.backupName);
485  ::avro::encode(e, v.backupId);
486  ::avro::encode(e, v.copiedBytes);
487  ::avro::encode(e, v.copiedFiles);
488  ::avro::encode(e, v.copiedRecords);
489  ::avro::encode(e, v.totalNumberOfRecords);
490  ::avro::encode(e, v.info);
491  }
492 
493  static void decode(Decoder& d, gpudb::CreateBackupResponse& v)
494  {
495  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
496  {
497  const std::vector<size_t> fo = rd->fieldOrder();
498 
499  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
500  {
501  switch (*it)
502  {
503  case 0:
504  ::avro::decode(d, v.backupName);
505  break;
506 
507  case 1:
508  ::avro::decode(d, v.backupId);
509  break;
510 
511  case 2:
512  ::avro::decode(d, v.copiedBytes);
513  break;
514 
515  case 3:
516  ::avro::decode(d, v.copiedFiles);
517  break;
518 
519  case 4:
520  ::avro::decode(d, v.copiedRecords);
521  break;
522 
523  case 5:
524  ::avro::decode(d, v.totalNumberOfRecords);
525  break;
526 
527  case 6:
528  ::avro::decode(d, v.info);
529  break;
530 
531  default:
532  break;
533  }
534  }
535  }
536  else
537  {
538  ::avro::decode(d, v.backupName);
539  ::avro::decode(d, v.backupId);
540  ::avro::decode(d, v.copiedBytes);
541  ::avro::decode(d, v.copiedFiles);
542  ::avro::decode(d, v.copiedRecords);
543  ::avro::decode(d, v.totalNumberOfRecords);
544  ::avro::decode(d, v.info);
545  }
546  }
547  };
548 } // end namespace avro
549 
550 #endif // __CREATE_BACKUP_H__
CreateBackupRequest()
Constructs a CreateBackupRequest object with default parameters.
Definition: create_backup.h:24
CreateBackupRequest(const std::string &backupName_, const std::string &backupType_, const std::map< std::string, std::string > &backupObjectsMap_, const std::string &datasinkName_, const std::map< std::string, std::string > &options_)
Constructs a CreateBackupRequest object with the specified parameters.
std::string datasinkName
Datasink where backup will be stored.
std::string backupType
Type of backup to create.
A set of parameters for GPUdb::createBackup.
Definition: create_backup.h:19
int64_t totalNumberOfRecords
Total number of records that can be restored from this snapshot.
std::map< std::string, std::string > backupObjectsMap
Map of objects to be captured in the backup.
int64_t copiedRecords
Total number of records in all files copied for this snapshot.
std::string backupName
Value of backupName.
std::map< std::string, std::string > info
Additional information.
int64_t copiedBytes
Total size of all files copied for this snapshot.
A set of results returned by GPUdb::createBackup.
std::string backupName
Name for this backup object.
int64_t copiedFiles
Total number of files copied for this snapshot.
int64_t backupId
Backup ID.
std::map< std::string, std::string > options
Optional parameters.
CreateBackupResponse()
Constructs a CreateBackupResponse object with default parameters.