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 {
24  {
29  backupName(std::string()),
30  backupType(std::string()),
31  backupObjectsMap(std::map<std::string, std::string>()),
32  datasinkName(std::string()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
267  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_):
268  backupName( backupName_ ),
269  backupType( backupType_ ),
270  backupObjectsMap( backupObjectsMap_ ),
271  datasinkName( datasinkName_ ),
272  options( options_ )
273  {
274  }
275 
282  std::string backupName;
283 
299  std::string backupType;
300 
366  std::map<std::string, std::string> backupObjectsMap;
367 
371  std::string datasinkName;
372 
442  std::map<std::string, std::string> options;
443  };
444 } // end namespace gpudb
445 
446 namespace avro
447 {
448  template<> struct codec_traits<gpudb::CreateBackupRequest>
449  {
450  static void encode(Encoder& e, const gpudb::CreateBackupRequest& v)
451  {
452  ::avro::encode(e, v.backupName);
453  ::avro::encode(e, v.backupType);
454  ::avro::encode(e, v.backupObjectsMap);
455  ::avro::encode(e, v.datasinkName);
456  ::avro::encode(e, v.options);
457  }
458 
459  static void decode(Decoder& d, gpudb::CreateBackupRequest& v)
460  {
461  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
462  {
463  const std::vector<size_t> fo = rd->fieldOrder();
464 
465  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
466  {
467  switch (*it)
468  {
469  case 0:
470  ::avro::decode(d, v.backupName);
471  break;
472 
473  case 1:
474  ::avro::decode(d, v.backupType);
475  break;
476 
477  case 2:
478  ::avro::decode(d, v.backupObjectsMap);
479  break;
480 
481  case 3:
482  ::avro::decode(d, v.datasinkName);
483  break;
484 
485  case 4:
486  ::avro::decode(d, v.options);
487  break;
488 
489  default:
490  break;
491  }
492  }
493  }
494  else
495  {
496  ::avro::decode(d, v.backupName);
497  ::avro::decode(d, v.backupType);
498  ::avro::decode(d, v.backupObjectsMap);
499  ::avro::decode(d, v.datasinkName);
500  ::avro::decode(d, v.options);
501  }
502  }
503  };
504 } // end namespace avro
505 
506 namespace gpudb
507 {
514  {
519  backupName(std::string()),
520  backupId(int64_t()),
521  copiedBytes(int64_t()),
522  copiedFiles(int64_t()),
523  copiedRecords(int64_t()),
524  totalNumberOfRecords(int64_t()),
525  info(std::map<std::string, std::string>())
526  {
527  }
528 
532  std::string backupName;
533 
537  int64_t backupId;
538 
542  int64_t copiedBytes;
543 
547  int64_t copiedFiles;
548 
552  int64_t copiedRecords;
553 
558 
562  std::map<std::string, std::string> info;
563  };
564 } // end namespace gpudb
565 
566 namespace avro
567 {
568  template<> struct codec_traits<gpudb::CreateBackupResponse>
569  {
570  static void encode(Encoder& e, const gpudb::CreateBackupResponse& v)
571  {
572  ::avro::encode(e, v.backupName);
573  ::avro::encode(e, v.backupId);
574  ::avro::encode(e, v.copiedBytes);
575  ::avro::encode(e, v.copiedFiles);
576  ::avro::encode(e, v.copiedRecords);
577  ::avro::encode(e, v.totalNumberOfRecords);
578  ::avro::encode(e, v.info);
579  }
580 
581  static void decode(Decoder& d, gpudb::CreateBackupResponse& v)
582  {
583  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
584  {
585  const std::vector<size_t> fo = rd->fieldOrder();
586 
587  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
588  {
589  switch (*it)
590  {
591  case 0:
592  ::avro::decode(d, v.backupName);
593  break;
594 
595  case 1:
596  ::avro::decode(d, v.backupId);
597  break;
598 
599  case 2:
600  ::avro::decode(d, v.copiedBytes);
601  break;
602 
603  case 3:
604  ::avro::decode(d, v.copiedFiles);
605  break;
606 
607  case 4:
608  ::avro::decode(d, v.copiedRecords);
609  break;
610 
611  case 5:
612  ::avro::decode(d, v.totalNumberOfRecords);
613  break;
614 
615  case 6:
616  ::avro::decode(d, v.info);
617  break;
618 
619  default:
620  break;
621  }
622  }
623  }
624  else
625  {
626  ::avro::decode(d, v.backupName);
627  ::avro::decode(d, v.backupId);
628  ::avro::decode(d, v.copiedBytes);
629  ::avro::decode(d, v.copiedFiles);
630  ::avro::decode(d, v.copiedRecords);
631  ::avro::decode(d, v.totalNumberOfRecords);
632  ::avro::decode(d, v.info);
633  }
634  }
635  };
636 } // end namespace avro
637 
638 #endif // __CREATE_BACKUP_H__
CreateBackupRequest()
Constructs a CreateBackupRequest object with default parameters.
Definition: create_backup.h:28
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
Data sink through which the backup will be stored.
std::string backupType
Type of snapshot to create.
A set of parameters for GPUdb::createBackup.
Definition: create_backup.h:23
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; must be specified when creating a full snapshot and left...
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.
int64_t copiedFiles
Total number of files copied for this snapshot.
int64_t backupId
ID of the snapshot created.
std::map< std::string, std::string > options
Optional parameters.
CreateBackupResponse()
Constructs a CreateBackupResponse object with default parameters.