File Coverage

lib/Smartcat/Client/ProjectApi.pm
Criterion Covered Total %
statement 32 483 6.6
branch 1 188 0.5
condition 2 9 22.2
subroutine 10 29 34.4
pod 0 20 0.0
total 45 729 6.1


line stmt bran cond sub pod time code
1              
2             =begin comment
3              
4             Smartcat Integration API
5              
6             No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7              
8             OpenAPI spec version: v1
9              
10             Generated by: https://github.com/swagger-api/swagger-codegen.git
11              
12             =end comment
13              
14             =cut
15              
16             #
17             # NOTE: This class is auto generated by the swagger code generator program.
18             # Do not edit the class manually.
19             # Ref: https://github.com/swagger-api/swagger-codegen
20             #
21             package Smartcat::Client::ProjectApi;
22              
23             require 5.6.0;
24 1     1   930 use strict;
  1         2  
  1         31  
25 1     1   5 use warnings;
  1         2  
  1         31  
26 1     1   588 use utf8;
  1         15  
  1         5  
27 1     1   30 use Exporter;
  1         2  
  1         38  
28 1     1   613 use JSON;
  1         8512  
  1         6  
29 1     1   152 use Carp qw( croak );
  1         2  
  1         56  
30 1     1   456 use Log::Any qw($log);
  1         8306  
  1         5  
31              
32 1     1   2620 use Smartcat::Client::ApiClient;
  1         4  
  1         41  
33              
34 1     1   7 use base "Class::Data::Inheritable";
  1         2  
  1         492  
35              
36             __PACKAGE__->mk_classdata( 'method_documentation' => {} );
37              
38             sub new {
39 1     1 0 637 my $class = shift;
40 1         2 my $api_client;
41              
42 1 50 33     9 if ( $_[0] && ref $_[0] && ref $_[0] eq 'Smartcat::Client::ApiClient' ) {
      33        
43 0         0 $api_client = $_[0];
44             }
45             else {
46 1         8 $api_client = Smartcat::Client::ApiClient->new(@_);
47             }
48              
49 1         7 bless { api_client => $api_client }, $class;
50              
51             }
52              
53             #
54             # project_add_document
55             #
56             #
57             #
58             # @param string $project_id (required)
59             # @param ARRAY[CreateDocumentPropertyModel] $document_model (required)
60             # @param $file (required)
61             # @param string $disassemble_algorithm_name (optional)
62             # @param string $external_id (optional)
63             # @param string $meta_info (optional)
64             # @param string $target_languages (optional)
65             # @param string $preset_disassemble_algorithm (optional)
66             {
67             my $params = {
68             'project_id' => {
69             data_type => 'string',
70             description => '',
71             required => '1',
72             },
73             'document_model' => {
74             data_type => 'ARRAY[CreateDocumentPropertyModel]',
75             description => '',
76             required => '1',
77             },
78             'file' => {
79             data_type => '',
80             description => '',
81             required => '1',
82             },
83             'disassemble_algorithm_name' => {
84             data_type => 'string',
85             description => '',
86             required => '0',
87             },
88             'external_id' => {
89             data_type => 'string',
90             description => '',
91             required => '0',
92             },
93             'meta_info' => {
94             data_type => 'string',
95             description => '',
96             required => '0',
97             },
98             'target_languages' => {
99             data_type => 'string',
100             description => '',
101             required => '0',
102             },
103             'preset_disassemble_algorithm' => {
104             data_type => 'string',
105             description => '',
106             required => '0',
107             },
108             };
109             __PACKAGE__->method_documentation->{'project_add_document'} = {
110             summary => '',
111             params => $params,
112             returns => 'ARRAY[DocumentModel]',
113             };
114             }
115              
116             # @return ARRAY[DocumentModel]
117             #
118             sub project_add_document {
119 0     0 0   my ( $self, %args ) = @_;
120              
121             # verify the required parameter 'project_id' is set
122 0 0         unless ( exists $args{'project_id'} ) {
123 0           croak(
124             "Missing the required parameter 'project_id' when calling project_add_document"
125             );
126             }
127              
128             # verify the required parameter 'document_model' is set
129 0 0         unless ( exists $args{'document_model'} ) {
130 0           croak(
131             "Missing the required parameter 'document_model' when calling project_add_document"
132             );
133             }
134              
135             # verify the required parameter 'file' is set
136 0 0         unless ( exists $args{'file'} ) {
137 0           croak(
138             "Missing the required parameter 'file' when calling project_add_document"
139             );
140             }
141              
142             # parse inputs
143 0           my $_resource_path = '/api/integration/v1/project/document';
144              
145 0           my $_method = 'POST';
146 0           my $query_params = {};
147 0           my $header_params = {};
148 0           my $form_params = {};
149              
150             # 'Accept' and 'Content-Type' header
151             my $_header_accept = $self->{api_client}
152 0           ->select_header_accept( 'application/json', 'text/json' );
153 0 0         if ($_header_accept) {
154 0           $header_params->{'Accept'} = $_header_accept;
155             }
156             $header_params->{'Content-Type'} =
157 0           $self->{api_client}->select_header_content_type('multipart/form-data');
158              
159             # query params
160 0 0         if ( exists $args{'project_id'} ) {
161             $query_params->{'projectId'} =
162 0           $self->{api_client}->to_query_value( $args{'project_id'} );
163             }
164              
165             # query params
166 0 0         if ( exists $args{'disassemble_algorithm_name'} ) {
167             $query_params->{'disassembleAlgorithmName'} = $self->{api_client}
168 0           ->to_query_value( $args{'disassemble_algorithm_name'} );
169             }
170              
171             # query params
172 0 0         if ( exists $args{'external_id'} ) {
173             $query_params->{'externalId'} =
174 0           $self->{api_client}->to_query_value( $args{'external_id'} );
175             }
176              
177             # query params
178 0 0         if ( exists $args{'meta_info'} ) {
179             $query_params->{'metaInfo'} =
180 0           $self->{api_client}->to_query_value( $args{'meta_info'} );
181             }
182              
183             # query params
184 0 0         if ( exists $args{'target_languages'} ) {
185             $query_params->{'targetLanguages'} =
186 0           $self->{api_client}->to_query_value( $args{'target_languages'} );
187             }
188              
189             # query params
190 0 0         if ( exists $args{'preset_disassemble_algorithm'} ) {
191             $query_params->{'presetDisassembleAlgorithm'} =
192 0           $self->{api_client}->to_query_value( $args{'preset_disassemble_algorithm'} );
193             }
194              
195 0           my $_body_data = [];
196              
197             # body params
198 0 0         if ( exists $args{'document_model'} ) {
199             push(
200             @$_body_data,
201             documentModel => [
202             undef,
203             undef,
204             Content_Type => 'application/json',
205 0           Content => to_json( [ $args{'document_model'}->to_hash ] )
206             ]
207             );
208             }
209 0 0 0       if ( exists $args{'file'} && ref $args{'file'} eq 'HASH' ) {
210             push(
211             @$_body_data,
212             file => [
213             $args{'file'}->{path},
214             $args{'file'}->{filename},
215 0           Content_Type => 'application/octetstream'
216             ]
217             );
218             }
219              
220             # authentication setting, if any
221 0           my $auth_settings = [qw()];
222              
223             # make the API Call
224             my $response = $self->{api_client}->call_api(
225 0           $_resource_path, $_method, $query_params, $form_params,
226             $header_params, $_body_data, $auth_settings
227             );
228 0 0         if ( !$response ) {
229 0           return;
230             }
231             my $_response_object =
232 0           $self->{api_client}->deserialize( 'ARRAY[DocumentModel]', $response );
233 0           return $_response_object;
234             }
235              
236             #
237             # project_add_language
238             #
239             # Add a new target language to the project
240             #
241             # @param string $project_id Project ID (required)
242             # @param string $target_language Target language (required)
243             {
244             my $params = {
245             'project_id' => {
246             data_type => 'string',
247             description => 'Project ID',
248             required => '1',
249             },
250             'target_language' => {
251             data_type => 'string',
252             description => 'Target language',
253             required => '1',
254             },
255             };
256             __PACKAGE__->method_documentation->{'project_add_language'} = {
257             summary => 'Add a new target language to the project',
258             params => $params,
259             returns => undef,
260             };
261             }
262              
263             # @return void
264             #
265             sub project_add_language {
266 0     0 0   my ( $self, %args ) = @_;
267              
268             # verify the required parameter 'project_id' is set
269 0 0         unless ( exists $args{'project_id'} ) {
270 0           croak(
271             "Missing the required parameter 'project_id' when calling project_add_language"
272             );
273             }
274              
275             # verify the required parameter 'target_language' is set
276 0 0         unless ( exists $args{'target_language'} ) {
277 0           croak(
278             "Missing the required parameter 'target_language' when calling project_add_language"
279             );
280             }
281              
282             # parse inputs
283 0           my $_resource_path = '/api/integration/v1/project/language';
284              
285 0           my $_method = 'POST';
286 0           my $query_params = {};
287 0           my $header_params = {};
288 0           my $form_params = {};
289              
290             # 'Accept' and 'Content-Type' header
291 0           my $_header_accept = $self->{api_client}->select_header_accept();
292 0 0         if ($_header_accept) {
293 0           $header_params->{'Accept'} = $_header_accept;
294             }
295             $header_params->{'Content-Type'} =
296 0           $self->{api_client}->select_header_content_type();
297              
298             # query params
299 0 0         if ( exists $args{'project_id'} ) {
300             $query_params->{'projectId'} =
301 0           $self->{api_client}->to_query_value( $args{'project_id'} );
302             }
303              
304             # query params
305 0 0         if ( exists $args{'target_language'} ) {
306             $query_params->{'targetLanguage'} =
307 0           $self->{api_client}->to_query_value( $args{'target_language'} );
308             }
309              
310 0           my $_body_data;
311              
312             # authentication setting, if any
313 0           my $auth_settings = [qw()];
314              
315             # make the API Call
316             $self->{api_client}->call_api(
317 0           $_resource_path, $_method, $query_params, $form_params,
318             $header_params, $_body_data, $auth_settings
319             );
320 0           return;
321             }
322              
323             #
324             # project_build_statistics
325             #
326             #
327             #
328             # @param string $project_id (required)
329             # @param boolean $only_exact_matches (optional)
330             {
331             my $params = {
332             'project_id' => {
333             data_type => 'string',
334             description => '',
335             required => '1',
336             },
337             'only_exact_matches' => {
338             data_type => 'boolean',
339             description => '',
340             required => '0',
341             },
342             };
343             __PACKAGE__->method_documentation->{'project_build_statistics'} = {
344             summary => '',
345             params => $params,
346             returns => 'string',
347             };
348             }
349              
350             # @return string
351             #
352             sub project_build_statistics {
353 0     0 0   my ( $self, %args ) = @_;
354              
355             # verify the required parameter 'project_id' is set
356 0 0         unless ( exists $args{'project_id'} ) {
357 0           croak(
358             "Missing the required parameter 'project_id' when calling project_build_statistics"
359             );
360             }
361              
362             # parse inputs
363 0           my $_resource_path =
364             '/api/integration/v1/project/{projectId}/statistics/build';
365              
366 0           my $_method = 'POST';
367 0           my $query_params = {};
368 0           my $header_params = {};
369 0           my $form_params = {};
370              
371             # 'Accept' and 'Content-Type' header
372             my $_header_accept = $self->{api_client}
373 0           ->select_header_accept( 'application/json', 'text/json' );
374 0 0         if ($_header_accept) {
375 0           $header_params->{'Accept'} = $_header_accept;
376             }
377             $header_params->{'Content-Type'} =
378 0           $self->{api_client}->select_header_content_type();
379              
380             # query params
381 0 0         if ( exists $args{'only_exact_matches'} ) {
382             $query_params->{'onlyExactMatches'} =
383 0           $self->{api_client}->to_query_value( $args{'only_exact_matches'} );
384             }
385              
386             # path params
387 0 0         if ( exists $args{'project_id'} ) {
388 0           my $_base_variable = "{" . "projectId" . "}";
389             my $_base_value =
390 0           $self->{api_client}->to_path_value( $args{'project_id'} );
391 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
392             }
393              
394 0           my $_body_data;
395              
396             # authentication setting, if any
397 0           my $auth_settings = [qw()];
398              
399             # make the API Call
400             my $response = $self->{api_client}->call_api(
401 0           $_resource_path, $_method, $query_params, $form_params,
402             $header_params, $_body_data, $auth_settings
403             );
404 0 0         if ( !$response ) {
405 0           return;
406             }
407             my $_response_object =
408 0           $self->{api_client}->deserialize( 'string', $response );
409 0           return $_response_object;
410             }
411              
412             #
413             # project_cancel_project
414             #
415             # Cancel the project
416             #
417             # @param string $project_id Project ID (required)
418             {
419             my $params = {
420             'project_id' => {
421             data_type => 'string',
422             description => 'Project ID',
423             required => '1',
424             },
425             };
426             __PACKAGE__->method_documentation->{'project_cancel_project'} = {
427             summary => 'Cancel the project',
428             params => $params,
429             returns => undef,
430             };
431             }
432              
433             # @return void
434             #
435             sub project_cancel_project {
436 0     0 0   my ( $self, %args ) = @_;
437              
438             # verify the required parameter 'project_id' is set
439 0 0         unless ( exists $args{'project_id'} ) {
440 0           croak(
441             "Missing the required parameter 'project_id' when calling project_cancel_project"
442             );
443             }
444              
445             # parse inputs
446 0           my $_resource_path = '/api/integration/v1/project/cancel';
447              
448 0           my $_method = 'POST';
449 0           my $query_params = {};
450 0           my $header_params = {};
451 0           my $form_params = {};
452              
453             # 'Accept' and 'Content-Type' header
454 0           my $_header_accept = $self->{api_client}->select_header_accept();
455 0 0         if ($_header_accept) {
456 0           $header_params->{'Accept'} = $_header_accept;
457             }
458             $header_params->{'Content-Type'} =
459 0           $self->{api_client}->select_header_content_type();
460              
461             # query params
462 0 0         if ( exists $args{'project_id'} ) {
463             $query_params->{'projectId'} =
464 0           $self->{api_client}->to_query_value( $args{'project_id'} );
465             }
466              
467 0           my $_body_data;
468              
469             # authentication setting, if any
470 0           my $auth_settings = [qw()];
471              
472             # make the API Call
473             $self->{api_client}->call_api(
474 0           $_resource_path, $_method, $query_params, $form_params,
475             $header_params, $_body_data, $auth_settings
476             );
477 0           return;
478             }
479              
480             #
481             # project_complete_project
482             #
483             #
484             #
485             # @param string $project_id (required)
486             {
487             my $params = {
488             'project_id' => {
489             data_type => 'string',
490             description => '',
491             required => '1',
492             },
493             };
494             __PACKAGE__->method_documentation->{'project_complete_project'} = {
495             summary => '',
496             params => $params,
497             returns => undef,
498             };
499             }
500              
501             # @return void
502             #
503             sub project_complete_project {
504 0     0 0   my ( $self, %args ) = @_;
505              
506             # verify the required parameter 'project_id' is set
507 0 0         unless ( exists $args{'project_id'} ) {
508 0           croak(
509             "Missing the required parameter 'project_id' when calling project_complete_project"
510             );
511             }
512              
513             # parse inputs
514 0           my $_resource_path = '/api/integration/v1/project/complete';
515              
516 0           my $_method = 'POST';
517 0           my $query_params = {};
518 0           my $header_params = {};
519 0           my $form_params = {};
520              
521             # 'Accept' and 'Content-Type' header
522 0           my $_header_accept = $self->{api_client}->select_header_accept();
523 0 0         if ($_header_accept) {
524 0           $header_params->{'Accept'} = $_header_accept;
525             }
526             $header_params->{'Content-Type'} =
527 0           $self->{api_client}->select_header_content_type();
528              
529             # query params
530 0 0         if ( exists $args{'project_id'} ) {
531             $query_params->{'projectId'} =
532 0           $self->{api_client}->to_query_value( $args{'project_id'} );
533             }
534              
535 0           my $_body_data;
536              
537             # authentication setting, if any
538 0           my $auth_settings = [qw()];
539              
540             # make the API Call
541             $self->{api_client}->call_api(
542 0           $_resource_path, $_method, $query_params, $form_params,
543             $header_params, $_body_data, $auth_settings
544             );
545 0           return;
546             }
547              
548             #
549             # project_create_project
550             #
551             #
552             #
553             # @param CreateProjectModel $project (required)
554             {
555             my $params = {
556             'project' => {
557             data_type => 'CreateProjectModel',
558             description => '',
559             required => '1',
560             },
561             };
562             __PACKAGE__->method_documentation->{'project_create_project'} = {
563             summary => '',
564             params => $params,
565             returns => 'ProjectModel',
566             };
567             }
568              
569             # @return ProjectModel
570             #
571             sub project_create_project {
572 0     0 0   my ( $self, %args ) = @_;
573              
574             # verify the required parameter 'project' is set
575 0 0         unless ( exists $args{'project'} ) {
576 0           croak(
577             "Missing the required parameter 'project' when calling project_create_project"
578             );
579             }
580              
581             # parse inputs
582 0           my $_resource_path = '/api/integration/v1/project/create';
583              
584 0           my $_method = 'POST';
585 0           my $query_params = {};
586 0           my $header_params = {};
587 0           my $form_params = {};
588              
589             # 'Accept' and 'Content-Type' header
590             my $_header_accept = $self->{api_client}
591 0           ->select_header_accept( 'application/json', 'text/json' );
592 0 0         if ($_header_accept) {
593 0           $header_params->{'Accept'} = $_header_accept;
594             }
595             $header_params->{'Content-Type'} =
596 0           $self->{api_client}->select_header_content_type('multipart/form-data');
597              
598 0           my $_body_data;
599              
600             # body params
601 0 0         if ( exists $args{'project'} ) {
602 0           $_body_data = $args{'project'};
603             }
604              
605             # authentication setting, if any
606 0           my $auth_settings = [qw()];
607              
608             # make the API Call
609             my $response = $self->{api_client}->call_api(
610 0           $_resource_path, $_method, $query_params, $form_params,
611             $header_params, $_body_data, $auth_settings
612             );
613 0 0         if ( !$response ) {
614 0           return;
615             }
616             my $_response_object =
617 0           $self->{api_client}->deserialize( 'ProjectModel', $response );
618 0           return $_response_object;
619             }
620              
621             #
622             # project_delete
623             #
624             # Delete the project
625             #
626             # @param string $project_id Project ID (required)
627             {
628             my $params = {
629             'project_id' => {
630             data_type => 'string',
631             description => 'Project ID',
632             required => '1',
633             },
634             };
635             __PACKAGE__->method_documentation->{'project_delete'} = {
636             summary => 'Delete the project',
637             params => $params,
638             returns => undef,
639             };
640             }
641              
642             # @return void
643             #
644             sub project_delete {
645 0     0 0   my ( $self, %args ) = @_;
646              
647             # verify the required parameter 'project_id' is set
648 0 0         unless ( exists $args{'project_id'} ) {
649 0           croak(
650             "Missing the required parameter 'project_id' when calling project_delete"
651             );
652             }
653              
654             # parse inputs
655 0           my $_resource_path = '/api/integration/v1/project/{projectId}';
656              
657 0           my $_method = 'DELETE';
658 0           my $query_params = {};
659 0           my $header_params = {};
660 0           my $form_params = {};
661              
662             # 'Accept' and 'Content-Type' header
663 0           my $_header_accept = $self->{api_client}->select_header_accept();
664 0 0         if ($_header_accept) {
665 0           $header_params->{'Accept'} = $_header_accept;
666             }
667             $header_params->{'Content-Type'} =
668 0           $self->{api_client}->select_header_content_type();
669              
670             # path params
671 0 0         if ( exists $args{'project_id'} ) {
672 0           my $_base_variable = "{" . "projectId" . "}";
673             my $_base_value =
674 0           $self->{api_client}->to_path_value( $args{'project_id'} );
675 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
676             }
677              
678 0           my $_body_data;
679              
680             # authentication setting, if any
681 0           my $auth_settings = [qw()];
682              
683             # make the API Call
684             $self->{api_client}->call_api(
685 0           $_resource_path, $_method, $query_params, $form_params,
686             $header_params, $_body_data, $auth_settings
687             );
688 0           return;
689             }
690              
691             #
692             # project_get
693             #
694             # Receive the project model
695             #
696             # @param string $project_id Project ID (required)
697             {
698             my $params = {
699             'project_id' => {
700             data_type => 'string',
701             description => 'Project ID',
702             required => '1',
703             },
704             };
705             __PACKAGE__->method_documentation->{'project_get'} = {
706             summary => 'Receive the project model',
707             params => $params,
708             returns => 'ProjectModel',
709             };
710             }
711              
712             # @return ProjectModel
713             #
714             sub project_get {
715 0     0 0   my ( $self, %args ) = @_;
716              
717             # verify the required parameter 'project_id' is set
718 0 0         unless ( exists $args{'project_id'} ) {
719 0           croak(
720             "Missing the required parameter 'project_id' when calling project_get"
721             );
722             }
723              
724             # parse inputs
725 0           my $_resource_path = '/api/integration/v1/project/{projectId}';
726              
727 0           my $_method = 'GET';
728 0           my $query_params = {};
729 0           my $header_params = {};
730 0           my $form_params = {};
731              
732             # 'Accept' and 'Content-Type' header
733             my $_header_accept = $self->{api_client}
734 0           ->select_header_accept( 'application/json', 'text/json' );
735 0 0         if ($_header_accept) {
736 0           $header_params->{'Accept'} = $_header_accept;
737             }
738             $header_params->{'Content-Type'} =
739 0           $self->{api_client}->select_header_content_type();
740              
741             # path params
742 0 0         if ( exists $args{'project_id'} ) {
743 0           my $_base_variable = "{" . "projectId" . "}";
744             my $_base_value =
745 0           $self->{api_client}->to_path_value( $args{'project_id'} );
746 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
747             }
748              
749 0           my $_body_data;
750              
751             # authentication setting, if any
752 0           my $auth_settings = [qw()];
753              
754             # make the API Call
755             my $response = $self->{api_client}->call_api(
756 0           $_resource_path, $_method, $query_params, $form_params,
757             $header_params, $_body_data, $auth_settings
758             );
759 0 0         if ( !$response ) {
760 0           return;
761             }
762             my $_response_object =
763 0           $self->{api_client}->deserialize( 'ProjectModel', $response );
764 0           return $_response_object;
765             }
766              
767             #
768             # project_get_all
769             #
770             #
771             #
772             # @param string $created_by_user_id (optional)
773             # @param string $project_name (optional)
774             # @param string $external_tag (optional)
775             # @param ARRAY[string] $client_ids (optional)
776             {
777             my $params = {
778             'created_by_user_id' => {
779             data_type => 'string',
780             description => '',
781             required => '0',
782             },
783             'project_name' => {
784             data_type => 'string',
785             description => '',
786             required => '0',
787             },
788             'external_tag' => {
789             data_type => 'string',
790             description => '',
791             required => '0',
792             },
793             'client_ids' => {
794             data_type => 'ARRAY[string]',
795             description => '',
796             required => '0',
797             },
798             };
799             __PACKAGE__->method_documentation->{'project_get_all'} = {
800             summary => '',
801             params => $params,
802             returns => 'ARRAY[ProjectModel]',
803             };
804             }
805              
806             # @return ARRAY[ProjectModel]
807             #
808             sub project_get_all {
809 0     0 0   my ( $self, %args ) = @_;
810              
811             # parse inputs
812 0           my $_resource_path = '/api/integration/v1/project/list';
813              
814 0           my $_method = 'GET';
815 0           my $query_params = {};
816 0           my $header_params = {};
817 0           my $form_params = {};
818              
819             # 'Accept' and 'Content-Type' header
820             my $_header_accept = $self->{api_client}
821 0           ->select_header_accept( 'application/json', 'text/json' );
822 0 0         if ($_header_accept) {
823 0           $header_params->{'Accept'} = $_header_accept;
824             }
825             $header_params->{'Content-Type'} =
826 0           $self->{api_client}->select_header_content_type();
827              
828             # query params
829 0 0         if ( exists $args{'created_by_user_id'} ) {
830             $query_params->{'createdByUserId'} =
831 0           $self->{api_client}->to_query_value( $args{'created_by_user_id'} );
832             }
833              
834             # query params
835 0 0         if ( exists $args{'project_name'} ) {
836             $query_params->{'projectName'} =
837 0           $self->{api_client}->to_query_value( $args{'project_name'} );
838             }
839              
840             # query params
841 0 0         if ( exists $args{'external_tag'} ) {
842             $query_params->{'externalTag'} =
843 0           $self->{api_client}->to_query_value( $args{'external_tag'} );
844             }
845              
846             # query params
847 0 0         if ( exists $args{'client_ids'} ) {
848             $query_params->{'clientIds'} =
849 0           $self->{api_client}->to_query_value( $args{'client_ids'} );
850             }
851              
852 0           my $_body_data;
853              
854             # authentication setting, if any
855 0           my $auth_settings = [qw()];
856              
857             # make the API Call
858             my $response = $self->{api_client}->call_api(
859 0           $_resource_path, $_method, $query_params, $form_params,
860             $header_params, $_body_data, $auth_settings
861             );
862 0 0         if ( !$response ) {
863 0           return;
864             }
865             my $_response_object =
866 0           $self->{api_client}->deserialize( 'ARRAY[ProjectModel]', $response );
867 0           return $_response_object;
868             }
869              
870             #
871             # project_get_completed_work_statistics
872             #
873             # Receiving statistics for the completed parts of the project
874             #
875             # @param string $project_id project id (required)
876             {
877             my $params = {
878             'project_id' => {
879             data_type => 'string',
880             description => 'project id',
881             required => '1',
882             },
883             };
884             __PACKAGE__->method_documentation->{'project_get_completed_work_statistics'}
885             = {
886             summary =>
887             'Receiving statistics for the completed parts of the project',
888             params => $params,
889             returns => 'ARRAY[ExecutiveStatisticsModel]',
890             };
891             }
892              
893             # @return ARRAY[ExecutiveStatisticsModel]
894             #
895             sub project_get_completed_work_statistics {
896 0     0 0   my ( $self, %args ) = @_;
897              
898             # verify the required parameter 'project_id' is set
899 0 0         unless ( exists $args{'project_id'} ) {
900 0           croak(
901             "Missing the required parameter 'project_id' when calling project_get_completed_work_statistics"
902             );
903             }
904              
905             # parse inputs
906 0           my $_resource_path =
907             '/api/integration/v1/project/{projectId}/completedWorkStatistics';
908              
909 0           my $_method = 'GET';
910 0           my $query_params = {};
911 0           my $header_params = {};
912 0           my $form_params = {};
913              
914             # 'Accept' and 'Content-Type' header
915             my $_header_accept = $self->{api_client}
916 0           ->select_header_accept( 'application/json', 'text/json' );
917 0 0         if ($_header_accept) {
918 0           $header_params->{'Accept'} = $_header_accept;
919             }
920             $header_params->{'Content-Type'} =
921 0           $self->{api_client}->select_header_content_type();
922              
923             # path params
924 0 0         if ( exists $args{'project_id'} ) {
925 0           my $_base_variable = "{" . "projectId" . "}";
926             my $_base_value =
927 0           $self->{api_client}->to_path_value( $args{'project_id'} );
928 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
929             }
930              
931 0           my $_body_data;
932              
933             # authentication setting, if any
934 0           my $auth_settings = [qw()];
935              
936             # make the API Call
937             my $response = $self->{api_client}->call_api(
938 0           $_resource_path, $_method, $query_params, $form_params,
939             $header_params, $_body_data, $auth_settings
940             );
941 0 0         if ( !$response ) {
942 0           return;
943             }
944             my $_response_object = $self->{api_client}
945 0           ->deserialize( 'ARRAY[ExecutiveStatisticsModel]', $response );
946 0           return $_response_object;
947             }
948              
949             #
950             # project_get_glossaries
951             #
952             #
953             #
954             # @param string $project_id (required)
955             {
956             my $params = {
957             'project_id' => {
958             data_type => 'string',
959             description => '',
960             required => '1',
961             },
962             };
963             __PACKAGE__->method_documentation->{'project_get_glossaries'} = {
964             summary => '',
965             params => $params,
966             returns => 'ARRAY[GlossaryModel]',
967             };
968             }
969              
970             # @return ARRAY[GlossaryModel]
971             #
972             sub project_get_glossaries {
973 0     0 0   my ( $self, %args ) = @_;
974              
975             # verify the required parameter 'project_id' is set
976 0 0         unless ( exists $args{'project_id'} ) {
977 0           croak(
978             "Missing the required parameter 'project_id' when calling project_get_glossaries"
979             );
980             }
981              
982             # parse inputs
983 0           my $_resource_path = '/api/integration/v1/project/{projectId}/glossaries';
984              
985 0           my $_method = 'GET';
986 0           my $query_params = {};
987 0           my $header_params = {};
988 0           my $form_params = {};
989              
990             # 'Accept' and 'Content-Type' header
991             my $_header_accept = $self->{api_client}
992 0           ->select_header_accept( 'application/json', 'text/json' );
993 0 0         if ($_header_accept) {
994 0           $header_params->{'Accept'} = $_header_accept;
995             }
996             $header_params->{'Content-Type'} =
997 0           $self->{api_client}->select_header_content_type();
998              
999             # path params
1000 0 0         if ( exists $args{'project_id'} ) {
1001 0           my $_base_variable = "{" . "projectId" . "}";
1002             my $_base_value =
1003 0           $self->{api_client}->to_path_value( $args{'project_id'} );
1004 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
1005             }
1006              
1007 0           my $_body_data;
1008              
1009             # authentication setting, if any
1010 0           my $auth_settings = [qw()];
1011              
1012             # make the API Call
1013             my $response = $self->{api_client}->call_api(
1014 0           $_resource_path, $_method, $query_params, $form_params,
1015             $header_params, $_body_data, $auth_settings
1016             );
1017 0 0         if ( !$response ) {
1018 0           return;
1019             }
1020             my $_response_object =
1021 0           $self->{api_client}->deserialize( 'ARRAY[GlossaryModel]', $response );
1022 0           return $_response_object;
1023             }
1024              
1025             #
1026             # project_get_project_statistics
1027             #
1028             # Receive statistics
1029             #
1030             # @param string $project_id Project ID (required)
1031             # @param boolean $only_exact_matches 100 or more matches requirement (optional)
1032             {
1033             my $params = {
1034             'project_id' => {
1035             data_type => 'string',
1036             description => 'Project ID',
1037             required => '1',
1038             },
1039             'only_exact_matches' => {
1040             data_type => 'boolean',
1041             description => '100 or more matches requirement',
1042             required => '0',
1043             },
1044             };
1045             __PACKAGE__->method_documentation->{'project_get_project_statistics'} = {
1046             summary => 'Receive statistics',
1047             params => $params,
1048             returns => 'ARRAY[ProjectStatisticsModel]',
1049             };
1050             }
1051              
1052             # @return ARRAY[ProjectStatisticsModel]
1053             #
1054             sub project_get_project_statistics {
1055 0     0 0   my ( $self, %args ) = @_;
1056              
1057             # verify the required parameter 'project_id' is set
1058 0 0         unless ( exists $args{'project_id'} ) {
1059 0           croak(
1060             "Missing the required parameter 'project_id' when calling project_get_project_statistics"
1061             );
1062             }
1063              
1064             # parse inputs
1065 0           my $_resource_path = '/api/integration/v2/project/{projectId}/statistics';
1066              
1067 0           my $_method = 'GET';
1068 0           my $query_params = {};
1069 0           my $header_params = {};
1070 0           my $form_params = {};
1071              
1072             # 'Accept' and 'Content-Type' header
1073             my $_header_accept = $self->{api_client}
1074 0           ->select_header_accept( 'application/json', 'text/json' );
1075 0 0         if ($_header_accept) {
1076 0           $header_params->{'Accept'} = $_header_accept;
1077             }
1078             $header_params->{'Content-Type'} =
1079 0           $self->{api_client}->select_header_content_type();
1080              
1081             # query params
1082 0 0         if ( exists $args{'only_exact_matches'} ) {
1083             $query_params->{'onlyExactMatches'} =
1084 0           $self->{api_client}->to_query_value( $args{'only_exact_matches'} );
1085             }
1086              
1087             # path params
1088 0 0         if ( exists $args{'project_id'} ) {
1089 0           my $_base_variable = "{" . "projectId" . "}";
1090             my $_base_value =
1091 0           $self->{api_client}->to_path_value( $args{'project_id'} );
1092 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
1093             }
1094              
1095 0           my $_body_data;
1096              
1097             # authentication setting, if any
1098 0           my $auth_settings = [qw()];
1099              
1100             # make the API Call
1101             my $response = $self->{api_client}->call_api(
1102 0           $_resource_path, $_method, $query_params, $form_params,
1103             $header_params, $_body_data, $auth_settings
1104             );
1105 0 0         if ( !$response ) {
1106 0           return;
1107             }
1108             my $_response_object = $self->{api_client}
1109 0           ->deserialize( 'ARRAY[ProjectStatisticsModel]', $response );
1110 0           return $_response_object;
1111             }
1112              
1113             #
1114             # project_get_project_statistics_obsolete
1115             #
1116             # (This method is obsolete. Newer version can be found here: /api/integrationv2/project/{projectId}/statistics) Receive statistics
1117             #
1118             # @param string $project_id Project ID (required)
1119             # @param boolean $only_exact_matches 100 or more matches requirement (optional)
1120             {
1121             my $params = {
1122             'project_id' => {
1123             data_type => 'string',
1124             description => 'Project ID',
1125             required => '1',
1126             },
1127             'only_exact_matches' => {
1128             data_type => 'boolean',
1129             description => '100 or more matches requirement',
1130             required => '0',
1131             },
1132             };
1133             __PACKAGE__->method_documentation->{
1134             'project_get_project_statistics_obsolete'} = {
1135             summary =>
1136             '(This method is obsolete. Newer version can be found here: /api/integrationv2/project/{projectId}/statistics) Receive statistics',
1137             params => $params,
1138             returns => 'HASH[string,ProjectStatisticsObsoleteModel]',
1139             };
1140             }
1141              
1142             # @return HASH[string,ProjectStatisticsObsoleteModel]
1143             #
1144             sub project_get_project_statistics_obsolete {
1145 0     0 0   my ( $self, %args ) = @_;
1146              
1147             # verify the required parameter 'project_id' is set
1148 0 0         unless ( exists $args{'project_id'} ) {
1149 0           croak(
1150             "Missing the required parameter 'project_id' when calling project_get_project_statistics_obsolete"
1151             );
1152             }
1153              
1154             # parse inputs
1155 0           my $_resource_path = '/api/integration/v1/project/{projectId}/statistics';
1156              
1157 0           my $_method = 'GET';
1158 0           my $query_params = {};
1159 0           my $header_params = {};
1160 0           my $form_params = {};
1161              
1162             # 'Accept' and 'Content-Type' header
1163             my $_header_accept = $self->{api_client}
1164 0           ->select_header_accept( 'application/json', 'text/json' );
1165 0 0         if ($_header_accept) {
1166 0           $header_params->{'Accept'} = $_header_accept;
1167             }
1168             $header_params->{'Content-Type'} =
1169 0           $self->{api_client}->select_header_content_type();
1170              
1171             # query params
1172 0 0         if ( exists $args{'only_exact_matches'} ) {
1173             $query_params->{'onlyExactMatches'} =
1174 0           $self->{api_client}->to_query_value( $args{'only_exact_matches'} );
1175             }
1176              
1177             # path params
1178 0 0         if ( exists $args{'project_id'} ) {
1179 0           my $_base_variable = "{" . "projectId" . "}";
1180             my $_base_value =
1181 0           $self->{api_client}->to_path_value( $args{'project_id'} );
1182 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
1183             }
1184              
1185 0           my $_body_data;
1186              
1187             # authentication setting, if any
1188 0           my $auth_settings = [qw()];
1189              
1190             # make the API Call
1191             my $response = $self->{api_client}->call_api(
1192 0           $_resource_path, $_method, $query_params, $form_params,
1193             $header_params, $_body_data, $auth_settings
1194             );
1195 0 0         if ( !$response ) {
1196 0           return;
1197             }
1198             my $_response_object = $self->{api_client}
1199 0           ->deserialize( 'HASH[string,ProjectStatisticsObsoleteModel]', $response );
1200 0           return $_response_object;
1201             }
1202              
1203             #
1204             # project_get_project_translation_memories
1205             #
1206             # Receiving a list of the TMs plugged into the project
1207             #
1208             # @param string $project_id Project ID (required)
1209             {
1210             my $params = {
1211             'project_id' => {
1212             data_type => 'string',
1213             description => 'Project ID',
1214             required => '1',
1215             },
1216             };
1217             __PACKAGE__->method_documentation->{
1218             'project_get_project_translation_memories'} = {
1219             summary => 'Receiving a list of the TMs plugged into the project',
1220             params => $params,
1221             returns => 'ARRAY[ProjectTranslationMemoryModel]',
1222             };
1223             }
1224              
1225             # @return ARRAY[ProjectTranslationMemoryModel]
1226             #
1227             sub project_get_project_translation_memories {
1228 0     0 0   my ( $self, %args ) = @_;
1229              
1230             # verify the required parameter 'project_id' is set
1231 0 0         unless ( exists $args{'project_id'} ) {
1232 0           croak(
1233             "Missing the required parameter 'project_id' when calling project_get_project_translation_memories"
1234             );
1235             }
1236              
1237             # parse inputs
1238 0           my $_resource_path =
1239             '/api/integration/v1/project/{projectId}/translationmemories';
1240              
1241 0           my $_method = 'GET';
1242 0           my $query_params = {};
1243 0           my $header_params = {};
1244 0           my $form_params = {};
1245              
1246             # 'Accept' and 'Content-Type' header
1247             my $_header_accept = $self->{api_client}
1248 0           ->select_header_accept( 'application/json', 'text/json' );
1249 0 0         if ($_header_accept) {
1250 0           $header_params->{'Accept'} = $_header_accept;
1251             }
1252             $header_params->{'Content-Type'} =
1253 0           $self->{api_client}->select_header_content_type();
1254              
1255             # path params
1256 0 0         if ( exists $args{'project_id'} ) {
1257 0           my $_base_variable = "{" . "projectId" . "}";
1258             my $_base_value =
1259 0           $self->{api_client}->to_path_value( $args{'project_id'} );
1260 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
1261             }
1262              
1263 0           my $_body_data;
1264              
1265             # authentication setting, if any
1266 0           my $auth_settings = [qw()];
1267              
1268             # make the API Call
1269             my $response = $self->{api_client}->call_api(
1270 0           $_resource_path, $_method, $query_params, $form_params,
1271             $header_params, $_body_data, $auth_settings
1272             );
1273 0 0         if ( !$response ) {
1274 0           return;
1275             }
1276             my $_response_object = $self->{api_client}
1277 0           ->deserialize( 'ARRAY[ProjectTranslationMemoryModel]', $response );
1278 0           return $_response_object;
1279             }
1280              
1281             #
1282             # project_restore_project
1283             #
1284             # Restore the project
1285             #
1286             # @param string $project_id Project ID (required)
1287             {
1288             my $params = {
1289             'project_id' => {
1290             data_type => 'string',
1291             description => 'Project ID',
1292             required => '1',
1293             },
1294             };
1295             __PACKAGE__->method_documentation->{'project_restore_project'} = {
1296             summary => 'Restore the project',
1297             params => $params,
1298             returns => undef,
1299             };
1300             }
1301              
1302             # @return void
1303             #
1304             sub project_restore_project {
1305 0     0 0   my ( $self, %args ) = @_;
1306              
1307             # verify the required parameter 'project_id' is set
1308 0 0         unless ( exists $args{'project_id'} ) {
1309 0           croak(
1310             "Missing the required parameter 'project_id' when calling project_restore_project"
1311             );
1312             }
1313              
1314             # parse inputs
1315 0           my $_resource_path = '/api/integration/v1/project/restore';
1316              
1317 0           my $_method = 'POST';
1318 0           my $query_params = {};
1319 0           my $header_params = {};
1320 0           my $form_params = {};
1321              
1322             # 'Accept' and 'Content-Type' header
1323 0           my $_header_accept = $self->{api_client}->select_header_accept();
1324 0 0         if ($_header_accept) {
1325 0           $header_params->{'Accept'} = $_header_accept;
1326             }
1327             $header_params->{'Content-Type'} =
1328 0           $self->{api_client}->select_header_content_type();
1329              
1330             # query params
1331 0 0         if ( exists $args{'project_id'} ) {
1332             $query_params->{'projectId'} =
1333 0           $self->{api_client}->to_query_value( $args{'project_id'} );
1334             }
1335              
1336 0           my $_body_data;
1337              
1338             # authentication setting, if any
1339 0           my $auth_settings = [qw()];
1340              
1341             # make the API Call
1342             $self->{api_client}->call_api(
1343 0           $_resource_path, $_method, $query_params, $form_params,
1344             $header_params, $_body_data, $auth_settings
1345             );
1346 0           return;
1347             }
1348              
1349             #
1350             # project_set_glossaries
1351             #
1352             #
1353             #
1354             # @param string $project_id (required)
1355             # @param ARRAY[string] $glossary_ids (required)
1356             {
1357             my $params = {
1358             'project_id' => {
1359             data_type => 'string',
1360             description => '',
1361             required => '1',
1362             },
1363             'glossary_ids' => {
1364             data_type => 'ARRAY[string]',
1365             description => '',
1366             required => '1',
1367             },
1368             };
1369             __PACKAGE__->method_documentation->{'project_set_glossaries'} = {
1370             summary => '',
1371             params => $params,
1372             returns => undef,
1373             };
1374             }
1375              
1376             # @return void
1377             #
1378             sub project_set_glossaries {
1379 0     0 0   my ( $self, %args ) = @_;
1380              
1381             # verify the required parameter 'project_id' is set
1382 0 0         unless ( exists $args{'project_id'} ) {
1383 0           croak(
1384             "Missing the required parameter 'project_id' when calling project_set_glossaries"
1385             );
1386             }
1387              
1388             # verify the required parameter 'glossary_ids' is set
1389 0 0         unless ( exists $args{'glossary_ids'} ) {
1390 0           croak(
1391             "Missing the required parameter 'glossary_ids' when calling project_set_glossaries"
1392             );
1393             }
1394              
1395             # parse inputs
1396 0           my $_resource_path = '/api/integration/v1/project/{projectId}/glossaries';
1397              
1398 0           my $_method = 'PUT';
1399 0           my $query_params = {};
1400 0           my $header_params = {};
1401 0           my $form_params = {};
1402              
1403             # 'Accept' and 'Content-Type' header
1404 0           my $_header_accept = $self->{api_client}->select_header_accept();
1405 0 0         if ($_header_accept) {
1406 0           $header_params->{'Accept'} = $_header_accept;
1407             }
1408             $header_params->{'Content-Type'} = $self->{api_client}
1409 0           ->select_header_content_type( 'application/json', 'text/json' );
1410              
1411             # path params
1412 0 0         if ( exists $args{'project_id'} ) {
1413 0           my $_base_variable = "{" . "projectId" . "}";
1414             my $_base_value =
1415 0           $self->{api_client}->to_path_value( $args{'project_id'} );
1416 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
1417             }
1418              
1419 0           my $_body_data;
1420              
1421             # body params
1422 0 0         if ( exists $args{'glossary_ids'} ) {
1423 0           $_body_data = $args{'glossary_ids'};
1424             }
1425              
1426             # authentication setting, if any
1427 0           my $auth_settings = [qw()];
1428              
1429             # make the API Call
1430             $self->{api_client}->call_api(
1431 0           $_resource_path, $_method, $query_params, $form_params,
1432             $header_params, $_body_data, $auth_settings
1433             );
1434 0           return;
1435             }
1436              
1437             #
1438             # project_set_project_translation_memories_by_languages
1439             #
1440             #
1441             #
1442             # @param ARRAY[TranslationMemoriesForLanguageModel] $tm_for_languages_models (required)
1443             # @param string $project_id (required)
1444             {
1445             my $params = {
1446             'tm_for_languages_models' => {
1447             data_type => 'ARRAY[TranslationMemoriesForLanguageModel]',
1448             description => '',
1449             required => '1',
1450             },
1451             'project_id' => {
1452             data_type => 'string',
1453             description => '',
1454             required => '1',
1455             },
1456             };
1457             __PACKAGE__->method_documentation->{
1458             'project_set_project_translation_memories_by_languages'} = {
1459             summary => '',
1460             params => $params,
1461             returns => 'string',
1462             };
1463             }
1464              
1465             # @return string
1466             #
1467             sub project_set_project_translation_memories_by_languages {
1468 0     0 0   my ( $self, %args ) = @_;
1469              
1470             # verify the required parameter 'tm_for_languages_models' is set
1471 0 0         unless ( exists $args{'tm_for_languages_models'} ) {
1472 0           croak(
1473             "Missing the required parameter 'tm_for_languages_models' when calling project_set_project_translation_memories_by_languages"
1474             );
1475             }
1476              
1477             # verify the required parameter 'project_id' is set
1478 0 0         unless ( exists $args{'project_id'} ) {
1479 0           croak(
1480             "Missing the required parameter 'project_id' when calling project_set_project_translation_memories_by_languages"
1481             );
1482             }
1483              
1484             # parse inputs
1485 0           my $_resource_path =
1486             '/api/integration/v1/project/{projectId}/translationmemories/bylanguages';
1487              
1488 0           my $_method = 'POST';
1489 0           my $query_params = {};
1490 0           my $header_params = {};
1491 0           my $form_params = {};
1492              
1493             # 'Accept' and 'Content-Type' header
1494             my $_header_accept = $self->{api_client}
1495 0           ->select_header_accept( 'application/json', 'text/json' );
1496 0 0         if ($_header_accept) {
1497 0           $header_params->{'Accept'} = $_header_accept;
1498             }
1499             $header_params->{'Content-Type'} = $self->{api_client}
1500 0           ->select_header_content_type( 'application/json', 'text/json' );
1501              
1502             # path params
1503 0 0         if ( exists $args{'project_id'} ) {
1504 0           my $_base_variable = "{" . "projectId" . "}";
1505             my $_base_value =
1506 0           $self->{api_client}->to_path_value( $args{'project_id'} );
1507 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
1508             }
1509              
1510 0           my $_body_data;
1511              
1512             # body params
1513 0 0         if ( exists $args{'tm_for_languages_models'} ) {
1514 0           $_body_data = $args{'tm_for_languages_models'};
1515             }
1516              
1517             # authentication setting, if any
1518 0           my $auth_settings = [qw()];
1519              
1520             # make the API Call
1521             my $response = $self->{api_client}->call_api(
1522 0           $_resource_path, $_method, $query_params, $form_params,
1523             $header_params, $_body_data, $auth_settings
1524             );
1525 0 0         if ( !$response ) {
1526 0           return;
1527             }
1528             my $_response_object =
1529 0           $self->{api_client}->deserialize( 'string', $response );
1530 0           return $_response_object;
1531             }
1532              
1533             #
1534             # project_set_translation_memories_for_whole_project
1535             #
1536             #
1537             #
1538             # @param ARRAY[TranslationMemoryForProjectModel] $tm_models (required)
1539             # @param string $project_id (required)
1540             {
1541             my $params = {
1542             'tm_models' => {
1543             data_type => 'ARRAY[TranslationMemoryForProjectModel]',
1544             description => '',
1545             required => '1',
1546             },
1547             'project_id' => {
1548             data_type => 'string',
1549             description => '',
1550             required => '1',
1551             },
1552             };
1553             __PACKAGE__->method_documentation->{
1554             'project_set_translation_memories_for_whole_project'} = {
1555             summary => '',
1556             params => $params,
1557             returns => 'string',
1558             };
1559             }
1560              
1561             # @return string
1562             #
1563             sub project_set_translation_memories_for_whole_project {
1564 0     0 0   my ( $self, %args ) = @_;
1565              
1566             # verify the required parameter 'tm_models' is set
1567 0 0         unless ( exists $args{'tm_models'} ) {
1568 0           croak(
1569             "Missing the required parameter 'tm_models' when calling project_set_translation_memories_for_whole_project"
1570             );
1571             }
1572              
1573             # verify the required parameter 'project_id' is set
1574 0 0         unless ( exists $args{'project_id'} ) {
1575 0           croak(
1576             "Missing the required parameter 'project_id' when calling project_set_translation_memories_for_whole_project"
1577             );
1578             }
1579              
1580             # parse inputs
1581 0           my $_resource_path =
1582             '/api/integration/v1/project/{projectId}/translationmemories';
1583              
1584 0           my $_method = 'POST';
1585 0           my $query_params = {};
1586 0           my $header_params = {};
1587 0           my $form_params = {};
1588              
1589             # 'Accept' and 'Content-Type' header
1590             my $_header_accept = $self->{api_client}
1591 0           ->select_header_accept( 'application/json', 'text/json' );
1592 0 0         if ($_header_accept) {
1593 0           $header_params->{'Accept'} = $_header_accept;
1594             }
1595             $header_params->{'Content-Type'} = $self->{api_client}
1596 0           ->select_header_content_type( 'application/json', 'text/json' );
1597              
1598             # path params
1599 0 0         if ( exists $args{'project_id'} ) {
1600 0           my $_base_variable = "{" . "projectId" . "}";
1601             my $_base_value =
1602 0           $self->{api_client}->to_path_value( $args{'project_id'} );
1603 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
1604             }
1605              
1606 0           my $_body_data;
1607              
1608             # body params
1609 0 0         if ( exists $args{'tm_models'} ) {
1610 0           $_body_data = $args{'tm_models'};
1611             }
1612              
1613             # authentication setting, if any
1614 0           my $auth_settings = [qw()];
1615              
1616             # make the API Call
1617             my $response = $self->{api_client}->call_api(
1618 0           $_resource_path, $_method, $query_params, $form_params,
1619             $header_params, $_body_data, $auth_settings
1620             );
1621 0 0         if ( !$response ) {
1622 0           return;
1623             }
1624             my $_response_object =
1625 0           $self->{api_client}->deserialize( 'string', $response );
1626 0           return $_response_object;
1627             }
1628              
1629             #
1630             # project_update_project
1631             #
1632             #
1633             #
1634             # @param string $project_id (required)
1635             # @param ProjectChangesModel $model (required)
1636             {
1637             my $params = {
1638             'project_id' => {
1639             data_type => 'string',
1640             description => '',
1641             required => '1',
1642             },
1643             'model' => {
1644             data_type => 'ProjectChangesModel',
1645             description => '',
1646             required => '1',
1647             },
1648             };
1649             __PACKAGE__->method_documentation->{'project_update_project'} = {
1650             summary => '',
1651             params => $params,
1652             returns => undef,
1653             };
1654             }
1655              
1656             # @return void
1657             #
1658             sub project_update_project {
1659 0     0 0   my ( $self, %args ) = @_;
1660              
1661             # verify the required parameter 'project_id' is set
1662 0 0         unless ( exists $args{'project_id'} ) {
1663 0           croak(
1664             "Missing the required parameter 'project_id' when calling project_update_project"
1665             );
1666             }
1667              
1668             # verify the required parameter 'model' is set
1669 0 0         unless ( exists $args{'model'} ) {
1670 0           croak(
1671             "Missing the required parameter 'model' when calling project_update_project"
1672             );
1673             }
1674              
1675             # parse inputs
1676 0           my $_resource_path = '/api/integration/v1/project/{projectId}';
1677              
1678 0           my $_method = 'PUT';
1679 0           my $query_params = {};
1680 0           my $header_params = {};
1681 0           my $form_params = {};
1682              
1683             # 'Accept' and 'Content-Type' header
1684 0           my $_header_accept = $self->{api_client}->select_header_accept();
1685 0 0         if ($_header_accept) {
1686 0           $header_params->{'Accept'} = $_header_accept;
1687             }
1688             $header_params->{'Content-Type'} = $self->{api_client}
1689 0           ->select_header_content_type( 'application/json', 'text/json' );
1690              
1691             # path params
1692 0 0         if ( exists $args{'project_id'} ) {
1693 0           my $_base_variable = "{" . "projectId" . "}";
1694             my $_base_value =
1695 0           $self->{api_client}->to_path_value( $args{'project_id'} );
1696 0           $_resource_path =~ s/$_base_variable/$_base_value/g;
1697             }
1698              
1699 0           my $_body_data;
1700              
1701             # body params
1702 0 0         if ( exists $args{'model'} ) {
1703 0           $_body_data = $args{'model'};
1704             }
1705              
1706             # authentication setting, if any
1707 0           my $auth_settings = [qw()];
1708              
1709             # make the API Call
1710             $self->{api_client}->call_api(
1711 0           $_resource_path, $_method, $query_params, $form_params,
1712             $header_params, $_body_data, $auth_settings
1713             );
1714 0           return;
1715             }
1716              
1717             1;