Fastly/NgwafAgentKeysApi.pm untested

filter: Statementstmt 0.0% 0 / 62 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 11 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 94 CC 6 SCAR 24.2
CC
6
Cov
0%
ngwaf_list_agent_keys
30.0
new
6.0
BEGIN
2.0
CRAP 11.2
1 =begin comment
2  
3 Fastly API
4  
5 Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
6  
7 The version of the API Spec document: 1.0.0
8 Contact: oss@fastly.com
9  
10 =end comment
11  
12 =cut
13  
14 #
15 # NOTE: This class is auto generated.
16 # Do not edit the class manually.
17 #
18 package WebService::Fastly::NgwafAgentKeysApi;
19  
20 require 5.6.0;
21 use strict;
22 use warnings;
23 use utf8;
24 use Exporter;
25 use Carp qw( croak );
26 use Log::Any qw($log);
27  
28 use WebService::Fastly::ApiClient;
29  
30 use base "Class::Data::Inheritable";
31  
32 __PACKAGE__->mk_classdata('method_documentation' => {});
33  
34 sub new {
35 my $class = shift;
36 my $api_client;
37  
38 if ($_[0] && ref $_[0] && ref $_[0] eq 'WebService::Fastly::ApiClient' ) {
39 $api_client = $_[0];
40 } else {
41 $api_client = WebService::Fastly::ApiClient->new(@_);
42 }
43  
44 bless { api_client => $api_client }, $class;
45  
46 }
47  
48  
49 #
50 # ngwaf_list_agent_keys
51 #
52 # List agent keys for a workspace
53 #
54 # @param string $workspace_id The ID of the workspace. (required)
55 {
56 my $params = {
57 'workspace_id' => {
58 data_type => 'string',
59 description => 'The ID of the workspace.',
60 required => '1',
61 },
62 };
63 __PACKAGE__->method_documentation->{ 'ngwaf_list_agent_keys' } = {
64 summary => 'List agent keys for a workspace',
65 params => $params,
66 returns => 'InlineResponse20019',
67 };
68 }
69 # @return InlineResponse20019
70 #
71 sub ngwaf_list_agent_keys {
72 my ($self, %args) = @_;
73  
74 # verify the required parameter 'workspace_id' is set
75 unless (exists $args{'workspace_id'}) {
76 croak("Missing the required parameter 'workspace_id' when calling ngwaf_list_agent_keys");
77 }
78  
79 # parse inputs
80 my $_resource_path = '/ngwaf/v1/workspaces/{workspace_id}/agent-keys';
81  
82 my $_method = 'GET';
83 my $query_params = {};
84 my $header_params = {};
85 my $form_params = {};
86  
87 # 'Accept' and 'Content-Type' header
88 my $_header_accept = $self->{api_client}->select_header_accept('application/json', 'application/problem+json');
89 if ($_header_accept) {
90 $header_params->{'Accept'} = $_header_accept;
91 }
92 $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
93  
94 # path params
95 if ( exists $args{'workspace_id'}) {
96 my $_base_variable = "{" . "workspace_id" . "}";
97 my $_base_value = $self->{api_client}->to_path_value($args{'workspace_id'});
98 $_resource_path =~ s/$_base_variable/$_base_value/g;
99 }
100  
101 my $_body_data;
102 # authentication setting, if any
103 my $auth_settings = [qw(token )];
104  
105 # make the API Call
106 my $response = $self->{api_client}->call_api($_resource_path, $_method,
107 $query_params, $form_params,
108 $header_params, $_body_data, $auth_settings);
109 if (!$response) {
110 return;
111 }
112 my $_response_object = $self->{api_client}->deserialize('InlineResponse20019', $response);
113 return $_response_object;
114 }
115  
116 1;