Class: OvirtSDK4::Group

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ Group

Creates a new instance of the OvirtSDK4::Group class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :domain (Domain, Hash)

    The value of attribute domain.

  • :domain_entry_id (String)

    The value of attribute domain_entry_id.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :namespace (String)

    The value of attribute namespace.

  • :permissions (Array<Permission>, Array<Hash>)

    The values of attribute permissions.

  • :roles (Array<Role>, Array<Hash>)

    The values of attribute roles.

  • :tags (Array<Tag>, Array<Hash>)

    The values of attribute tags.



41511
41512
41513
41514
41515
41516
41517
41518
41519
# File 'lib/ovirtsdk4/types.rb', line 41511

def initialize(opts = {})
  super(opts)
  self.domain = opts[:domain]
  self.domain_entry_id = opts[:domain_entry_id]
  self.namespace = opts[:namespace]
  self.permissions = opts[:permissions]
  self.roles = opts[:roles]
  self.tags = opts[:tags]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



41524
41525
41526
41527
41528
41529
41530
41531
41532
# File 'lib/ovirtsdk4/types.rb', line 41524

def ==(other)
  super &&
  @domain == other.domain &&
  @domain_entry_id == other.domain_entry_id &&
  @namespace == other.namespace &&
  @permissions == other.permissions &&
  @roles == other.roles &&
  @tags == other.tags
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


41277
41278
41279
# File 'lib/ovirtsdk4/types.rb', line 41277

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


41286
41287
41288
# File 'lib/ovirtsdk4/types.rb', line 41286

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


41295
41296
41297
# File 'lib/ovirtsdk4/types.rb', line 41295

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


41304
41305
41306
# File 'lib/ovirtsdk4/types.rb', line 41304

def description=(value)
  @description = value
end

#domainDomain

Returns the value of the domain attribute.

Returns:



41313
41314
41315
# File 'lib/ovirtsdk4/types.rb', line 41313

def domain
  @domain
end

#domain=(value) ⇒ Object

Sets the value of the domain attribute.

The value parameter can be an instance of Domain 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.

Parameters:



41326
41327
41328
41329
41330
41331
# File 'lib/ovirtsdk4/types.rb', line 41326

def domain=(value)
  if value.is_a?(Hash)
    value = Domain.new(value)
  end
  @domain = value
end

#domain_entry_idString

Returns the value of the domain_entry_id attribute.

Returns:

  • (String)


41338
41339
41340
# File 'lib/ovirtsdk4/types.rb', line 41338

def domain_entry_id
  @domain_entry_id
end

#domain_entry_id=(value) ⇒ Object

Sets the value of the domain_entry_id attribute.

Parameters:

  • value (String)


41347
41348
41349
# File 'lib/ovirtsdk4/types.rb', line 41347

def domain_entry_id=(value)
  @domain_entry_id = value
end

#hashObject

Generates a hash value for this object.



41537
41538
41539
41540
41541
41542
41543
41544
41545
# File 'lib/ovirtsdk4/types.rb', line 41537

def hash
  super +
  @domain.hash +
  @domain_entry_id.hash +
  @namespace.hash +
  @permissions.hash +
  @roles.hash +
  @tags.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


41356
41357
41358
# File 'lib/ovirtsdk4/types.rb', line 41356

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


41365
41366
41367
# File 'lib/ovirtsdk4/types.rb', line 41365

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


41374
41375
41376
# File 'lib/ovirtsdk4/types.rb', line 41374

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


41383
41384
41385
# File 'lib/ovirtsdk4/types.rb', line 41383

def name=(value)
  @name = value
end

#namespaceString

Returns the value of the namespace attribute.

Returns:

  • (String)


41392
41393
41394
# File 'lib/ovirtsdk4/types.rb', line 41392

def namespace
  @namespace
end

#namespace=(value) ⇒ Object

Sets the value of the namespace attribute.

Parameters:

  • value (String)


41401
41402
41403
# File 'lib/ovirtsdk4/types.rb', line 41401

def namespace=(value)
  @namespace = value
end

#permissionsArray<Permission>

Returns the value of the permissions attribute.

Returns:



41410
41411
41412
# File 'lib/ovirtsdk4/types.rb', line 41410

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:



41419
41420
41421
41422
41423
41424
41425
41426
41427
41428
41429
# File 'lib/ovirtsdk4/types.rb', line 41419

def permissions=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Permission.new(value)
      end
    end
  end
  @permissions = list
end

#rolesArray<Role>

Returns the value of the roles attribute.

Returns:



41436
41437
41438
# File 'lib/ovirtsdk4/types.rb', line 41436

def roles
  @roles
end

#roles=(list) ⇒ Object

Sets the value of the roles attribute.

Parameters:

  • list (Array<Role>)


41445
41446
41447
41448
41449
41450
41451
41452
41453
41454
41455
# File 'lib/ovirtsdk4/types.rb', line 41445

def roles=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Role.new(value)
      end
    end
  end
  @roles = list
end

#tagsArray<Tag>

Returns the value of the tags attribute.

Returns:



41462
41463
41464
# File 'lib/ovirtsdk4/types.rb', line 41462

def tags
  @tags
end

#tags=(list) ⇒ Object

Sets the value of the tags attribute.

Parameters:

  • list (Array<Tag>)


41471
41472
41473
41474
41475
41476
41477
41478
41479
41480
41481
# File 'lib/ovirtsdk4/types.rb', line 41471

def tags=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Tag.new(value)
      end
    end
  end
  @tags = list
end