Class: OvirtSDK4::Image
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Image
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Image
constructor
Creates a new instance of the Image class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#size ⇒ Integer
Returns the value of the
size
attribute. -
#size=(value) ⇒ Object
Sets the value of the
size
attribute. -
#storage_domain ⇒ StorageDomain
Returns the value of the
storage_domain
attribute. -
#storage_domain=(value) ⇒ Object
Sets the value of the
storage_domain
attribute. -
#type ⇒ ImageFileType
Returns the value of the
type
attribute. -
#type=(value) ⇒ Object
Sets the value of the
type
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Image
Creates a new instance of the OvirtSDK4::Image class.
5355 5356 5357 5358 5359 5360 |
# File 'lib/ovirtsdk4/types.rb', line 5355 def initialize(opts = {}) super(opts) self.size = opts[:size] self.storage_domain = opts[:storage_domain] self.type = opts[:type] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
5365 5366 5367 5368 5369 5370 |
# File 'lib/ovirtsdk4/types.rb', line 5365 def ==(other) super && @size == other.size && @storage_domain == other.storage_domain && @type == other.type end |
#comment ⇒ String
Returns the value of the comment
attribute.
5205 5206 5207 |
# File 'lib/ovirtsdk4/types.rb', line 5205 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
5214 5215 5216 |
# File 'lib/ovirtsdk4/types.rb', line 5214 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
5223 5224 5225 |
# File 'lib/ovirtsdk4/types.rb', line 5223 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
5232 5233 5234 |
# File 'lib/ovirtsdk4/types.rb', line 5232 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
5375 5376 5377 5378 5379 5380 |
# File 'lib/ovirtsdk4/types.rb', line 5375 def hash super + @size.hash + @storage_domain.hash + @type.hash end |
#id ⇒ String
Returns the value of the id
attribute.
5241 5242 5243 |
# File 'lib/ovirtsdk4/types.rb', line 5241 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
5250 5251 5252 |
# File 'lib/ovirtsdk4/types.rb', line 5250 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
5259 5260 5261 |
# File 'lib/ovirtsdk4/types.rb', line 5259 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
5268 5269 5270 |
# File 'lib/ovirtsdk4/types.rb', line 5268 def name=(value) @name = value end |
#size ⇒ Integer
Returns the value of the size
attribute.
5277 5278 5279 |
# File 'lib/ovirtsdk4/types.rb', line 5277 def size @size end |
#size=(value) ⇒ Object
Sets the value of the size
attribute.
5286 5287 5288 |
# File 'lib/ovirtsdk4/types.rb', line 5286 def size=(value) @size = value end |
#storage_domain ⇒ StorageDomain
Returns the value of the storage_domain
attribute.
5295 5296 5297 |
# File 'lib/ovirtsdk4/types.rb', line 5295 def storage_domain @storage_domain end |
#storage_domain=(value) ⇒ Object
Sets the value of the storage_domain
attribute.
The value
parameter can be an instance of StorageDomain or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
5308 5309 5310 5311 5312 5313 |
# File 'lib/ovirtsdk4/types.rb', line 5308 def storage_domain=(value) if value.is_a?(Hash) value = StorageDomain.new(value) end @storage_domain = value end |
#type ⇒ ImageFileType
Returns the value of the type
attribute.
5320 5321 5322 |
# File 'lib/ovirtsdk4/types.rb', line 5320 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
5329 5330 5331 |
# File 'lib/ovirtsdk4/types.rb', line 5329 def type=(value) @type = value end |