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



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
104
105
106
107
108
109
110
111
112
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 77

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

  if attributes.has_key?(:'DefaultParagraphFormat')
    self.default_paragraph_format = attributes[:'DefaultParagraphFormat']
  end
end

Instance Attribute Details

#default_paragraph_formatObject

Default paragraph format for the node’s text frame.



47
48
49
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 47

def default_paragraph_format
  @default_paragraph_format
end

#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.



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 50

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

.swagger_typesObject

Attribute type mapping.



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 63

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

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



146
147
148
149
150
151
152
153
154
155
156
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 146

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 &&
      default_paragraph_format == o.default_paragraph_format
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


160
161
162
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 160

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



166
167
168
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 166

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

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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

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



127
128
129
130
131
132
# File 'lib/aspose_slides_cloud/models/smart_art_node.rb', line 127

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