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 
256  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_):
257  backupName( backupName_ ),
258  backupType( backupType_ ),
259  backupObjectsMap( backupObjectsMap_ ),
260  datasinkName( datasinkName_ ),
261  options( options_ )
262  {
263  }
264 
271  std::string backupName;
272 
288  std::string backupType;
289 
351  std::map<std::string, std::string> backupObjectsMap;
352 
356  std::string datasinkName;
357 
427  std::map<std::string, std::string> options;
428  };
429 } // end namespace gpudb
430 
431 namespace avro
432 {
433  template<> struct codec_traits<gpudb::CreateBackupRequest>
434  {
435  static void encode(Encoder& e, const gpudb::CreateBackupRequest& v)
436  {
437  ::avro::encode(e, v.backupName);
438  ::avro::encode(e, v.backupType);
439  ::avro::encode(e, v.backupObjectsMap);
440  ::avro::encode(e, v.datasinkName);
441  ::avro::encode(e, v.options);
442  }
443 
444  static void decode(Decoder& d, gpudb::CreateBackupRequest& v)
445  {
446  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
447  {
448  const std::vector<size_t> fo = rd->fieldOrder();
449 
450  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
451  {
452  switch (*it)
453  {
454  case 0:
455  ::avro::decode(d, v.backupName);
456  break;
457 
458  case 1:
459  ::avro::decode(d, v.backupType);
460  break;
461 
462  case 2:
463  ::avro::decode(d, v.backupObjectsMap);
464  break;
465 
466  case 3:
467  ::avro::decode(d, v.datasinkName);
468  break;
469 
470  case 4:
471  ::avro::decode(d, v.options);
472  break;
473 
474  default:
475  break;
476  }
477  }
478  }
479  else
480  {
481  ::avro::decode(d, v.backupName);
482  ::avro::decode(d, v.backupType);
483  ::avro::decode(d, v.backupObjectsMap);
484  ::avro::decode(d, v.datasinkName);
485  ::avro::decode(d, v.options);
486  }
487  }
488  };
489 } // end namespace avro
490 
491 namespace gpudb
492 {
499  {
504  backupName(std::string()),
505  backupId(int64_t()),
506  copiedBytes(int64_t()),
507  copiedFiles(int64_t()),
508  copiedRecords(int64_t()),
509  totalNumberOfRecords(int64_t()),
510  info(std::map<std::string, std::string>())
511  {
512  }
513 
517  std::string backupName;
518 
522  int64_t backupId;
523 
527  int64_t copiedBytes;
528 
532  int64_t copiedFiles;
533 
537  int64_t copiedRecords;
538 
543 
547  std::map<std::string, std::string> info;
548  };
549 } // end namespace gpudb
550 
551 namespace avro
552 {
553  template<> struct codec_traits<gpudb::CreateBackupResponse>
554  {
555  static void encode(Encoder& e, const gpudb::CreateBackupResponse& v)
556  {
557  ::avro::encode(e, v.backupName);
558  ::avro::encode(e, v.backupId);
559  ::avro::encode(e, v.copiedBytes);
560  ::avro::encode(e, v.copiedFiles);
561  ::avro::encode(e, v.copiedRecords);
562  ::avro::encode(e, v.totalNumberOfRecords);
563  ::avro::encode(e, v.info);
564  }
565 
566  static void decode(Decoder& d, gpudb::CreateBackupResponse& v)
567  {
568  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
569  {
570  const std::vector<size_t> fo = rd->fieldOrder();
571 
572  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
573  {
574  switch (*it)
575  {
576  case 0:
577  ::avro::decode(d, v.backupName);
578  break;
579 
580  case 1:
581  ::avro::decode(d, v.backupId);
582  break;
583 
584  case 2:
585  ::avro::decode(d, v.copiedBytes);
586  break;
587 
588  case 3:
589  ::avro::decode(d, v.copiedFiles);
590  break;
591 
592  case 4:
593  ::avro::decode(d, v.copiedRecords);
594  break;
595 
596  case 5:
597  ::avro::decode(d, v.totalNumberOfRecords);
598  break;
599 
600  case 6:
601  ::avro::decode(d, v.info);
602  break;
603 
604  default:
605  break;
606  }
607  }
608  }
609  else
610  {
611  ::avro::decode(d, v.backupName);
612  ::avro::decode(d, v.backupId);
613  ::avro::decode(d, v.copiedBytes);
614  ::avro::decode(d, v.copiedFiles);
615  ::avro::decode(d, v.copiedRecords);
616  ::avro::decode(d, v.totalNumberOfRecords);
617  ::avro::decode(d, v.info);
618  }
619  }
620  };
621 } // end namespace avro
622 
623 #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.