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.
5352 5353 5354 5355 5356 5357 |
# File 'lib/ovirtsdk4/types.rb', line 5352 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.
5362 5363 5364 5365 5366 5367 |
# File 'lib/ovirtsdk4/types.rb', line 5362 def ==(other) super && @size == other.size && @storage_domain == other.storage_domain && @type == other.type end |
#comment ⇒ String
Returns the value of the comment
attribute.
5202 5203 5204 |
# File 'lib/ovirtsdk4/types.rb', line 5202 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
5211 5212 5213 |
# File 'lib/ovirtsdk4/types.rb', line 5211 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
5220 5221 5222 |
# File 'lib/ovirtsdk4/types.rb', line 5220 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
5229 5230 5231 |
# File 'lib/ovirtsdk4/types.rb', line 5229 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
5372 5373 5374 5375 5376 5377 |
# File 'lib/ovirtsdk4/types.rb', line 5372 def hash super + @size.hash + @storage_domain.hash + @type.hash end |
#id ⇒ String
Returns the value of the id
attribute.
5238 5239 5240 |
# File 'lib/ovirtsdk4/types.rb', line 5238 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
5247 5248 5249 |
# File 'lib/ovirtsdk4/types.rb', line 5247 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
5256 5257 5258 |
# File 'lib/ovirtsdk4/types.rb', line 5256 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
5265 5266 5267 |
# File 'lib/ovirtsdk4/types.rb', line 5265 def name=(value) @name = value end |
#size ⇒ Integer
Returns the value of the size
attribute.
5274 5275 5276 |
# File 'lib/ovirtsdk4/types.rb', line 5274 def size @size end |
#size=(value) ⇒ Object
Sets the value of the size
attribute.
5283 5284 5285 |
# File 'lib/ovirtsdk4/types.rb', line 5283 def size=(value) @size = value end |
#storage_domain ⇒ StorageDomain
Returns the value of the storage_domain
attribute.
5292 5293 5294 |
# File 'lib/ovirtsdk4/types.rb', line 5292 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.
5305 5306 5307 5308 5309 5310 |
# File 'lib/ovirtsdk4/types.rb', line 5305 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.
5317 5318 5319 |
# File 'lib/ovirtsdk4/types.rb', line 5317 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
5326 5327 5328 |
# File 'lib/ovirtsdk4/types.rb', line 5326 def type=(value) @type = value end |