//
// Copyright 2020-2022 Sean C Foley
//
// 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.
//

// Code generated by running convert.go from the go workspace directory (the one containing the src folder). Do not edit.

package ipaddr

var keyStrMap = map[string]int{
	`ipaddress.error.invalid.character.combination.at.index`:   13,
	`ipaddress.error.address.lower.exceeds.upper`:              24,
	`ipaddress.error.segment.too.long`:                         57,
	`ipaddress.error.nullNetwork`:                              82,
	`ipaddress.error.segment.too.short.at.index`:               89,
	`ipaddress.error.ipVersionIndeterminate`:                   110,
	`ipaddress.host.error.segment.too.short`:                   137,
	`ipaddress.error.ipv4.invalid.segment.count`:               21,
	`ipaddress.error.separatePrefixFromAddress`:                29,
	`ipaddress.error.ipv4.segment.hex`:                         56,
	`ipaddress.error.null.segment`:                             68,
	`ipaddress.error.special.ip`:                               81,
	`ipaddress.error.ipVersionMismatch`:                        120,
	`ipaddress.error.ipv6.prefix.leading.zeros`:                133,
	`ipaddress.error.mismatched.bit.size`:                      25,
	`ipaddress.error.invalid.mask.address.empty`:               40,
	`ipaddress.mac.error.mix.format.characters.at.index`:       51,
	`ipaddress.host.error.invalid.service.hyphen.consecutive`:  72,
	`ipaddress.error.no.mixed`:                                 4,
	`ipaddress.host.error.invalid.port.service`:                22,
	`ipaddress.error.segment.leading.zeros`:                    26,
	`ipaddress.error.zone`:                                     28,
	`ipaddress.error.too.many.segments`:                        36,
	`ipaddress.error.too.few.segments`:                         105,
	`ipaddress.error.no.range`:                                 108,
	`ipaddress.error.only.zone`:                                116,
	`ipaddress.error.url`:                                      30,
	`ipaddress.error.version.mismatch`:                         97,
	`ipaddress.error.negative`:                                 141,
	`ipaddress.error.empty.start.of.range`:                     14,
	`ipaddress.error.segment.too.long.at.index`:                48,
	`ipaddress.error.ipv6.invalid.segment.count`:               114,
	`ipaddress.error.ipv6.segment.format`:                      18,
	`ipaddress.address.error`:                                  35,
	`ipaddress.error.unavailable.numeric`:                      63,
	`ipaddress.error.invalid.mask.extra.chars`:                 71,
	`ipaddress.error.address.too.large`:                        76,
	`ipaddress.error.only.ipv6.square.brackets`:                85,
	`ipaddress.error.ipv4.invalid.decimal.digit`:               87,
	`ipaddress.error.invalid.character.combination`:            12,
	`ipaddress.host.error.invalid.character.at.index`:          27,
	`ipaddress.error.single.segment`:                           66,
	`ipaddress.error.invalidMultipleMask`:                      109,
	`ipaddress.host.error.invalid.type`:                        125,
	`ipaddress.error.invalidRange`:                             144,
	`ipaddress.error.ipv4.invalid.octal.digit`:                 19,
	`ipaddress.host.error.invalid`:                             41,
	`ipaddress.error.empty.segment.at.index`:                   64,
	`ipaddress.error.ipv4.segment.too.large`:                   88,
	`ipaddress.error.too.few.segments.digit.count`:             39,
	`ipaddress.host.error.ipaddress`:                           80,
	`ipaddress.error.notNetworkMask`:                           130,
	`ipaddress.error.sizeMismatch`:                             49,
	`ipaddress.host.error.invalidService.no.letter`:            67,
	`ipaddress.error.zoneAndCIDRPrefix`:                        73,
	`ipaddress.host.error.invalid.length`:                      136,
	`ipaddress.host.error`:                                     31,
	`ipaddress.error.invalid.position`:                         45,
	`ipaddress.host.error.invalidPort.no.digits`:               53,
	`ipaddress.host.error.invalid.service.hyphen.start`:        101,
	`ipaddress.error.reverseRange`:                             52,
	`ipaddress.error.front.digit.count`:                        69,
	`ipaddress.error.invalidCIDRPrefixOrMask`:                  103,
	`ipaddress.error.zero.not.allowed`:                         119,
	`ipaddress.error.ipv6`:                                     126,
	`ipaddress.host.error.service`:                             132,
	`ipaddress.error.invalidMixedRange`:                        135,
	`ipaddress.error.ipv4.invalid.byte.count`:                  11,
	`ipaddress.error.invalidMACIPv6Range`:                      34,
	`ipaddress.error.separatePrefixFromMask`:                   37,
	`ipaddress.error.invalid.mask.empty`:                       94,
	`ipaddress.host.error.bracketed.conflicting.prefix.length`: 6,
	`ipaddress.error.single.wildcard.order`:                    58,
	`ipaddress.host.error.host.resolve`:                        143,
	`ipaddress.host.error.too.many.segments`:                   33,
	`ipaddress.error.inconsistent.prefixes`:                    50,
	`ipaddress.host.error.url`:                                 32,
	`ipaddress.error.no.wildcard`:                              59,
	`ipaddress.error.lower.above.range`:                        86,
	`ipaddress.error.ipv4.prefix.leading.zeros`:                104,
	`ipaddress.error.no.iterator.element.to.remove`:            118,
	`ipaddress.error.ip.format`:                                121,
	`ipaddress.error.index.exceeds.prefix.length`:              123,
	`ipaddress.error.CIDRNotAllowed`:                           134,
	`ipaddress.error.mac.invalid.segment.count`:                75,
	`ipaddress.error.splitMismatch`:                            5,
	`ipaddress.error.ipv6.cannot.start.with.single.separator`:  42,
	`ipaddress.error.address.out.of.range`:                     91,
	`ipaddress.host.error.invalidService.no.chars`:             102,
	`ipaddress.error.back.digit.count`:                         106,
	`ipaddress.error.invalid.joined.ranges`:                    127,
	`ipaddress.error.cannot.end.with.single.separator`:         128,
	`ipaddress.error.invalidCIDRPrefix`:                        129,
	`ipaddress.host.error.invalid.service.hyphen.end`:          16,
	`ipaddress.error.mac.invalid.byte.count`:                   62,
	`ipaddress.error.prefix.only`:                              111,
	`ipaddress.error.lower.below.range`:                        124,
	`ipaddress.error.prefixSize`:                               1,
	`ipaddress.error.invalid.mask.wildcard`:                    15,
	`ipaddress.host.error.cidrprefixonly`:                      46,
	`ipaddress.host.error.port`:                                99,
	`ipaddress.host.error.bracketed.not.ipv6`:                  17,
	`ipaddress.error.invalid.zone.encoding`:                    55,
	`ipaddress.error.mixedNetworks`:                            115,
	`ipaddress.error.invalid.zone`:                             117,
	`ipaddress.host.error.invalid.mechanism`:                   142,
	`ipaddress.error.address.is.ipv4`:                          10,
	`ipaddress.error.all`:                                      60,
	`ipaddress.error.ipv6.has.zone`:                            113,
	`ipaddress.error.address.not.block`:                        131,
	`ipaddress.host.error.invalidPort.too.large`:               0,
	`ipaddress.host.error.bracketed.conflicting.mask`:          47,
	`ipaddress.error.wildcardOrRangeIPv6`:                      95,
	`ipaddress.error.incompatible.position`:                    112,
	`ipaddress.host.error.empty.host.resolve`:                  2,
	`ipaddress.error.ipMismatch`:                               54,
	`ipaddress.error.invalid.character`:                        77,
	`ipaddress.error.ipv4.too.many.segments`:                   90,
	`ipaddress.error.ipv4.format`:                              93,
	`ipaddress.mac.error.format`:                               7,
	`ipaddress.error.exceeds.size`:                             9,
	`ipaddress.error.ipv4`:                                     61,
	`ipaddress.error.no.single.wildcard`:                       139,
	`ipaddress.error.empty`:                                    8,
	`ipaddress.host.error.all.numeric`:                         38,
	`ipaddress.host.error.host.brackets`:                       74,
	`ipaddress.error.only.ipv6.has.zone`:                       92,
	`ipaddress.host.error.bracketed.missing.end`:               98,
	`ipaddress.host.error.empty`:                               138,
	`ipaddress.error.ipv4.invalid.binary.digit`:                3,
	`ipaddress.error.mixedVersions`:                            23,
	`ipaddress.error.ipv4.too.few.segments`:                    43,
	`ipaddress.error.invalid.size`:                             122,
	`ipaddress.host.error.invalidService.too.long`:             140,
	`ipaddress.error.ipv6.invalid.byte.count`:                  44,
	`ipaddress.error.splitSeg`:                                 83,
	`ipaddress.error.mask.single.segment`:                      84,
	`ipaddress.error.address.is.ipv6`:                          20,
	`ipaddress.error.invalid.character.at.index`:               70,
	`ipaddress.error.ipv6.separator`:                           78,
	`ipaddress.error.segmentMismatch`:                          96,
	`ipaddress.mac.error.not.eui.convertible`:                  65,
	`ipaddress.error.maskMismatch`:                             79,
	`ipaddress.error.ipv6.format`:                              100,
	`ipaddress.error.ipv6.ambiguous`:                           107,
}

var strIndices = []int{
	0, 21, 96, 125, 145, 186, 318, 384, 430, 457,
	477, 492, 527, 571, 633, 652, 668, 703, 733, 748,
	767, 782, 820, 868, 926, 975, 1002, 1032, 1058, 1079,
	1136, 1176, 1187, 1223, 1240, 1301, 1318, 1347, 1384, 1410,
	1464, 1487, 1499, 1611, 1673, 1708, 1734, 1789, 1846, 1871,
	1904, 1954, 2007, 2072, 2091, 2142, 2176, 2215, 2231, 2292,
	2340, 2376, 2412, 2446, 2489, 2519, 2560, 2635, 2677, 2724,
	2773, 2797, 2835, 2879, 2903, 2972, 3009, 3026, 3054, 3088,
	3157, 3198, 3273, 3288, 3369, 3427, 3471, 3483, 3504, 3526,
	3552, 3586, 3623, 3658, 3706, 3719, 3776, 3851, 3896, 3933,
	3972, 4044, 4083, 4104, 4299, 4339, 4367, 4415, 4451, 4497,
	4534, 4568, 4604, 4637, 4657, 4695, 4737, 4776, 4820, 4849,
	4879, 4904, 5040, 5060, 5087, 5099, 5122, 5158, 5223, 5330,
	5498, 5524, 5588, 5635, 5675, 5723, 5785, 5804, 5823, 5875,
	5940, 5961, 5983, 6014, 6037,
}

var strVals = `port number too large` +
	`the network prefix bit-length is negative or exceeds the address bit-length` +
	`empty host cannot be resolved` +
	`invalid binary digit` +
	`validation options do no allow mixed IPv6` +
	`splitting digits in range segments results in an invalid string (eg 12-22 becomes 1-2.2-2 which is 12 and 22 and nothing in between)` +
	`conflicting prefix lengths inside and outside of bracketed address` +
	`validation options do no allow this mac format` +
	`you must specify an address` +
	`exceeds address size` +
	`address is IPv4` +
	`IPv4 address has invalid byte count` +
	`invalid combination of characters in segment` +
	`invalid combination with earlier character at character number` +
	`range start missing` +
	`wildcard in mask` +
	`service name cannot end in a hyphen` +
	`bracketed address must be IPv6` +
	`invalid segment` +
	`invalid octal digit` +
	`address is IPv6` +
	`IPv4 address has invalid segment count` +
	`invalid port or service name character at index:` +
	`Please specify either IPv4 or IPv6 addresses, but not both` +
	`invalid address range, lower bound exceeds upper:` +
	`mismatched address bit size` +
	`segment value starts with zero` +
	`invalid character at index` +
	`IPv6 zone not allowed` +
	`specify the IP address separately from the mask or prefix` +
	`please supply an address, not a full URL` +
	`Host error:` +
	`please supply a host, not a full URL` +
	`too many segments` +
	`MAC segment ranges cannot be converted to IPv6 segment ranges` +
	`IP Address error:` +
	`address has too many segments` +
	`specify a mask or prefix but not both` +
	`host cannot be all numeric` +
	`address has too few segments or an invalid digit count` +
	`mask with empty address` +
	`invalid host` +
	`An IPv6 address cannot start with a single colon, it must start with either two colons or with the first segment` +
	`options do not allow IPv4 address with less than four segments` +
	`IPv6 address has invalid byte count` +
	`Invalid index into address` +
	`please supply an address, not a CIDR prefix length only` +
	`conflicting masks inside and outside of bracketed address` +
	`segment too long at index` +
	`the number of segments must match` +
	`Segments invalid due to inconsistent prefix values` +
	`invalid mix of mac address format characters at index` +
	`reversing a range of values does not result in a sequential range` +
	`port value is empty` +
	`IP version of address must match IP version of mask` +
	`invalid encoding in zone at index:` +
	`IPv4 segment contains hexadecimal value` +
	`segment too long` +
	`single wildcards can appear only as the end of segment values` +
	`validation options do no allow wildcard segments` +
	`the universal address is not allowed` +
	`validation options do not allow IPv4` +
	`MAC address has invalid byte count` +
	`No numeric value available for this address` +
	`segment value missing at index` +
	`MAC address cannot be converted to EUI 64` +
	`validation options do not allow you to specify a non-segmented single value` +
	`service name must have at least one letter` +
	`Section or grouping array contains a null value` +
	`front address in range has an invalid digit count` +
	`invalid character number` +
	`invalid chars following mask at index:` +
	`service name cannot have consecutive hyphens` +
	`zone and prefix combined` +
	`ipv6 addresses must be surrounded by square brackets [] in host names` +
	`MAC address has invalid segment count` +
	`address too large` +
	`invalid character in segment` +
	`invalid position of IPv6 separator` +
	`applying the mask results in a segment that is not a sequential range` +
	`validation options do no allow IP address` +
	`a special IP address with first segment larger than 255 cannot be used here` +
	`network is null` +
	`cannot split ranged segment into smaller ranged segments spanning the same values` +
	`mask with single segment not allowed by validation options` +
	`only ipv6 can be enclosed in square brackets` +
	`above range:` +
	`invalid decimal digit` +
	`IPv4 segment too large` +
	`segment too short at index` +
	`IPv4 address has too many segments` +
	`Address not within the assigned range` +
	`only ipv6 can have a zone specified` +
	`invalid format of IPv4 (255.255.255.255) address` +
	`mask is empty` +
	`Wildcards and ranges are not supported for IPv6 addresses` +
	`joining segments results in a joined segment that is not a sequential range` +
	`Unable to convert version of argument address` +
	`bracketed address missing end bracket` +
	`validation options do no allow for port` +
	`invalid format of IPv6 (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff) address` +
	`service name cannot start with a hyphen` +
	`service name is empty` +
	`A mask must be a single IP address, while a CIDR prefix length must indicate the count of subnet bits, between 0 and 32 for IP version 4 addresses and between 0 and 128 for IP version 6 addresses` +
	`IPv4 CIDR prefix length starts with zero` +
	`address has too few segments` +
	`back address in range has an invalid digit count` +
	`IPv6 compressed address is ambiguous` +
	`validation options do not allow range segments` +
	`mask must specify a single IP address` +
	`requested version is indeterminate` +
	`a prefix-only address is not allowed` +
	`Incompatible positions in address` +
	`no ipv6 zone allowed` +
	`IPv6 address has invalid segment count` +
	`Address components have different networks` +
	`with a zone you must specify an address` +
	`invalid zone or scope id character at index:` +
	`no iterator element to remove` +
	`a non-zero address is required` +
	`the IP version must match` +
	`invalid format of IP address, whether IPv4 (255.255.255.255) or IPv6 (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff) or other supported format` +
	`invalid address size` +
	`index exceeds prefix length` +
	`below range:` +
	`invalid IP address type` +
	`validation options do not allow IPv6` +
	`range of joined segments cannot be divided into individual ranges` +
	`An IPv6 address cannot end with a single colon, it must end with either two colons or with the last segment` +
	`CIDR prefix must indicate the count of subnet bits, between 0 and 32 subnet bits for IP version 4 addresses and between 0 and 128 subnet bits for IP version 6 addresses` +
	`mask is not a network mask` +
	`Address is neither a CIDR prefix block nor an individual address` +
	`validation options do no allow for service name` +
	`IPv6 CIDR prefix length starts with zero` +
	`CIDR prefix or mask not allowed for this address` +
	`IPv4 segment ranges cannot be converted to IPv6 segment ranges` +
	`invalid host length` +
	`zero-length segment` +
	`validation options do no allow empty string for host` +
	`validation options do no allow single character wildcard segments` +
	`service name too long` +
	`negative address value` +
	`address mechanism not supported` +
	`host cannot be resolved` +
	`in segment range, lower value must precede upper value`

func lookupStr(key string) (result string) {
	if index, ok := keyStrMap[key]; ok {
		start, end := strIndices[index], strIndices[index+1]
		result = strVals[start:end]
	}
	return
}
