require
5.6.0;
use
base (
"Class::Accessor"
,
"Class::Data::Inheritable"
);
__PACKAGE__->mk_classdata(
'attribute_map'
=> {});
__PACKAGE__->mk_classdata(
'method_documentation'
=> {});
__PACKAGE__->mk_classdata(
'class_documentation'
=> {});
sub
new {
my
(
$class
,
%args
) =
@_
;
my
$self
=
bless
{},
$class
;
foreach
my
$attribute
(
keys
%{
$class
->attribute_map}) {
my
$args_key
=
$class
->attribute_map->{
$attribute
};
$self
->
$attribute
(
$args
{
$args_key
} );
}
return
$self
;
}
{
my
$params
= {
'client'
=>{
data_type
=>
'ApiClient'
,
description
=>
'API Client.'
,
required
=>
'0'
,
}
};
__PACKAGE__->method_documentation->{
'post_workbook_calculate_formula'
} = {
summary
=>
'Calculate all formulas in the workbook.'
,
params
=>
$params
,
returns
=>
'CellsCloudResponse'
,
};
}
sub
run_http_request {
my
(
$self
,
%args
) =
@_
;
my
$client
=
$args
{
'client'
};
my
$_resource_path
=
'/cells/{name}/calculateformula'
;
my
$_method
=
'POST'
;
my
$query_params
= {};
my
$header_params
= {};
my
$form_params
= {};
my
$_header_accept
=
$client
->select_header_accept(
'application/json'
);
if
(
$_header_accept
) {
$header_params
->{
'Accept'
} =
$_header_accept
;
}
$header_params
->{
'Content-Type'
} =
$client
->select_header_content_type(
'application/json'
);
if
(
defined
$self
->name){
my
$_base_variable
=
"{"
.
"name"
.
"}"
;
my
$_base_value
=
$client
->to_path_value(
$self
->name);
$_resource_path
=~ s/
$_base_variable
/
$_base_value
/g;
}
if
(
defined
$self
->ignore_error){
$query_params
->{
'ignoreError'
} =
$client
->to_query_value(
$self
->ignore_error);
}
if
(
defined
$self
->folder){
$query_params
->{
'folder'
} =
$client
->to_query_value(
$self
->folder);
}
if
(
defined
$self
->storage_name){
$query_params
->{
'storageName'
} =
$client
->to_query_value(
$self
->storage_name);
}
my
$_body_data
;
if
(
defined
$self
->options) {
$_body_data
= JSON->new->convert_blessed->encode(
$self
->options);
}
my
$auth_settings
= [
qw()
];
my
$response
=
$client
->call_api(
$_resource_path
,
$_method
,
$query_params
,
$form_params
,
$header_params
,
$_body_data
,
$auth_settings
);
return
$response
;
}
__PACKAGE__->method_documentation({
'name'
=> {
datatype
=>
'string'
,
base_name
=>
'name'
,
description
=>
'The file name.'
,
format
=>
''
,
read_only
=>
''
,
},
'options'
=> {
datatype
=>
'CalculationOptions'
,
base_name
=>
'options'
,
description
=>
'CalculationOptions Calculation Options.'
,
format
=>
''
,
read_only
=>
''
,
},
'ignore_error'
=> {
datatype
=>
'string'
,
base_name
=>
'ignoreError'
,
description
=>
'ignore Error.'
,
format
=>
''
,
read_only
=>
''
,
},
'folder'
=> {
datatype
=>
'string'
,
base_name
=>
'folder'
,
description
=>
'The folder where the file is situated.'
,
format
=>
''
,
read_only
=>
''
,
},
'storage_name'
=> {
datatype
=>
'string'
,
base_name
=>
'storageName'
,
description
=>
'The storage name where the file is situated.'
,
format
=>
''
,
read_only
=>
''
,
},
});
__PACKAGE__->attribute_map( {
'name'
=>
'name'
,
'options'
=>
'options'
,
'ignore_error'
=>
'ignoreError'
,
'folder'
=>
'folder'
,
'storage_name'
=>
'storageName'
} );
__PACKAGE__->mk_accessors(
keys
%{__PACKAGE__->attribute_map});
1;