/
snsgettopicattribute_enumer.go
258 lines (231 loc) · 8.85 KB
/
snsgettopicattribute_enumer.go
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
// Code Generated By gen-enumer For "Enum Type: SNSGetTopicAttribute" - DO NOT EDIT;
/*
* Copyright 2020-2023 Aldelo, LP
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package snsgettopicattribute
import (
"fmt"
"strconv"
)
// enum names constants
const (
_SNSGetTopicAttributeName_0 = "UNKNOWN"
_SNSGetTopicAttributeName_1 = "DeliveryPolicy"
_SNSGetTopicAttributeName_2 = "DisplayName"
_SNSGetTopicAttributeName_3 = "Owner"
_SNSGetTopicAttributeName_4 = "Policy"
_SNSGetTopicAttributeName_5 = "SubscriptionsConfirmed"
_SNSGetTopicAttributeName_6 = "SubscriptionsDeleted"
_SNSGetTopicAttributeName_7 = "SubscriptionsPending"
_SNSGetTopicAttributeName_8 = "TopicArn"
_SNSGetTopicAttributeName_9 = "EffectiveDeliveryPolicy"
_SNSGetTopicAttributeName_10 = "KmsMasterKeyId"
)
// var declares of enum indexes
var (
_SNSGetTopicAttributeIndex_0 = [...]uint8{0, 7}
_SNSGetTopicAttributeIndex_1 = [...]uint8{0, 14}
_SNSGetTopicAttributeIndex_2 = [...]uint8{0, 11}
_SNSGetTopicAttributeIndex_3 = [...]uint8{0, 5}
_SNSGetTopicAttributeIndex_4 = [...]uint8{0, 6}
_SNSGetTopicAttributeIndex_5 = [...]uint8{0, 22}
_SNSGetTopicAttributeIndex_6 = [...]uint8{0, 20}
_SNSGetTopicAttributeIndex_7 = [...]uint8{0, 20}
_SNSGetTopicAttributeIndex_8 = [...]uint8{0, 8}
_SNSGetTopicAttributeIndex_9 = [...]uint8{0, 23}
_SNSGetTopicAttributeIndex_10 = [...]uint8{0, 14}
)
func (i SNSGetTopicAttribute) String() string {
switch {
case i == UNKNOWN:
return _SNSGetTopicAttributeName_0
case i == DeliveryPolicy:
return _SNSGetTopicAttributeName_1
case i == DisplayName:
return _SNSGetTopicAttributeName_2
case i == Owner:
return _SNSGetTopicAttributeName_3
case i == Policy:
return _SNSGetTopicAttributeName_4
case i == SubscriptionsConfirmed:
return _SNSGetTopicAttributeName_5
case i == SubscriptionsDeleted:
return _SNSGetTopicAttributeName_6
case i == SubscriptionsPending:
return _SNSGetTopicAttributeName_7
case i == TopicArn:
return _SNSGetTopicAttributeName_8
case i == EffectiveDeliveryPolicy:
return _SNSGetTopicAttributeName_9
case i == KmsMasterKeyId:
return _SNSGetTopicAttributeName_10
default:
return ""
}
}
var _SNSGetTopicAttributeValues = []SNSGetTopicAttribute{
0, // UNKNOWN
1, // DeliveryPolicy
2, // DisplayName
3, // Owner
4, // Policy
5, // SubscriptionsConfirmed
6, // SubscriptionsDeleted
7, // SubscriptionsPending
8, // TopicArn
9, // EffectiveDeliveryPolicy
10, // KmsMasterKeyId
}
var _SNSGetTopicAttributeNameToValueMap = map[string]SNSGetTopicAttribute{
_SNSGetTopicAttributeName_0[0:7]: 0, // UNKNOWN
_SNSGetTopicAttributeName_1[0:14]: 1, // DeliveryPolicy
_SNSGetTopicAttributeName_2[0:11]: 2, // DisplayName
_SNSGetTopicAttributeName_3[0:5]: 3, // Owner
_SNSGetTopicAttributeName_4[0:6]: 4, // Policy
_SNSGetTopicAttributeName_5[0:22]: 5, // SubscriptionsConfirmed
_SNSGetTopicAttributeName_6[0:20]: 6, // SubscriptionsDeleted
_SNSGetTopicAttributeName_7[0:20]: 7, // SubscriptionsPending
_SNSGetTopicAttributeName_8[0:8]: 8, // TopicArn
_SNSGetTopicAttributeName_9[0:23]: 9, // EffectiveDeliveryPolicy
_SNSGetTopicAttributeName_10[0:14]: 10, // KmsMasterKeyId
}
var _SNSGetTopicAttributeValueToKeyMap = map[SNSGetTopicAttribute]string{
0: _SNSGetTopicAttributeKey_0, // UNKNOWN
1: _SNSGetTopicAttributeKey_1, // DeliveryPolicy
2: _SNSGetTopicAttributeKey_2, // DisplayName
3: _SNSGetTopicAttributeKey_3, // Owner
4: _SNSGetTopicAttributeKey_4, // Policy
5: _SNSGetTopicAttributeKey_5, // SubscriptionsConfirmed
6: _SNSGetTopicAttributeKey_6, // SubscriptionsDeleted
7: _SNSGetTopicAttributeKey_7, // SubscriptionsPending
8: _SNSGetTopicAttributeKey_8, // TopicArn
9: _SNSGetTopicAttributeKey_9, // EffectiveDeliveryPolicy
10: _SNSGetTopicAttributeKey_10, // KmsMasterKeyId
}
var _SNSGetTopicAttributeValueToCaptionMap = map[SNSGetTopicAttribute]string{
0: _SNSGetTopicAttributeCaption_0, // UNKNOWN
1: _SNSGetTopicAttributeCaption_1, // DeliveryPolicy
2: _SNSGetTopicAttributeCaption_2, // DisplayName
3: _SNSGetTopicAttributeCaption_3, // Owner
4: _SNSGetTopicAttributeCaption_4, // Policy
5: _SNSGetTopicAttributeCaption_5, // SubscriptionsConfirmed
6: _SNSGetTopicAttributeCaption_6, // SubscriptionsDeleted
7: _SNSGetTopicAttributeCaption_7, // SubscriptionsPending
8: _SNSGetTopicAttributeCaption_8, // TopicArn
9: _SNSGetTopicAttributeCaption_9, // EffectiveDeliveryPolicy
10: _SNSGetTopicAttributeCaption_10, // KmsMasterKeyId
}
var _SNSGetTopicAttributeValueToDescriptionMap = map[SNSGetTopicAttribute]string{
0: _SNSGetTopicAttributeDescription_0, // UNKNOWN
1: _SNSGetTopicAttributeDescription_1, // DeliveryPolicy
2: _SNSGetTopicAttributeDescription_2, // DisplayName
3: _SNSGetTopicAttributeDescription_3, // Owner
4: _SNSGetTopicAttributeDescription_4, // Policy
5: _SNSGetTopicAttributeDescription_5, // SubscriptionsConfirmed
6: _SNSGetTopicAttributeDescription_6, // SubscriptionsDeleted
7: _SNSGetTopicAttributeDescription_7, // SubscriptionsPending
8: _SNSGetTopicAttributeDescription_8, // TopicArn
9: _SNSGetTopicAttributeDescription_9, // EffectiveDeliveryPolicy
10: _SNSGetTopicAttributeDescription_10, // KmsMasterKeyId
}
// Valid returns 'true' if the value is listed in the SNSGetTopicAttribute enum map definition, 'false' otherwise
func (i SNSGetTopicAttribute) Valid() bool {
for _, v := range _SNSGetTopicAttributeValues {
if i == v {
return true
}
}
return false
}
// ParseByName retrieves a SNSGetTopicAttribute enum value from the enum string name,
// throws an error if the param is not part of the enum
func (i SNSGetTopicAttribute) ParseByName(s string) (SNSGetTopicAttribute, error) {
if val, ok := _SNSGetTopicAttributeNameToValueMap[s]; ok {
// parse ok
return val, nil
}
// error
return -1, fmt.Errorf("Enum Name of %s Not Expected In SNSGetTopicAttribute Values List", s)
}
// ParseByKey retrieves a SNSGetTopicAttribute enum value from the enum string key,
// throws an error if the param is not part of the enum
func (i SNSGetTopicAttribute) ParseByKey(s string) (SNSGetTopicAttribute, error) {
for k, v := range _SNSGetTopicAttributeValueToKeyMap {
if v == s {
// parse ok
return k, nil
}
}
// error
return -1, fmt.Errorf("Enum Key of %s Not Expected In SNSGetTopicAttribute Keys List", s)
}
// Key retrieves a SNSGetTopicAttribute enum string key
func (i SNSGetTopicAttribute) Key() string {
if val, ok := _SNSGetTopicAttributeValueToKeyMap[i]; ok {
// found
return val
} else {
// not found
return ""
}
}
// Caption retrieves a SNSGetTopicAttribute enum string caption
func (i SNSGetTopicAttribute) Caption() string {
if val, ok := _SNSGetTopicAttributeValueToCaptionMap[i]; ok {
// found
return val
} else {
// not found
return ""
}
}
// Description retrieves a SNSGetTopicAttribute enum string description
func (i SNSGetTopicAttribute) Description() string {
if val, ok := _SNSGetTopicAttributeValueToDescriptionMap[i]; ok {
// found
return val
} else {
// not found
return ""
}
}
// IntValue gets the intrinsic enum integer value
func (i SNSGetTopicAttribute) IntValue() int {
return int(i)
}
// IntString gets the intrinsic enum integer value represented in string format
func (i SNSGetTopicAttribute) IntString() string {
return strconv.Itoa(int(i))
}
// ValueSlice returns all values of the enum SNSGetTopicAttribute in a slice
func (i SNSGetTopicAttribute) ValueSlice() []SNSGetTopicAttribute {
return _SNSGetTopicAttributeValues
}
// NameMap returns all names of the enum SNSGetTopicAttribute in a K:name,V:SNSGetTopicAttribute map
func (i SNSGetTopicAttribute) NameMap() map[string]SNSGetTopicAttribute {
return _SNSGetTopicAttributeNameToValueMap
}
// KeyMap returns all keys of the enum SNSGetTopicAttribute in a K:SNSGetTopicAttribute,V:key map
func (i SNSGetTopicAttribute) KeyMap() map[SNSGetTopicAttribute]string {
return _SNSGetTopicAttributeValueToKeyMap
}
// CaptionMap returns all captions of the enum SNSGetTopicAttribute in a K:SNSGetTopicAttribute,V:caption map
func (i SNSGetTopicAttribute) CaptionMap() map[SNSGetTopicAttribute]string {
return _SNSGetTopicAttributeValueToCaptionMap
}
// DescriptionMap returns all descriptions of the enum SNSGetTopicAttribute in a K:SNSGetTopicAttribute,V:description map
func (i SNSGetTopicAttribute) DescriptionMap() map[SNSGetTopicAttribute]string {
return _SNSGetTopicAttributeValueToDescriptionMap
}