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.
5774 5775 5776 5777 5778 5779 |
# File 'lib/ovirtsdk4/types.rb', line 5774 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.
5784 5785 5786 5787 5788 5789 |
# File 'lib/ovirtsdk4/types.rb', line 5784 def ==(other) super && @size == other.size && @storage_domain == other.storage_domain && @type == other.type end |
#comment ⇒ String
Returns the value of the comment
attribute.
5624 5625 5626 |
# File 'lib/ovirtsdk4/types.rb', line 5624 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
5633 5634 5635 |
# File 'lib/ovirtsdk4/types.rb', line 5633 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
5642 5643 5644 |
# File 'lib/ovirtsdk4/types.rb', line 5642 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
5651 5652 5653 |
# File 'lib/ovirtsdk4/types.rb', line 5651 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
5794 5795 5796 5797 5798 5799 |
# File 'lib/ovirtsdk4/types.rb', line 5794 def hash super + @size.hash + @storage_domain.hash + @type.hash end |
#id ⇒ String
Returns the value of the id
attribute.
5660 5661 5662 |
# File 'lib/ovirtsdk4/types.rb', line 5660 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
5669 5670 5671 |
# File 'lib/ovirtsdk4/types.rb', line 5669 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
5678 5679 5680 |
# File 'lib/ovirtsdk4/types.rb', line 5678 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
5687 5688 5689 |
# File 'lib/ovirtsdk4/types.rb', line 5687 def name=(value) @name = value end |
#size ⇒ Integer
Returns the value of the size
attribute.
5696 5697 5698 |
# File 'lib/ovirtsdk4/types.rb', line 5696 def size @size end |
#size=(value) ⇒ Object
Sets the value of the size
attribute.
5705 5706 5707 |
# File 'lib/ovirtsdk4/types.rb', line 5705 def size=(value) @size = value end |
#storage_domain ⇒ StorageDomain
Returns the value of the storage_domain
attribute.
5714 5715 5716 |
# File 'lib/ovirtsdk4/types.rb', line 5714 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.
5727 5728 5729 5730 5731 5732 |
# File 'lib/ovirtsdk4/types.rb', line 5727 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.
5739 5740 5741 |
# File 'lib/ovirtsdk4/types.rb', line 5739 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
5748 5749 5750 |
# File 'lib/ovirtsdk4/types.rb', line 5748 def type=(value) @type = value end |