=begin comment

Web API Swagger specification

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

OpenAPI spec version: 1.0

Generated by: https://github.com/swagger-api/swagger-codegen.git

=end comment

=cut

#
# NOTE: This class is auto generated by the swagger code generator program. 
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#

use lib 'lib';
use strict;
use warnings;
use utf8; 
use Exporter;
use Carp qw( croak );
use Log::Any qw($log);

use AsposeCellsCloud::OAuthApi ;
use AsposeCellsCloud::Configuration ;
use AsposeCellsCloud::ApiClient ;
use AsposeCellsCloud::CellsSaveAsApi ;
use AsposeCellsCloud::Object::SaaSposeResponse ;
# sub new {
#     my $class = shift;
#     return bless {}, $class;
# }
our $new_client = undef;

sub get_client
{
    my ($self, %args) = @_;
    my $config = AsposeCellsCloud::Configuration->new('base_url' => 'https://api.aspose.cloud/');
    my $client = AsposeCellsCloud::ApiClient->new( $config);
    my $oauth_api = AsposeCellsCloud::OAuthApi->new($client);

    my $grant_type = 'client_credentials'; # replace NULL with a proper value
    my $client_id = '66164C51-693E-4904-A121-545961673EC1'; # replace NULL with a proper value
    my $client_secret =  '536e76768419db9585afdd37bb5f7533'; # replace NULL with a proper value
    my $result = $oauth_api->o_auth_post(grant_type => $grant_type, client_id => $client_id, client_secret => $client_secret);
    my $access_token  = $result->access_token;

    my $new_config = AsposeCellsCloud::Configuration->new('access_token' =>  $access_token, 'base_url' => 'https://api.aspose.cloud/v1.1');
    $new_client = AsposeCellsCloud::ApiClient->new( $new_config);
    return $new_client;
}

sub copy_to_temp_1
{
    my $BOOK1 = 'Book1.xlsx';
    my $name = $BOOK1; # replace NULL with a proper value
    my $save_options = undef; # replace NULL with a proper value
    my $newfilename = 'Temp/Book1.xlsx'; # replace NULL with a proper value
    my $is_auto_fit_rows = 'true'; # replace NULL with a proper value
    my $is_auto_fit_columns = 'true'; # replace NULL with a proper value
    my $folder = undef ; # replace NULL with a proper value
    my $api = AsposeCellsCloud::CellsSaveAsApi->new($new_client);
    $api->cells_save_as_post_document_save_as(name => $BOOK1,
     save_options => $save_options,
     newfilename => $newfilename,
     is_auto_fit_rows => $is_auto_fit_rows,
     is_auto_fit_columns => $is_auto_fit_columns,
     folder => $folder);
}
sub copy_to_temp_2
{
    my $BOOK1 = 'myDocument.xlsx';
    my $name = $BOOK1; # replace NULL with a proper value
    my $save_options = undef; # replace NULL with a proper value
    my $newfilename = 'Temp/myDocument.xlsx'; # replace NULL with a proper value
    my $is_auto_fit_rows = 'true'; # replace NULL with a proper value
    my $is_auto_fit_columns = 'true'; # replace NULL with a proper value
    my $folder = undef ; # replace NULL with a proper value
    my $api = AsposeCellsCloud::CellsSaveAsApi->new($new_client);
    $api->cells_save_as_post_document_save_as(name => $BOOK1,
     save_options => $save_options,
     newfilename => $newfilename,
     is_auto_fit_rows => $is_auto_fit_rows,
     is_auto_fit_columns => $is_auto_fit_columns,
     folder => $folder);
}
sub copy_to_temp_3
{
    my $BOOK1 = 'TestCase.xlsx';
    my $name = $BOOK1; # replace NULL with a proper value
    my $save_options = undef; # replace NULL with a proper value
    my $newfilename = 'Temp/TestCase.xlsx'; # replace NULL with a proper value
    my $is_auto_fit_rows = 'true'; # replace NULL with a proper value
    my $is_auto_fit_columns = 'true'; # replace NULL with a proper value
    my $folder = undef ; # replace NULL with a proper value
    my $api = AsposeCellsCloud::CellsSaveAsApi->new($new_client);
    $api->cells_save_as_post_document_save_as(name => $BOOK1,
     save_options => $save_options,
     newfilename => $newfilename,
     is_auto_fit_rows => $is_auto_fit_rows,
     is_auto_fit_columns => $is_auto_fit_columns,
     folder => $folder);
}
sub copy_to_temp_4
{
    my $BOOK1 = 'NewCopy.xlsx';
    my $name = $BOOK1; # replace NULL with a proper value
    my $save_options = undef; # replace NULL with a proper value
    my $newfilename = 'Temp/NewCopy.xlsx'; # replace NULL with a proper value
    my $is_auto_fit_rows = 'true'; # replace NULL with a proper value
    my $is_auto_fit_columns = 'true'; # replace NULL with a proper value
    my $folder = undef ; # replace NULL with a proper value
    my $api = AsposeCellsCloud::CellsSaveAsApi->new($new_client);
    $api->cells_save_as_post_document_save_as(name => $BOOK1,
     save_options => $save_options,
     newfilename => $newfilename,
     is_auto_fit_rows => $is_auto_fit_rows,
     is_auto_fit_columns => $is_auto_fit_columns,
     folder => $folder);
}

1;
