AsposeCellsCloud-CellsApi
view release on metacpan or search on metacpan
lib/AsposeCellsCloud/Request/PutWorksheetChartLegendRequest.pm view on Meta::CPAN
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=end comment
=cut
package AsposeCellsCloud::Request::PutWorksheetChartLegendRequest;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON ;
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::Parse;
use DateTime;
use File::Basename;
use base ("Class::Accessor", "Class::Data::Inheritable");
__PACKAGE__->mk_classdata('attribute_map' => {});
__PACKAGE__->mk_classdata('method_documentation' => {});
__PACKAGE__->mk_classdata('class_documentation' => {});
# new object
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;
}
# Run Operation Request
# PutWorksheetChartLegendRequest.name : The file name. ,
# PutWorksheetChartLegendRequest.sheetName : The worksheet name. ,
# PutWorksheetChartLegendRequest.chartIndex : The chart index. ,
# PutWorksheetChartLegendRequest.folder : The folder where the file is situated. ,
# PutWorksheetChartLegendRequest.storageName : The storage name where the file is situated.
{
my $params = {
'client' =>{
data_type => 'ApiClient',
description => 'API Client.',
required => '0',
}
};
__PACKAGE__->method_documentation->{ 'put_worksheet_chart_legend' } = {
summary => 'Show chart legend in the worksheet.',
params => $params,
returns => 'CellsCloudResponse',
};
}
sub run_http_request {
my ($self, %args) = @_;
my $client = $args{'client'};
# parse inputs
my $_resource_path = 'v3.0/cells/{name}/worksheets/{sheetName}/charts/{chartIndex}/legend';
my $_method = 'PUT';
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->sheet_name){
my $_base_variable = "{" . "sheetName" . "}";
my $_base_value = $client->to_path_value($self->sheet_name);
$_resource_path =~ s/$_base_variable/$_base_value/g;
}
if(defined $self->chart_index){
my $_base_variable = "{" . "chartIndex" . "}";
my $_base_value = $client->to_path_value($self->chart_index);
$_resource_path =~ s/$_base_variable/$_base_value/g;
}
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;
# authentication setting, if any
my $auth_settings = [qw()];
# make the API Call
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 => '',
},
'sheet_name' => {
datatype => 'string',
base_name => 'sheetName',
( run in 0.735 second using v1.01-cache-2.11-cpan-9581c071862 )