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.
22390 22391 22392 22393 22394 22395 22396 22397 22398 |
# File 'lib/ovirtsdk4/types.rb', line 22390 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.
22403 22404 22405 22406 22407 22408 22409 22410 22411 |
# File 'lib/ovirtsdk4/types.rb', line 22403 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.
22145 22146 22147 |
# File 'lib/ovirtsdk4/types.rb', line 22145 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
22154 22155 22156 |
# File 'lib/ovirtsdk4/types.rb', line 22154 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
22163 22164 22165 |
# File 'lib/ovirtsdk4/types.rb', line 22163 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
22172 22173 22174 |
# File 'lib/ovirtsdk4/types.rb', line 22172 def description=(value) @description = value end |
#group ⇒ Group
Returns the value of the group
attribute.
22181 22182 22183 |
# File 'lib/ovirtsdk4/types.rb', line 22181 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.
22194 22195 22196 22197 22198 22199 |
# File 'lib/ovirtsdk4/types.rb', line 22194 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.
22416 22417 22418 22419 22420 22421 22422 22423 22424 |
# File 'lib/ovirtsdk4/types.rb', line 22416 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.
22206 22207 22208 |
# File 'lib/ovirtsdk4/types.rb', line 22206 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.
22219 22220 22221 22222 22223 22224 |
# File 'lib/ovirtsdk4/types.rb', line 22219 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.
22231 22232 22233 |
# File 'lib/ovirtsdk4/types.rb', line 22231 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
22240 22241 22242 |
# File 'lib/ovirtsdk4/types.rb', line 22240 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
22249 22250 22251 |
# File 'lib/ovirtsdk4/types.rb', line 22249 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
22258 22259 22260 |
# File 'lib/ovirtsdk4/types.rb', line 22258 def name=(value) @name = value end |
#parent ⇒ Tag
Returns the value of the parent
attribute.
22267 22268 22269 |
# File 'lib/ovirtsdk4/types.rb', line 22267 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.
22280 22281 22282 22283 22284 22285 |
# File 'lib/ovirtsdk4/types.rb', line 22280 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.
22292 22293 22294 |
# File 'lib/ovirtsdk4/types.rb', line 22292 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.
22305 22306 22307 22308 22309 22310 |
# File 'lib/ovirtsdk4/types.rb', line 22305 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.
22317 22318 22319 |
# File 'lib/ovirtsdk4/types.rb', line 22317 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.
22330 22331 22332 22333 22334 22335 |
# File 'lib/ovirtsdk4/types.rb', line 22330 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.
22342 22343 22344 |
# File 'lib/ovirtsdk4/types.rb', line 22342 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.
22355 22356 22357 22358 22359 22360 |
# File 'lib/ovirtsdk4/types.rb', line 22355 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |