File Coverage

blib/lib/OpenSearch/Parameters/Index/DeleteDangling.pm
Criterion Covered Total %
statement 18 19 94.7
branch n/a
condition n/a
subroutine 6 7 85.7
pod 0 1 0.0
total 24 27 88.8


line stmt bran cond sub pod time code
1             package OpenSearch::Parameters::Index::DeleteDangling;
2 4     4   2872 use strict;
  4         11  
  4         189  
3 4     4   23 use warnings;
  4         38  
  4         242  
4 4     4   26 use feature qw(state);
  4         12  
  4         499  
5 4     4   30 use Types::Standard qw(Str Bool);
  4         9  
  4         38  
6 4     4   8090 use Types::Common::String qw(NonEmptyStr);
  4         11  
  4         39  
7 4     4   4657 use Moo::Role;
  4         27  
  4         43  
8              
9             with 'OpenSearch::Parameters';
10              
11             has 'index_uuid' => (
12             is => 'rw',
13             isa => NonEmptyStr,
14             required => 1,
15             );
16              
17             has 'accept_data_loss' => (
18             is => 'rw',
19             isa => Bool,
20             );
21              
22             has 'timeout' => (
23             is => 'rw',
24             isa => Str,
25             );
26              
27             has 'cluster_manager_timeout' => (
28             is => 'rw',
29             isa => Str,
30             );
31              
32             around [qw/index_uuid accept_data_loss timeout cluster_manager_timeout/] => sub {
33             my $orig = shift;
34             my $self = shift;
35              
36             if (@_) {
37             $self->$orig(@_);
38             return ($self);
39             }
40             return ( $self->$orig );
41             };
42              
43             sub api_spec {
44 0     0 0   state $s = +{
45             index_uuid => {
46             encode_func => 'as_is',
47             type => 'path',
48             },
49             accept_data_loss => {
50             encode_func => 'encode_bool',
51             type => 'url',
52             },
53             timeout => {
54             encode_func => 'as_is',
55             type => 'url',
56             },
57             cluster_manager_timeout => {
58             encode_func => 'as_is',
59             type => 'url',
60             }
61             };
62             }
63              
64             1;