github.com/aldelo/common@v1.5.1/wrapper/sqs/sqssetqueueattribute/sqssetqueueattribute_enumer.go (about)

     1  // Code Generated By gen-enumer For "Enum Type: SQSSetQueueAttribute" - 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 sqssetqueueattribute
    20  
    21  import (
    22  	"fmt"
    23  	"strconv"
    24  )
    25  
    26  // enum names constants
    27  const (
    28  	_SQSSetQueueAttributeName_0  = "UNKNOWN"
    29  	_SQSSetQueueAttributeName_1  = "DelaySeconds"
    30  	_SQSSetQueueAttributeName_2  = "MaximumMessageSize"
    31  	_SQSSetQueueAttributeName_3  = "MessageRetentionPeriod"
    32  	_SQSSetQueueAttributeName_4  = "Policy"
    33  	_SQSSetQueueAttributeName_5  = "ReceiveMessageWaitTimeSeconds"
    34  	_SQSSetQueueAttributeName_6  = "RedrivePolicy"
    35  	_SQSSetQueueAttributeName_7  = "DeadLetterTargetArn"
    36  	_SQSSetQueueAttributeName_8  = "MaxReceiveCount"
    37  	_SQSSetQueueAttributeName_9  = "VisibilityTimeout"
    38  	_SQSSetQueueAttributeName_10 = "KmsMasterKeyId"
    39  	_SQSSetQueueAttributeName_11 = "KmsDataKeyReusePeriodSeconds"
    40  	_SQSSetQueueAttributeName_12 = "ContentBasedDeduplication"
    41  )
    42  
    43  // var declares of enum indexes
    44  var (
    45  	_SQSSetQueueAttributeIndex_0  = [...]uint8{0, 7}
    46  	_SQSSetQueueAttributeIndex_1  = [...]uint8{0, 12}
    47  	_SQSSetQueueAttributeIndex_2  = [...]uint8{0, 18}
    48  	_SQSSetQueueAttributeIndex_3  = [...]uint8{0, 22}
    49  	_SQSSetQueueAttributeIndex_4  = [...]uint8{0, 6}
    50  	_SQSSetQueueAttributeIndex_5  = [...]uint8{0, 29}
    51  	_SQSSetQueueAttributeIndex_6  = [...]uint8{0, 13}
    52  	_SQSSetQueueAttributeIndex_7  = [...]uint8{0, 19}
    53  	_SQSSetQueueAttributeIndex_8  = [...]uint8{0, 15}
    54  	_SQSSetQueueAttributeIndex_9  = [...]uint8{0, 17}
    55  	_SQSSetQueueAttributeIndex_10 = [...]uint8{0, 14}
    56  	_SQSSetQueueAttributeIndex_11 = [...]uint8{0, 28}
    57  	_SQSSetQueueAttributeIndex_12 = [...]uint8{0, 25}
    58  )
    59  
    60  func (i SQSSetQueueAttribute) String() string {
    61  	switch {
    62  	case i == UNKNOWN:
    63  		return _SQSSetQueueAttributeName_0
    64  	case i == DelaySeconds:
    65  		return _SQSSetQueueAttributeName_1
    66  	case i == MaximumMessageSize:
    67  		return _SQSSetQueueAttributeName_2
    68  	case i == MessageRetentionPeriod:
    69  		return _SQSSetQueueAttributeName_3
    70  	case i == Policy:
    71  		return _SQSSetQueueAttributeName_4
    72  	case i == ReceiveMessageWaitTimeSeconds:
    73  		return _SQSSetQueueAttributeName_5
    74  	case i == RedrivePolicy:
    75  		return _SQSSetQueueAttributeName_6
    76  	case i == DeadLetterTargetArn:
    77  		return _SQSSetQueueAttributeName_7
    78  	case i == MaxReceiveCount:
    79  		return _SQSSetQueueAttributeName_8
    80  	case i == VisibilityTimeout:
    81  		return _SQSSetQueueAttributeName_9
    82  	case i == KmsMasterKeyId:
    83  		return _SQSSetQueueAttributeName_10
    84  	case i == KmsDataKeyReusePeriodSeconds:
    85  		return _SQSSetQueueAttributeName_11
    86  	case i == ContentBasedDeduplication:
    87  		return _SQSSetQueueAttributeName_12
    88  	default:
    89  		return ""
    90  	}
    91  }
    92  
    93  var _SQSSetQueueAttributeValues = []SQSSetQueueAttribute{
    94  	0,  // UNKNOWN
    95  	1,  // DelaySeconds
    96  	2,  // MaximumMessageSize
    97  	3,  // MessageRetentionPeriod
    98  	4,  // Policy
    99  	5,  // ReceiveMessageWaitTimeSeconds
   100  	6,  // RedrivePolicy
   101  	7,  // DeadLetterTargetArn
   102  	8,  // MaxReceiveCount
   103  	9,  // VisibilityTimeout
   104  	10, // KmsMasterKeyId
   105  	11, // KmsDataKeyReusePeriodSeconds
   106  	13, // ContentBasedDeduplication
   107  }
   108  
   109  var _SQSSetQueueAttributeNameToValueMap = map[string]SQSSetQueueAttribute{
   110  	_SQSSetQueueAttributeName_0[0:7]:   0,  // UNKNOWN
   111  	_SQSSetQueueAttributeName_1[0:12]:  1,  // DelaySeconds
   112  	_SQSSetQueueAttributeName_2[0:18]:  2,  // MaximumMessageSize
   113  	_SQSSetQueueAttributeName_3[0:22]:  3,  // MessageRetentionPeriod
   114  	_SQSSetQueueAttributeName_4[0:6]:   4,  // Policy
   115  	_SQSSetQueueAttributeName_5[0:29]:  5,  // ReceiveMessageWaitTimeSeconds
   116  	_SQSSetQueueAttributeName_6[0:13]:  6,  // RedrivePolicy
   117  	_SQSSetQueueAttributeName_7[0:19]:  7,  // DeadLetterTargetArn
   118  	_SQSSetQueueAttributeName_8[0:15]:  8,  // MaxReceiveCount
   119  	_SQSSetQueueAttributeName_9[0:17]:  9,  // VisibilityTimeout
   120  	_SQSSetQueueAttributeName_10[0:14]: 10, // KmsMasterKeyId
   121  	_SQSSetQueueAttributeName_11[0:28]: 11, // KmsDataKeyReusePeriodSeconds
   122  	_SQSSetQueueAttributeName_12[0:25]: 13, // ContentBasedDeduplication
   123  }
   124  
   125  var _SQSSetQueueAttributeValueToKeyMap = map[SQSSetQueueAttribute]string{
   126  	0:  _SQSSetQueueAttributeKey_0,  // UNKNOWN
   127  	1:  _SQSSetQueueAttributeKey_1,  // DelaySeconds
   128  	2:  _SQSSetQueueAttributeKey_2,  // MaximumMessageSize
   129  	3:  _SQSSetQueueAttributeKey_3,  // MessageRetentionPeriod
   130  	4:  _SQSSetQueueAttributeKey_4,  // Policy
   131  	5:  _SQSSetQueueAttributeKey_5,  // ReceiveMessageWaitTimeSeconds
   132  	6:  _SQSSetQueueAttributeKey_6,  // RedrivePolicy
   133  	7:  _SQSSetQueueAttributeKey_7,  // DeadLetterTargetArn
   134  	8:  _SQSSetQueueAttributeKey_8,  // MaxReceiveCount
   135  	9:  _SQSSetQueueAttributeKey_9,  // VisibilityTimeout
   136  	10: _SQSSetQueueAttributeKey_10, // KmsMasterKeyId
   137  	11: _SQSSetQueueAttributeKey_11, // KmsDataKeyReusePeriodSeconds
   138  	13: _SQSSetQueueAttributeKey_12, // ContentBasedDeduplication
   139  }
   140  
   141  var _SQSSetQueueAttributeValueToCaptionMap = map[SQSSetQueueAttribute]string{
   142  	0:  _SQSSetQueueAttributeCaption_0,  // UNKNOWN
   143  	1:  _SQSSetQueueAttributeCaption_1,  // DelaySeconds
   144  	2:  _SQSSetQueueAttributeCaption_2,  // MaximumMessageSize
   145  	3:  _SQSSetQueueAttributeCaption_3,  // MessageRetentionPeriod
   146  	4:  _SQSSetQueueAttributeCaption_4,  // Policy
   147  	5:  _SQSSetQueueAttributeCaption_5,  // ReceiveMessageWaitTimeSeconds
   148  	6:  _SQSSetQueueAttributeCaption_6,  // RedrivePolicy
   149  	7:  _SQSSetQueueAttributeCaption_7,  // DeadLetterTargetArn
   150  	8:  _SQSSetQueueAttributeCaption_8,  // MaxReceiveCount
   151  	9:  _SQSSetQueueAttributeCaption_9,  // VisibilityTimeout
   152  	10: _SQSSetQueueAttributeCaption_10, // KmsMasterKeyId
   153  	11: _SQSSetQueueAttributeCaption_11, // KmsDataKeyReusePeriodSeconds
   154  	13: _SQSSetQueueAttributeCaption_12, // ContentBasedDeduplication
   155  }
   156  
   157  var _SQSSetQueueAttributeValueToDescriptionMap = map[SQSSetQueueAttribute]string{
   158  	0:  _SQSSetQueueAttributeDescription_0,  // UNKNOWN
   159  	1:  _SQSSetQueueAttributeDescription_1,  // DelaySeconds
   160  	2:  _SQSSetQueueAttributeDescription_2,  // MaximumMessageSize
   161  	3:  _SQSSetQueueAttributeDescription_3,  // MessageRetentionPeriod
   162  	4:  _SQSSetQueueAttributeDescription_4,  // Policy
   163  	5:  _SQSSetQueueAttributeDescription_5,  // ReceiveMessageWaitTimeSeconds
   164  	6:  _SQSSetQueueAttributeDescription_6,  // RedrivePolicy
   165  	7:  _SQSSetQueueAttributeDescription_7,  // DeadLetterTargetArn
   166  	8:  _SQSSetQueueAttributeDescription_8,  // MaxReceiveCount
   167  	9:  _SQSSetQueueAttributeDescription_9,  // VisibilityTimeout
   168  	10: _SQSSetQueueAttributeDescription_10, // KmsMasterKeyId
   169  	11: _SQSSetQueueAttributeDescription_11, // KmsDataKeyReusePeriodSeconds
   170  	13: _SQSSetQueueAttributeDescription_12, // ContentBasedDeduplication
   171  }
   172  
   173  // Valid returns 'true' if the value is listed in the SQSSetQueueAttribute enum map definition, 'false' otherwise
   174  func (i SQSSetQueueAttribute) Valid() bool {
   175  	for _, v := range _SQSSetQueueAttributeValues {
   176  		if i == v {
   177  			return true
   178  		}
   179  	}
   180  
   181  	return false
   182  }
   183  
   184  // ParseByName retrieves a SQSSetQueueAttribute enum value from the enum string name,
   185  // throws an error if the param is not part of the enum
   186  func (i SQSSetQueueAttribute) ParseByName(s string) (SQSSetQueueAttribute, error) {
   187  	if val, ok := _SQSSetQueueAttributeNameToValueMap[s]; ok {
   188  		// parse ok
   189  		return val, nil
   190  	}
   191  
   192  	// error
   193  	return -1, fmt.Errorf("Enum Name of %s Not Expected In SQSSetQueueAttribute Values List", s)
   194  }
   195  
   196  // ParseByKey retrieves a SQSSetQueueAttribute enum value from the enum string key,
   197  // throws an error if the param is not part of the enum
   198  func (i SQSSetQueueAttribute) ParseByKey(s string) (SQSSetQueueAttribute, error) {
   199  	for k, v := range _SQSSetQueueAttributeValueToKeyMap {
   200  		if v == s {
   201  			// parse ok
   202  			return k, nil
   203  		}
   204  	}
   205  
   206  	// error
   207  	return -1, fmt.Errorf("Enum Key of %s Not Expected In SQSSetQueueAttribute Keys List", s)
   208  }
   209  
   210  // Key retrieves a SQSSetQueueAttribute enum string key
   211  func (i SQSSetQueueAttribute) Key() string {
   212  	if val, ok := _SQSSetQueueAttributeValueToKeyMap[i]; ok {
   213  		// found
   214  		return val
   215  	} else {
   216  		// not found
   217  		return ""
   218  	}
   219  }
   220  
   221  // Caption retrieves a SQSSetQueueAttribute enum string caption
   222  func (i SQSSetQueueAttribute) Caption() string {
   223  	if val, ok := _SQSSetQueueAttributeValueToCaptionMap[i]; ok {
   224  		// found
   225  		return val
   226  	} else {
   227  		// not found
   228  		return ""
   229  	}
   230  }
   231  
   232  // Description retrieves a SQSSetQueueAttribute enum string description
   233  func (i SQSSetQueueAttribute) Description() string {
   234  	if val, ok := _SQSSetQueueAttributeValueToDescriptionMap[i]; ok {
   235  		// found
   236  		return val
   237  	} else {
   238  		// not found
   239  		return ""
   240  	}
   241  }
   242  
   243  // IntValue gets the intrinsic enum integer value
   244  func (i SQSSetQueueAttribute) IntValue() int {
   245  	return int(i)
   246  }
   247  
   248  // IntString gets the intrinsic enum integer value represented in string format
   249  func (i SQSSetQueueAttribute) IntString() string {
   250  	return strconv.Itoa(int(i))
   251  }
   252  
   253  // ValueSlice returns all values of the enum SQSSetQueueAttribute in a slice
   254  func (i SQSSetQueueAttribute) ValueSlice() []SQSSetQueueAttribute {
   255  	return _SQSSetQueueAttributeValues
   256  }
   257  
   258  // NameMap returns all names of the enum SQSSetQueueAttribute in a K:name,V:SQSSetQueueAttribute map
   259  func (i SQSSetQueueAttribute) NameMap() map[string]SQSSetQueueAttribute {
   260  	return _SQSSetQueueAttributeNameToValueMap
   261  }
   262  
   263  // KeyMap returns all keys of the enum SQSSetQueueAttribute in a K:SQSSetQueueAttribute,V:key map
   264  func (i SQSSetQueueAttribute) KeyMap() map[SQSSetQueueAttribute]string {
   265  	return _SQSSetQueueAttributeValueToKeyMap
   266  }
   267  
   268  // CaptionMap returns all captions of the enum SQSSetQueueAttribute in a K:SQSSetQueueAttribute,V:caption map
   269  func (i SQSSetQueueAttribute) CaptionMap() map[SQSSetQueueAttribute]string {
   270  	return _SQSSetQueueAttributeValueToCaptionMap
   271  }
   272  
   273  // DescriptionMap returns all descriptions of the enum SQSSetQueueAttribute in a K:SQSSetQueueAttribute,V:description map
   274  func (i SQSSetQueueAttribute) DescriptionMap() map[SQSSetQueueAttribute]string {
   275  	return _SQSSetQueueAttributeValueToDescriptionMap
   276  }