Class: AsposeSlidesCloud::ArrayElement

Inherits:
MathElement show all
Defined in:
lib/aspose_slides_cloud/models/array_element.rb

Overview

An array of elements.

Instance Attribute Summary collapse

Attributes inherited from MathElement

#type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ ArrayElement

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 72

def initialize(attributes = {})
  super

  if attributes.has_key?(:'Arguments')
    if (value = attributes[:'Arguments']).is_a?(Array)
      self.arguments = value
    end
  end

  if attributes.has_key?(:'BaseJustification')
    self.base_justification = attributes[:'BaseJustification']
  end

  if attributes.has_key?(:'MaximumDistribution')
    self.maximum_distribution = attributes[:'MaximumDistribution']
  end

  if attributes.has_key?(:'ObjectDistribution')
    self.object_distribution = attributes[:'ObjectDistribution']
  end

  if attributes.has_key?(:'RowSpacingRule')
    self.row_spacing_rule = attributes[:'RowSpacingRule']
  end

  if attributes.has_key?(:'RowSpacing')
    self.row_spacing = attributes[:'RowSpacing']
  end
  self.type = 'Array'
end

Instance Attribute Details

#argumentsObject

Arguments



29
30
31
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 29

def arguments
  @arguments
end

#base_justificationObject

Specifies alignment of the array relative to surrounding text



32
33
34
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 32

def base_justification
  @base_justification
end

#maximum_distributionObject

Maximum Distribution



35
36
37
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 35

def maximum_distribution
  @maximum_distribution
end

#object_distributionObject

Object Distribution



38
39
40
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 38

def object_distribution
  @object_distribution
end

#row_spacingObject

Spacing between rows of an array



44
45
46
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 44

def row_spacing
  @row_spacing
end

#row_spacing_ruleObject

The type of vertical spacing between array elements



41
42
43
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 41

def row_spacing_rule
  @row_spacing_rule
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



47
48
49
50
51
52
53
54
55
56
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 47

def self.attribute_map
  super.merge({
    :'arguments' => :'Arguments',
    :'base_justification' => :'BaseJustification',
    :'maximum_distribution' => :'MaximumDistribution',
    :'object_distribution' => :'ObjectDistribution',
    :'row_spacing_rule' => :'RowSpacingRule',
    :'row_spacing' => :'RowSpacing',
  })
end

.swagger_typesObject

Attribute type mapping.



59
60
61
62
63
64
65
66
67
68
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 59

def self.swagger_types
  super.merge({
    :'arguments' => :'Array<MathElement>',
    :'base_justification' => :'String',
    :'maximum_distribution' => :'BOOLEAN',
    :'object_distribution' => :'BOOLEAN',
    :'row_spacing_rule' => :'String',
    :'row_spacing' => :'Integer',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



143
144
145
146
147
148
149
150
151
152
153
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 143

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      type == o.type &&
      arguments == o.arguments &&
      base_justification == o.base_justification &&
      maximum_distribution == o.maximum_distribution &&
      object_distribution == o.object_distribution &&
      row_spacing_rule == o.row_spacing_rule &&
      row_spacing == o.row_spacing
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


157
158
159
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 157

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



163
164
165
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 163

def hash
  [type, arguments, base_justification, maximum_distribution, object_distribution, row_spacing_rule, row_spacing].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



105
106
107
108
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 105

def list_invalid_properties
  invalid_properties = super
  invalid_properties
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



112
113
114
115
116
117
118
119
# File 'lib/aspose_slides_cloud/models/array_element.rb', line 112

def valid?
  return false if !super
  base_justification_validator = EnumAttributeValidator.new('String', ['NotDefined', 'Top', 'Center', 'Bottom'])
  return false unless base_justification_validator.valid?(@base_justification)
  row_spacing_rule_validator = EnumAttributeValidator.new('String', ['SingleLineGap', 'OneAndAHalfLineGap', 'TwoLineGap', 'Exactly', 'Multiple'])
  return false unless row_spacing_rule_validator.valid?(@row_spacing_rule)
  true
end