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
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. -
#content ⇒ String
Returns the value of the
content
attribute. -
#content=(value) ⇒ Object
Sets the value of the
content
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 = {}) ⇒ File
constructor
Creates a new instance of the File class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
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 ⇒ String
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 = {}) ⇒ File
Creates a new instance of the OvirtSDK4::File class.
40313 40314 40315 40316 40317 40318 |
# File 'lib/ovirtsdk4/types.rb', line 40313 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.
40323 40324 40325 40326 40327 40328 |
# File 'lib/ovirtsdk4/types.rb', line 40323 def ==(other) super && @content == other.content && @storage_domain == other.storage_domain && @type == other.type end |
#comment ⇒ String
Returns the value of the comment
attribute.
40163 40164 40165 |
# File 'lib/ovirtsdk4/types.rb', line 40163 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
40172 40173 40174 |
# File 'lib/ovirtsdk4/types.rb', line 40172 def comment=(value) @comment = value end |
#content ⇒ String
Returns the value of the content
attribute.
40181 40182 40183 |
# File 'lib/ovirtsdk4/types.rb', line 40181 def content @content end |
#content=(value) ⇒ Object
Sets the value of the content
attribute.
40190 40191 40192 |
# File 'lib/ovirtsdk4/types.rb', line 40190 def content=(value) @content = value end |
#description ⇒ String
Returns the value of the description
attribute.
40199 40200 40201 |
# File 'lib/ovirtsdk4/types.rb', line 40199 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
40208 40209 40210 |
# File 'lib/ovirtsdk4/types.rb', line 40208 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
40333 40334 40335 40336 40337 40338 |
# File 'lib/ovirtsdk4/types.rb', line 40333 def hash super + @content.hash + @storage_domain.hash + @type.hash end |
#id ⇒ String
Returns the value of the id
attribute.
40217 40218 40219 |
# File 'lib/ovirtsdk4/types.rb', line 40217 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
40226 40227 40228 |
# File 'lib/ovirtsdk4/types.rb', line 40226 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
40235 40236 40237 |
# File 'lib/ovirtsdk4/types.rb', line 40235 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
40244 40245 40246 |
# File 'lib/ovirtsdk4/types.rb', line 40244 def name=(value) @name = value end |
#storage_domain ⇒ StorageDomain
Returns the value of the storage_domain
attribute.
40253 40254 40255 |
# File 'lib/ovirtsdk4/types.rb', line 40253 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.
40266 40267 40268 40269 40270 40271 |
# File 'lib/ovirtsdk4/types.rb', line 40266 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.
40278 40279 40280 |
# File 'lib/ovirtsdk4/types.rb', line 40278 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
40287 40288 40289 |
# File 'lib/ovirtsdk4/types.rb', line 40287 def type=(value) @type = value end |