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.
22825 22826 22827 22828 22829 22830 22831 22832 22833 |
# File 'lib/ovirtsdk4/types.rb', line 22825 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.
22838 22839 22840 22841 22842 22843 22844 22845 22846 |
# File 'lib/ovirtsdk4/types.rb', line 22838 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.
22580 22581 22582 |
# File 'lib/ovirtsdk4/types.rb', line 22580 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
22589 22590 22591 |
# File 'lib/ovirtsdk4/types.rb', line 22589 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
22598 22599 22600 |
# File 'lib/ovirtsdk4/types.rb', line 22598 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
22607 22608 22609 |
# File 'lib/ovirtsdk4/types.rb', line 22607 def description=(value) @description = value end |
#group ⇒ Group
Returns the value of the group
attribute.
22616 22617 22618 |
# File 'lib/ovirtsdk4/types.rb', line 22616 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.
22629 22630 22631 22632 22633 22634 |
# File 'lib/ovirtsdk4/types.rb', line 22629 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.
22851 22852 22853 22854 22855 22856 22857 22858 22859 |
# File 'lib/ovirtsdk4/types.rb', line 22851 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.
22641 22642 22643 |
# File 'lib/ovirtsdk4/types.rb', line 22641 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.
22654 22655 22656 22657 22658 22659 |
# File 'lib/ovirtsdk4/types.rb', line 22654 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.
22666 22667 22668 |
# File 'lib/ovirtsdk4/types.rb', line 22666 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
22675 22676 22677 |
# File 'lib/ovirtsdk4/types.rb', line 22675 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
22684 22685 22686 |
# File 'lib/ovirtsdk4/types.rb', line 22684 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
22693 22694 22695 |
# File 'lib/ovirtsdk4/types.rb', line 22693 def name=(value) @name = value end |
#parent ⇒ Tag
Returns the value of the parent
attribute.
22702 22703 22704 |
# File 'lib/ovirtsdk4/types.rb', line 22702 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.
22715 22716 22717 22718 22719 22720 |
# File 'lib/ovirtsdk4/types.rb', line 22715 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.
22727 22728 22729 |
# File 'lib/ovirtsdk4/types.rb', line 22727 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.
22740 22741 22742 22743 22744 22745 |
# File 'lib/ovirtsdk4/types.rb', line 22740 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.
22752 22753 22754 |
# File 'lib/ovirtsdk4/types.rb', line 22752 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.
22765 22766 22767 22768 22769 22770 |
# File 'lib/ovirtsdk4/types.rb', line 22765 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.
22777 22778 22779 |
# File 'lib/ovirtsdk4/types.rb', line 22777 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.
22790 22791 22792 22793 22794 22795 |
# File 'lib/ovirtsdk4/types.rb', line 22790 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |