Class: OvirtSDK4::Tag
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Tag
- 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. -
#group ⇒ Group
Returns the value of the
group
attribute. -
#group=(value) ⇒ Object
Sets the value of the
group
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Tag
constructor
Creates a new instance of the Tag class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#parent ⇒ Tag
Returns the value of the
parent
attribute. -
#parent=(value) ⇒ Object
Sets the value of the
parent
attribute. -
#template ⇒ Template
Returns the value of the
template
attribute. -
#template=(value) ⇒ Object
Sets the value of the
template
attribute. -
#user ⇒ User
Returns the value of the
user
attribute. -
#user=(value) ⇒ Object
Sets the value of the
user
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Tag
Creates a new instance of the OvirtSDK4::Tag class.
23298 23299 23300 23301 23302 23303 23304 23305 23306 |
# File 'lib/ovirtsdk4/types.rb', line 23298 def initialize(opts = {}) super(opts) self.group = opts[:group] self.host = opts[:host] self.parent = opts[:parent] self.template = opts[:template] self.user = opts[:user] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
23311 23312 23313 23314 23315 23316 23317 23318 23319 |
# File 'lib/ovirtsdk4/types.rb', line 23311 def ==(other) super && @group == other.group && @host == other.host && @parent == other.parent && @template == other.template && @user == other.user && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
23053 23054 23055 |
# File 'lib/ovirtsdk4/types.rb', line 23053 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
23062 23063 23064 |
# File 'lib/ovirtsdk4/types.rb', line 23062 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
23071 23072 23073 |
# File 'lib/ovirtsdk4/types.rb', line 23071 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
23080 23081 23082 |
# File 'lib/ovirtsdk4/types.rb', line 23080 def description=(value) @description = value end |
#group ⇒ Group
Returns the value of the group
attribute.
23089 23090 23091 |
# File 'lib/ovirtsdk4/types.rb', line 23089 def group @group end |
#group=(value) ⇒ Object
Sets the value of the group
attribute.
The value
parameter can be an instance of Group 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.
23102 23103 23104 23105 23106 23107 |
# File 'lib/ovirtsdk4/types.rb', line 23102 def group=(value) if value.is_a?(Hash) value = Group.new(value) end @group = value end |
#hash ⇒ Object
Generates a hash value for this object.
23324 23325 23326 23327 23328 23329 23330 23331 23332 |
# File 'lib/ovirtsdk4/types.rb', line 23324 def hash super + @group.hash + @host.hash + @parent.hash + @template.hash + @user.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
23114 23115 23116 |
# File 'lib/ovirtsdk4/types.rb', line 23114 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host
attribute.
The value
parameter can be an instance of Host 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.
23127 23128 23129 23130 23131 23132 |
# File 'lib/ovirtsdk4/types.rb', line 23127 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#id ⇒ String
Returns the value of the id
attribute.
23139 23140 23141 |
# File 'lib/ovirtsdk4/types.rb', line 23139 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
23148 23149 23150 |
# File 'lib/ovirtsdk4/types.rb', line 23148 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
23157 23158 23159 |
# File 'lib/ovirtsdk4/types.rb', line 23157 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
23166 23167 23168 |
# File 'lib/ovirtsdk4/types.rb', line 23166 def name=(value) @name = value end |
#parent ⇒ Tag
Returns the value of the parent
attribute.
23175 23176 23177 |
# File 'lib/ovirtsdk4/types.rb', line 23175 def parent @parent end |
#parent=(value) ⇒ Object
Sets the value of the parent
attribute.
The value
parameter can be an instance of OvirtSDK4::Tag 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.
23188 23189 23190 23191 23192 23193 |
# File 'lib/ovirtsdk4/types.rb', line 23188 def parent=(value) if value.is_a?(Hash) value = Tag.new(value) end @parent = value end |
#template ⇒ Template
Returns the value of the template
attribute.
23200 23201 23202 |
# File 'lib/ovirtsdk4/types.rb', line 23200 def template @template end |
#template=(value) ⇒ Object
Sets the value of the template
attribute.
The value
parameter can be an instance of OvirtSDK4::Template 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.
23213 23214 23215 23216 23217 23218 |
# File 'lib/ovirtsdk4/types.rb', line 23213 def template=(value) if value.is_a?(Hash) value = Template.new(value) end @template = value end |
#user ⇒ User
Returns the value of the user
attribute.
23225 23226 23227 |
# File 'lib/ovirtsdk4/types.rb', line 23225 def user @user end |
#user=(value) ⇒ Object
Sets the value of the user
attribute.
The value
parameter can be an instance of User 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.
23238 23239 23240 23241 23242 23243 |
# File 'lib/ovirtsdk4/types.rb', line 23238 def user=(value) if value.is_a?(Hash) value = User.new(value) end @user = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
23250 23251 23252 |
# File 'lib/ovirtsdk4/types.rb', line 23250 def vm @vm end |
#vm=(value) ⇒ Object
Sets the value of the vm
attribute.
The value
parameter can be an instance of Vm 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.
23263 23264 23265 23266 23267 23268 |
# File 'lib/ovirtsdk4/types.rb', line 23263 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |