-
Notifications
You must be signed in to change notification settings - Fork 310
/
email_validation.pb.setters.fm.go
104 lines (98 loc) · 2.29 KB
/
email_validation.pb.setters.fm.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
// Code generated by protoc-gen-fieldmask. DO NOT EDIT.
package ttnpb
import fmt "fmt"
func (dst *EmailValidation) SetFields(src *EmailValidation, paths ...string) error {
for name, subs := range _processPaths(paths) {
switch name {
case "id":
if len(subs) > 0 {
return fmt.Errorf("'id' has no subfields, but %s were specified", subs)
}
if src != nil {
dst.Id = src.Id
} else {
var zero string
dst.Id = zero
}
case "token":
if len(subs) > 0 {
return fmt.Errorf("'token' has no subfields, but %s were specified", subs)
}
if src != nil {
dst.Token = src.Token
} else {
var zero string
dst.Token = zero
}
case "address":
if len(subs) > 0 {
return fmt.Errorf("'address' has no subfields, but %s were specified", subs)
}
if src != nil {
dst.Address = src.Address
} else {
var zero string
dst.Address = zero
}
case "created_at":
if len(subs) > 0 {
return fmt.Errorf("'created_at' has no subfields, but %s were specified", subs)
}
if src != nil {
dst.CreatedAt = src.CreatedAt
} else {
dst.CreatedAt = nil
}
case "expires_at":
if len(subs) > 0 {
return fmt.Errorf("'expires_at' has no subfields, but %s were specified", subs)
}
if src != nil {
dst.ExpiresAt = src.ExpiresAt
} else {
dst.ExpiresAt = nil
}
case "updated_at":
if len(subs) > 0 {
return fmt.Errorf("'updated_at' has no subfields, but %s were specified", subs)
}
if src != nil {
dst.UpdatedAt = src.UpdatedAt
} else {
dst.UpdatedAt = nil
}
default:
return fmt.Errorf("invalid field: '%s'", name)
}
}
return nil
}
func (dst *ValidateEmailRequest) SetFields(src *ValidateEmailRequest, paths ...string) error {
for name, subs := range _processPaths(paths) {
switch name {
case "id":
if len(subs) > 0 {
return fmt.Errorf("'id' has no subfields, but %s were specified", subs)
}
if src != nil {
dst.Id = src.Id
} else {
var zero string
dst.Id = zero
}
case "token":
if len(subs) > 0 {
return fmt.Errorf("'token' has no subfields, but %s were specified", subs)
}
if src != nil {
dst.Token = src.Token
} else {
var zero string
dst.Token = zero
}
default:
return fmt.Errorf("invalid field: '%s'", name)
}
}
return nil
}