summaryrefslogtreecommitdiffstats
path: root/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-sqs/source/model/QueueAttributeName.cpp
blob: 2e614b26310bece8701f2cfa848f477fbf863847 (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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#include <aws/sqs/model/QueueAttributeName.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 SQS
  {
    namespace Model
    {
      namespace QueueAttributeNameMapper
      {

        static const int All_HASH = HashingUtils::HashString("All");
        static const int Policy_HASH = HashingUtils::HashString("Policy");
        static const int VisibilityTimeout_HASH = HashingUtils::HashString("VisibilityTimeout");
        static const int MaximumMessageSize_HASH = HashingUtils::HashString("MaximumMessageSize");
        static const int MessageRetentionPeriod_HASH = HashingUtils::HashString("MessageRetentionPeriod");
        static const int ApproximateNumberOfMessages_HASH = HashingUtils::HashString("ApproximateNumberOfMessages");
        static const int ApproximateNumberOfMessagesNotVisible_HASH = HashingUtils::HashString("ApproximateNumberOfMessagesNotVisible");
        static const int CreatedTimestamp_HASH = HashingUtils::HashString("CreatedTimestamp");
        static const int LastModifiedTimestamp_HASH = HashingUtils::HashString("LastModifiedTimestamp");
        static const int QueueArn_HASH = HashingUtils::HashString("QueueArn");
        static const int ApproximateNumberOfMessagesDelayed_HASH = HashingUtils::HashString("ApproximateNumberOfMessagesDelayed");
        static const int DelaySeconds_HASH = HashingUtils::HashString("DelaySeconds");
        static const int ReceiveMessageWaitTimeSeconds_HASH = HashingUtils::HashString("ReceiveMessageWaitTimeSeconds");
        static const int RedrivePolicy_HASH = HashingUtils::HashString("RedrivePolicy");
        static const int FifoQueue_HASH = HashingUtils::HashString("FifoQueue");
        static const int ContentBasedDeduplication_HASH = HashingUtils::HashString("ContentBasedDeduplication");
        static const int KmsMasterKeyId_HASH = HashingUtils::HashString("KmsMasterKeyId");
        static const int KmsDataKeyReusePeriodSeconds_HASH = HashingUtils::HashString("KmsDataKeyReusePeriodSeconds");
        static const int DeduplicationScope_HASH = HashingUtils::HashString("DeduplicationScope");
        static const int FifoThroughputLimit_HASH = HashingUtils::HashString("FifoThroughputLimit");
        static const int RedriveAllowPolicy_HASH = HashingUtils::HashString("RedriveAllowPolicy");
        static const int SqsManagedSseEnabled_HASH = HashingUtils::HashString("SqsManagedSseEnabled");
        static const int SentTimestamp_HASH = HashingUtils::HashString("SentTimestamp");
        static const int ApproximateFirstReceiveTimestamp_HASH = HashingUtils::HashString("ApproximateFirstReceiveTimestamp");
        static const int ApproximateReceiveCount_HASH = HashingUtils::HashString("ApproximateReceiveCount");
        static const int SenderId_HASH = HashingUtils::HashString("SenderId");


        QueueAttributeName GetQueueAttributeNameForName(const Aws::String& name)
        {
          int hashCode = HashingUtils::HashString(name.c_str());
          if (hashCode == All_HASH)
          {
            return QueueAttributeName::All;
          }
          else if (hashCode == Policy_HASH)
          {
            return QueueAttributeName::Policy;
          }
          else if (hashCode == VisibilityTimeout_HASH)
          {
            return QueueAttributeName::VisibilityTimeout;
          }
          else if (hashCode == MaximumMessageSize_HASH)
          {
            return QueueAttributeName::MaximumMessageSize;
          }
          else if (hashCode == MessageRetentionPeriod_HASH)
          {
            return QueueAttributeName::MessageRetentionPeriod;
          }
          else if (hashCode == ApproximateNumberOfMessages_HASH)
          {
            return QueueAttributeName::ApproximateNumberOfMessages;
          }
          else if (hashCode == ApproximateNumberOfMessagesNotVisible_HASH)
          {
            return QueueAttributeName::ApproximateNumberOfMessagesNotVisible;
          }
          else if (hashCode == CreatedTimestamp_HASH)
          {
            return QueueAttributeName::CreatedTimestamp;
          }
          else if (hashCode == LastModifiedTimestamp_HASH)
          {
            return QueueAttributeName::LastModifiedTimestamp;
          }
          else if (hashCode == QueueArn_HASH)
          {
            return QueueAttributeName::QueueArn;
          }
          else if (hashCode == ApproximateNumberOfMessagesDelayed_HASH)
          {
            return QueueAttributeName::ApproximateNumberOfMessagesDelayed;
          }
          else if (hashCode == DelaySeconds_HASH)
          {
            return QueueAttributeName::DelaySeconds;
          }
          else if (hashCode == ReceiveMessageWaitTimeSeconds_HASH)
          {
            return QueueAttributeName::ReceiveMessageWaitTimeSeconds;
          }
          else if (hashCode == RedrivePolicy_HASH)
          {
            return QueueAttributeName::RedrivePolicy;
          }
          else if (hashCode == FifoQueue_HASH)
          {
            return QueueAttributeName::FifoQueue;
          }
          else if (hashCode == ContentBasedDeduplication_HASH)
          {
            return QueueAttributeName::ContentBasedDeduplication;
          }
          else if (hashCode == KmsMasterKeyId_HASH)
          {
            return QueueAttributeName::KmsMasterKeyId;
          }
          else if (hashCode == KmsDataKeyReusePeriodSeconds_HASH)
          {
            return QueueAttributeName::KmsDataKeyReusePeriodSeconds;
          }
          else if (hashCode == DeduplicationScope_HASH)
          {
            return QueueAttributeName::DeduplicationScope;
          }
          else if (hashCode == FifoThroughputLimit_HASH)
          {
            return QueueAttributeName::FifoThroughputLimit;
          }
          else if (hashCode == RedriveAllowPolicy_HASH)
          {
            return QueueAttributeName::RedriveAllowPolicy;
          }
          else if (hashCode == SqsManagedSseEnabled_HASH)
          {
            return QueueAttributeName::SqsManagedSseEnabled;
          }
          else if (hashCode == SentTimestamp_HASH)
          {
            return QueueAttributeName::SentTimestamp;
          }
          else if (hashCode == ApproximateFirstReceiveTimestamp_HASH)
          {
            return QueueAttributeName::ApproximateFirstReceiveTimestamp;
          }
          else if (hashCode == ApproximateReceiveCount_HASH)
          {
            return QueueAttributeName::ApproximateReceiveCount;
          }
          else if (hashCode == SenderId_HASH)
          {
            return QueueAttributeName::SenderId;
          }
          EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
          if(overflowContainer)
          {
            overflowContainer->StoreOverflow(hashCode, name);
            return static_cast<QueueAttributeName>(hashCode);
          }

          return QueueAttributeName::NOT_SET;
        }

        Aws::String GetNameForQueueAttributeName(QueueAttributeName enumValue)
        {
          switch(enumValue)
          {
          case QueueAttributeName::All:
            return "All";
          case QueueAttributeName::Policy:
            return "Policy";
          case QueueAttributeName::VisibilityTimeout:
            return "VisibilityTimeout";
          case QueueAttributeName::MaximumMessageSize:
            return "MaximumMessageSize";
          case QueueAttributeName::MessageRetentionPeriod:
            return "MessageRetentionPeriod";
          case QueueAttributeName::ApproximateNumberOfMessages:
            return "ApproximateNumberOfMessages";
          case QueueAttributeName::ApproximateNumberOfMessagesNotVisible:
            return "ApproximateNumberOfMessagesNotVisible";
          case QueueAttributeName::CreatedTimestamp:
            return "CreatedTimestamp";
          case QueueAttributeName::LastModifiedTimestamp:
            return "LastModifiedTimestamp";
          case QueueAttributeName::QueueArn:
            return "QueueArn";
          case QueueAttributeName::ApproximateNumberOfMessagesDelayed:
            return "ApproximateNumberOfMessagesDelayed";
          case QueueAttributeName::DelaySeconds:
            return "DelaySeconds";
          case QueueAttributeName::ReceiveMessageWaitTimeSeconds:
            return "ReceiveMessageWaitTimeSeconds";
          case QueueAttributeName::RedrivePolicy:
            return "RedrivePolicy";
          case QueueAttributeName::FifoQueue:
            return "FifoQueue";
          case QueueAttributeName::ContentBasedDeduplication:
            return "ContentBasedDeduplication";
          case QueueAttributeName::KmsMasterKeyId:
            return "KmsMasterKeyId";
          case QueueAttributeName::KmsDataKeyReusePeriodSeconds:
            return "KmsDataKeyReusePeriodSeconds";
          case QueueAttributeName::DeduplicationScope:
            return "DeduplicationScope";
          case QueueAttributeName::FifoThroughputLimit:
            return "FifoThroughputLimit";
          case QueueAttributeName::RedriveAllowPolicy:
            return "RedriveAllowPolicy";
          case QueueAttributeName::SqsManagedSseEnabled:
            return "SqsManagedSseEnabled";
          case QueueAttributeName::SentTimestamp:
            return "SentTimestamp";
          case QueueAttributeName::ApproximateFirstReceiveTimestamp:
            return "ApproximateFirstReceiveTimestamp";
          case QueueAttributeName::ApproximateReceiveCount:
            return "ApproximateReceiveCount";
          case QueueAttributeName::SenderId:
            return "SenderId";
          default:
            EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
            if(overflowContainer)
            {
              return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
            }

            return {};
          }
        }

      } // namespace QueueAttributeNameMapper
    } // namespace Model
  } // namespace SQS
} // namespace Aws