forked from ttacon/libphonenumber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphonenumber.pb.go
129 lines (110 loc) · 4.44 KB
/
phonenumber.pb.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
// Code generated by protoc-gen-go.
// source: phonenumber.proto
// DO NOT EDIT!
package libphonenumber
import proto "github.com/golang/protobuf/proto"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
type PhoneNumber_CountryCodeSource int32
const (
PhoneNumber_FROM_NUMBER_WITH_PLUS_SIGN PhoneNumber_CountryCodeSource = 1
PhoneNumber_FROM_NUMBER_WITH_IDD PhoneNumber_CountryCodeSource = 5
PhoneNumber_FROM_NUMBER_WITHOUT_PLUS_SIGN PhoneNumber_CountryCodeSource = 10
PhoneNumber_FROM_DEFAULT_COUNTRY PhoneNumber_CountryCodeSource = 20
)
var PhoneNumber_CountryCodeSource_name = map[int32]string{
1: "FROM_NUMBER_WITH_PLUS_SIGN",
5: "FROM_NUMBER_WITH_IDD",
10: "FROM_NUMBER_WITHOUT_PLUS_SIGN",
20: "FROM_DEFAULT_COUNTRY",
}
var PhoneNumber_CountryCodeSource_value = map[string]int32{
"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 proto.EnumName(PhoneNumber_CountryCodeSource_name, int32(x))
}
func (x *PhoneNumber_CountryCodeSource) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(PhoneNumber_CountryCodeSource_value, data, "PhoneNumber_CountryCodeSource")
if err != nil {
return err
}
*x = PhoneNumber_CountryCodeSource(value)
return nil
}
type PhoneNumber struct {
CountryCode *int32 `protobuf:"varint,1,req,name=country_code" json:"country_code,omitempty"`
NationalNumber *uint64 `protobuf:"varint,2,req,name=national_number" json:"national_number,omitempty"`
Extension *string `protobuf:"bytes,3,opt,name=extension" json:"extension,omitempty"`
ItalianLeadingZero *bool `protobuf:"varint,4,opt,name=italian_leading_zero" json:"italian_leading_zero,omitempty"`
NumberOfLeadingZeros *int32 `protobuf:"varint,8,opt,name=number_of_leading_zeros,def=1" json:"number_of_leading_zeros,omitempty"`
RawInput *string `protobuf:"bytes,5,opt,name=raw_input" json:"raw_input,omitempty"`
CountryCodeSource *PhoneNumber_CountryCodeSource `protobuf:"varint,6,opt,name=country_code_source,enum=i18n.phonenumbers.PhoneNumber_CountryCodeSource" json:"country_code_source,omitempty"`
PreferredDomesticCarrierCode *string `protobuf:"bytes,7,opt,name=preferred_domestic_carrier_code" json:"preferred_domestic_carrier_code,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PhoneNumber) Reset() { *m = PhoneNumber{} }
func (m *PhoneNumber) String() string { return proto.CompactTextString(m) }
func (*PhoneNumber) ProtoMessage() {}
const Default_PhoneNumber_NumberOfLeadingZeros int32 = 1
func (m *PhoneNumber) GetCountryCode() int32 {
if m != nil && m.CountryCode != nil {
return *m.CountryCode
}
return 0
}
func (m *PhoneNumber) GetNationalNumber() uint64 {
if m != nil && m.NationalNumber != nil {
return *m.NationalNumber
}
return 0
}
func (m *PhoneNumber) GetExtension() string {
if m != nil && m.Extension != nil {
return *m.Extension
}
return ""
}
func (m *PhoneNumber) GetItalianLeadingZero() bool {
if m != nil && m.ItalianLeadingZero != nil {
return *m.ItalianLeadingZero
}
return false
}
func (m *PhoneNumber) GetNumberOfLeadingZeros() int32 {
if m != nil && m.NumberOfLeadingZeros != nil {
return *m.NumberOfLeadingZeros
}
return Default_PhoneNumber_NumberOfLeadingZeros
}
func (m *PhoneNumber) GetRawInput() string {
if m != nil && m.RawInput != nil {
return *m.RawInput
}
return ""
}
func (m *PhoneNumber) GetCountryCodeSource() PhoneNumber_CountryCodeSource {
if m != nil && m.CountryCodeSource != nil {
return *m.CountryCodeSource
}
return PhoneNumber_FROM_NUMBER_WITH_PLUS_SIGN
}
func (m *PhoneNumber) GetPreferredDomesticCarrierCode() string {
if m != nil && m.PreferredDomesticCarrierCode != nil {
return *m.PreferredDomesticCarrierCode
}
return ""
}
func init() {
proto.RegisterEnum("i18n.phonenumbers.PhoneNumber_CountryCodeSource", PhoneNumber_CountryCodeSource_name, PhoneNumber_CountryCodeSource_value)
}