Files
perl/lib/Kubernetes/EventsApi.pm

109 lines
2.3 KiB
Perl
Raw Normal View History

2019-04-24 12:07:57 +08:00
2019-03-23 16:42:23 +08:00
=begin comment
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2019-05-16 20:24:00 +08:00
The version of the OpenAPI document: v1.13.7
2019-03-23 16:42:23 +08:00
Generated by: https://openapi-generator.tech
=end comment
=cut
#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# Do not edit the class manually.
# Ref: https://openapi-generator.tech
#
package Kubernetes::EventsApi;
require 5.6.0;
use strict;
use warnings;
2019-04-24 12:07:57 +08:00
use utf8;
2019-03-23 16:42:23 +08:00
use Exporter;
use Carp qw( croak );
use Log::Any qw($log);
use Kubernetes::ApiClient;
use base "Class::Data::Inheritable";
2019-04-24 12:07:57 +08:00
__PACKAGE__->mk_classdata( 'method_documentation' => {} );
2019-03-23 16:42:23 +08:00
sub new {
my $class = shift;
my $api_client;
2019-04-24 12:07:57 +08:00
if ( $_[0] && ref $_[0] && ref $_[0] eq 'Kubernetes::ApiClient' ) {
2019-03-23 16:42:23 +08:00
$api_client = $_[0];
2019-04-24 12:07:57 +08:00
}
else {
2019-03-23 16:42:23 +08:00
$api_client = Kubernetes::ApiClient->new(@_);
}
bless { api_client => $api_client }, $class;
}
#
# get_api_group
#
2019-04-24 12:07:57 +08:00
#
#
2019-03-23 16:42:23 +08:00
{
2019-04-24 12:07:57 +08:00
my $params = {};
__PACKAGE__->method_documentation->{'get_api_group'} = {
summary => '',
params => $params,
2019-03-23 16:42:23 +08:00
returns => 'V1APIGroup',
2019-04-24 12:07:57 +08:00
};
2019-03-23 16:42:23 +08:00
}
2019-04-24 12:07:57 +08:00
2019-03-23 16:42:23 +08:00
# @return V1APIGroup
#
sub get_api_group {
2019-04-24 12:07:57 +08:00
my ( $self, %args ) = @_;
2019-03-23 16:42:23 +08:00
# parse inputs
my $_resource_path = '/apis/events.k8s.io/';
2019-04-24 12:07:57 +08:00
my $_method = 'GET';
my $query_params = {};
2019-03-23 16:42:23 +08:00
my $header_params = {};
2019-04-24 12:07:57 +08:00
my $form_params = {};
2019-03-23 16:42:23 +08:00
# 'Accept' and 'Content-Type' header
2019-04-24 12:07:57 +08:00
my $_header_accept =
$self->{api_client}
->select_header_accept( 'application/json', 'application/yaml',
'application/vnd.kubernetes.protobuf' );
2019-03-23 16:42:23 +08:00
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
2019-04-24 12:07:57 +08:00
$header_params->{'Content-Type'} =
$self->{api_client}->select_header_content_type();
2019-03-23 16:42:23 +08:00
my $_body_data;
2019-04-24 12:07:57 +08:00
2019-03-23 16:42:23 +08:00
# authentication setting, if any
my $auth_settings = [qw(BearerToken )];
# make the API Call
2019-04-24 12:07:57 +08:00
my $response = $self->{api_client}->call_api(
$_resource_path, $_method, $query_params, $form_params,
$header_params, $_body_data, $auth_settings
);
if ( !$response ) {
2019-03-23 16:42:23 +08:00
return;
}
2019-04-24 12:07:57 +08:00
my $_response_object =
$self->{api_client}->deserialize( 'V1APIGroup', $response );
2019-03-23 16:42:23 +08:00
return $_response_object;
}
1;