Class: OvirtSDK4::Domain

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

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (Domain) initialize(opts = {})

Creates a new instance of the OvirtSDK4::Domain 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.

  • :groups (Array<Group>, Array<Hash>)

    The values of attribute groups.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :user (User, Hash)

    The value of attribute user.

  • :users (Array<User>, Array<Hash>)

    The values of attribute users.



28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
# File 'lib/ovirtsdk4/types.rb', line 28007

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.groups = opts[:groups]
  self.id = opts[:id]
  self.name = opts[:name]
  self.user = opts[:user]
  self.users = opts[:users]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


27843
27844
27845
# File 'lib/ovirtsdk4/types.rb', line 27843

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


27852
27853
27854
# File 'lib/ovirtsdk4/types.rb', line 27852

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


27861
27862
27863
# File 'lib/ovirtsdk4/types.rb', line 27861

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


27870
27871
27872
# File 'lib/ovirtsdk4/types.rb', line 27870

def description=(value)
  @description = value
end

- (Array<Group>) groups

Returns the value of the groups attribute.

Returns:



27879
27880
27881
# File 'lib/ovirtsdk4/types.rb', line 27879

def groups
  return @groups
end

- (Object) groups=(list)

Sets the value of the groups attribute.

Parameters:



27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
# File 'lib/ovirtsdk4/types.rb', line 27887

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

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


27904
27905
27906
# File 'lib/ovirtsdk4/types.rb', line 27904

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


27913
27914
27915
# File 'lib/ovirtsdk4/types.rb', line 27913

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


27922
27923
27924
# File 'lib/ovirtsdk4/types.rb', line 27922

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


27931
27932
27933
# File 'lib/ovirtsdk4/types.rb', line 27931

def name=(value)
  @name = value
end

- (User) user

Returns the value of the user attribute.

Returns:



27940
27941
27942
# File 'lib/ovirtsdk4/types.rb', line 27940

def user
  return @user
end

- (Object) user=(value)

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.

Parameters:

  • value (User, Hash)


27953
27954
27955
27956
27957
27958
# File 'lib/ovirtsdk4/types.rb', line 27953

def user=(value)
  if value.is_a?(Hash)
    value = User.new(value)
  end
  @user = value
end

- (Array<User>) users

Returns the value of the users attribute.

Returns:



27965
27966
27967
# File 'lib/ovirtsdk4/types.rb', line 27965

def users
  return @users
end

- (Object) users=(list)

Sets the value of the users attribute.

Parameters:

  • list (Array<User>)


27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
# File 'lib/ovirtsdk4/types.rb', line 27973

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