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
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#group ⇒ Group
Returns the value of the
groupattribute. -
#group=(value) ⇒ Object
Sets the value of the
groupattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Tag
constructor
Creates a new instance of the Tag class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#parent ⇒ Tag
Returns the value of the
parentattribute. -
#parent=(value) ⇒ Object
Sets the value of the
parentattribute. -
#template ⇒ Template
Returns the value of the
templateattribute. -
#template=(value) ⇒ Object
Sets the value of the
templateattribute. -
#user ⇒ User
Returns the value of the
userattribute. -
#user=(value) ⇒ Object
Sets the value of the
userattribute. -
#vm ⇒ Vm
Returns the value of the
vmattribute. -
#vm=(value) ⇒ Object
Sets the value of the
vmattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Tag
Creates a new instance of the OvirtSDK4::Tag class.
23568 23569 23570 23571 23572 23573 23574 23575 23576 |
# File 'lib/ovirtsdk4/types.rb', line 23568 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.
23581 23582 23583 23584 23585 23586 23587 23588 23589 |
# File 'lib/ovirtsdk4/types.rb', line 23581 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.
23323 23324 23325 |
# File 'lib/ovirtsdk4/types.rb', line 23323 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
23332 23333 23334 |
# File 'lib/ovirtsdk4/types.rb', line 23332 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
23341 23342 23343 |
# File 'lib/ovirtsdk4/types.rb', line 23341 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
23350 23351 23352 |
# File 'lib/ovirtsdk4/types.rb', line 23350 def description=(value) @description = value end |
#group ⇒ Group
Returns the value of the group attribute.
23359 23360 23361 |
# File 'lib/ovirtsdk4/types.rb', line 23359 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.
23372 23373 23374 23375 23376 23377 |
# File 'lib/ovirtsdk4/types.rb', line 23372 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.
23594 23595 23596 23597 23598 23599 23600 23601 23602 |
# File 'lib/ovirtsdk4/types.rb', line 23594 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.
23384 23385 23386 |
# File 'lib/ovirtsdk4/types.rb', line 23384 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.
23397 23398 23399 23400 23401 23402 |
# File 'lib/ovirtsdk4/types.rb', line 23397 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.
23409 23410 23411 |
# File 'lib/ovirtsdk4/types.rb', line 23409 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
23418 23419 23420 |
# File 'lib/ovirtsdk4/types.rb', line 23418 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
23427 23428 23429 |
# File 'lib/ovirtsdk4/types.rb', line 23427 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
23436 23437 23438 |
# File 'lib/ovirtsdk4/types.rb', line 23436 def name=(value) @name = value end |
#parent ⇒ Tag
Returns the value of the parent attribute.
23445 23446 23447 |
# File 'lib/ovirtsdk4/types.rb', line 23445 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.
23458 23459 23460 23461 23462 23463 |
# File 'lib/ovirtsdk4/types.rb', line 23458 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.
23470 23471 23472 |
# File 'lib/ovirtsdk4/types.rb', line 23470 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.
23483 23484 23485 23486 23487 23488 |
# File 'lib/ovirtsdk4/types.rb', line 23483 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.
23495 23496 23497 |
# File 'lib/ovirtsdk4/types.rb', line 23495 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.
23508 23509 23510 23511 23512 23513 |
# File 'lib/ovirtsdk4/types.rb', line 23508 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.
23520 23521 23522 |
# File 'lib/ovirtsdk4/types.rb', line 23520 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.
23533 23534 23535 23536 23537 23538 |
# File 'lib/ovirtsdk4/types.rb', line 23533 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |