github.com/aldelo/common@v1.5.1/wrapper/sqs/sqsgetqueueattribute/sqsgetqueueattribute_enumer.go (about) 1 // Code Generated By gen-enumer For "Enum Type: SQSGetQueueAttribute" - DO NOT EDIT; 2 3 /* 4 * Copyright 2020-2023 Aldelo, LP 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package sqsgetqueueattribute 20 21 import ( 22 "fmt" 23 "strconv" 24 ) 25 26 // enum names constants 27 const ( 28 _SQSGetQueueAttributeName_0 = "UNKNOWN" 29 _SQSGetQueueAttributeName_1 = "All" 30 _SQSGetQueueAttributeName_2 = "ApproximateNumberOfMessages" 31 _SQSGetQueueAttributeName_3 = "ApproximateNumberOfMessagesDelayed" 32 _SQSGetQueueAttributeName_4 = "ApproximateNumberOfMessagesNotVisible" 33 _SQSGetQueueAttributeName_5 = "CreatedTimestamp" 34 _SQSGetQueueAttributeName_6 = "DelaySeconds" 35 _SQSGetQueueAttributeName_7 = "LastModifiedTimestamp" 36 _SQSGetQueueAttributeName_8 = "MaximumMessageSize" 37 _SQSGetQueueAttributeName_9 = "MessageRetentionPeriod" 38 _SQSGetQueueAttributeName_10 = "Policy" 39 _SQSGetQueueAttributeName_11 = "QueueArn" 40 _SQSGetQueueAttributeName_12 = "ReceiveMessageWaitTimeSeconds" 41 _SQSGetQueueAttributeName_13 = "RedrivePolicy" 42 _SQSGetQueueAttributeName_14 = "DeadLetterTargetArn" 43 _SQSGetQueueAttributeName_15 = "MaxReceiveCount" 44 _SQSGetQueueAttributeName_16 = "VisibilityTimeout" 45 _SQSGetQueueAttributeName_17 = "KmsMasterKeyId" 46 _SQSGetQueueAttributeName_18 = "KmsDataKeyReusePeriodSeconds" 47 _SQSGetQueueAttributeName_19 = "FifoQueue" 48 _SQSGetQueueAttributeName_20 = "ContentBasedDeduplication" 49 ) 50 51 // var declares of enum indexes 52 var ( 53 _SQSGetQueueAttributeIndex_0 = [...]uint8{0, 7} 54 _SQSGetQueueAttributeIndex_1 = [...]uint8{0, 3} 55 _SQSGetQueueAttributeIndex_2 = [...]uint8{0, 27} 56 _SQSGetQueueAttributeIndex_3 = [...]uint8{0, 34} 57 _SQSGetQueueAttributeIndex_4 = [...]uint8{0, 37} 58 _SQSGetQueueAttributeIndex_5 = [...]uint8{0, 16} 59 _SQSGetQueueAttributeIndex_6 = [...]uint8{0, 12} 60 _SQSGetQueueAttributeIndex_7 = [...]uint8{0, 21} 61 _SQSGetQueueAttributeIndex_8 = [...]uint8{0, 18} 62 _SQSGetQueueAttributeIndex_9 = [...]uint8{0, 22} 63 _SQSGetQueueAttributeIndex_10 = [...]uint8{0, 6} 64 _SQSGetQueueAttributeIndex_11 = [...]uint8{0, 8} 65 _SQSGetQueueAttributeIndex_12 = [...]uint8{0, 29} 66 _SQSGetQueueAttributeIndex_13 = [...]uint8{0, 13} 67 _SQSGetQueueAttributeIndex_14 = [...]uint8{0, 19} 68 _SQSGetQueueAttributeIndex_15 = [...]uint8{0, 15} 69 _SQSGetQueueAttributeIndex_16 = [...]uint8{0, 17} 70 _SQSGetQueueAttributeIndex_17 = [...]uint8{0, 14} 71 _SQSGetQueueAttributeIndex_18 = [...]uint8{0, 28} 72 _SQSGetQueueAttributeIndex_19 = [...]uint8{0, 9} 73 _SQSGetQueueAttributeIndex_20 = [...]uint8{0, 25} 74 ) 75 76 func (i SQSGetQueueAttribute) String() string { 77 switch { 78 case i == UNKNOWN: 79 return _SQSGetQueueAttributeName_0 80 case i == All: 81 return _SQSGetQueueAttributeName_1 82 case i == ApproximateNumberOfMessages: 83 return _SQSGetQueueAttributeName_2 84 case i == ApproximateNumberOfMessagesDelayed: 85 return _SQSGetQueueAttributeName_3 86 case i == ApproximateNumberOfMessagesNotVisible: 87 return _SQSGetQueueAttributeName_4 88 case i == CreatedTimestamp: 89 return _SQSGetQueueAttributeName_5 90 case i == DelaySeconds: 91 return _SQSGetQueueAttributeName_6 92 case i == LastModifiedTimestamp: 93 return _SQSGetQueueAttributeName_7 94 case i == MaximumMessageSize: 95 return _SQSGetQueueAttributeName_8 96 case i == MessageRetentionPeriod: 97 return _SQSGetQueueAttributeName_9 98 case i == Policy: 99 return _SQSGetQueueAttributeName_10 100 case i == QueueArn: 101 return _SQSGetQueueAttributeName_11 102 case i == ReceiveMessageWaitTimeSeconds: 103 return _SQSGetQueueAttributeName_12 104 case i == RedrivePolicy: 105 return _SQSGetQueueAttributeName_13 106 case i == DeadLetterTargetArn: 107 return _SQSGetQueueAttributeName_14 108 case i == MaxReceiveCount: 109 return _SQSGetQueueAttributeName_15 110 case i == VisibilityTimeout: 111 return _SQSGetQueueAttributeName_16 112 case i == KmsMasterKeyId: 113 return _SQSGetQueueAttributeName_17 114 case i == KmsDataKeyReusePeriodSeconds: 115 return _SQSGetQueueAttributeName_18 116 case i == FifoQueue: 117 return _SQSGetQueueAttributeName_19 118 case i == ContentBasedDeduplication: 119 return _SQSGetQueueAttributeName_20 120 default: 121 return "" 122 } 123 } 124 125 var _SQSGetQueueAttributeValues = []SQSGetQueueAttribute{ 126 0, // UNKNOWN 127 1, // All 128 2, // ApproximateNumberOfMessages 129 3, // ApproximateNumberOfMessagesDelayed 130 4, // ApproximateNumberOfMessagesNotVisible 131 5, // CreatedTimestamp 132 6, // DelaySeconds 133 7, // LastModifiedTimestamp 134 8, // MaximumMessageSize 135 9, // MessageRetentionPeriod 136 10, // Policy 137 11, // QueueArn 138 12, // ReceiveMessageWaitTimeSeconds 139 13, // RedrivePolicy 140 14, // DeadLetterTargetArn 141 15, // MaxReceiveCount 142 16, // VisibilityTimeout 143 17, // KmsMasterKeyId 144 18, // KmsDataKeyReusePeriodSeconds 145 19, // FifoQueue 146 20, // ContentBasedDeduplication 147 } 148 149 var _SQSGetQueueAttributeNameToValueMap = map[string]SQSGetQueueAttribute{ 150 _SQSGetQueueAttributeName_0[0:7]: 0, // UNKNOWN 151 _SQSGetQueueAttributeName_1[0:3]: 1, // All 152 _SQSGetQueueAttributeName_2[0:27]: 2, // ApproximateNumberOfMessages 153 _SQSGetQueueAttributeName_3[0:34]: 3, // ApproximateNumberOfMessagesDelayed 154 _SQSGetQueueAttributeName_4[0:37]: 4, // ApproximateNumberOfMessagesNotVisible 155 _SQSGetQueueAttributeName_5[0:16]: 5, // CreatedTimestamp 156 _SQSGetQueueAttributeName_6[0:12]: 6, // DelaySeconds 157 _SQSGetQueueAttributeName_7[0:21]: 7, // LastModifiedTimestamp 158 _SQSGetQueueAttributeName_8[0:18]: 8, // MaximumMessageSize 159 _SQSGetQueueAttributeName_9[0:22]: 9, // MessageRetentionPeriod 160 _SQSGetQueueAttributeName_10[0:6]: 10, // Policy 161 _SQSGetQueueAttributeName_11[0:8]: 11, // QueueArn 162 _SQSGetQueueAttributeName_12[0:29]: 12, // ReceiveMessageWaitTimeSeconds 163 _SQSGetQueueAttributeName_13[0:13]: 13, // RedrivePolicy 164 _SQSGetQueueAttributeName_14[0:19]: 14, // DeadLetterTargetArn 165 _SQSGetQueueAttributeName_15[0:15]: 15, // MaxReceiveCount 166 _SQSGetQueueAttributeName_16[0:17]: 16, // VisibilityTimeout 167 _SQSGetQueueAttributeName_17[0:14]: 17, // KmsMasterKeyId 168 _SQSGetQueueAttributeName_18[0:28]: 18, // KmsDataKeyReusePeriodSeconds 169 _SQSGetQueueAttributeName_19[0:9]: 19, // FifoQueue 170 _SQSGetQueueAttributeName_20[0:25]: 20, // ContentBasedDeduplication 171 } 172 173 var _SQSGetQueueAttributeValueToKeyMap = map[SQSGetQueueAttribute]string{ 174 0: _SQSGetQueueAttributeKey_0, // UNKNOWN 175 1: _SQSGetQueueAttributeKey_1, // All 176 2: _SQSGetQueueAttributeKey_2, // ApproximateNumberOfMessages 177 3: _SQSGetQueueAttributeKey_3, // ApproximateNumberOfMessagesDelayed 178 4: _SQSGetQueueAttributeKey_4, // ApproximateNumberOfMessagesNotVisible 179 5: _SQSGetQueueAttributeKey_5, // CreatedTimestamp 180 6: _SQSGetQueueAttributeKey_6, // DelaySeconds 181 7: _SQSGetQueueAttributeKey_7, // LastModifiedTimestamp 182 8: _SQSGetQueueAttributeKey_8, // MaximumMessageSize 183 9: _SQSGetQueueAttributeKey_9, // MessageRetentionPeriod 184 10: _SQSGetQueueAttributeKey_10, // Policy 185 11: _SQSGetQueueAttributeKey_11, // QueueArn 186 12: _SQSGetQueueAttributeKey_12, // ReceiveMessageWaitTimeSeconds 187 13: _SQSGetQueueAttributeKey_13, // RedrivePolicy 188 14: _SQSGetQueueAttributeKey_14, // DeadLetterTargetArn 189 15: _SQSGetQueueAttributeKey_15, // MaxReceiveCount 190 16: _SQSGetQueueAttributeKey_16, // VisibilityTimeout 191 17: _SQSGetQueueAttributeKey_17, // KmsMasterKeyId 192 18: _SQSGetQueueAttributeKey_18, // KmsDataKeyReusePeriodSeconds 193 19: _SQSGetQueueAttributeKey_19, // FifoQueue 194 20: _SQSGetQueueAttributeKey_20, // ContentBasedDeduplication 195 } 196 197 var _SQSGetQueueAttributeValueToCaptionMap = map[SQSGetQueueAttribute]string{ 198 0: _SQSGetQueueAttributeCaption_0, // UNKNOWN 199 1: _SQSGetQueueAttributeCaption_1, // All 200 2: _SQSGetQueueAttributeCaption_2, // ApproximateNumberOfMessages 201 3: _SQSGetQueueAttributeCaption_3, // ApproximateNumberOfMessagesDelayed 202 4: _SQSGetQueueAttributeCaption_4, // ApproximateNumberOfMessagesNotVisible 203 5: _SQSGetQueueAttributeCaption_5, // CreatedTimestamp 204 6: _SQSGetQueueAttributeCaption_6, // DelaySeconds 205 7: _SQSGetQueueAttributeCaption_7, // LastModifiedTimestamp 206 8: _SQSGetQueueAttributeCaption_8, // MaximumMessageSize 207 9: _SQSGetQueueAttributeCaption_9, // MessageRetentionPeriod 208 10: _SQSGetQueueAttributeCaption_10, // Policy 209 11: _SQSGetQueueAttributeCaption_11, // QueueArn 210 12: _SQSGetQueueAttributeCaption_12, // ReceiveMessageWaitTimeSeconds 211 13: _SQSGetQueueAttributeCaption_13, // RedrivePolicy 212 14: _SQSGetQueueAttributeCaption_14, // DeadLetterTargetArn 213 15: _SQSGetQueueAttributeCaption_15, // MaxReceiveCount 214 16: _SQSGetQueueAttributeCaption_16, // VisibilityTimeout 215 17: _SQSGetQueueAttributeCaption_17, // KmsMasterKeyId 216 18: _SQSGetQueueAttributeCaption_18, // KmsDataKeyReusePeriodSeconds 217 19: _SQSGetQueueAttributeCaption_19, // FifoQueue 218 20: _SQSGetQueueAttributeCaption_20, // ContentBasedDeduplication 219 } 220 221 var _SQSGetQueueAttributeValueToDescriptionMap = map[SQSGetQueueAttribute]string{ 222 0: _SQSGetQueueAttributeDescription_0, // UNKNOWN 223 1: _SQSGetQueueAttributeDescription_1, // All 224 2: _SQSGetQueueAttributeDescription_2, // ApproximateNumberOfMessages 225 3: _SQSGetQueueAttributeDescription_3, // ApproximateNumberOfMessagesDelayed 226 4: _SQSGetQueueAttributeDescription_4, // ApproximateNumberOfMessagesNotVisible 227 5: _SQSGetQueueAttributeDescription_5, // CreatedTimestamp 228 6: _SQSGetQueueAttributeDescription_6, // DelaySeconds 229 7: _SQSGetQueueAttributeDescription_7, // LastModifiedTimestamp 230 8: _SQSGetQueueAttributeDescription_8, // MaximumMessageSize 231 9: _SQSGetQueueAttributeDescription_9, // MessageRetentionPeriod 232 10: _SQSGetQueueAttributeDescription_10, // Policy 233 11: _SQSGetQueueAttributeDescription_11, // QueueArn 234 12: _SQSGetQueueAttributeDescription_12, // ReceiveMessageWaitTimeSeconds 235 13: _SQSGetQueueAttributeDescription_13, // RedrivePolicy 236 14: _SQSGetQueueAttributeDescription_14, // DeadLetterTargetArn 237 15: _SQSGetQueueAttributeDescription_15, // MaxReceiveCount 238 16: _SQSGetQueueAttributeDescription_16, // VisibilityTimeout 239 17: _SQSGetQueueAttributeDescription_17, // KmsMasterKeyId 240 18: _SQSGetQueueAttributeDescription_18, // KmsDataKeyReusePeriodSeconds 241 19: _SQSGetQueueAttributeDescription_19, // FifoQueue 242 20: _SQSGetQueueAttributeDescription_20, // ContentBasedDeduplication 243 } 244 245 // Valid returns 'true' if the value is listed in the SQSGetQueueAttribute enum map definition, 'false' otherwise 246 func (i SQSGetQueueAttribute) Valid() bool { 247 for _, v := range _SQSGetQueueAttributeValues { 248 if i == v { 249 return true 250 } 251 } 252 253 return false 254 } 255 256 // ParseByName retrieves a SQSGetQueueAttribute enum value from the enum string name, 257 // throws an error if the param is not part of the enum 258 func (i SQSGetQueueAttribute) ParseByName(s string) (SQSGetQueueAttribute, error) { 259 if val, ok := _SQSGetQueueAttributeNameToValueMap[s]; ok { 260 // parse ok 261 return val, nil 262 } 263 264 // error 265 return -1, fmt.Errorf("Enum Name of %s Not Expected In SQSGetQueueAttribute Values List", s) 266 } 267 268 // ParseByKey retrieves a SQSGetQueueAttribute enum value from the enum string key, 269 // throws an error if the param is not part of the enum 270 func (i SQSGetQueueAttribute) ParseByKey(s string) (SQSGetQueueAttribute, error) { 271 for k, v := range _SQSGetQueueAttributeValueToKeyMap { 272 if v == s { 273 // parse ok 274 return k, nil 275 } 276 } 277 278 // error 279 return -1, fmt.Errorf("Enum Key of %s Not Expected In SQSGetQueueAttribute Keys List", s) 280 } 281 282 // Key retrieves a SQSGetQueueAttribute enum string key 283 func (i SQSGetQueueAttribute) Key() string { 284 if val, ok := _SQSGetQueueAttributeValueToKeyMap[i]; ok { 285 // found 286 return val 287 } else { 288 // not found 289 return "" 290 } 291 } 292 293 // Caption retrieves a SQSGetQueueAttribute enum string caption 294 func (i SQSGetQueueAttribute) Caption() string { 295 if val, ok := _SQSGetQueueAttributeValueToCaptionMap[i]; ok { 296 // found 297 return val 298 } else { 299 // not found 300 return "" 301 } 302 } 303 304 // Description retrieves a SQSGetQueueAttribute enum string description 305 func (i SQSGetQueueAttribute) Description() string { 306 if val, ok := _SQSGetQueueAttributeValueToDescriptionMap[i]; ok { 307 // found 308 return val 309 } else { 310 // not found 311 return "" 312 } 313 } 314 315 // IntValue gets the intrinsic enum integer value 316 func (i SQSGetQueueAttribute) IntValue() int { 317 return int(i) 318 } 319 320 // IntString gets the intrinsic enum integer value represented in string format 321 func (i SQSGetQueueAttribute) IntString() string { 322 return strconv.Itoa(int(i)) 323 } 324 325 // ValueSlice returns all values of the enum SQSGetQueueAttribute in a slice 326 func (i SQSGetQueueAttribute) ValueSlice() []SQSGetQueueAttribute { 327 return _SQSGetQueueAttributeValues 328 } 329 330 // NameMap returns all names of the enum SQSGetQueueAttribute in a K:name,V:SQSGetQueueAttribute map 331 func (i SQSGetQueueAttribute) NameMap() map[string]SQSGetQueueAttribute { 332 return _SQSGetQueueAttributeNameToValueMap 333 } 334 335 // KeyMap returns all keys of the enum SQSGetQueueAttribute in a K:SQSGetQueueAttribute,V:key map 336 func (i SQSGetQueueAttribute) KeyMap() map[SQSGetQueueAttribute]string { 337 return _SQSGetQueueAttributeValueToKeyMap 338 } 339 340 // CaptionMap returns all captions of the enum SQSGetQueueAttribute in a K:SQSGetQueueAttribute,V:caption map 341 func (i SQSGetQueueAttribute) CaptionMap() map[SQSGetQueueAttribute]string { 342 return _SQSGetQueueAttributeValueToCaptionMap 343 } 344 345 // DescriptionMap returns all descriptions of the enum SQSGetQueueAttribute in a K:SQSGetQueueAttribute,V:description map 346 func (i SQSGetQueueAttribute) DescriptionMap() map[SQSGetQueueAttribute]string { 347 return _SQSGetQueueAttributeValueToDescriptionMap 348 }