Class: OvirtSDK4::MacPool

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

- (MacPool) initialize(opts = {})

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

  • :allow_duplicates (Boolean)

    The value of attribute allow_duplicates.

  • :comment (String)

    The value of attribute comment.

  • :default_pool (Boolean)

    The value of attribute default_pool.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :ranges (Array<Range>, Array<Hash>)

    The values of attribute ranges.



6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
# File 'lib/ovirtsdk4/types.rb', line 6339

def initialize(opts = {})
  super(opts)
  self.allow_duplicates = opts[:allow_duplicates]
  self.comment = opts[:comment]
  self.default_pool = opts[:default_pool]
  self.description = opts[:description]
  self.id = opts[:id]
  self.name = opts[:name]
  self.ranges = opts[:ranges]
end

Instance Method Details

- (Boolean) allow_duplicates

Returns the value of the allow_duplicates attribute.

Returns:

  • (Boolean)


6189
6190
6191
# File 'lib/ovirtsdk4/types.rb', line 6189

def allow_duplicates
  return @allow_duplicates
end

- (Object) allow_duplicates=(value)

Sets the value of the allow_duplicates attribute.

Parameters:

  • value (Boolean)


6198
6199
6200
# File 'lib/ovirtsdk4/types.rb', line 6198

def allow_duplicates=(value)
  @allow_duplicates = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


6207
6208
6209
# File 'lib/ovirtsdk4/types.rb', line 6207

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


6216
6217
6218
# File 'lib/ovirtsdk4/types.rb', line 6216

def comment=(value)
  @comment = value
end

- (Boolean) default_pool

Returns the value of the default_pool attribute.

Returns:

  • (Boolean)


6225
6226
6227
# File 'lib/ovirtsdk4/types.rb', line 6225

def default_pool
  return @default_pool
end

- (Object) default_pool=(value)

Sets the value of the default_pool attribute.

Parameters:

  • value (Boolean)


6234
6235
6236
# File 'lib/ovirtsdk4/types.rb', line 6234

def default_pool=(value)
  @default_pool = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


6243
6244
6245
# File 'lib/ovirtsdk4/types.rb', line 6243

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


6252
6253
6254
# File 'lib/ovirtsdk4/types.rb', line 6252

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


6261
6262
6263
# File 'lib/ovirtsdk4/types.rb', line 6261

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


6270
6271
6272
# File 'lib/ovirtsdk4/types.rb', line 6270

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


6279
6280
6281
# File 'lib/ovirtsdk4/types.rb', line 6279

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


6288
6289
6290
# File 'lib/ovirtsdk4/types.rb', line 6288

def name=(value)
  @name = value
end

- (Array<Range>) ranges

Returns the value of the ranges attribute.

Returns:



6297
6298
6299
# File 'lib/ovirtsdk4/types.rb', line 6297

def ranges
  return @ranges
end

- (Object) ranges=(list)

Sets the value of the ranges attribute.

Parameters:



6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
# File 'lib/ovirtsdk4/types.rb', line 6305

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