Class: AsposeSlidesCloud::SmartArtNode

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

Overview

Smart art node.

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

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
102
103
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 72

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?(:'Nodes')
    if (value = attributes[:'Nodes']).is_a?(Array)
      self.nodes = value
    end
  end

  if attributes.has_key?(:'Shapes')
    self.shapes = attributes[:'Shapes']
  end

  if attributes.has_key?(:'IsAssistant')
    self.is_assistant = attributes[:'IsAssistant']
  end

  if attributes.has_key?(:'Text')
    self.text = attributes[:'Text']
  end

  if attributes.has_key?(:'OrgChartLayout')
    self.org_chart_layout = attributes[:'OrgChartLayout']
  end

  if attributes.has_key?(:'Paragraphs')
    self.paragraphs = attributes[:'Paragraphs']
  end
end

Instance Attribute Details

#is_assistantObject

True for and assistant node.



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

def is_assistant
  @is_assistant
end

#nodesObject

Node list.



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

def nodes
  @nodes
end

#org_chart_layoutObject

Organization chart layout type associated with current node.



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

def org_chart_layout
  @org_chart_layout
end

#paragraphsObject

Get or sets list to paragraphs list



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

def paragraphs
  @paragraphs
end

#shapesObject

Gets or sets the link to shapes.



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

def shapes
  @shapes
end

#textObject

Node text.



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

def text
  @text
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/smart_art_node.rb', line 47

def self.attribute_map
  {
    :'nodes' => :'Nodes',
    :'shapes' => :'Shapes',
    :'is_assistant' => :'IsAssistant',
    :'text' => :'Text',
    :'org_chart_layout' => :'OrgChartLayout',
    :'paragraphs' => :'Paragraphs',
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    :'nodes' => :'Array<SmartArtNode>',
    :'shapes' => :'ResourceUri',
    :'is_assistant' => :'BOOLEAN',
    :'text' => :'String',
    :'org_chart_layout' => :'String',
    :'paragraphs' => :'ResourceUri',
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



137
138
139
140
141
142
143
144
145
146
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 137

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      nodes == o.nodes &&
      shapes == o.shapes &&
      is_assistant == o.is_assistant &&
      text == o.text &&
      org_chart_layout == o.org_chart_layout &&
      paragraphs == o.paragraphs
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


150
151
152
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 150

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



156
157
158
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 156

def hash
  [nodes, shapes, is_assistant, text, org_chart_layout, paragraphs].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



107
108
109
110
111
112
113
114
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 107

def list_invalid_properties
  invalid_properties = Array.new
  if @org_chart_layout.nil?
    invalid_properties.push('invalid value for "org_chart_layout", org_chart_layout 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



118
119
120
121
122
123
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 118

def valid?
  return false if @org_chart_layout.nil?
  org_chart_layout_validator = EnumAttributeValidator.new('String', ['Initial', 'Standart', 'BothHanging', 'LeftHanging', 'RightHanging'])
  return false unless org_chart_layout_validator.valid?(@org_chart_layout)
  true
end