| 1 | =begin comment | ||
| 2 | |||
| 3 | Copyright (c) 2026 Aspose.Cells Cloud | ||
| 4 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 5 | of this software and associated documentation files (the "Software"), to deal | ||
| 6 | in the Software without restriction, including without limitation the rights | ||
| 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 8 | copies of the Software, and to permit persons to whom the Software is | ||
| 9 | furnished to do so, subject to the following conditions: | ||
| 10 | |||
| 11 | The above copyright notice and this permission notice shall be included in all | ||
| 12 | copies or substantial portions of the Software. | ||
| 13 | |||
| 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 20 | SOFTWARE. | ||
| 21 | |||
| 22 | =end comment | ||
| 23 | |||
| 24 | =cut | ||
| 25 | |||
| 26 | package AsposeCellsCloud::Request::PostTrimContentRequest; | ||
| 27 | |||
| 28 | require 5.6.0; | ||
| 29 | use strict; | ||
| 30 | use warnings; | ||
| 31 | use utf8; | ||
| 32 | use JSON ; | ||
| 33 | use Data::Dumper; | ||
| 34 | use Module::Runtime qw(use_module); | ||
| 35 | use Log::Any qw($log); | ||
| 36 | use Date::Parse; | ||
| 37 | use DateTime; | ||
| 38 | use File::Basename; | ||
| 39 | |||
| 40 | use base ("Class::Accessor", "Class::Data::Inheritable"); | ||
| 41 | |||
| 42 | __PACKAGE__->mk_classdata('attribute_map' => {}); | ||
| 43 | __PACKAGE__->mk_classdata('method_documentation' => {}); | ||
| 44 | __PACKAGE__->mk_classdata('class_documentation' => {}); | ||
| 45 | |||
| 46 | |||
| 47 | # new object | ||
| 48 | sub new { | ||
| 49 | my ($class, %args) = @_; | ||
| 50 | |||
| 51 | my $self = bless {}, $class; | ||
| 52 | |||
| 53 | foreach my $attribute (keys %{$class->attribute_map}) { | ||
| 54 | my $args_key = $class->attribute_map->{$attribute}; | ||
| 55 | $self->$attribute( $args{ $args_key } ); | ||
| 56 | } | ||
| 57 | |||
| 58 | return $self; | ||
| 59 | } | ||
| 60 | |||
| 61 | |||
| 62 | # Run Operation Request | ||
| 63 | # PostTrimContentRequest.trimContentOptions : | ||
| 64 | |||
| 65 | { | ||
| 66 | my $params = { | ||
| 67 | 'client' =>{ | ||
| 68 | data_type => 'ApiClient', | ||
| 69 | description => 'API Client.', | ||
| 70 | required => '0', | ||
| 71 | } | ||
| 72 | }; | ||
| 73 | __PACKAGE__->method_documentation->{ 'post_trim_content' } = { | ||
| 74 | summary => 'The PostTrimContent API is designed to process and trim content within a specified range in a spreadsheet. This API allows users to remove extra spaces, line breaks, or other unnecessary characters from the content of selected cells. It is particularly useful for cleaning up data entries and ensuring consistency in spreadsheet formatting', | ||
| 75 | params => $params, | ||
| 76 | returns => 'FileInfo', | ||
| 77 | }; | ||
| 78 | } | ||
| 79 | |||
| 80 | sub run_http_request { | ||
| 81 | my ($self, %args) = @_; | ||
| 82 | |||
| 83 | my $client = $args{'client'}; | ||
| 84 | |||
| 85 | # parse inputs | ||
| 86 | my $_resource_path = 'v3.0/cells/trimcontent'; | ||
| 87 | |||
| 88 | my $_method = 'POST'; | ||
| 89 | my $query_params = {}; | ||
| 90 | my $header_params = {}; | ||
| 91 | my $form_params = {}; | ||
| 92 | |||
| 93 | |||
| 94 | my $_header_accept = $client->select_header_accept('application/json'); | ||
| 95 | if ($_header_accept) { | ||
| 96 | $header_params->{'Accept'} = $_header_accept; | ||
| 97 | } | ||
| 98 | $header_params->{'Content-Type'} = $client->select_header_content_type('application/json'); | ||
| 99 | |||
| 100 | |||
| 101 | my $_body_data; | ||
| 102 | |||
| 103 | |||
| 104 | # body params | ||
| 105 | if (defined $self->trim_content_options) { | ||
| 106 | $_body_data = JSON->new->convert_blessed->encode( $self->trim_content_options); | ||
| 107 | } | ||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | # authentication setting, if any | ||
| 112 | my $auth_settings = [qw()]; | ||
| 113 | |||
| 114 | # make the API Call | ||
| 115 | my $response = $client->call_api($_resource_path, $_method, $query_params, $form_params, $header_params, $_body_data, $auth_settings); | ||
| 116 | return $response; | ||
| 117 | } | ||
| 118 | |||
| 119 | |||
| 120 | __PACKAGE__->method_documentation({ | ||
| 121 | 'trim_content_options' => { | ||
| 122 | datatype => 'TrimContentOptions', | ||
| 123 | base_name => 'trimContentOptions', | ||
| 124 | description => '', | ||
| 125 | format => '', | ||
| 126 | read_only => '', | ||
| 127 | }, | ||
| 128 | }); | ||
| 129 | |||
| 130 | |||
| 131 | __PACKAGE__->attribute_map( { | ||
| 132 | 'trim_content_options' => 'trimContentOptions' | ||
| 133 | } ); | ||
| 134 | |||
| 135 | __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); | ||
| 136 | |||
| 137 | |||
| 138 | 1; |