16 #ifndef _MINIO_S3_TYPES_H
17 #define _MINIO_S3_TYPES_H
25 enum class RetentionMode { kGovernance, kCompliance };
28 RetentionMode StringToRetentionMode(std::string_view str)
throw();
30 constexpr
bool IsRetentionModeValid(RetentionMode& retention) {
32 case RetentionMode::kGovernance:
33 case RetentionMode::kCompliance:
40 constexpr
const char* RetentionModeToString(RetentionMode& retention)
throw() {
42 case RetentionMode::kGovernance:
44 case RetentionMode::kCompliance:
47 std::cerr <<
"ABORT: Unknown retention mode. This should not happen."
55 enum class LegalHold { kOn, kOff };
58 LegalHold StringToLegalHold(std::string_view str)
throw();
60 constexpr
bool IsLegalHoldValid(LegalHold& legal_hold) {
70 constexpr
const char* LegalHoldToString(LegalHold& legal_hold)
throw() {
77 std::cerr <<
"ABORT: Unknown legal hold. This should not happen."
85 enum class Directive { kCopy, kReplace };
88 Directive StringToDirective(std::string_view str)
throw();
91 constexpr
const char* DirectiveToString(Directive& directive)
throw() {
93 case Directive::kCopy:
95 case Directive::kReplace:
98 std::cerr <<
"ABORT: Unknown directive. This should not happen."