Class: AsposeSlidesCloud::TableCellMergeOptions

Inherits:
BaseObject
  • Object
show all
Defined in:
lib/aspose_slides_cloud/models/table_cell_merge_options.rb

Overview

Table cells merge options

Instance Attribute Summary collapse

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 = {}) ⇒ TableCellMergeOptions

Initializes the object

Parameters:

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

    Model attributes in the form of hash



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/aspose_slides_cloud/models/table_cell_merge_options.rb', line 67

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'FirstRowIndex')
    self.first_row_index = attributes[:'FirstRowIndex']
  end

  if attributes.has_key?(:'FirstCellIndex')
    self.first_cell_index = attributes[:'FirstCellIndex']
  end

  if attributes.has_key?(:'LastRowIndex')
    self.last_row_index = attributes[:'LastRowIndex']
  end

  if attributes.has_key?(:'LastCellIndex')
    self.last_cell_index = attributes[:'LastCellIndex']
  end

  if attributes.has_key?(:'AllowSplitting')
    self.allow_splitting = attributes[:'AllowSplitting']
  end
end

Instance Attribute Details

#allow_splittingObject

Allow splitting



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

def allow_splitting
  @allow_splitting
end

#first_cell_indexObject

First cell index in the row



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

def first_cell_index
  @first_cell_index
end

#first_row_indexObject

Row index of the first cell



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

def first_row_index
  @first_row_index
end

#last_cell_indexObject

Last cell index in the row



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

def last_cell_index
  @last_cell_index
end

#last_row_indexObject

Row index of the last cell



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

def last_row_index
  @last_row_index
end

Class Method Details

.attribute_mapObject

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/table_cell_merge_options.rb', line 44

def self.attribute_map
  {
    :'first_row_index' => :'FirstRowIndex',
    :'first_cell_index' => :'FirstCellIndex',
    :'last_row_index' => :'LastRowIndex',
    :'last_cell_index' => :'LastCellIndex',
    :'allow_splitting' => :'AllowSplitting',
  }
end

.swagger_typesObject

Attribute type mapping.



55
56
57
58
59
60
61
62
63
# File 'lib/aspose_slides_cloud/models/table_cell_merge_options.rb', line 55

def self.swagger_types
  {
    :'first_row_index' => :'Integer',
    :'first_cell_index' => :'Integer',
    :'last_row_index' => :'Integer',
    :'last_cell_index' => :'Integer',
    :'allow_splitting' => :'BOOLEAN',
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



129
130
131
132
133
134
135
136
137
# File 'lib/aspose_slides_cloud/models/table_cell_merge_options.rb', line 129

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      first_row_index == o.first_row_index &&
      first_cell_index == o.first_cell_index &&
      last_row_index == o.last_row_index &&
      last_cell_index == o.last_cell_index &&
      allow_splitting == o.allow_splitting
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


141
142
143
# File 'lib/aspose_slides_cloud/models/table_cell_merge_options.rb', line 141

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



147
148
149
# File 'lib/aspose_slides_cloud/models/table_cell_merge_options.rb', line 147

def hash
  [first_row_index, first_cell_index, last_row_index, last_cell_index, allow_splitting].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/aspose_slides_cloud/models/table_cell_merge_options.rb', line 96

def list_invalid_properties
  invalid_properties = Array.new
  if @first_row_index.nil?
    invalid_properties.push('invalid value for "first_row_index", first_row_index cannot be nil.')
  end

  if @first_cell_index.nil?
    invalid_properties.push('invalid value for "first_cell_index", first_cell_index cannot be nil.')
  end

  if @last_row_index.nil?
    invalid_properties.push('invalid value for "last_row_index", last_row_index cannot be nil.')
  end

  if @last_cell_index.nil?
    invalid_properties.push('invalid value for "last_cell_index", last_cell_index cannot be nil.')
  end

  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



119
120
121
122
123
124
125
# File 'lib/aspose_slides_cloud/models/table_cell_merge_options.rb', line 119

def valid?
  return false if @first_row_index.nil?
  return false if @first_cell_index.nil?
  return false if @last_row_index.nil?
  return false if @last_cell_index.nil?
  true
end