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.
38141 38142 38143 38144 38145 38146 |
# File 'lib/ovirtsdk4/types.rb', line 38141 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.
38151 38152 38153 38154 38155 38156 |
# File 'lib/ovirtsdk4/types.rb', line 38151 def ==(other) super && @content == other.content && @storage_domain == other.storage_domain && @type == other.type end |
#comment ⇒ String
Returns the value of the comment
attribute.
37991 37992 37993 |
# File 'lib/ovirtsdk4/types.rb', line 37991 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
38000 38001 38002 |
# File 'lib/ovirtsdk4/types.rb', line 38000 def comment=(value) @comment = value end |
#content ⇒ String
Returns the value of the content
attribute.
38009 38010 38011 |
# File 'lib/ovirtsdk4/types.rb', line 38009 def content @content end |
#content=(value) ⇒ Object
Sets the value of the content
attribute.
38018 38019 38020 |
# File 'lib/ovirtsdk4/types.rb', line 38018 def content=(value) @content = value end |
#description ⇒ String
Returns the value of the description
attribute.
38027 38028 38029 |
# File 'lib/ovirtsdk4/types.rb', line 38027 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
38036 38037 38038 |
# File 'lib/ovirtsdk4/types.rb', line 38036 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
38161 38162 38163 38164 38165 38166 |
# File 'lib/ovirtsdk4/types.rb', line 38161 def hash super + @content.hash + @storage_domain.hash + @type.hash end |
#id ⇒ String
Returns the value of the id
attribute.
38045 38046 38047 |
# File 'lib/ovirtsdk4/types.rb', line 38045 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
38054 38055 38056 |
# File 'lib/ovirtsdk4/types.rb', line 38054 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
38063 38064 38065 |
# File 'lib/ovirtsdk4/types.rb', line 38063 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
38072 38073 38074 |
# File 'lib/ovirtsdk4/types.rb', line 38072 def name=(value) @name = value end |
#storage_domain ⇒ StorageDomain
Returns the value of the storage_domain
attribute.
38081 38082 38083 |
# File 'lib/ovirtsdk4/types.rb', line 38081 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.
38094 38095 38096 38097 38098 38099 |
# File 'lib/ovirtsdk4/types.rb', line 38094 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.
38106 38107 38108 |
# File 'lib/ovirtsdk4/types.rb', line 38106 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
38115 38116 38117 |
# File 'lib/ovirtsdk4/types.rb', line 38115 def type=(value) @type = value end |