| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
=begin comment |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
Smartcat Integration API |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
OpenAPI spec version: v1 |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Generated by: https://github.com/swagger-api/swagger-codegen.git |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=end comment |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# |
|
17
|
|
|
|
|
|
|
# NOTE: This class is auto generated by the swagger code generator program. |
|
18
|
|
|
|
|
|
|
# Do not edit the class manually. |
|
19
|
|
|
|
|
|
|
# Ref: https://github.com/swagger-api/swagger-codegen |
|
20
|
|
|
|
|
|
|
# |
|
21
|
|
|
|
|
|
|
package Smartcat::Client::Object::ExecutiveStatisticsModel; |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
require 5.6.0; |
|
24
|
1
|
|
|
1
|
|
780
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
31
|
|
|
25
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
30
|
|
|
26
|
1
|
|
|
1
|
|
599
|
use utf8; |
|
|
1
|
|
|
|
|
16
|
|
|
|
1
|
|
|
|
|
5
|
|
|
27
|
1
|
|
|
1
|
|
694
|
use JSON qw(decode_json); |
|
|
1
|
|
|
|
|
8630
|
|
|
|
1
|
|
|
|
|
7
|
|
|
28
|
1
|
|
|
1
|
|
822
|
use Data::Dumper; |
|
|
1
|
|
|
|
|
6739
|
|
|
|
1
|
|
|
|
|
93
|
|
|
29
|
1
|
|
|
1
|
|
530
|
use Module::Runtime qw(use_module); |
|
|
1
|
|
|
|
|
1784
|
|
|
|
1
|
|
|
|
|
7
|
|
|
30
|
1
|
|
|
1
|
|
580
|
use Log::Any qw($log); |
|
|
1
|
|
|
|
|
8599
|
|
|
|
1
|
|
|
|
|
6
|
|
|
31
|
1
|
|
|
1
|
|
2799
|
use Date::Parse; |
|
|
1
|
|
|
|
|
7851
|
|
|
|
1
|
|
|
|
|
142
|
|
|
32
|
1
|
|
|
1
|
|
924
|
use DateTime; |
|
|
1
|
|
|
|
|
516893
|
|
|
|
1
|
|
|
|
|
61
|
|
|
33
|
|
|
|
|
|
|
|
|
34
|
1
|
|
|
1
|
|
566
|
use Smartcat::Client::Object::DocumentStatisticsModel; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
5
|
|
|
35
|
1
|
|
|
1
|
|
509
|
use Smartcat::Client::Object::ExecutiveModel; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
8
|
|
|
36
|
1
|
|
|
1
|
|
92
|
use Smartcat::Client::Object::StatisticsRowModel; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
7
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
1
|
|
|
1
|
|
69
|
use base ( "Class::Accessor", "Class::Data::Inheritable" ); |
|
|
1
|
|
|
|
|
17
|
|
|
|
1
|
|
|
|
|
866
|
|
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# |
|
41
|
|
|
|
|
|
|
# |
|
42
|
|
|
|
|
|
|
# |
|
43
|
|
|
|
|
|
|
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. |
|
44
|
|
|
|
|
|
|
# REF: https://github.com/swagger-api/swagger-codegen |
|
45
|
|
|
|
|
|
|
# |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=begin comment |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Smartcat Integration API |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
OpenAPI spec version: v1 |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Generated by: https://github.com/swagger-api/swagger-codegen.git |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=end comment |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# |
|
62
|
|
|
|
|
|
|
# NOTE: This class is auto generated by the swagger code generator program. |
|
63
|
|
|
|
|
|
|
# Do not edit the class manually. |
|
64
|
|
|
|
|
|
|
# Ref: https://github.com/swagger-api/swagger-codegen |
|
65
|
|
|
|
|
|
|
# |
|
66
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata( 'attribute_map' => {} ); |
|
67
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata( 'swagger_types' => {} ); |
|
68
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata( 'method_documentation' => {} ); |
|
69
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata( 'class_documentation' => {} ); |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# new object |
|
72
|
|
|
|
|
|
|
sub new { |
|
73
|
1
|
|
|
1
|
1
|
626
|
my ( $class, %args ) = @_; |
|
74
|
|
|
|
|
|
|
|
|
75
|
1
|
|
|
|
|
3
|
my $self = bless {}, $class; |
|
76
|
|
|
|
|
|
|
|
|
77
|
1
|
|
|
|
|
2
|
foreach my $attribute ( keys %{ $class->attribute_map } ) { |
|
|
1
|
|
|
|
|
4
|
|
|
78
|
6
|
|
|
|
|
76
|
my $args_key = $class->attribute_map->{$attribute}; |
|
79
|
6
|
|
|
|
|
49
|
$self->$attribute( $args{$args_key} ); |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
|
|
82
|
1
|
|
|
|
|
13
|
return $self; |
|
83
|
|
|
|
|
|
|
} |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
# return perl hash |
|
86
|
|
|
|
|
|
|
sub to_hash { |
|
87
|
0
|
|
|
0
|
0
|
|
return decode_json( JSON->new->convert_blessed->encode(shift) ); |
|
88
|
|
|
|
|
|
|
} |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
# used by JSON for serialization |
|
91
|
|
|
|
|
|
|
sub TO_JSON { |
|
92
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
93
|
0
|
|
|
|
|
|
my $_data = {}; |
|
94
|
0
|
|
|
|
|
|
foreach my $_key ( keys %{ $self->attribute_map } ) { |
|
|
0
|
|
|
|
|
|
|
|
95
|
0
|
0
|
|
|
|
|
if ( defined $self->{$_key} ) { |
|
96
|
0
|
|
|
|
|
|
$_data->{ $self->attribute_map->{$_key} } = $self->{$_key}; |
|
97
|
|
|
|
|
|
|
} |
|
98
|
|
|
|
|
|
|
} |
|
99
|
0
|
|
|
|
|
|
return $_data; |
|
100
|
|
|
|
|
|
|
} |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# from Perl hashref |
|
103
|
|
|
|
|
|
|
sub from_hash { |
|
104
|
0
|
|
|
0
|
0
|
|
my ( $self, $hash ) = @_; |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
# loop through attributes and use swagger_types to deserialize the data |
|
107
|
0
|
|
|
|
|
|
while ( my ( $_key, $_type ) = each %{ $self->swagger_types } ) { |
|
|
0
|
|
|
|
|
|
|
|
108
|
0
|
|
|
|
|
|
my $_json_attribute = $self->attribute_map->{$_key}; |
|
109
|
0
|
0
|
|
|
|
|
if ( $_type =~ /^array\[/i ) { # array |
|
|
|
0
|
|
|
|
|
|
|
110
|
0
|
|
|
|
|
|
my $_subclass = substr( $_type, 6, -1 ); |
|
111
|
0
|
|
|
|
|
|
my @_array = (); |
|
112
|
0
|
|
|
|
|
|
foreach my $_element ( @{ $hash->{$_json_attribute} } ) { |
|
|
0
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
|
push @_array, $self->_deserialize( $_subclass, $_element ); |
|
114
|
|
|
|
|
|
|
} |
|
115
|
0
|
|
|
|
|
|
$self->{$_key} = \@_array; |
|
116
|
|
|
|
|
|
|
} |
|
117
|
|
|
|
|
|
|
elsif ( exists $hash->{$_json_attribute} ) |
|
118
|
|
|
|
|
|
|
{ #hash(model), primitive, datetime |
|
119
|
|
|
|
|
|
|
$self->{$_key} = |
|
120
|
0
|
|
|
|
|
|
$self->_deserialize( $_type, $hash->{$_json_attribute} ); |
|
121
|
|
|
|
|
|
|
} |
|
122
|
|
|
|
|
|
|
else { |
|
123
|
0
|
|
|
|
|
|
$log->debugf( "Warning: %s (%s) does not exist in input hash\n", |
|
124
|
|
|
|
|
|
|
$_key, $_json_attribute ); |
|
125
|
|
|
|
|
|
|
} |
|
126
|
|
|
|
|
|
|
} |
|
127
|
|
|
|
|
|
|
|
|
128
|
0
|
|
|
|
|
|
return $self; |
|
129
|
|
|
|
|
|
|
} |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
# deserialize non-array data |
|
132
|
|
|
|
|
|
|
sub _deserialize { |
|
133
|
0
|
|
|
0
|
|
|
my ( $self, $type, $data ) = @_; |
|
134
|
0
|
|
|
|
|
|
$log->debugf( "deserializing %s with %s", Dumper($data), $type ); |
|
135
|
|
|
|
|
|
|
|
|
136
|
0
|
0
|
|
|
|
|
if ( $type eq 'DateTime' ) { |
|
|
|
0
|
|
|
|
|
|
|
137
|
0
|
|
|
|
|
|
return DateTime->from_epoch( epoch => str2time($data) ); |
|
138
|
|
|
|
|
|
|
} |
|
139
|
|
|
|
|
|
|
elsif ( grep( /^$type$/, ( 'int', 'double', 'string', 'boolean' ) ) ) { |
|
140
|
0
|
|
|
|
|
|
return $data; |
|
141
|
|
|
|
|
|
|
} |
|
142
|
|
|
|
|
|
|
else { # hash(model) |
|
143
|
0
|
|
|
|
|
|
my $_instance = eval "Smartcat::Client::Object::$type->new()"; |
|
144
|
0
|
|
|
|
|
|
return $_instance->from_hash($data); |
|
145
|
|
|
|
|
|
|
} |
|
146
|
|
|
|
|
|
|
} |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
__PACKAGE__->class_documentation( |
|
149
|
|
|
|
|
|
|
{ |
|
150
|
|
|
|
|
|
|
description => '', |
|
151
|
|
|
|
|
|
|
class => 'ExecutiveStatisticsModel', |
|
152
|
|
|
|
|
|
|
required => [], # TODO |
|
153
|
|
|
|
|
|
|
} |
|
154
|
|
|
|
|
|
|
); |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
__PACKAGE__->method_documentation( |
|
157
|
|
|
|
|
|
|
{ |
|
158
|
|
|
|
|
|
|
'executive' => { |
|
159
|
|
|
|
|
|
|
datatype => 'ExecutiveModel', |
|
160
|
|
|
|
|
|
|
base_name => 'executive', |
|
161
|
|
|
|
|
|
|
description => '', |
|
162
|
|
|
|
|
|
|
format => '', |
|
163
|
|
|
|
|
|
|
read_only => '', |
|
164
|
|
|
|
|
|
|
}, |
|
165
|
|
|
|
|
|
|
'stage_type' => { |
|
166
|
|
|
|
|
|
|
datatype => 'string', |
|
167
|
|
|
|
|
|
|
base_name => 'stageType', |
|
168
|
|
|
|
|
|
|
description => '', |
|
169
|
|
|
|
|
|
|
format => '', |
|
170
|
|
|
|
|
|
|
read_only => '', |
|
171
|
|
|
|
|
|
|
}, |
|
172
|
|
|
|
|
|
|
'stage_number' => { |
|
173
|
|
|
|
|
|
|
datatype => 'int', |
|
174
|
|
|
|
|
|
|
base_name => 'stageNumber', |
|
175
|
|
|
|
|
|
|
description => '', |
|
176
|
|
|
|
|
|
|
format => '', |
|
177
|
|
|
|
|
|
|
read_only => '', |
|
178
|
|
|
|
|
|
|
}, |
|
179
|
|
|
|
|
|
|
'target_language' => { |
|
180
|
|
|
|
|
|
|
datatype => 'string', |
|
181
|
|
|
|
|
|
|
base_name => 'targetLanguage', |
|
182
|
|
|
|
|
|
|
description => '', |
|
183
|
|
|
|
|
|
|
format => '', |
|
184
|
|
|
|
|
|
|
read_only => '', |
|
185
|
|
|
|
|
|
|
}, |
|
186
|
|
|
|
|
|
|
'total' => { |
|
187
|
|
|
|
|
|
|
datatype => 'ARRAY[StatisticsRowModel]', |
|
188
|
|
|
|
|
|
|
base_name => 'total', |
|
189
|
|
|
|
|
|
|
description => '', |
|
190
|
|
|
|
|
|
|
format => '', |
|
191
|
|
|
|
|
|
|
read_only => '', |
|
192
|
|
|
|
|
|
|
}, |
|
193
|
|
|
|
|
|
|
'documents' => { |
|
194
|
|
|
|
|
|
|
datatype => 'ARRAY[DocumentStatisticsModel]', |
|
195
|
|
|
|
|
|
|
base_name => 'documents', |
|
196
|
|
|
|
|
|
|
description => '', |
|
197
|
|
|
|
|
|
|
format => '', |
|
198
|
|
|
|
|
|
|
read_only => '', |
|
199
|
|
|
|
|
|
|
}, |
|
200
|
|
|
|
|
|
|
} |
|
201
|
|
|
|
|
|
|
); |
|
202
|
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
__PACKAGE__->swagger_types( |
|
204
|
|
|
|
|
|
|
{ |
|
205
|
|
|
|
|
|
|
'executive' => 'ExecutiveModel', |
|
206
|
|
|
|
|
|
|
'stage_type' => 'string', |
|
207
|
|
|
|
|
|
|
'stage_number' => 'int', |
|
208
|
|
|
|
|
|
|
'target_language' => 'string', |
|
209
|
|
|
|
|
|
|
'total' => 'ARRAY[StatisticsRowModel]', |
|
210
|
|
|
|
|
|
|
'documents' => 'ARRAY[DocumentStatisticsModel]' |
|
211
|
|
|
|
|
|
|
} |
|
212
|
|
|
|
|
|
|
); |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
__PACKAGE__->attribute_map( |
|
215
|
|
|
|
|
|
|
{ |
|
216
|
|
|
|
|
|
|
'executive' => 'executive', |
|
217
|
|
|
|
|
|
|
'stage_type' => 'stageType', |
|
218
|
|
|
|
|
|
|
'stage_number' => 'stageNumber', |
|
219
|
|
|
|
|
|
|
'target_language' => 'targetLanguage', |
|
220
|
|
|
|
|
|
|
'total' => 'total', |
|
221
|
|
|
|
|
|
|
'documents' => 'documents' |
|
222
|
|
|
|
|
|
|
} |
|
223
|
|
|
|
|
|
|
); |
|
224
|
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( keys %{ __PACKAGE__->attribute_map } ); |
|
226
|
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
1; |