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