aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-s3/source/model/InventoryOptionalField.cpp
blob: a9b64dd1f1447df9e24610dcd922f70075087fc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#include <aws/s3/model/InventoryOptionalField.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>

using namespace Aws::Utils;


namespace Aws
{
  namespace S3
  {
    namespace Model
    {
      namespace InventoryOptionalFieldMapper
      {

        static const int Size_HASH = HashingUtils::HashString("Size");
        static const int LastModifiedDate_HASH = HashingUtils::HashString("LastModifiedDate");
        static const int StorageClass_HASH = HashingUtils::HashString("StorageClass");
        static const int ETag_HASH = HashingUtils::HashString("ETag");
        static const int IsMultipartUploaded_HASH = HashingUtils::HashString("IsMultipartUploaded");
        static const int ReplicationStatus_HASH = HashingUtils::HashString("ReplicationStatus");
        static const int EncryptionStatus_HASH = HashingUtils::HashString("EncryptionStatus");
        static const int ObjectLockRetainUntilDate_HASH = HashingUtils::HashString("ObjectLockRetainUntilDate");
        static const int ObjectLockMode_HASH = HashingUtils::HashString("ObjectLockMode");
        static const int ObjectLockLegalHoldStatus_HASH = HashingUtils::HashString("ObjectLockLegalHoldStatus");
        static const int IntelligentTieringAccessTier_HASH = HashingUtils::HashString("IntelligentTieringAccessTier");
        static const int BucketKeyStatus_HASH = HashingUtils::HashString("BucketKeyStatus");
        static const int ChecksumAlgorithm_HASH = HashingUtils::HashString("ChecksumAlgorithm");


        InventoryOptionalField GetInventoryOptionalFieldForName(const Aws::String& name)
        {
          int hashCode = HashingUtils::HashString(name.c_str());
          if (hashCode == Size_HASH)
          {
            return InventoryOptionalField::Size;
          }
          else if (hashCode == LastModifiedDate_HASH)
          {
            return InventoryOptionalField::LastModifiedDate;
          }
          else if (hashCode == StorageClass_HASH)
          {
            return InventoryOptionalField::StorageClass;
          }
          else if (hashCode == ETag_HASH)
          {
            return InventoryOptionalField::ETag;
          }
          else if (hashCode == IsMultipartUploaded_HASH)
          {
            return InventoryOptionalField::IsMultipartUploaded;
          }
          else if (hashCode == ReplicationStatus_HASH)
          {
            return InventoryOptionalField::ReplicationStatus;
          }
          else if (hashCode == EncryptionStatus_HASH)
          {
            return InventoryOptionalField::EncryptionStatus;
          }
          else if (hashCode == ObjectLockRetainUntilDate_HASH)
          {
            return InventoryOptionalField::ObjectLockRetainUntilDate;
          }
          else if (hashCode == ObjectLockMode_HASH)
          {
            return InventoryOptionalField::ObjectLockMode;
          }
          else if (hashCode == ObjectLockLegalHoldStatus_HASH)
          {
            return InventoryOptionalField::ObjectLockLegalHoldStatus;
          }
          else if (hashCode == IntelligentTieringAccessTier_HASH)
          {
            return InventoryOptionalField::IntelligentTieringAccessTier;
          }
          else if (hashCode == BucketKeyStatus_HASH)
          {
            return InventoryOptionalField::BucketKeyStatus;
          }
          else if (hashCode == ChecksumAlgorithm_HASH)
          {
            return InventoryOptionalField::ChecksumAlgorithm;
          }
          EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
          if(overflowContainer)
          {
            overflowContainer->StoreOverflow(hashCode, name);
            return static_cast<InventoryOptionalField>(hashCode);
          }

          return InventoryOptionalField::NOT_SET;
        }

        Aws::String GetNameForInventoryOptionalField(InventoryOptionalField enumValue)
        {
          switch(enumValue)
          {
          case InventoryOptionalField::Size:
            return "Size";
          case InventoryOptionalField::LastModifiedDate:
            return "LastModifiedDate";
          case InventoryOptionalField::StorageClass:
            return "StorageClass";
          case InventoryOptionalField::ETag:
            return "ETag";
          case InventoryOptionalField::IsMultipartUploaded:
            return "IsMultipartUploaded";
          case InventoryOptionalField::ReplicationStatus:
            return "ReplicationStatus";
          case InventoryOptionalField::EncryptionStatus:
            return "EncryptionStatus";
          case InventoryOptionalField::ObjectLockRetainUntilDate:
            return "ObjectLockRetainUntilDate";
          case InventoryOptionalField::ObjectLockMode:
            return "ObjectLockMode";
          case InventoryOptionalField::ObjectLockLegalHoldStatus:
            return "ObjectLockLegalHoldStatus";
          case InventoryOptionalField::IntelligentTieringAccessTier:
            return "IntelligentTieringAccessTier";
          case InventoryOptionalField::BucketKeyStatus:
            return "BucketKeyStatus";
          case InventoryOptionalField::ChecksumAlgorithm:
            return "ChecksumAlgorithm";
          default:
            EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
            if(overflowContainer)
            {
              return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
            }

            return {};
          }
        }

      } // namespace InventoryOptionalFieldMapper
    } // namespace Model
  } // namespace S3
} // namespace Aws