Class: OvirtSDK4::File
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::File
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#content ⇒ String
Returns the value of the
contentattribute. -
#content=(value) ⇒ Object
Sets the value of the
contentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ File
constructor
Creates a new instance of the File class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#storage_domain ⇒ StorageDomain
Returns the value of the
storage_domainattribute. -
#storage_domain=(value) ⇒ Object
Sets the value of the
storage_domainattribute. -
#type ⇒ String
Returns the value of the
typeattribute. -
#type=(value) ⇒ Object
Sets the value of the
typeattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ File
Creates a new instance of the OvirtSDK4::File class.
41461 41462 41463 41464 41465 41466 |
# File 'lib/ovirtsdk4/types.rb', line 41461 def initialize(opts = {}) super(opts) self.content = opts[:content] 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.
41471 41472 41473 41474 41475 41476 |
# File 'lib/ovirtsdk4/types.rb', line 41471 def ==(other) super && @content == other.content && @storage_domain == other.storage_domain && @type == other.type end |
#comment ⇒ String
Returns the value of the comment attribute.
41311 41312 41313 |
# File 'lib/ovirtsdk4/types.rb', line 41311 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
41320 41321 41322 |
# File 'lib/ovirtsdk4/types.rb', line 41320 def comment=(value) @comment = value end |
#content ⇒ String
Returns the value of the content attribute.
41329 41330 41331 |
# File 'lib/ovirtsdk4/types.rb', line 41329 def content @content end |
#content=(value) ⇒ Object
Sets the value of the content attribute.
41338 41339 41340 |
# File 'lib/ovirtsdk4/types.rb', line 41338 def content=(value) @content = value end |
#description ⇒ String
Returns the value of the description attribute.
41347 41348 41349 |
# File 'lib/ovirtsdk4/types.rb', line 41347 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
41356 41357 41358 |
# File 'lib/ovirtsdk4/types.rb', line 41356 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
41481 41482 41483 41484 41485 41486 |
# File 'lib/ovirtsdk4/types.rb', line 41481 def hash super + @content.hash + @storage_domain.hash + @type.hash end |
#id ⇒ String
Returns the value of the id attribute.
41365 41366 41367 |
# File 'lib/ovirtsdk4/types.rb', line 41365 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
41374 41375 41376 |
# File 'lib/ovirtsdk4/types.rb', line 41374 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
41383 41384 41385 |
# File 'lib/ovirtsdk4/types.rb', line 41383 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
41392 41393 41394 |
# File 'lib/ovirtsdk4/types.rb', line 41392 def name=(value) @name = value end |
#storage_domain ⇒ StorageDomain
Returns the value of the storage_domain attribute.
41401 41402 41403 |
# File 'lib/ovirtsdk4/types.rb', line 41401 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.
41414 41415 41416 41417 41418 41419 |
# File 'lib/ovirtsdk4/types.rb', line 41414 def storage_domain=(value) if value.is_a?(Hash) value = StorageDomain.new(value) end @storage_domain = value end |
#type ⇒ String
Returns the value of the type attribute.
41426 41427 41428 |
# File 'lib/ovirtsdk4/types.rb', line 41426 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type attribute.
41435 41436 41437 |
# File 'lib/ovirtsdk4/types.rb', line 41435 def type=(value) @type = value end |