| 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::Shape; | ||
| 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::EffectFormat; | ||
| 41 | use AsposeSlidesCloud::Object::FillFormat; | ||
| 42 | use AsposeSlidesCloud::Object::GeometryShape; | ||
| 43 | use AsposeSlidesCloud::Object::Hyperlink; | ||
| 44 | use AsposeSlidesCloud::Object::LineFormat; | ||
| 45 | use AsposeSlidesCloud::Object::Paragraph; | ||
| 46 | use AsposeSlidesCloud::Object::ResourceUri; | ||
| 47 | use AsposeSlidesCloud::Object::TextFrameFormat; | ||
| 48 | use AsposeSlidesCloud::Object::ThreeDFormat; | ||
| 49 | |||
| 50 | use base ("Class::Accessor", "Class::Data::Inheritable"); | ||
| 51 | |||
| 52 | |||
| 53 | # | ||
| 54 | #Represents AutoShape resource. | ||
| 55 | # | ||
| 56 | # NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. | ||
| 57 | # REF: https://github.com/swagger-api/swagger-codegen | ||
| 58 | # | ||
| 59 | |||
| 60 | # | ||
| 61 | # NOTE: This class is auto generated by the swagger code generator program. | ||
| 62 | # Do not edit the class manually. | ||
| 63 | # Ref: https://github.com/swagger-api/swagger-codegen | ||
| 64 | # | ||
| 65 | __PACKAGE__->mk_classdata('attribute_map' => {}); | ||
| 66 | __PACKAGE__->mk_classdata('swagger_types' => {}); | ||
| 67 | __PACKAGE__->mk_classdata('method_documentation' => {}); | ||
| 68 | __PACKAGE__->mk_classdata('class_documentation' => {}); | ||
| 69 | |||
| 70 | # new object | ||
| 71 | sub new { | ||
| 72 | my ($class, %args) = @_; | ||
| 73 | |||
| 74 | my $self = bless {}, $class; | ||
| 75 | |||
| 76 | foreach my $attribute (keys %{$class->attribute_map}) { | ||
| 77 | my $args_key = $class->attribute_map->{$attribute}; | ||
| 78 | $self->$attribute( $args{ $args_key } ); | ||
| 79 | } | ||
| 80 | $self->{ type } = 'Shape'; | ||
| 81 | return $self; | ||
| 82 | } | ||
| 83 | |||
| 84 | # used by JSON for serialization | ||
| 85 | sub TO_JSON { | ||
| 86 | my $self = shift; | ||
| 87 | my $_data = {}; | ||
| 88 | foreach my $_key (keys %{$self->attribute_map}) { | ||
| 89 | if (defined $self->{$_key}) { | ||
| 90 | $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; | ||
| 91 | } | ||
| 92 | } | ||
| 93 | return $_data; | ||
| 94 | } | ||
| 95 | |||
| 96 | |||
| 97 | __PACKAGE__->class_documentation({description => 'Represents AutoShape resource.', | ||
| 98 | class => 'Shape', | ||
| 99 | required => [], # TODO | ||
| 100 | } ); | ||
| 101 | |||
| 102 | __PACKAGE__->method_documentation({ | ||
| 103 | 'self_uri' => { | ||
| 104 | datatype => 'ResourceUri', | ||
| 105 | base_name => 'SelfUri', | ||
| 106 | description => 'Gets or sets the link to this resource.', | ||
| 107 | format => '', | ||
| 108 | read_only => '', | ||
| 109 | }, | ||
| 110 | 'alternate_links' => { | ||
| 111 | datatype => 'ARRAY[ResourceUri]', | ||
| 112 | base_name => 'AlternateLinks', | ||
| 113 | description => 'List of alternate links.', | ||
| 114 | format => '', | ||
| 115 | read_only => '', | ||
| 116 | }, | ||
| 117 | 'name' => { | ||
| 118 | datatype => 'string', | ||
| 119 | base_name => 'Name', | ||
| 120 | description => 'Gets or sets the name.', | ||
| 121 | format => '', | ||
| 122 | read_only => '', | ||
| 123 | }, | ||
| 124 | 'width' => { | ||
| 125 | datatype => 'double', | ||
| 126 | base_name => 'Width', | ||
| 127 | description => 'Gets or sets the width.', | ||
| 128 | format => '', | ||
| 129 | read_only => '', | ||
| 130 | }, | ||
| 131 | 'height' => { | ||
| 132 | datatype => 'double', | ||
| 133 | base_name => 'Height', | ||
| 134 | description => 'Gets or sets the height.', | ||
| 135 | format => '', | ||
| 136 | read_only => '', | ||
| 137 | }, | ||
| 138 | 'alternative_text' => { | ||
| 139 | datatype => 'string', | ||
| 140 | base_name => 'AlternativeText', | ||
| 141 | description => 'Gets or sets the alternative text.', | ||
| 142 | format => '', | ||
| 143 | read_only => '', | ||
| 144 | }, | ||
| 145 | 'alternative_text_title' => { | ||
| 146 | datatype => 'string', | ||
| 147 | base_name => 'AlternativeTextTitle', | ||
| 148 | description => 'The title of alternative text associated with the shape.', | ||
| 149 | format => '', | ||
| 150 | read_only => '', | ||
| 151 | }, | ||
| 152 | 'hidden' => { | ||
| 153 | datatype => 'boolean', | ||
| 154 | base_name => 'Hidden', | ||
| 155 | description => 'Gets or sets a value indicating whether this ShapeBase is hidden.', | ||
| 156 | format => '', | ||
| 157 | read_only => '', | ||
| 158 | }, | ||
| 159 | 'is_decorative' => { | ||
| 160 | datatype => 'boolean', | ||
| 161 | base_name => 'IsDecorative', | ||
| 162 | description => 'Gets or sets 'Mark as decorative' option.', | ||
| 163 | format => '', | ||
| 164 | read_only => '', | ||
| 165 | }, | ||
| 166 | 'x' => { | ||
| 167 | datatype => 'double', | ||
| 168 | base_name => 'X', | ||
| 169 | description => 'Gets or sets the X', | ||
| 170 | format => '', | ||
| 171 | read_only => '', | ||
| 172 | }, | ||
| 173 | 'y' => { | ||
| 174 | datatype => 'double', | ||
| 175 | base_name => 'Y', | ||
| 176 | description => 'Gets or sets the Y.', | ||
| 177 | format => '', | ||
| 178 | read_only => '', | ||
| 179 | }, | ||
| 180 | 'z_order_position' => { | ||
| 181 | datatype => 'int', | ||
| 182 | base_name => 'ZOrderPosition', | ||
| 183 | description => 'Gets z-order position of shape', | ||
| 184 | format => '', | ||
| 185 | read_only => '', | ||
| 186 | }, | ||
| 187 | 'fill_format' => { | ||
| 188 | datatype => 'FillFormat', | ||
| 189 | base_name => 'FillFormat', | ||
| 190 | description => 'Gets or sets the fill format.', | ||
| 191 | format => '', | ||
| 192 | read_only => '', | ||
| 193 | }, | ||
| 194 | 'effect_format' => { | ||
| 195 | datatype => 'EffectFormat', | ||
| 196 | base_name => 'EffectFormat', | ||
| 197 | description => 'Gets or sets the effect format.', | ||
| 198 | format => '', | ||
| 199 | read_only => '', | ||
| 200 | }, | ||
| 201 | 'three_d_format' => { | ||
| 202 | datatype => 'ThreeDFormat', | ||
| 203 | base_name => 'ThreeDFormat', | ||
| 204 | description => 'Gets or sets the 3D format', | ||
| 205 | format => '', | ||
| 206 | read_only => '', | ||
| 207 | }, | ||
| 208 | 'line_format' => { | ||
| 209 | datatype => 'LineFormat', | ||
| 210 | base_name => 'LineFormat', | ||
| 211 | description => 'Gets or sets the line format.', | ||
| 212 | format => '', | ||
| 213 | read_only => '', | ||
| 214 | }, | ||
| 215 | 'hyperlink_click' => { | ||
| 216 | datatype => 'Hyperlink', | ||
| 217 | base_name => 'HyperlinkClick', | ||
| 218 | description => 'Hyperlink defined for mouse click.', | ||
| 219 | format => '', | ||
| 220 | read_only => '', | ||
| 221 | }, | ||
| 222 | 'hyperlink_mouse_over' => { | ||
| 223 | datatype => 'Hyperlink', | ||
| 224 | base_name => 'HyperlinkMouseOver', | ||
| 225 | description => 'Hyperlink defined for mouse over.', | ||
| 226 | format => '', | ||
| 227 | read_only => '', | ||
| 228 | }, | ||
| 229 | 'type' => { | ||
| 230 | datatype => 'string', | ||
| 231 | base_name => 'Type', | ||
| 232 | description => 'Shape type.', | ||
| 233 | format => '', | ||
| 234 | read_only => '', | ||
| 235 | }, | ||
| 236 | 'shape_type' => { | ||
| 237 | datatype => 'string', | ||
| 238 | base_name => 'ShapeType', | ||
| 239 | description => 'Combined shape type.', | ||
| 240 | format => '', | ||
| 241 | read_only => '', | ||
| 242 | }, | ||
| 243 | 'text' => { | ||
| 244 | datatype => 'string', | ||
| 245 | base_name => 'Text', | ||
| 246 | description => 'Gets or sets the text.', | ||
| 247 | format => '', | ||
| 248 | read_only => '', | ||
| 249 | }, | ||
| 250 | 'paragraphs' => { | ||
| 251 | datatype => 'ARRAY[Paragraph]', | ||
| 252 | base_name => 'Paragraphs', | ||
| 253 | description => 'Get or sets list to paragraphs list', | ||
| 254 | format => '', | ||
| 255 | read_only => '', | ||
| 256 | }, | ||
| 257 | 'text_frame_format' => { | ||
| 258 | datatype => 'TextFrameFormat', | ||
| 259 | base_name => 'TextFrameFormat', | ||
| 260 | description => 'Returns TextFrame's formatting properties.', | ||
| 261 | format => '', | ||
| 262 | read_only => '', | ||
| 263 | }, | ||
| 264 | }); | ||
| 265 | |||
| 266 | __PACKAGE__->swagger_types( { | ||
| 267 | 'self_uri' => 'ResourceUri', | ||
| 268 | 'alternate_links' => 'ARRAY[ResourceUri]', | ||
| 269 | 'name' => 'string', | ||
| 270 | 'width' => 'double', | ||
| 271 | 'height' => 'double', | ||
| 272 | 'alternative_text' => 'string', | ||
| 273 | 'alternative_text_title' => 'string', | ||
| 274 | 'hidden' => 'boolean', | ||
| 275 | 'is_decorative' => 'boolean', | ||
| 276 | 'x' => 'double', | ||
| 277 | 'y' => 'double', | ||
| 278 | 'z_order_position' => 'int', | ||
| 279 | 'fill_format' => 'FillFormat', | ||
| 280 | 'effect_format' => 'EffectFormat', | ||
| 281 | 'three_d_format' => 'ThreeDFormat', | ||
| 282 | 'line_format' => 'LineFormat', | ||
| 283 | 'hyperlink_click' => 'Hyperlink', | ||
| 284 | 'hyperlink_mouse_over' => 'Hyperlink', | ||
| 285 | 'type' => 'string', | ||
| 286 | 'shape_type' => 'string', | ||
| 287 | 'text' => 'string', | ||
| 288 | 'paragraphs' => 'ARRAY[Paragraph]', | ||
| 289 | 'text_frame_format' => 'TextFrameFormat' | ||
| 290 | } ); | ||
| 291 | |||
| 292 | __PACKAGE__->attribute_map( { | ||
| 293 | 'self_uri' => 'SelfUri', | ||
| 294 | 'alternate_links' => 'AlternateLinks', | ||
| 295 | 'name' => 'Name', | ||
| 296 | 'width' => 'Width', | ||
| 297 | 'height' => 'Height', | ||
| 298 | 'alternative_text' => 'AlternativeText', | ||
| 299 | 'alternative_text_title' => 'AlternativeTextTitle', | ||
| 300 | 'hidden' => 'Hidden', | ||
| 301 | 'is_decorative' => 'IsDecorative', | ||
| 302 | 'x' => 'X', | ||
| 303 | 'y' => 'Y', | ||
| 304 | 'z_order_position' => 'ZOrderPosition', | ||
| 305 | 'fill_format' => 'FillFormat', | ||
| 306 | 'effect_format' => 'EffectFormat', | ||
| 307 | 'three_d_format' => 'ThreeDFormat', | ||
| 308 | 'line_format' => 'LineFormat', | ||
| 309 | 'hyperlink_click' => 'HyperlinkClick', | ||
| 310 | 'hyperlink_mouse_over' => 'HyperlinkMouseOver', | ||
| 311 | 'type' => 'Type', | ||
| 312 | 'shape_type' => 'ShapeType', | ||
| 313 | 'text' => 'Text', | ||
| 314 | 'paragraphs' => 'Paragraphs', | ||
| 315 | 'text_frame_format' => 'TextFrameFormat' | ||
| 316 | } ); | ||
| 317 | |||
| 318 | __PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); | ||
| 319 | |||
| 320 | |||
| 321 | 1; |