Class: AsposeSlidesCloud::ColorScheme

Inherits:
ResourceBase show all
Defined in:
lib/aspose_slides_cloud/models/color_scheme.rb

Overview

Slide’s color scheme DTO

Instance Attribute Summary collapse

Attributes inherited from ResourceBase

#alternate_links, #self_uri

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 102

def initialize(attributes = {})
  super

  if attributes.has_key?(:'Accent1')
    self.accent1 = attributes[:'Accent1']
  end

  if attributes.has_key?(:'Accent2')
    self.accent2 = attributes[:'Accent2']
  end

  if attributes.has_key?(:'Accent3')
    self.accent3 = attributes[:'Accent3']
  end

  if attributes.has_key?(:'Accent4')
    self.accent4 = attributes[:'Accent4']
  end

  if attributes.has_key?(:'Accent5')
    self.accent5 = attributes[:'Accent5']
  end

  if attributes.has_key?(:'Accent6')
    self.accent6 = attributes[:'Accent6']
  end

  if attributes.has_key?(:'Dark1')
    self.dark1 = attributes[:'Dark1']
  end

  if attributes.has_key?(:'Dark2')
    self.dark2 = attributes[:'Dark2']
  end

  if attributes.has_key?(:'FollowedHyperlink')
    self.followed_hyperlink = attributes[:'FollowedHyperlink']
  end

  if attributes.has_key?(:'Hyperlink')
    self.hyperlink = attributes[:'Hyperlink']
  end

  if attributes.has_key?(:'Light1')
    self.light1 = attributes[:'Light1']
  end

  if attributes.has_key?(:'Light2')
    self.light2 = attributes[:'Light2']
  end
end

Instance Attribute Details

#accent1Object

First accent color.



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

def accent1
  @accent1
end

#accent2Object

Second accent color.



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

def accent2
  @accent2
end

#accent3Object

Third accent color.



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

def accent3
  @accent3
end

#accent4Object

Fourth accent color.



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

def accent4
  @accent4
end

#accent5Object

Fifth accent color.



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

def accent5
  @accent5
end

#accent6Object

Sixth accent color.



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

def accent6
  @accent6
end

#dark1Object

First dark color.



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

def dark1
  @dark1
end

#dark2Object

Second dark color.



50
51
52
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 50

def dark2
  @dark2
end

Visited hyperlink color.



53
54
55
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 53

def followed_hyperlink
  @followed_hyperlink
end

Hyperlink color/



56
57
58
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 56

def hyperlink
  @hyperlink
end

#light1Object

First light color.



59
60
61
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 59

def light1
  @light1
end

#light2Object

Second light color.



62
63
64
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 62

def light2
  @light2
end

Class Method Details

.attribute_mapObject

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



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 65

def self.attribute_map
  super.merge({
    :'accent1' => :'Accent1',
    :'accent2' => :'Accent2',
    :'accent3' => :'Accent3',
    :'accent4' => :'Accent4',
    :'accent5' => :'Accent5',
    :'accent6' => :'Accent6',
    :'dark1' => :'Dark1',
    :'dark2' => :'Dark2',
    :'followed_hyperlink' => :'FollowedHyperlink',
    :'hyperlink' => :'Hyperlink',
    :'light1' => :'Light1',
    :'light2' => :'Light2',
  })
end

.swagger_typesObject

Attribute type mapping.



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 83

def self.swagger_types
  super.merge({
    :'accent1' => :'String',
    :'accent2' => :'String',
    :'accent3' => :'String',
    :'accent4' => :'String',
    :'accent5' => :'String',
    :'accent6' => :'String',
    :'dark1' => :'String',
    :'dark2' => :'String',
    :'followed_hyperlink' => :'String',
    :'hyperlink' => :'String',
    :'light1' => :'String',
    :'light2' => :'String',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 170

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      self_uri == o.self_uri &&
      alternate_links == o.alternate_links &&
      accent1 == o.accent1 &&
      accent2 == o.accent2 &&
      accent3 == o.accent3 &&
      accent4 == o.accent4 &&
      accent5 == o.accent5 &&
      accent6 == o.accent6 &&
      dark1 == o.dark1 &&
      dark2 == o.dark2 &&
      followed_hyperlink == o.followed_hyperlink &&
      hyperlink == o.hyperlink &&
      light1 == o.light1 &&
      light2 == o.light2
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


191
192
193
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 191

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



197
198
199
# File 'lib/aspose_slides_cloud/models/color_scheme.rb', line 197

def hash
  [self_uri, alternate_links, accent1, accent2, accent3, accent4, accent5, accent6, dark1, dark2, followed_hyperlink, hyperlink, light1, light2].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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

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



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

def valid?
  return false if !super
  true
end