//
// Copyright (C) 2009 The Libphonenumber Authors
//
// 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.

// Definition of protocol buffer for representing international telephone numbers.
// @author Shaopeng Jia

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.25.0-devel
// 	protoc        v3.14.0
// source: phonenumber.proto

package phonenumbers

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// The source from which the country_code is derived. This is not set in the
// general parsing method, but in the method that parses and keeps raw_input.
// New fields could be added upon request.
type PhoneNumber_CountryCodeSource int32

const (
	// Default value returned if this is not set, because the phone number was
	// created using parse, not parseAndKeepRawInput. hasCountryCodeSource will
	// return false if this is the case.
	PhoneNumber_UNSPECIFIED PhoneNumber_CountryCodeSource = 0
	// The country_code is derived based on a phone number with a leading "+",
	// e.g. the French number "+33 1 42 68 53 00".
	PhoneNumber_FROM_NUMBER_WITH_PLUS_SIGN PhoneNumber_CountryCodeSource = 1
	// The country_code is derived based on a phone number with a leading IDD,
	// e.g. the French number "011 33 1 42 68 53 00", as it is dialled from US.
	PhoneNumber_FROM_NUMBER_WITH_IDD PhoneNumber_CountryCodeSource = 5
	// The country_code is derived based on a phone number without a leading
	// "+", e.g. the French number "33 1 42 68 53 00" when defaultCountry is
	// supplied as France.
	PhoneNumber_FROM_NUMBER_WITHOUT_PLUS_SIGN PhoneNumber_CountryCodeSource = 10
	// The country_code is derived NOT based on the phone number itself, but
	// from the defaultCountry parameter provided in the parsing function by the
	// clients. This happens mostly for numbers written in the national format
	// (without country code). For example, this would be set when parsing the
	// French number "01 42 68 53 00", when defaultCountry is supplied as
	// France.
	PhoneNumber_FROM_DEFAULT_COUNTRY PhoneNumber_CountryCodeSource = 20
)

// Enum value maps for PhoneNumber_CountryCodeSource.
var (
	PhoneNumber_CountryCodeSource_name = map[int32]string{
		0:  "UNSPECIFIED",
		1:  "FROM_NUMBER_WITH_PLUS_SIGN",
		5:  "FROM_NUMBER_WITH_IDD",
		10: "FROM_NUMBER_WITHOUT_PLUS_SIGN",
		20: "FROM_DEFAULT_COUNTRY",
	}
	PhoneNumber_CountryCodeSource_value = map[string]int32{
		"UNSPECIFIED":                   0,
		"FROM_NUMBER_WITH_PLUS_SIGN":    1,
		"FROM_NUMBER_WITH_IDD":          5,
		"FROM_NUMBER_WITHOUT_PLUS_SIGN": 10,
		"FROM_DEFAULT_COUNTRY":          20,
	}
)

func (x PhoneNumber_CountryCodeSource) Enum() *PhoneNumber_CountryCodeSource {
	p := new(PhoneNumber_CountryCodeSource)
	*p = x
	return p
}

func (x PhoneNumber_CountryCodeSource) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (PhoneNumber_CountryCodeSource) Descriptor() protoreflect.EnumDescriptor {
	return file_phonenumber_proto_enumTypes[0].Descriptor()
}

func (PhoneNumber_CountryCodeSource) Type() protoreflect.EnumType {
	return &file_phonenumber_proto_enumTypes[0]
}

func (x PhoneNumber_CountryCodeSource) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Do not use.
func (x *PhoneNumber_CountryCodeSource) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = PhoneNumber_CountryCodeSource(num)
	return nil
}

// Deprecated: Use PhoneNumber_CountryCodeSource.Descriptor instead.
func (PhoneNumber_CountryCodeSource) EnumDescriptor() ([]byte, []int) {
	return file_phonenumber_proto_rawDescGZIP(), []int{0, 0}
}

type PhoneNumber struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// The country calling code for this number, as defined by the International
	// Telecommunication Union (ITU). For example, this would be 1 for NANPA
	// countries, and 33 for France.
	CountryCode *int32 `protobuf:"varint,1,req,name=country_code,json=countryCode" json:"country_code,omitempty"`
	// The National (significant) Number, as defined in International
	// Telecommunication Union (ITU) Recommendation E.164, without any leading
	// zero. The leading-zero is stored separately if required, since this is an
	// uint64 and hence cannot store such information. Do not use this field
	// directly: if you want the national significant number, call the
	// getNationalSignificantNumber method of PhoneNumberUtil.
	//
	// For countries which have the concept of an "area code" or "national
	// destination code", this is included in the National (significant) Number.
	// Although the ITU says the maximum length should be 15, we have found longer
	// numbers in some countries e.g. Germany.
	// Note that the National (significant) Number does not contain the National
	// (trunk) prefix. Obviously, as a uint64, it will never contain any
	// formatting (hyphens, spaces, parentheses), nor any alphanumeric spellings.
	NationalNumber *uint64 `protobuf:"varint,2,req,name=national_number,json=nationalNumber" json:"national_number,omitempty"`
	// Extension is not standardized in ITU recommendations, except for being
	// defined as a series of numbers with a maximum length of 40 digits. It is
	// defined as a string here to accommodate for the possible use of a leading
	// zero in the extension (organizations have complete freedom to do so, as
	// there is no standard defined). Other than digits, some other dialling
	// characters such as "," (indicating a wait) may be stored here.
	Extension *string `protobuf:"bytes,3,opt,name=extension" json:"extension,omitempty"`
	// In some countries, the national (significant) number starts with one or
	// more "0"s without this being a national prefix or trunk code of some kind.
	// For example, the leading zero in the national (significant) number of an
	// Italian phone number indicates the number is a fixed-line number.  There
	// have been plans to migrate fixed-line numbers to start with the digit two
	// since December 2000, but it has not happened yet. See
	// http://en.wikipedia.org/wiki/%2B39 for more details.
	//
	// These fields can be safely ignored (there is no need to set them) for most
	// countries. Some limited number of countries behave like Italy - for these
	// cases, if the leading zero(s) of a number would be retained even when
	// dialling internationally, set this flag to true, and also set the number of
	// leading zeros.
	//
	// Clients who use the parsing functionality of the i18n phone
	// number libraries will have these fields set if necessary automatically.
	ItalianLeadingZero   *bool  `protobuf:"varint,4,opt,name=italian_leading_zero,json=italianLeadingZero" json:"italian_leading_zero,omitempty"`
	NumberOfLeadingZeros *int32 `protobuf:"varint,8,opt,name=number_of_leading_zeros,json=numberOfLeadingZeros,def=1" json:"number_of_leading_zeros,omitempty"`
	// This field is used to store the raw input string containing phone numbers
	// before it was canonicalized by the library. For example, it could be used
	// to store alphanumerical numbers such as "1-800-GOOG-411".
	RawInput *string `protobuf:"bytes,5,opt,name=raw_input,json=rawInput" json:"raw_input,omitempty"`
	// The source from which the country_code is derived.
	CountryCodeSource *PhoneNumber_CountryCodeSource `protobuf:"varint,6,opt,name=country_code_source,json=countryCodeSource,enum=phonenumbers.PhoneNumber_CountryCodeSource" json:"country_code_source,omitempty"`
	// The carrier selection code that is preferred when calling this phone number
	// domestically. This also includes codes that need to be dialed in some
	// countries when calling from landlines to mobiles or vice versa. For
	// example, in Columbia, a "3" needs to be dialed before the phone number
	// itself when calling from a mobile phone to a domestic landline phone and
	// vice versa.
	//
	// Note this is the "preferred" code, which means other codes may work as
	// well.
	PreferredDomesticCarrierCode *string `protobuf:"bytes,7,opt,name=preferred_domestic_carrier_code,json=preferredDomesticCarrierCode" json:"preferred_domestic_carrier_code,omitempty"`
}

// Default values for PhoneNumber fields.
const (
	Default_PhoneNumber_NumberOfLeadingZeros = int32(1)
)

func (x *PhoneNumber) Reset() {
	*x = PhoneNumber{}
	if protoimpl.UnsafeEnabled {
		mi := &file_phonenumber_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *PhoneNumber) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PhoneNumber) ProtoMessage() {}

func (x *PhoneNumber) ProtoReflect() protoreflect.Message {
	mi := &file_phonenumber_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PhoneNumber.ProtoReflect.Descriptor instead.
func (*PhoneNumber) Descriptor() ([]byte, []int) {
	return file_phonenumber_proto_rawDescGZIP(), []int{0}
}

func (x *PhoneNumber) GetCountryCode() int32 {
	if x != nil && x.CountryCode != nil {
		return *x.CountryCode
	}
	return 0
}

func (x *PhoneNumber) GetNationalNumber() uint64 {
	if x != nil && x.NationalNumber != nil {
		return *x.NationalNumber
	}
	return 0
}

func (x *PhoneNumber) GetExtension() string {
	if x != nil && x.Extension != nil {
		return *x.Extension
	}
	return ""
}

func (x *PhoneNumber) GetItalianLeadingZero() bool {
	if x != nil && x.ItalianLeadingZero != nil {
		return *x.ItalianLeadingZero
	}
	return false
}

func (x *PhoneNumber) GetNumberOfLeadingZeros() int32 {
	if x != nil && x.NumberOfLeadingZeros != nil {
		return *x.NumberOfLeadingZeros
	}
	return Default_PhoneNumber_NumberOfLeadingZeros
}

func (x *PhoneNumber) GetRawInput() string {
	if x != nil && x.RawInput != nil {
		return *x.RawInput
	}
	return ""
}

func (x *PhoneNumber) GetCountryCodeSource() PhoneNumber_CountryCodeSource {
	if x != nil && x.CountryCodeSource != nil {
		return *x.CountryCodeSource
	}
	return PhoneNumber_UNSPECIFIED
}

func (x *PhoneNumber) GetPreferredDomesticCarrierCode() string {
	if x != nil && x.PreferredDomesticCarrierCode != nil {
		return *x.PreferredDomesticCarrierCode
	}
	return ""
}

var File_phonenumber_proto protoreflect.FileDescriptor

var file_phonenumber_proto_rawDesc = []byte{
	0x0a, 0x11, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70, 0x72,
	0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72,
	0x73, 0x22, 0xc2, 0x04, 0x0a, 0x0b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65,
	0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64,
	0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
	0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
	0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0e, 0x6e,
	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a,
	0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
	0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x69,
	0x74, 0x61, 0x6c, 0x69, 0x61, 0x6e, 0x5f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x7a,
	0x65, 0x72, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x74, 0x61, 0x6c, 0x69,
	0x61, 0x6e, 0x4c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5a, 0x65, 0x72, 0x6f, 0x12, 0x38, 0x0a,
	0x17, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x6c, 0x65, 0x61, 0x64, 0x69,
	0x6e, 0x67, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x3a, 0x01,
	0x31, 0x52, 0x14, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x4c, 0x65, 0x61, 0x64, 0x69,
	0x6e, 0x67, 0x5a, 0x65, 0x72, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x69,
	0x6e, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x61, 0x77, 0x49,
	0x6e, 0x70, 0x75, 0x74, 0x12, 0x5b, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f,
	0x63, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
	0x0e, 0x32, 0x2b, 0x2e, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73,
	0x2e, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x75,
	0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x11,
	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63,
	0x65, 0x12, 0x45, 0x0a, 0x1f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x64,
	0x6f, 0x6d, 0x65, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x5f,
	0x63, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x70, 0x72, 0x65, 0x66,
	0x65, 0x72, 0x72, 0x65, 0x64, 0x44, 0x6f, 0x6d, 0x65, 0x73, 0x74, 0x69, 0x63, 0x43, 0x61, 0x72,
	0x72, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x75,
	0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0f,
	0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
	0x1e, 0x0a, 0x1a, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x57,
	0x49, 0x54, 0x48, 0x5f, 0x50, 0x4c, 0x55, 0x53, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x12,
	0x18, 0x0a, 0x14, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x57,
	0x49, 0x54, 0x48, 0x5f, 0x49, 0x44, 0x44, 0x10, 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x46, 0x52, 0x4f,
	0x4d, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x4f, 0x55, 0x54,
	0x5f, 0x50, 0x4c, 0x55, 0x53, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x0a, 0x12, 0x18, 0x0a, 0x14,
	0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x4f, 0x55,
	0x4e, 0x54, 0x52, 0x59, 0x10, 0x14, 0x42, 0x20, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f,
	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x31, 0x38, 0x6e, 0x2e, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x6e,
	0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x48, 0x03,
}

var (
	file_phonenumber_proto_rawDescOnce sync.Once
	file_phonenumber_proto_rawDescData = file_phonenumber_proto_rawDesc
)

func file_phonenumber_proto_rawDescGZIP() []byte {
	file_phonenumber_proto_rawDescOnce.Do(func() {
		file_phonenumber_proto_rawDescData = protoimpl.X.CompressGZIP(file_phonenumber_proto_rawDescData)
	})
	return file_phonenumber_proto_rawDescData
}

var file_phonenumber_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_phonenumber_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_phonenumber_proto_goTypes = []interface{}{
	(PhoneNumber_CountryCodeSource)(0), // 0: phonenumbers.PhoneNumber.CountryCodeSource
	(*PhoneNumber)(nil),                // 1: phonenumbers.PhoneNumber
}
var file_phonenumber_proto_depIdxs = []int32{
	0, // 0: phonenumbers.PhoneNumber.country_code_source:type_name -> phonenumbers.PhoneNumber.CountryCodeSource
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_phonenumber_proto_init() }
func file_phonenumber_proto_init() {
	if File_phonenumber_proto != nil {
		return
	}
	if !protoimpl.UnsafeEnabled {
		file_phonenumber_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*PhoneNumber); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_phonenumber_proto_rawDesc,
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_phonenumber_proto_goTypes,
		DependencyIndexes: file_phonenumber_proto_depIdxs,
		EnumInfos:         file_phonenumber_proto_enumTypes,
		MessageInfos:      file_phonenumber_proto_msgTypes,
	}.Build()
	File_phonenumber_proto = out.File
	file_phonenumber_proto_rawDesc = nil
	file_phonenumber_proto_goTypes = nil
	file_phonenumber_proto_depIdxs = nil
}
