Class: OvirtSDK4::Role

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

- (Role) initialize(opts = {})

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

  • :administrative (Boolean)

    The value of attribute administrative.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :mutable (Boolean)

    The value of attribute mutable.

  • :name (String)

    The value of attribute name.

  • :permits (Array<Permit>, Array<Hash>)

    The values of attribute permits.

  • :user (User, Hash)

    The value of attribute user.



13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
# File 'lib/ovirtsdk4/types.rb', line 13125

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

Instance Method Details

- (Boolean) administrative

Returns the value of the administrative attribute.

Returns:

  • (Boolean)


12948
12949
12950
# File 'lib/ovirtsdk4/types.rb', line 12948

def administrative
  return @administrative
end

- (Object) administrative=(value)

Sets the value of the administrative attribute.

Parameters:

  • value (Boolean)


12957
12958
12959
# File 'lib/ovirtsdk4/types.rb', line 12957

def administrative=(value)
  @administrative = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


12966
12967
12968
# File 'lib/ovirtsdk4/types.rb', line 12966

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


12975
12976
12977
# File 'lib/ovirtsdk4/types.rb', line 12975

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


12984
12985
12986
# File 'lib/ovirtsdk4/types.rb', line 12984

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


12993
12994
12995
# File 'lib/ovirtsdk4/types.rb', line 12993

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


13002
13003
13004
# File 'lib/ovirtsdk4/types.rb', line 13002

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


13011
13012
13013
# File 'lib/ovirtsdk4/types.rb', line 13011

def id=(value)
  @id = value
end

- (Boolean) mutable

Returns the value of the mutable attribute.

Returns:

  • (Boolean)


13020
13021
13022
# File 'lib/ovirtsdk4/types.rb', line 13020

def mutable
  return @mutable
end

- (Object) mutable=(value)

Sets the value of the mutable attribute.

Parameters:

  • value (Boolean)


13029
13030
13031
# File 'lib/ovirtsdk4/types.rb', line 13029

def mutable=(value)
  @mutable = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


13038
13039
13040
# File 'lib/ovirtsdk4/types.rb', line 13038

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


13047
13048
13049
# File 'lib/ovirtsdk4/types.rb', line 13047

def name=(value)
  @name = value
end

- (Array<Permit>) permits

Returns the value of the permits attribute.

Returns:



13056
13057
13058
# File 'lib/ovirtsdk4/types.rb', line 13056

def permits
  return @permits
end

- (Object) permits=(list)

Sets the value of the permits attribute.

Parameters:



13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
# File 'lib/ovirtsdk4/types.rb', line 13064

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

- (User) user

Returns the value of the user attribute.

Returns:



13081
13082
13083
# File 'lib/ovirtsdk4/types.rb', line 13081

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)


13094
13095
13096
13097
13098
13099
# File 'lib/ovirtsdk4/types.rb', line 13094

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