Class: OvirtSDK4::SchedulingPolicy

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

- (SchedulingPolicy) initialize(opts = {})

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

  • :balances (Array<Balance>, Array<Hash>)

    The values of attribute balances.

  • :comment (String)

    The value of attribute comment.

  • :default_policy (Boolean)

    The value of attribute default_policy.

  • :description (String)

    The value of attribute description.

  • :filters (Array<Filter>, Array<Hash>)

    The values of attribute filters.

  • :id (String)

    The value of attribute id.

  • :locked (Boolean)

    The value of attribute locked.

  • :name (String)

    The value of attribute name.

  • :properties (Array<Property>, Array<Hash>)

    The values of attribute properties.

  • :weight (Array<Weight>, Array<Hash>)

    The values of attribute weight.



13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
# File 'lib/ovirtsdk4/types.rb', line 13377

def initialize(opts = {})
  super(opts)
  self.balances = opts[:balances]
  self.comment = opts[:comment]
  self.default_policy = opts[:default_policy]
  self.description = opts[:description]
  self.filters = opts[:filters]
  self.id = opts[:id]
  self.locked = opts[:locked]
  self.name = opts[:name]
  self.properties = opts[:properties]
  self.weight = opts[:weight]
end

Instance Method Details

- (Array<Balance>) balances

Returns the value of the balances attribute.

Returns:



13146
13147
13148
# File 'lib/ovirtsdk4/types.rb', line 13146

def balances
  return @balances
end

- (Object) balances=(list)

Sets the value of the balances attribute.

Parameters:



13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
# File 'lib/ovirtsdk4/types.rb', line 13154

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

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


13171
13172
13173
# File 'lib/ovirtsdk4/types.rb', line 13171

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


13180
13181
13182
# File 'lib/ovirtsdk4/types.rb', line 13180

def comment=(value)
  @comment = value
end

- (Boolean) default_policy

Returns the value of the default_policy attribute.

Returns:

  • (Boolean)


13189
13190
13191
# File 'lib/ovirtsdk4/types.rb', line 13189

def default_policy
  return @default_policy
end

- (Object) default_policy=(value)

Sets the value of the default_policy attribute.

Parameters:

  • value (Boolean)


13198
13199
13200
# File 'lib/ovirtsdk4/types.rb', line 13198

def default_policy=(value)
  @default_policy = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


13207
13208
13209
# File 'lib/ovirtsdk4/types.rb', line 13207

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


13216
13217
13218
# File 'lib/ovirtsdk4/types.rb', line 13216

def description=(value)
  @description = value
end

- (Array<Filter>) filters

Returns the value of the filters attribute.

Returns:



13225
13226
13227
# File 'lib/ovirtsdk4/types.rb', line 13225

def filters
  return @filters
end

- (Object) filters=(list)

Sets the value of the filters attribute.

Parameters:



13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
# File 'lib/ovirtsdk4/types.rb', line 13233

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

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


13250
13251
13252
# File 'lib/ovirtsdk4/types.rb', line 13250

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


13259
13260
13261
# File 'lib/ovirtsdk4/types.rb', line 13259

def id=(value)
  @id = value
end

- (Boolean) locked

Returns the value of the locked attribute.

Returns:

  • (Boolean)


13268
13269
13270
# File 'lib/ovirtsdk4/types.rb', line 13268

def locked
  return @locked
end

- (Object) locked=(value)

Sets the value of the locked attribute.

Parameters:

  • value (Boolean)


13277
13278
13279
# File 'lib/ovirtsdk4/types.rb', line 13277

def locked=(value)
  @locked = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


13286
13287
13288
# File 'lib/ovirtsdk4/types.rb', line 13286

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


13295
13296
13297
# File 'lib/ovirtsdk4/types.rb', line 13295

def name=(value)
  @name = value
end

- (Array<Property>) properties

Returns the value of the properties attribute.

Returns:



13304
13305
13306
# File 'lib/ovirtsdk4/types.rb', line 13304

def properties
  return @properties
end

- (Object) properties=(list)

Sets the value of the properties attribute.

Parameters:



13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
# File 'lib/ovirtsdk4/types.rb', line 13312

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

- (Array<Weight>) weight

Returns the value of the weight attribute.

Returns:



13329
13330
13331
# File 'lib/ovirtsdk4/types.rb', line 13329

def weight
  return @weight
end

- (Object) weight=(list)

Sets the value of the weight attribute.

Parameters:



13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
# File 'lib/ovirtsdk4/types.rb', line 13337

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