File Coverage

blib/lib/OpenSearch/Parameters/Security/PatchUser.pm
Criterion Covered Total %
statement 15 16 93.7
branch n/a
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 20 23 86.9


line stmt bran cond sub pod time code
1             package OpenSearch::Parameters::Security::PatchUser;
2 4     4   2827 use strict;
  4         12  
  4         273  
3 4     4   111 use warnings;
  4         12  
  4         232  
4 4     4   27 use feature qw(state);
  4         11  
  4         544  
5 4     4   58 use Types::Standard qw(Str ArrayRef HashRef);
  4         10  
  4         36  
6 4     4   17547 use Moo::Role;
  4         12  
  4         71  
7              
8             with 'OpenSearch::Parameters';
9              
10             has 'username' => (
11             is => 'rw',
12             isa => Str,
13             required => 1
14             );
15              
16             has 'ops' => (
17             is => 'rw',
18             isa => ArrayRef [HashRef],
19             required => 1
20             );
21              
22             around [qw/username ops/] => sub {
23             my $orig = shift;
24             my $self = shift;
25              
26             if (@_) {
27             $self->$orig(@_);
28             return ($self);
29             }
30             return ( $self->$orig );
31             };
32              
33             sub api_spec {
34 0     0 0   state $s = +{
35             username => {
36             encode_func => 'as_is',
37             type => 'path',
38             },
39             ops => {
40             encode_func => 'as_is',
41             type => 'body',
42             forced_body => 1,
43             },
44             };
45             }
46              
47             1;