AgentPushKit-Client
view release on metacpan or search on metacpan
lib/AgentPushKit/Client/HealthApi.pm view on Meta::CPAN
#
package AgentPushKit::Client::HealthApi;
require 5.6.0;
use strict;
use warnings;
use utf8;
use Exporter;
use Carp qw( croak );
use Log::Any qw($log);
use AgentPushKit::Client::ApiClient;
use base "Class::Data::Inheritable";
__PACKAGE__->mk_classdata('method_documentation' => {});
sub new {
my $class = shift;
my $api_client;
if ($_[0] && ref $_[0] && ref $_[0] eq 'AgentPushKit::Client::ApiClient' ) {
$api_client = $_[0];
} else {
$api_client = AgentPushKit::Client::ApiClient->new(@_);
}
bless { api_client => $api_client }, $class;
}
#
# get_health
#
# Check Agent Push Kit API health
#
{
my $params = {
};
__PACKAGE__->method_documentation->{ 'get_health' } = {
summary => 'Check Agent Push Kit API health',
params => $params,
returns => 'HealthResponse',
};
}
# @return HealthResponse
#
sub get_health {
my ($self, %args) = @_;
# parse inputs
my $_resource_path = '/health';
my $_method = 'GET';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('application/json');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
my $_body_data;
# authentication setting, if any
my $auth_settings = [qw()];
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('HealthResponse', $response);
return $_response_object;
}
1;
( run in 0.773 second using v1.01-cache-2.11-cpan-e623d60df62 )