| 1 | =begin comment | ||
| 2 | |||
| 3 | Copyright (c) 2019 Aspose Pty Ltd | ||
| 4 | |||
| 5 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 6 | of this software and associated documentation files (the "Software"), to deal | ||
| 7 | in the Software without restriction, including without limitation the rights | ||
| 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 9 | copies of the Software, and to permit persons to whom the Software is | ||
| 10 | furnished to do so, subject to the following conditions: | ||
| 11 | |||
| 12 | The above copyright notice and this permission notice shall be included in all | ||
| 13 | copies or substantial portions of the Software. | ||
| 14 | |||
| 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 21 | SOFTWARE. | ||
| 22 | |||
| 23 | =end comment | ||
| 24 | |||
| 25 | =cut | ||
| 26 | |||
| 27 | package AsposeSlidesCloud::Object::FileVersion; | ||
| 28 | |||
| 29 | require 5.6.0; | ||
| 30 | use strict; | ||
| 31 | use warnings; | ||
| 32 | use utf8; | ||
| 33 | use JSON qw(decode_json); | ||
| 34 | use Data::Dumper; | ||
| 35 | use Module::Runtime qw(use_module); | ||
| 36 | use Log::Any qw($log); | ||
| 37 | use Date::Parse; | ||
| 38 | use DateTime; | ||
| 39 | |||
| 40 | use AsposeSlidesCloud::Object::StorageFile; | ||
| 41 | |||
| 42 | use base ("Class::Accessor", "Class::Data::Inheritable"); | ||
| 43 | |||
| 44 | |||
| 45 | # | ||
| 46 | #File Version | ||
| 47 | # | ||
| 48 | # NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. | ||
| 49 | # REF: https://github.com/swagger-api/swagger-codegen | ||
| 50 | # | ||
| 51 | |||
| 52 | # | ||
| 53 | # NOTE: This class is auto generated by the swagger code generator program. | ||
| 54 | # Do not edit the class manually. | ||
| 55 | # Ref: https://github.com/swagger-api/swagger-codegen | ||
| 56 | # | ||
| 57 | __PACKAGE__->mk_classdata('attribute_map' => {}); | ||
| 58 | __PACKAGE__->mk_classdata('swagger_types' => {}); | ||
| 59 | __PACKAGE__->mk_classdata('method_documentation' => {}); | ||
| 60 | __PACKAGE__->mk_classdata('class_documentation' => {}); | ||
| 61 | |||
| 62 | # new object | ||
| 63 | sub new { | ||
| 64 | my ($class, %args) = @_; | ||
| 65 | |||
| 66 | my $self = bless {}, $class; | ||
| 67 | |||
| 68 | foreach my $attribute (keys %{$class->attribute_map}) { | ||
| 69 | my $args_key = $class->attribute_map->{$attribute}; | ||
| 70 | $self->$attribute( $args{ $args_key } ); | ||
| 71 | } | ||
| 72 | return $self; | ||
| 73 | } | ||
| 74 | |||
| 75 | # used by JSON for serialization | ||
| 76 | sub TO_JSON { | ||
| 77 | my $self = shift; | ||
| 78 | my $_data = {}; | ||
| 79 | foreach my $_key (keys %{$self->attribute_map}) { | ||
| 80 | if (defined $self->{$_key}) { | ||
| 81 | $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; | ||
| 82 | } | ||
| 83 | } | ||
| 84 | return $_data; | ||
| 85 | } | ||
| 86 | |||
| 87 | |||
| 88 | __PACKAGE__->class_documentation({description => 'File Version', | ||
| 89 | class => 'FileVersion', | ||
| 90 | required => [], # TODO | ||
| 91 | } ); | ||
| 92 | |||
| 93 | __PACKAGE__->method_documentation({ | ||
| 94 | 'name' => { | ||
| 95 | datatype => 'string', | ||
| 96 | base_name => 'Name', | ||
| 97 | description => 'File or folder name.', | ||
| 98 | format => '', | ||
| 99 | read_only => '', | ||
| 100 | }, | ||
| 101 | 'is_folder' => { | ||
| 102 | datatype => 'boolean', | ||
| 103 | base_name => 'IsFolder', | ||
| 104 | description => 'True if it is a folder.', | ||
| 105 | format => '', | ||
| 106 | read_only => '', | ||
| 107 | }, | ||
| 108 | 'modified_date' => { | ||
| 109 | datatype => 'DateTime', | ||
| 110 | base_name => 'ModifiedDate', | ||
| 111 | description => 'File or folder last modified DateTime.', | ||
| 112 | format => '', | ||
| 113 | read_only => '', | ||
| 114 | }, | ||
| 115 | 'size' => { | ||
| 116 | datatype => 'int', | ||
| 117 | base_name => 'Size', | ||
| 118 | description => 'File or folder size.', | ||
| 119 | format => '', | ||
| 120 | read_only => '', | ||
| 121 | }, | ||
| 122 | 'path' => { | ||
| 123 | datatype => 'string', | ||
| 124 | base_name => 'Path', | ||
| 125 | description => 'File or folder path.', | ||
| 126 | format => '', | ||
| 127 | read_only => '', | ||
| 128 | }, | ||
| 129 | 'version_id' => { | ||
| 130 | datatype => 'string', | ||
| 131 | base_name => 'VersionId', | ||
| 132 | description => 'File Version ID.', | ||
| 133 | format => '', | ||
| 134 | read_only => '', | ||
| 135 | }, | ||
| 136 | 'is_latest' => { | ||
| 137 | datatype => 'boolean', | ||
| 138 | base_name => 'IsLatest', | ||
| 139 | description => 'Specifies whether the file is (true) or is not (false) the latest version of an file.', | ||
| 140 | format => '', | ||
| 141 | read_only => '', | ||
| 142 | }, | ||
| 143 | }); | ||
| 144 | |||
| 145 | __PACKAGE__->swagger_types( { | ||
| 146 | 'name' => 'string', | ||
| 147 | 'is_folder' => 'boolean', | ||
| 148 | 'modified_date' => 'DateTime', | ||
| 149 | 'size' => 'int', | ||
| 150 | 'path' => 'string', | ||
| 151 | 'version_id' => 'string', | ||
| 152 | 'is_latest' => 'boolean' | ||
| 153 | } ); | ||
| 154 | |||
| 155 | __PACKAGE__->attribute_map( { | ||
| 156 | 'name' => 'Name', | ||
| 157 | 'is_folder' => 'IsFolder', | ||
| 158 | 'modified_date' => 'ModifiedDate', | ||
| 159 | 'size' => 'Size', | ||
| 160 | 'path' => 'Path', | ||
| 161 | 'version_id' => 'VersionId', | ||
| 162 | 'is_latest' => 'IsLatest' | ||
| 163 | } ); | ||
| 164 | |||
| 165 | __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); | ||
| 166 | |||
| 167 | |||
| 168 | 1; |