File Coverage

blib/lib/OpenSearch/Parameters/Index/GetDangling.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::Index::GetDangling;
2 4     4   2634 use strict;
  4         30  
  4         164  
3 4     4   22 use warnings;
  4         9  
  4         253  
4 4     4   24 use feature qw(state);
  4         8  
  4         453  
5 4     4   29 use Types::Standard qw(Str Bool);
  4         10  
  4         38  
6 4     4   7730 use Moo::Role;
  4         11  
  4         83  
7              
8             with 'OpenSearch::Parameters';
9              
10             has 'index_uuid' => (
11             is => 'rw',
12             isa => Str,
13             );
14              
15             has 'accept_data_loss' => (
16             is => 'rw',
17             isa => Bool,
18             );
19              
20             has 'timeout' => (
21             is => 'rw',
22             isa => Str,
23             );
24              
25             has 'cluster_manager_timeout' => (
26             is => 'rw',
27             isa => Str,
28             );
29              
30             around [qw/index_uuid accept_data_loss timeout cluster_manager_timeout/] => sub {
31             my $orig = shift;
32             my $self = shift;
33              
34             if (@_) {
35             $self->$orig(@_);
36             return ($self);
37             }
38             return ( $self->$orig );
39             };
40              
41             sub api_spec {
42 0     0 0   state $s = +{
43             index_uuid => {
44             encode_func => 'as_is',
45             type => 'path',
46             },
47             accept_data_loss => {
48             encode_func => 'encode_bool',
49             type => 'url',
50             },
51             timeout => {
52             encode_func => 'as_is',
53             type => 'url',
54             },
55             cluster_manager_timeout => {
56             encode_func => 'as_is',
57             type => 'url',
58             }
59             };
60             }
61              
62             1;