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 
252  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_):
253  backupName( backupName_ ),
254  backupType( backupType_ ),
255  backupObjectsMap( backupObjectsMap_ ),
256  datasinkName( datasinkName_ ),
257  options( options_ )
258  {
259  }
260 
267  std::string backupName;
268 
283  std::string backupType;
284 
344  std::map<std::string, std::string> backupObjectsMap;
345 
349  std::string datasinkName;
350 
420  std::map<std::string, std::string> options;
421  };
422 } // end namespace gpudb
423 
424 namespace avro
425 {
426  template<> struct codec_traits<gpudb::CreateBackupRequest>
427  {
428  static void encode(Encoder& e, const gpudb::CreateBackupRequest& v)
429  {
430  ::avro::encode(e, v.backupName);
431  ::avro::encode(e, v.backupType);
432  ::avro::encode(e, v.backupObjectsMap);
433  ::avro::encode(e, v.datasinkName);
434  ::avro::encode(e, v.options);
435  }
436 
437  static void decode(Decoder& d, gpudb::CreateBackupRequest& v)
438  {
439  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
440  {
441  const std::vector<size_t> fo = rd->fieldOrder();
442 
443  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
444  {
445  switch (*it)
446  {
447  case 0:
448  ::avro::decode(d, v.backupName);
449  break;
450 
451  case 1:
452  ::avro::decode(d, v.backupType);
453  break;
454 
455  case 2:
456  ::avro::decode(d, v.backupObjectsMap);
457  break;
458 
459  case 3:
460  ::avro::decode(d, v.datasinkName);
461  break;
462 
463  case 4:
464  ::avro::decode(d, v.options);
465  break;
466 
467  default:
468  break;
469  }
470  }
471  }
472  else
473  {
474  ::avro::decode(d, v.backupName);
475  ::avro::decode(d, v.backupType);
476  ::avro::decode(d, v.backupObjectsMap);
477  ::avro::decode(d, v.datasinkName);
478  ::avro::decode(d, v.options);
479  }
480  }
481  };
482 } // end namespace avro
483 
484 namespace gpudb
485 {
492  {
497  backupName(std::string()),
498  backupId(int64_t()),
499  copiedBytes(int64_t()),
500  copiedFiles(int64_t()),
501  copiedRecords(int64_t()),
502  totalNumberOfRecords(int64_t()),
503  info(std::map<std::string, std::string>())
504  {
505  }
506 
510  std::string backupName;
511 
515  int64_t backupId;
516 
520  int64_t copiedBytes;
521 
525  int64_t copiedFiles;
526 
530  int64_t copiedRecords;
531 
536 
540  std::map<std::string, std::string> info;
541  };
542 } // end namespace gpudb
543 
544 namespace avro
545 {
546  template<> struct codec_traits<gpudb::CreateBackupResponse>
547  {
548  static void encode(Encoder& e, const gpudb::CreateBackupResponse& v)
549  {
550  ::avro::encode(e, v.backupName);
551  ::avro::encode(e, v.backupId);
552  ::avro::encode(e, v.copiedBytes);
553  ::avro::encode(e, v.copiedFiles);
554  ::avro::encode(e, v.copiedRecords);
555  ::avro::encode(e, v.totalNumberOfRecords);
556  ::avro::encode(e, v.info);
557  }
558 
559  static void decode(Decoder& d, gpudb::CreateBackupResponse& v)
560  {
561  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
562  {
563  const std::vector<size_t> fo = rd->fieldOrder();
564 
565  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
566  {
567  switch (*it)
568  {
569  case 0:
570  ::avro::decode(d, v.backupName);
571  break;
572 
573  case 1:
574  ::avro::decode(d, v.backupId);
575  break;
576 
577  case 2:
578  ::avro::decode(d, v.copiedBytes);
579  break;
580 
581  case 3:
582  ::avro::decode(d, v.copiedFiles);
583  break;
584 
585  case 4:
586  ::avro::decode(d, v.copiedRecords);
587  break;
588 
589  case 5:
590  ::avro::decode(d, v.totalNumberOfRecords);
591  break;
592 
593  case 6:
594  ::avro::decode(d, v.info);
595  break;
596 
597  default:
598  break;
599  }
600  }
601  }
602  else
603  {
604  ::avro::decode(d, v.backupName);
605  ::avro::decode(d, v.backupId);
606  ::avro::decode(d, v.copiedBytes);
607  ::avro::decode(d, v.copiedFiles);
608  ::avro::decode(d, v.copiedRecords);
609  ::avro::decode(d, v.totalNumberOfRecords);
610  ::avro::decode(d, v.info);
611  }
612  }
613  };
614 } // end namespace avro
615 
616 #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.