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::ExportDocumentTaskModel; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
require 5.6.0; |
24
|
1
|
|
|
1
|
|
724
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
25
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
26
|
1
|
|
|
1
|
|
571
|
use utf8; |
|
1
|
|
|
|
|
15
|
|
|
1
|
|
|
|
|
5
|
|
27
|
1
|
|
|
1
|
|
706
|
use JSON qw(decode_json); |
|
1
|
|
|
|
|
8081
|
|
|
1
|
|
|
|
|
5
|
|
28
|
1
|
|
|
1
|
|
711
|
use Data::Dumper; |
|
1
|
|
|
|
|
6309
|
|
|
1
|
|
|
|
|
64
|
|
29
|
1
|
|
|
1
|
|
557
|
use Module::Runtime qw(use_module); |
|
1
|
|
|
|
|
1741
|
|
|
1
|
|
|
|
|
5
|
|
30
|
1
|
|
|
1
|
|
526
|
use Log::Any qw($log); |
|
1
|
|
|
|
|
8357
|
|
|
1
|
|
|
|
|
6
|
|
31
|
1
|
|
|
1
|
|
2624
|
use Date::Parse; |
|
1
|
|
|
|
|
7723
|
|
|
1
|
|
|
|
|
130
|
|
32
|
1
|
|
|
1
|
|
866
|
use DateTime; |
|
1
|
|
|
|
|
517436
|
|
|
1
|
|
|
|
|
61
|
|
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
1
|
|
9
|
use base ( "Class::Accessor", "Class::Data::Inheritable" ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
712
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# |
37
|
|
|
|
|
|
|
# |
38
|
|
|
|
|
|
|
# |
39
|
|
|
|
|
|
|
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. |
40
|
|
|
|
|
|
|
# REF: https://github.com/swagger-api/swagger-codegen |
41
|
|
|
|
|
|
|
# |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=begin comment |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Smartcat Integration API |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
OpenAPI spec version: v1 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Generated by: https://github.com/swagger-api/swagger-codegen.git |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=end comment |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
# |
58
|
|
|
|
|
|
|
# NOTE: This class is auto generated by the swagger code generator program. |
59
|
|
|
|
|
|
|
# Do not edit the class manually. |
60
|
|
|
|
|
|
|
# Ref: https://github.com/swagger-api/swagger-codegen |
61
|
|
|
|
|
|
|
# |
62
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata( 'attribute_map' => {} ); |
63
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata( 'swagger_types' => {} ); |
64
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata( 'method_documentation' => {} ); |
65
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata( 'class_documentation' => {} ); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
# new object |
68
|
|
|
|
|
|
|
sub new { |
69
|
1
|
|
|
1
|
1
|
626
|
my ( $class, %args ) = @_; |
70
|
|
|
|
|
|
|
|
71
|
1
|
|
|
|
|
3
|
my $self = bless {}, $class; |
72
|
|
|
|
|
|
|
|
73
|
1
|
|
|
|
|
2
|
foreach my $attribute ( keys %{ $class->attribute_map } ) { |
|
1
|
|
|
|
|
3
|
|
74
|
2
|
|
|
|
|
34
|
my $args_key = $class->attribute_map->{$attribute}; |
75
|
2
|
|
|
|
|
20
|
$self->$attribute( $args{$args_key} ); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
1
|
|
|
|
|
14
|
return $self; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
# return perl hash |
82
|
|
|
|
|
|
|
sub to_hash { |
83
|
0
|
|
|
0
|
0
|
|
return decode_json( JSON->new->convert_blessed->encode(shift) ); |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
# used by JSON for serialization |
87
|
|
|
|
|
|
|
sub TO_JSON { |
88
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
89
|
0
|
|
|
|
|
|
my $_data = {}; |
90
|
0
|
|
|
|
|
|
foreach my $_key ( keys %{ $self->attribute_map } ) { |
|
0
|
|
|
|
|
|
|
91
|
0
|
0
|
|
|
|
|
if ( defined $self->{$_key} ) { |
92
|
0
|
|
|
|
|
|
$_data->{ $self->attribute_map->{$_key} } = $self->{$_key}; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
} |
95
|
0
|
|
|
|
|
|
return $_data; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
# from Perl hashref |
99
|
|
|
|
|
|
|
sub from_hash { |
100
|
0
|
|
|
0
|
0
|
|
my ( $self, $hash ) = @_; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# loop through attributes and use swagger_types to deserialize the data |
103
|
0
|
|
|
|
|
|
while ( my ( $_key, $_type ) = each %{ $self->swagger_types } ) { |
|
0
|
|
|
|
|
|
|
104
|
0
|
|
|
|
|
|
my $_json_attribute = $self->attribute_map->{$_key}; |
105
|
0
|
0
|
|
|
|
|
if ( $_type =~ /^array\[/i ) { # array |
|
|
0
|
|
|
|
|
|
106
|
0
|
|
|
|
|
|
my $_subclass = substr( $_type, 6, -1 ); |
107
|
0
|
|
|
|
|
|
my @_array = (); |
108
|
0
|
|
|
|
|
|
foreach my $_element ( @{ $hash->{$_json_attribute} } ) { |
|
0
|
|
|
|
|
|
|
109
|
0
|
|
|
|
|
|
push @_array, $self->_deserialize( $_subclass, $_element ); |
110
|
|
|
|
|
|
|
} |
111
|
0
|
|
|
|
|
|
$self->{$_key} = \@_array; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
elsif ( exists $hash->{$_json_attribute} ) |
114
|
|
|
|
|
|
|
{ #hash(model), primitive, datetime |
115
|
|
|
|
|
|
|
$self->{$_key} = |
116
|
0
|
|
|
|
|
|
$self->_deserialize( $_type, $hash->{$_json_attribute} ); |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
else { |
119
|
0
|
|
|
|
|
|
$log->debugf( "Warning: %s (%s) does not exist in input hash\n", |
120
|
|
|
|
|
|
|
$_key, $_json_attribute ); |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
0
|
|
|
|
|
|
return $self; |
125
|
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
# deserialize non-array data |
128
|
|
|
|
|
|
|
sub _deserialize { |
129
|
0
|
|
|
0
|
|
|
my ( $self, $type, $data ) = @_; |
130
|
0
|
|
|
|
|
|
$log->debugf( "deserializing %s with %s", Dumper($data), $type ); |
131
|
|
|
|
|
|
|
|
132
|
0
|
0
|
|
|
|
|
if ( $type eq 'DateTime' ) { |
|
|
0
|
|
|
|
|
|
133
|
0
|
|
|
|
|
|
return DateTime->from_epoch( epoch => str2time($data) ); |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
elsif ( grep( /^$type$/, ( 'int', 'double', 'string', 'boolean' ) ) ) { |
136
|
0
|
|
|
|
|
|
return $data; |
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
else { # hash(model) |
139
|
0
|
|
|
|
|
|
my $_instance = eval "Smartcat::Client::Object::$type->new()"; |
140
|
0
|
|
|
|
|
|
return $_instance->from_hash($data); |
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
__PACKAGE__->class_documentation( |
145
|
|
|
|
|
|
|
{ |
146
|
|
|
|
|
|
|
description => '', |
147
|
|
|
|
|
|
|
class => 'ExportDocumentTaskModel', |
148
|
|
|
|
|
|
|
required => [], # TODO |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
); |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
__PACKAGE__->method_documentation( |
153
|
|
|
|
|
|
|
{ |
154
|
|
|
|
|
|
|
'id' => { |
155
|
|
|
|
|
|
|
datatype => 'string', |
156
|
|
|
|
|
|
|
base_name => 'id', |
157
|
|
|
|
|
|
|
description => '', |
158
|
|
|
|
|
|
|
format => '', |
159
|
|
|
|
|
|
|
read_only => '', |
160
|
|
|
|
|
|
|
}, |
161
|
|
|
|
|
|
|
'document_ids' => { |
162
|
|
|
|
|
|
|
datatype => 'ARRAY[string]', |
163
|
|
|
|
|
|
|
base_name => 'documentIds', |
164
|
|
|
|
|
|
|
description => '', |
165
|
|
|
|
|
|
|
format => '', |
166
|
|
|
|
|
|
|
read_only => '', |
167
|
|
|
|
|
|
|
}, |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
); |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
__PACKAGE__->swagger_types( |
172
|
|
|
|
|
|
|
{ |
173
|
|
|
|
|
|
|
'id' => 'string', |
174
|
|
|
|
|
|
|
'document_ids' => 'ARRAY[string]' |
175
|
|
|
|
|
|
|
} |
176
|
|
|
|
|
|
|
); |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
__PACKAGE__->attribute_map( |
179
|
|
|
|
|
|
|
{ |
180
|
|
|
|
|
|
|
'id' => 'id', |
181
|
|
|
|
|
|
|
'document_ids' => 'documentIds' |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
); |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( keys %{ __PACKAGE__->attribute_map } ); |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
1; |