github.com/aldelo/common@v1.5.1/wrapper/sqs/sqscreatequeueattribute/sqscreatequeueattribute_enumer.go (about)

     1  // Code Generated By gen-enumer For "Enum Type: SQSCreateQueueAttribute" - 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 sqscreatequeueattribute
    20  
    21  import (
    22  	"fmt"
    23  	"strconv"
    24  )
    25  
    26  // enum names constants
    27  const (
    28  	_SQSCreateQueueAttributeName_0  = "UNKNOWN"
    29  	_SQSCreateQueueAttributeName_1  = "DelaySeconds"
    30  	_SQSCreateQueueAttributeName_2  = "MaximumMessageSize"
    31  	_SQSCreateQueueAttributeName_3  = "MessageRetentionPeriod"
    32  	_SQSCreateQueueAttributeName_4  = "Policy"
    33  	_SQSCreateQueueAttributeName_5  = "ReceiveMessageWaitTimeSeconds"
    34  	_SQSCreateQueueAttributeName_6  = "RedrivePolicy"
    35  	_SQSCreateQueueAttributeName_7  = "DeadLetterTargetArn"
    36  	_SQSCreateQueueAttributeName_8  = "MaxReceiveCount"
    37  	_SQSCreateQueueAttributeName_9  = "VisibilityTimeout"
    38  	_SQSCreateQueueAttributeName_10 = "KmsMasterKeyId"
    39  	_SQSCreateQueueAttributeName_11 = "KmsDataKeyReusePeriodSeconds"
    40  	_SQSCreateQueueAttributeName_12 = "FifoQueue"
    41  	_SQSCreateQueueAttributeName_13 = "ContentBasedDeduplication"
    42  )
    43  
    44  // var declares of enum indexes
    45  var (
    46  	_SQSCreateQueueAttributeIndex_0  = [...]uint8{0, 7}
    47  	_SQSCreateQueueAttributeIndex_1  = [...]uint8{0, 12}
    48  	_SQSCreateQueueAttributeIndex_2  = [...]uint8{0, 18}
    49  	_SQSCreateQueueAttributeIndex_3  = [...]uint8{0, 22}
    50  	_SQSCreateQueueAttributeIndex_4  = [...]uint8{0, 6}
    51  	_SQSCreateQueueAttributeIndex_5  = [...]uint8{0, 29}
    52  	_SQSCreateQueueAttributeIndex_6  = [...]uint8{0, 13}
    53  	_SQSCreateQueueAttributeIndex_7  = [...]uint8{0, 19}
    54  	_SQSCreateQueueAttributeIndex_8  = [...]uint8{0, 15}
    55  	_SQSCreateQueueAttributeIndex_9  = [...]uint8{0, 17}
    56  	_SQSCreateQueueAttributeIndex_10 = [...]uint8{0, 14}
    57  	_SQSCreateQueueAttributeIndex_11 = [...]uint8{0, 28}
    58  	_SQSCreateQueueAttributeIndex_12 = [...]uint8{0, 9}
    59  	_SQSCreateQueueAttributeIndex_13 = [...]uint8{0, 25}
    60  )
    61  
    62  func (i SQSCreateQueueAttribute) String() string {
    63  	switch {
    64  	case i == UNKNOWN:
    65  		return _SQSCreateQueueAttributeName_0
    66  	case i == DelaySeconds:
    67  		return _SQSCreateQueueAttributeName_1
    68  	case i == MaximumMessageSize:
    69  		return _SQSCreateQueueAttributeName_2
    70  	case i == MessageRetentionPeriod:
    71  		return _SQSCreateQueueAttributeName_3
    72  	case i == Policy:
    73  		return _SQSCreateQueueAttributeName_4
    74  	case i == ReceiveMessageWaitTimeSeconds:
    75  		return _SQSCreateQueueAttributeName_5
    76  	case i == RedrivePolicy:
    77  		return _SQSCreateQueueAttributeName_6
    78  	case i == DeadLetterTargetArn:
    79  		return _SQSCreateQueueAttributeName_7
    80  	case i == MaxReceiveCount:
    81  		return _SQSCreateQueueAttributeName_8
    82  	case i == VisibilityTimeout:
    83  		return _SQSCreateQueueAttributeName_9
    84  	case i == KmsMasterKeyId:
    85  		return _SQSCreateQueueAttributeName_10
    86  	case i == KmsDataKeyReusePeriodSeconds:
    87  		return _SQSCreateQueueAttributeName_11
    88  	case i == FifoQueue:
    89  		return _SQSCreateQueueAttributeName_12
    90  	case i == ContentBasedDeduplication:
    91  		return _SQSCreateQueueAttributeName_13
    92  	default:
    93  		return ""
    94  	}
    95  }
    96  
    97  var _SQSCreateQueueAttributeValues = []SQSCreateQueueAttribute{
    98  	0,  // UNKNOWN
    99  	1,  // DelaySeconds
   100  	2,  // MaximumMessageSize
   101  	3,  // MessageRetentionPeriod
   102  	4,  // Policy
   103  	5,  // ReceiveMessageWaitTimeSeconds
   104  	6,  // RedrivePolicy
   105  	7,  // DeadLetterTargetArn
   106  	8,  // MaxReceiveCount
   107  	9,  // VisibilityTimeout
   108  	10, // KmsMasterKeyId
   109  	11, // KmsDataKeyReusePeriodSeconds
   110  	12, // FifoQueue
   111  	13, // ContentBasedDeduplication
   112  }
   113  
   114  var _SQSCreateQueueAttributeNameToValueMap = map[string]SQSCreateQueueAttribute{
   115  	_SQSCreateQueueAttributeName_0[0:7]:   0,  // UNKNOWN
   116  	_SQSCreateQueueAttributeName_1[0:12]:  1,  // DelaySeconds
   117  	_SQSCreateQueueAttributeName_2[0:18]:  2,  // MaximumMessageSize
   118  	_SQSCreateQueueAttributeName_3[0:22]:  3,  // MessageRetentionPeriod
   119  	_SQSCreateQueueAttributeName_4[0:6]:   4,  // Policy
   120  	_SQSCreateQueueAttributeName_5[0:29]:  5,  // ReceiveMessageWaitTimeSeconds
   121  	_SQSCreateQueueAttributeName_6[0:13]:  6,  // RedrivePolicy
   122  	_SQSCreateQueueAttributeName_7[0:19]:  7,  // DeadLetterTargetArn
   123  	_SQSCreateQueueAttributeName_8[0:15]:  8,  // MaxReceiveCount
   124  	_SQSCreateQueueAttributeName_9[0:17]:  9,  // VisibilityTimeout
   125  	_SQSCreateQueueAttributeName_10[0:14]: 10, // KmsMasterKeyId
   126  	_SQSCreateQueueAttributeName_11[0:28]: 11, // KmsDataKeyReusePeriodSeconds
   127  	_SQSCreateQueueAttributeName_12[0:9]:  12, // FifoQueue
   128  	_SQSCreateQueueAttributeName_13[0:25]: 13, // ContentBasedDeduplication
   129  }
   130  
   131  var _SQSCreateQueueAttributeValueToKeyMap = map[SQSCreateQueueAttribute]string{
   132  	0:  _SQSCreateQueueAttributeKey_0,  // UNKNOWN
   133  	1:  _SQSCreateQueueAttributeKey_1,  // DelaySeconds
   134  	2:  _SQSCreateQueueAttributeKey_2,  // MaximumMessageSize
   135  	3:  _SQSCreateQueueAttributeKey_3,  // MessageRetentionPeriod
   136  	4:  _SQSCreateQueueAttributeKey_4,  // Policy
   137  	5:  _SQSCreateQueueAttributeKey_5,  // ReceiveMessageWaitTimeSeconds
   138  	6:  _SQSCreateQueueAttributeKey_6,  // RedrivePolicy
   139  	7:  _SQSCreateQueueAttributeKey_7,  // DeadLetterTargetArn
   140  	8:  _SQSCreateQueueAttributeKey_8,  // MaxReceiveCount
   141  	9:  _SQSCreateQueueAttributeKey_9,  // VisibilityTimeout
   142  	10: _SQSCreateQueueAttributeKey_10, // KmsMasterKeyId
   143  	11: _SQSCreateQueueAttributeKey_11, // KmsDataKeyReusePeriodSeconds
   144  	12: _SQSCreateQueueAttributeKey_12, // FifoQueue
   145  	13: _SQSCreateQueueAttributeKey_13, // ContentBasedDeduplication
   146  }
   147  
   148  var _SQSCreateQueueAttributeValueToCaptionMap = map[SQSCreateQueueAttribute]string{
   149  	0:  _SQSCreateQueueAttributeCaption_0,  // UNKNOWN
   150  	1:  _SQSCreateQueueAttributeCaption_1,  // DelaySeconds
   151  	2:  _SQSCreateQueueAttributeCaption_2,  // MaximumMessageSize
   152  	3:  _SQSCreateQueueAttributeCaption_3,  // MessageRetentionPeriod
   153  	4:  _SQSCreateQueueAttributeCaption_4,  // Policy
   154  	5:  _SQSCreateQueueAttributeCaption_5,  // ReceiveMessageWaitTimeSeconds
   155  	6:  _SQSCreateQueueAttributeCaption_6,  // RedrivePolicy
   156  	7:  _SQSCreateQueueAttributeCaption_7,  // DeadLetterTargetArn
   157  	8:  _SQSCreateQueueAttributeCaption_8,  // MaxReceiveCount
   158  	9:  _SQSCreateQueueAttributeCaption_9,  // VisibilityTimeout
   159  	10: _SQSCreateQueueAttributeCaption_10, // KmsMasterKeyId
   160  	11: _SQSCreateQueueAttributeCaption_11, // KmsDataKeyReusePeriodSeconds
   161  	12: _SQSCreateQueueAttributeCaption_12, // FifoQueue
   162  	13: _SQSCreateQueueAttributeCaption_13, // ContentBasedDeduplication
   163  }
   164  
   165  var _SQSCreateQueueAttributeValueToDescriptionMap = map[SQSCreateQueueAttribute]string{
   166  	0:  _SQSCreateQueueAttributeDescription_0,  // UNKNOWN
   167  	1:  _SQSCreateQueueAttributeDescription_1,  // DelaySeconds
   168  	2:  _SQSCreateQueueAttributeDescription_2,  // MaximumMessageSize
   169  	3:  _SQSCreateQueueAttributeDescription_3,  // MessageRetentionPeriod
   170  	4:  _SQSCreateQueueAttributeDescription_4,  // Policy
   171  	5:  _SQSCreateQueueAttributeDescription_5,  // ReceiveMessageWaitTimeSeconds
   172  	6:  _SQSCreateQueueAttributeDescription_6,  // RedrivePolicy
   173  	7:  _SQSCreateQueueAttributeDescription_7,  // DeadLetterTargetArn
   174  	8:  _SQSCreateQueueAttributeDescription_8,  // MaxReceiveCount
   175  	9:  _SQSCreateQueueAttributeDescription_9,  // VisibilityTimeout
   176  	10: _SQSCreateQueueAttributeDescription_10, // KmsMasterKeyId
   177  	11: _SQSCreateQueueAttributeDescription_11, // KmsDataKeyReusePeriodSeconds
   178  	12: _SQSCreateQueueAttributeDescription_12, // FifoQueue
   179  	13: _SQSCreateQueueAttributeDescription_13, // ContentBasedDeduplication
   180  }
   181  
   182  // Valid returns 'true' if the value is listed in the SQSCreateQueueAttribute enum map definition, 'false' otherwise
   183  func (i SQSCreateQueueAttribute) Valid() bool {
   184  	for _, v := range _SQSCreateQueueAttributeValues {
   185  		if i == v {
   186  			return true
   187  		}
   188  	}
   189  
   190  	return false
   191  }
   192  
   193  // ParseByName retrieves a SQSCreateQueueAttribute enum value from the enum string name,
   194  // throws an error if the param is not part of the enum
   195  func (i SQSCreateQueueAttribute) ParseByName(s string) (SQSCreateQueueAttribute, error) {
   196  	if val, ok := _SQSCreateQueueAttributeNameToValueMap[s]; ok {
   197  		// parse ok
   198  		return val, nil
   199  	}
   200  
   201  	// error
   202  	return -1, fmt.Errorf("Enum Name of %s Not Expected In SQSCreateQueueAttribute Values List", s)
   203  }
   204  
   205  // ParseByKey retrieves a SQSCreateQueueAttribute enum value from the enum string key,
   206  // throws an error if the param is not part of the enum
   207  func (i SQSCreateQueueAttribute) ParseByKey(s string) (SQSCreateQueueAttribute, error) {
   208  	for k, v := range _SQSCreateQueueAttributeValueToKeyMap {
   209  		if v == s {
   210  			// parse ok
   211  			return k, nil
   212  		}
   213  	}
   214  
   215  	// error
   216  	return -1, fmt.Errorf("Enum Key of %s Not Expected In SQSCreateQueueAttribute Keys List", s)
   217  }
   218  
   219  // Key retrieves a SQSCreateQueueAttribute enum string key
   220  func (i SQSCreateQueueAttribute) Key() string {
   221  	if val, ok := _SQSCreateQueueAttributeValueToKeyMap[i]; ok {
   222  		// found
   223  		return val
   224  	} else {
   225  		// not found
   226  		return ""
   227  	}
   228  }
   229  
   230  // Caption retrieves a SQSCreateQueueAttribute enum string caption
   231  func (i SQSCreateQueueAttribute) Caption() string {
   232  	if val, ok := _SQSCreateQueueAttributeValueToCaptionMap[i]; ok {
   233  		// found
   234  		return val
   235  	} else {
   236  		// not found
   237  		return ""
   238  	}
   239  }
   240  
   241  // Description retrieves a SQSCreateQueueAttribute enum string description
   242  func (i SQSCreateQueueAttribute) Description() string {
   243  	if val, ok := _SQSCreateQueueAttributeValueToDescriptionMap[i]; ok {
   244  		// found
   245  		return val
   246  	} else {
   247  		// not found
   248  		return ""
   249  	}
   250  }
   251  
   252  // IntValue gets the intrinsic enum integer value
   253  func (i SQSCreateQueueAttribute) IntValue() int {
   254  	return int(i)
   255  }
   256  
   257  // IntString gets the intrinsic enum integer value represented in string format
   258  func (i SQSCreateQueueAttribute) IntString() string {
   259  	return strconv.Itoa(int(i))
   260  }
   261  
   262  // ValueSlice returns all values of the enum SQSCreateQueueAttribute in a slice
   263  func (i SQSCreateQueueAttribute) ValueSlice() []SQSCreateQueueAttribute {
   264  	return _SQSCreateQueueAttributeValues
   265  }
   266  
   267  // NameMap returns all names of the enum SQSCreateQueueAttribute in a K:name,V:SQSCreateQueueAttribute map
   268  func (i SQSCreateQueueAttribute) NameMap() map[string]SQSCreateQueueAttribute {
   269  	return _SQSCreateQueueAttributeNameToValueMap
   270  }
   271  
   272  // KeyMap returns all keys of the enum SQSCreateQueueAttribute in a K:SQSCreateQueueAttribute,V:key map
   273  func (i SQSCreateQueueAttribute) KeyMap() map[SQSCreateQueueAttribute]string {
   274  	return _SQSCreateQueueAttributeValueToKeyMap
   275  }
   276  
   277  // CaptionMap returns all captions of the enum SQSCreateQueueAttribute in a K:SQSCreateQueueAttribute,V:caption map
   278  func (i SQSCreateQueueAttribute) CaptionMap() map[SQSCreateQueueAttribute]string {
   279  	return _SQSCreateQueueAttributeValueToCaptionMap
   280  }
   281  
   282  // DescriptionMap returns all descriptions of the enum SQSCreateQueueAttribute in a K:SQSCreateQueueAttribute,V:description map
   283  func (i SQSCreateQueueAttribute) DescriptionMap() map[SQSCreateQueueAttribute]string {
   284  	return _SQSCreateQueueAttributeValueToDescriptionMap
   285  }