Class: AsposeSlidesCloud::Placeholder
- Inherits:
-
ResourceBase
- Object
- BaseObject
- ResourceBase
- AsposeSlidesCloud::Placeholder
- Defined in:
- lib/aspose_slides_cloud/models/placeholder.rb
Overview
Represents placeholder
Instance Attribute Summary collapse
-
#index ⇒ Object
Index.
-
#orientation ⇒ Object
Orientation.
-
#shape ⇒ Object
Shape link.
-
#size ⇒ Object
Size.
-
#type ⇒ Object
Placeholder type.
Attributes inherited from ResourceBase
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Placeholder
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ Placeholder
Initializes the object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 67 def initialize(attributes = {}) super if attributes.has_key?(:'Index') self.index = attributes[:'Index'] end if attributes.has_key?(:'Orientation') self.orientation = attributes[:'Orientation'] end if attributes.has_key?(:'Size') self.size = attributes[:'Size'] end if attributes.has_key?(:'Type') self.type = attributes[:'Type'] end if attributes.has_key?(:'Shape') self.shape = attributes[:'Shape'] end end |
Instance Attribute Details
#index ⇒ Object
Index.
29 30 31 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 29 def index @index end |
#orientation ⇒ Object
Orientation.
32 33 34 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 32 def orientation @orientation end |
#shape ⇒ Object
Shape link.
41 42 43 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 41 def shape @shape end |
#size ⇒ Object
Size.
35 36 37 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 35 def size @size end |
#type ⇒ Object
Placeholder type.
38 39 40 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 38 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
44 45 46 47 48 49 50 51 52 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 44 def self.attribute_map super.merge({ :'index' => :'Index', :'orientation' => :'Orientation', :'size' => :'Size', :'type' => :'Type', :'shape' => :'Shape', }) end |
.swagger_types ⇒ Object
Attribute type mapping.
55 56 57 58 59 60 61 62 63 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 55 def self.swagger_types super.merge({ :'index' => :'Integer', :'orientation' => :'String', :'size' => :'String', :'type' => :'String', :'shape' => :'ResourceUri', }) end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 163 def ==(o) return true if self.equal?(o) self.class == o.class && self_uri == o.self_uri && alternate_links == o.alternate_links && index == o.index && orientation == o.orientation && size == o.size && type == o.type && shape == o.shape end |
#eql?(o) ⇒ Boolean
177 178 179 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 177 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
183 184 185 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 183 def hash [self_uri, alternate_links, index, orientation, size, type, shape].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 93 def list_invalid_properties invalid_properties = super if @index.nil? invalid_properties.push('invalid value for "index", index cannot be nil.') end if @orientation.nil? invalid_properties.push('invalid value for "orientation", orientation cannot be nil.') end if @size.nil? invalid_properties.push('invalid value for "size", size cannot be nil.') end if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end invalid_properties end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/aspose_slides_cloud/models/placeholder.rb', line 116 def valid? return false if !super return false if @index.nil? return false if @orientation.nil? orientation_validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical']) return false unless orientation_validator.valid?(@orientation) return false if @size.nil? size_validator = EnumAttributeValidator.new('String', ['Full', 'Half', 'Quarter']) return false unless size_validator.valid?(@size) return false if @type.nil? type_validator = EnumAttributeValidator.new('String', ['Title', 'Body', 'CenteredTitle', 'Subtitle', 'DateAndTime', 'SlideNumber', 'Footer', 'Header', 'Object', 'Chart', 'Table', 'ClipArt', 'Diagram', 'Media', 'SlideImage', 'Picture']) return false unless type_validator.valid?(@type) true end |