| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package WWW::Google::Contacts::Types; |
|
2
|
|
|
|
|
|
|
{ |
|
3
|
|
|
|
|
|
|
$WWW::Google::Contacts::Types::VERSION = '0.38'; |
|
4
|
|
|
|
|
|
|
} |
|
5
|
|
|
|
|
|
|
|
|
6
|
0
|
|
|
|
|
|
use MooseX::Types -declare => [ |
|
7
|
|
|
|
|
|
|
qw( |
|
8
|
|
|
|
|
|
|
Category |
|
9
|
|
|
|
|
|
|
Name |
|
10
|
|
|
|
|
|
|
PhoneNumber ArrayRefOfPhoneNumber |
|
11
|
|
|
|
|
|
|
Email ArrayRefOfEmail |
|
12
|
|
|
|
|
|
|
IM ArrayRefOfIM |
|
13
|
|
|
|
|
|
|
Organization ArrayRefOfOrganization |
|
14
|
|
|
|
|
|
|
PostalAddress ArrayRefOfPostalAddress |
|
15
|
|
|
|
|
|
|
CalendarLink ArrayRefOfCalendarLink |
|
16
|
|
|
|
|
|
|
Birthday |
|
17
|
|
|
|
|
|
|
ContactEvent ArrayRefOfContactEvent |
|
18
|
|
|
|
|
|
|
ExternalId ArrayRefOfExternalId |
|
19
|
|
|
|
|
|
|
Gender |
|
20
|
|
|
|
|
|
|
GroupMembership ArrayRefOfGroupMembership |
|
21
|
|
|
|
|
|
|
Hobby ArrayRefOfHobby |
|
22
|
|
|
|
|
|
|
Jot ArrayRefOfJot |
|
23
|
|
|
|
|
|
|
Language ArrayRefOfLanguage |
|
24
|
|
|
|
|
|
|
Priority |
|
25
|
|
|
|
|
|
|
Sensitivity |
|
26
|
|
|
|
|
|
|
Relation ArrayRefOfRelation |
|
27
|
|
|
|
|
|
|
UserDefined ArrayRefOfUserDefined |
|
28
|
|
|
|
|
|
|
Website ArrayRefOfWebsite |
|
29
|
|
|
|
|
|
|
Photo |
|
30
|
|
|
|
|
|
|
Group |
|
31
|
|
|
|
|
|
|
) |
|
32
|
2
|
|
|
2
|
|
74047
|
]; |
|
|
0
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
use MooseX::Types::Moose qw(Str HashRef ArrayRef Any Undef Bool); |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Category; |
|
37
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Name; |
|
38
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::PhoneNumber; |
|
39
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::PhoneNumber; |
|
40
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Email; |
|
41
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Email; |
|
42
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::IM; |
|
43
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Organization; |
|
44
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::PostalAddress; |
|
45
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Birthday; |
|
46
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::CalendarLink; |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::ContactEvent; |
|
49
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::ExternalId; |
|
50
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Gender; |
|
51
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::GroupMembership; |
|
52
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Hobby; |
|
53
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Jot; |
|
54
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Language; |
|
55
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Priority; |
|
56
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Relation; |
|
57
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::UserDefined; |
|
58
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Website; |
|
59
|
|
|
|
|
|
|
use WWW::Google::Contacts::Type::Sensitivity; |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
class_type Group, { class => 'WWW::Google::Contacts::Group' }; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
coerce Group, from HashRef, via { |
|
64
|
|
|
|
|
|
|
require WWW::Google::Contacts::Group; |
|
65
|
|
|
|
|
|
|
WWW::Google::Contacts::Group->new($_); |
|
66
|
|
|
|
|
|
|
}; |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
class_type Category, { class => 'WWW::Google::Contacts::Type::Category' }; |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
coerce Category, from Any, via { |
|
71
|
|
|
|
|
|
|
WWW::Google::Contacts::Type::Category->new( |
|
72
|
|
|
|
|
|
|
type => 'http://schemas.google.com/g/2005#kind', |
|
73
|
|
|
|
|
|
|
term => 'http://schemas.google.com/contact/2008#contact' |
|
74
|
|
|
|
|
|
|
); |
|
75
|
|
|
|
|
|
|
}; |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
class_type Name, { class => 'WWW::Google::Contacts::Type::Name' }; |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
coerce Name, |
|
80
|
|
|
|
|
|
|
from Str, |
|
81
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Name->new( full_name => $_ ) }, |
|
82
|
|
|
|
|
|
|
from Any, |
|
83
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Name->new( $_ || {} ) }; |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
class_type PhoneNumber, { class => 'WWW::Google::Contacts::Type::PhoneNumber' }; |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
coerce PhoneNumber, |
|
88
|
|
|
|
|
|
|
from HashRef, |
|
89
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::PhoneNumber->new($_) }, |
|
90
|
|
|
|
|
|
|
from Str, |
|
91
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::PhoneNumber->new( value => $_ ) }; |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
subtype ArrayRefOfPhoneNumber, as ArrayRef [PhoneNumber]; |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
coerce ArrayRefOfPhoneNumber, from ArrayRef, via { |
|
96
|
|
|
|
|
|
|
return [ map { to_PhoneNumber($_) } @{$_} ]; |
|
97
|
|
|
|
|
|
|
}, from Any, via { return [ to_PhoneNumber($_) ] }; |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
class_type Email, { class => 'WWW::Google::Contacts::Type::Email' }; |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
coerce Email, |
|
102
|
|
|
|
|
|
|
from HashRef, |
|
103
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Email->new($_) }, |
|
104
|
|
|
|
|
|
|
from Str, |
|
105
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Email->new( value => $_ ) }; |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
subtype ArrayRefOfEmail, as ArrayRef [Email]; |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
coerce ArrayRefOfEmail, from ArrayRef, via { |
|
110
|
|
|
|
|
|
|
[ map { to_Email($_) } @{$_} ]; |
|
111
|
|
|
|
|
|
|
}, from Any, via { [ to_Email($_) ] }; |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
class_type IM, { class => 'WWW::Google::Contacts::Type::IM' }; |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
coerce IM, |
|
116
|
|
|
|
|
|
|
from HashRef, |
|
117
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::IM->new($_) }, |
|
118
|
|
|
|
|
|
|
from Str, |
|
119
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::IM->new( value => $_ ) }; |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
subtype ArrayRefOfIM, as ArrayRef [IM]; |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
coerce ArrayRefOfIM, from ArrayRef, via { |
|
124
|
|
|
|
|
|
|
[ map { to_IM($_) } @{$_} ]; |
|
125
|
|
|
|
|
|
|
}, from Any, via { [ to_IM($_) ] }; |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
class_type Organization, |
|
128
|
|
|
|
|
|
|
{ class => 'WWW::Google::Contacts::Type::Organization' }; |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
coerce Organization, |
|
131
|
|
|
|
|
|
|
from HashRef, |
|
132
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Organization->new($_) }, |
|
133
|
|
|
|
|
|
|
from Str, |
|
134
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Organization->new( name => $_ ) }; |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
subtype ArrayRefOfOrganization, as ArrayRef [Organization]; |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
coerce ArrayRefOfOrganization, from ArrayRef, via { |
|
139
|
|
|
|
|
|
|
[ map { to_Organization($_) } @{$_} ]; |
|
140
|
|
|
|
|
|
|
}, from Any, via { [ to_Organization($_) ] }; |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
class_type PostalAddress, |
|
143
|
|
|
|
|
|
|
{ class => 'WWW::Google::Contacts::Type::PostalAddress' }; |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
coerce PostalAddress, |
|
146
|
|
|
|
|
|
|
from HashRef, |
|
147
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::PostalAddress->new($_) }, |
|
148
|
|
|
|
|
|
|
from Str, |
|
149
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::PostalAddress->new( formatted => $_ ) }; |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
subtype ArrayRefOfPostalAddress, as ArrayRef [PostalAddress]; |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
coerce ArrayRefOfPostalAddress, from ArrayRef, via { |
|
154
|
|
|
|
|
|
|
[ map { to_PostalAddress($_) } @{$_} ]; |
|
155
|
|
|
|
|
|
|
}, from Any, via { [ to_PostalAddress($_) ] }; |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
class_type Birthday, { class => 'WWW::Google::Contacts::Type::Birthday' }; |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
coerce Birthday, |
|
160
|
|
|
|
|
|
|
from Str, |
|
161
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Birthday->new( when => $_ ) }, |
|
162
|
|
|
|
|
|
|
from HashRef, |
|
163
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Birthday->new($_) }; |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
class_type CalendarLink, |
|
166
|
|
|
|
|
|
|
{ class => 'WWW::Google::Contacts::Type::CalendarLink' }; |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
coerce CalendarLink, |
|
169
|
|
|
|
|
|
|
from HashRef, |
|
170
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::CalendarLink->new($_) }, from Str, via { |
|
171
|
|
|
|
|
|
|
WWW::Google::Contacts::Type::CalendarLink->new( |
|
172
|
|
|
|
|
|
|
type => "home", |
|
173
|
|
|
|
|
|
|
href => $_ |
|
174
|
|
|
|
|
|
|
); |
|
175
|
|
|
|
|
|
|
}; |
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
subtype ArrayRefOfCalendarLink, as ArrayRef [CalendarLink]; |
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
coerce ArrayRefOfCalendarLink, from ArrayRef, via { |
|
180
|
|
|
|
|
|
|
[ map { to_CalendarLink($_) } @{$_} ]; |
|
181
|
|
|
|
|
|
|
}, from Any, via { [ to_CalendarLink($_) ] }; |
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
class_type ContactEvent, |
|
184
|
|
|
|
|
|
|
{ class => 'WWW::Google::Contacts::Type::ContactEvent' }; |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
coerce ContactEvent, |
|
187
|
|
|
|
|
|
|
from HashRef, |
|
188
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::ContactEvent->new($_) }; |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
subtype ArrayRefOfContactEvent, as ArrayRef [ContactEvent]; |
|
191
|
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
coerce ArrayRefOfContactEvent, from ArrayRef, via { |
|
193
|
|
|
|
|
|
|
[ map { to_ContactEvent($_) } @{$_} ]; |
|
194
|
|
|
|
|
|
|
}, from Any, via { [ to_ContactEvent($_) ] }; |
|
195
|
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
class_type ExternalId, { class => 'WWW::Google::Contacts::Type::ExternalId' }; |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
coerce ExternalId, |
|
199
|
|
|
|
|
|
|
from HashRef, |
|
200
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::ExternalId->new($_) }; |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
subtype ArrayRefOfExternalId, as ArrayRef [ExternalId]; |
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
coerce ArrayRefOfExternalId, from ArrayRef, via { |
|
205
|
|
|
|
|
|
|
[ map { to_ExternalId($_) } @{$_} ]; |
|
206
|
|
|
|
|
|
|
}, from Any, via { [ to_ExternalId($_) ] }; |
|
207
|
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
class_type Gender, { class => 'WWW::Google::Contacts::Type::Gender' }; |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
coerce Gender, |
|
211
|
|
|
|
|
|
|
from Str, |
|
212
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Gender->new( value => $_ ) }, |
|
213
|
|
|
|
|
|
|
from HashRef, |
|
214
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Gender->new($_) }; |
|
215
|
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
class_type GroupMembership, |
|
217
|
|
|
|
|
|
|
{ class => 'WWW::Google::Contacts::Type::GroupMembership' }; |
|
218
|
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
coerce GroupMembership, |
|
220
|
|
|
|
|
|
|
from HashRef, |
|
221
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::GroupMembership->new($_) }, |
|
222
|
|
|
|
|
|
|
from Str, |
|
223
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::GroupMembership->new( href => $_ ) }, |
|
224
|
|
|
|
|
|
|
from Group, |
|
225
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::GroupMembership->new( href => $_->id ) }; |
|
226
|
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
subtype ArrayRefOfGroupMembership, as ArrayRef [GroupMembership]; |
|
228
|
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
coerce ArrayRefOfGroupMembership, from ArrayRef, via { |
|
230
|
|
|
|
|
|
|
[ map { to_GroupMembership($_) } @{$_} ]; |
|
231
|
|
|
|
|
|
|
}, from Any, via { [ to_GroupMembership($_) ] }; |
|
232
|
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
class_type Hobby, { class => 'WWW::Google::Contacts::Type::Hobby' }; |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
coerce Hobby, |
|
236
|
|
|
|
|
|
|
from HashRef, |
|
237
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Hobby->new($_) }, |
|
238
|
|
|
|
|
|
|
from Str, |
|
239
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Hobby->new( value => $_ ) }; |
|
240
|
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
subtype ArrayRefOfHobby, as ArrayRef [Hobby]; |
|
242
|
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
coerce ArrayRefOfHobby, from ArrayRef, via { |
|
244
|
|
|
|
|
|
|
[ map { to_Hobby($_) } @{$_} ]; |
|
245
|
|
|
|
|
|
|
}, from Any, via { [ to_Hobby($_) ] }; |
|
246
|
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
class_type Jot, { class => 'WWW::Google::Contacts::Type::Jot' }; |
|
248
|
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
coerce Jot, |
|
250
|
|
|
|
|
|
|
from HashRef, |
|
251
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Jot->new($_) }, |
|
252
|
|
|
|
|
|
|
from Str, |
|
253
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Jot->new( type => "home", value => $_ ) }; |
|
254
|
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
subtype ArrayRefOfJot, as ArrayRef [Jot]; |
|
256
|
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
coerce ArrayRefOfJot, from ArrayRef, via { |
|
258
|
|
|
|
|
|
|
[ map { to_Jot($_) } @{$_} ]; |
|
259
|
|
|
|
|
|
|
}, from Any, via { [ to_Jot($_) ] }; |
|
260
|
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
class_type Language, { class => 'WWW::Google::Contacts::Type::Language' }; |
|
262
|
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
coerce Language, |
|
264
|
|
|
|
|
|
|
from HashRef, |
|
265
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Language->new($_) }, |
|
266
|
|
|
|
|
|
|
from Str, |
|
267
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Language->new( value => $_ ) }; |
|
268
|
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
subtype ArrayRefOfLanguage, as ArrayRef [Language]; |
|
270
|
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
coerce ArrayRefOfLanguage, from ArrayRef, via { |
|
272
|
|
|
|
|
|
|
[ map { to_Language($_) } @{$_} ]; |
|
273
|
|
|
|
|
|
|
}, from Any, via { [ to_Language($_) ] }; |
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
class_type Priority, { class => 'WWW::Google::Contacts::Type::Priority' }; |
|
276
|
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
coerce Priority, |
|
278
|
|
|
|
|
|
|
from Str, |
|
279
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Priority->new( type => $_ ) }, |
|
280
|
|
|
|
|
|
|
from Undef, |
|
281
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Priority->new( type => "normal" ) }, |
|
282
|
|
|
|
|
|
|
from HashRef, |
|
283
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Priority->new( type => $_->{rel} ) }; |
|
284
|
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
class_type Relation, { class => 'WWW::Google::Contacts::Type::Relation' }; |
|
286
|
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
coerce Relation, |
|
288
|
|
|
|
|
|
|
from HashRef, |
|
289
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Relation->new($_) }; |
|
290
|
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
subtype ArrayRefOfRelation, as ArrayRef [Relation]; |
|
292
|
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
coerce ArrayRefOfRelation, from ArrayRef, via { |
|
294
|
|
|
|
|
|
|
[ map { to_Relation($_) } @{$_} ]; |
|
295
|
|
|
|
|
|
|
}, from Any, via { [ to_Relation($_) ] }; |
|
296
|
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
class_type UserDefined, { class => 'WWW::Google::Contacts::Type::UserDefined' }; |
|
298
|
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
coerce UserDefined, |
|
300
|
|
|
|
|
|
|
from HashRef, |
|
301
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::UserDefined->new($_) }; |
|
302
|
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
subtype ArrayRefOfUserDefined, as ArrayRef [UserDefined]; |
|
304
|
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
coerce ArrayRefOfUserDefined, from ArrayRef, via { |
|
306
|
|
|
|
|
|
|
[ map { to_UserDefined($_) } @{$_} ]; |
|
307
|
|
|
|
|
|
|
}, from HashRef, via { |
|
308
|
|
|
|
|
|
|
my $ref = $_; |
|
309
|
|
|
|
|
|
|
return [ to_UserDefined($ref) ] if ( defined $ref->{key} ); |
|
310
|
|
|
|
|
|
|
[ map { to_UserDefined( { key => $_, value => $ref->{$_}{value} } ) } |
|
311
|
|
|
|
|
|
|
keys %{$ref} ]; |
|
312
|
|
|
|
|
|
|
}, from Any, via { [ to_UserDefined($_) ] }; |
|
313
|
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
class_type Website, { class => 'WWW::Google::Contacts::Type::Website' }; |
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
coerce Website, |
|
317
|
|
|
|
|
|
|
from HashRef, |
|
318
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Website->new($_) }, from Str, via { |
|
319
|
|
|
|
|
|
|
WWW::Google::Contacts::Type::Website->new( type => "home", value => $_ ); |
|
320
|
|
|
|
|
|
|
}; |
|
321
|
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
subtype ArrayRefOfWebsite, as ArrayRef [Website]; |
|
323
|
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
coerce ArrayRefOfWebsite, from ArrayRef, via { |
|
325
|
|
|
|
|
|
|
[ map { to_Website($_) } @{$_} ]; |
|
326
|
|
|
|
|
|
|
}, from Any, via { [ to_Website($_) ] }; |
|
327
|
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
class_type Sensitivity, { class => 'WWW::Google::Contacts::Type::Sensitivity' }; |
|
329
|
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
coerce Sensitivity, |
|
331
|
|
|
|
|
|
|
from HashRef, |
|
332
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Sensitivity->new($_) }, |
|
333
|
|
|
|
|
|
|
from Str, |
|
334
|
|
|
|
|
|
|
via { WWW::Google::Contacts::Type::Sensitivity->new( type => $_ ) }; |
|
335
|
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
class_type Photo, { class => 'WWW::Google::Contacts::Photo' }; |
|
337
|
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
coerce Photo, from HashRef, via { |
|
339
|
|
|
|
|
|
|
require WWW::Google::Contacts::Photo; |
|
340
|
|
|
|
|
|
|
WWW::Google::Contacts::Photo->new($_); |
|
341
|
|
|
|
|
|
|
}; |