line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# ABSTRACT: MailboxOrg::API::Backup |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
# --- |
5
|
|
|
|
|
|
|
# This class is auto-generated by bin/get_mailbox_api.pl |
6
|
|
|
|
|
|
|
# --- |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.24; |
9
|
2
|
|
|
2
|
|
932
|
|
|
2
|
|
|
|
|
6
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
2
|
|
|
2
|
|
30
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
38
|
|
12
|
2
|
|
|
2
|
|
7
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
41
|
|
13
|
|
|
|
|
|
|
use Moo; |
14
|
2
|
|
|
2
|
|
9
|
use Types::Standard qw(Enum Str Int InstanceOf ArrayRef); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
14
|
|
15
|
2
|
|
|
2
|
|
538
|
use API::MailboxOrg::Types qw(HashRefRestricted Boolean); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
20
|
|
16
|
2
|
|
|
2
|
|
1627
|
use Params::ValidationCompiler qw(validation_for); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
10
|
|
17
|
2
|
|
|
2
|
|
708
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
117
|
|
18
|
|
|
|
|
|
|
extends 'API::MailboxOrg::APIBase'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
with 'MooX::Singleton'; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use feature 'signatures'; |
23
|
2
|
|
|
2
|
|
11
|
no warnings 'experimental::signatures'; |
|
2
|
|
|
|
|
33
|
|
|
2
|
|
|
|
|
162
|
|
24
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
513
|
|
25
|
|
|
|
|
|
|
our $VERSION = '1.0.2'; # VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my %validators = ( |
28
|
|
|
|
|
|
|
'backup_import' => validation_for( |
29
|
|
|
|
|
|
|
params => { |
30
|
|
|
|
|
|
|
mail => { type => Str, optional => 0 }, |
31
|
|
|
|
|
|
|
id => { type => Int, optional => 0 }, |
32
|
|
|
|
|
|
|
time => { type => Int, optional => 0 }, |
33
|
|
|
|
|
|
|
filter => { type => Str, optional => 0 }, |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
), |
37
|
|
|
|
|
|
|
'list' => validation_for( |
38
|
|
|
|
|
|
|
params => { |
39
|
|
|
|
|
|
|
mail => { type => Str, optional => 0 }, |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
}, |
42
|
|
|
|
|
|
|
), |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
my $validator = $validators{'backup_import'}; |
48
|
0
|
|
|
0
|
1
|
|
%params = $validator->(%params) if $validator; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
|
50
|
0
|
0
|
|
|
|
|
my %opt = (needs_auth => 1); |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return $self->_request( 'mail.backup.import', \%params, \%opt ); |
53
|
|
|
|
|
|
|
} |
54
|
0
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my $validator = $validators{'list'}; |
56
|
|
|
|
|
|
|
%params = $validator->(%params) if $validator; |
57
|
0
|
|
|
0
|
1
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
my %opt = (needs_auth => 1); |
59
|
0
|
0
|
|
|
|
|
|
60
|
|
|
|
|
|
|
return $self->_request( 'mail.backup.list', \%params, \%opt ); |
61
|
0
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=pod |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=encoding UTF-8 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 NAME |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
API::MailboxOrg::API::Backup - MailboxOrg::API::Backup |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 VERSION |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
version 1.0.2 |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 SYNOPSIS |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
use API::MailboxOrg; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
my $user = '1234abc'; |
84
|
|
|
|
|
|
|
my $password = '1234abc'; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
my $api = API::MailboxOrg->new( |
87
|
|
|
|
|
|
|
user => $user, |
88
|
|
|
|
|
|
|
password => $password, |
89
|
|
|
|
|
|
|
); |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 METHODS |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 backup_import |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Import an E-Mail-Backup into the users mailaccount |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Available for admin, account, domain, mail |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Parameters: |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=over 4 |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item * mail |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item * id |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item * time |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * filter |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=back |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
returns: array |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
$api->backup->backup_import(%params); |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head2 list |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Lists all existing E-Mail-backups |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Available for admin, account, domain, mail |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Parameters: |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=over 4 |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item * mail |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=back |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
returns: array |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
$api->backup->list(%params); |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 AUTHOR |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Renee Baecker <reneeb@cpan.org> |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
This software is Copyright (c) 2022 by Renee Baecker. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
This is free software, licensed under: |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |