e v5.16.3; # minimum for CentOS 7
use autodie;
use Carp;
use DateTime;
use LWP::UserAgent;
use JSON;
use List::Util 'first';
use List::MoreUtils 'zip';
use Log::Any qw/$log/;
use URI::QueryParam;
u
sprintf("HTTP error! %d - %s\n", $res->code, $res->message);
}
my $res_decoded = decode_json $res->decoded_content;
if ($res_decoded->{status} != 200) {
croak(
sprin
iption => (is => 'ro');
has name => (is => 'ro');
has privileges => (is => 'ro');
sub TO_JSON {
my $self = shift;
my %hash = %{$self};
return \%hash;
}
1;
__END__
=pod
=enco
e => (is => 'rw'); # enum simple|timebased
has stages => (is => 'rw'); # arrayref
sub TO_JSON {
my $self = shift;
my @stages;
#$self->stages
return [{
type =>
rw'); # array of str - emails?
has type => (is => 'rw'); # enum? admin|arbitrary
sub TO_JSON {
my $self = shift;
my %hash = %{$self};
return \%hash;
}
1;
__END__
=pod
=enco
age WebService::LogicMonitor::EscalationChain;
# ABSTRACT: An escalation chain
use v5.16.3;
use JSON qw//;
use WebService::LogicMonitor::EscalationChain::Destination;
use WebService::LogicMonitor::E
$self->$key;
}
my $json = JSON->new;
foreach my $key (qw/destination ccdestination/) {
next unless $self->$key;
$params{$key} =
$json->allow_blessed->convert_bl