class OvirtSDK4::DataCenter

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {DataCenter} class.

@param opts [Hash] 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.

@option opts [String] :comment The value of attribute `comment`.

@option opts [String] :description The value of attribute `description`.

@option opts [String] :id The value of attribute `id`.

@option opts [Boolean] :local The value of attribute `local`.

@option opts [String] :name The value of attribute `name`.

@option opts [QuotaModeType] :quota_mode The value of attribute `quota_mode`.

@option opts [DataCenterStatus] :status The value of attribute `status`.

@option opts [StorageFormat] :storage_format The value of attribute `storage_format`.

@option opts [Array<Version>, Array<Hash>] :supported_versions The values of attribute `supported_versions`.

@option opts [Version, Hash] :version The value of attribute `version`.

Calls superclass method OvirtSDK4::Identified.new
# File lib/ovirtsdk4/types.rb, line 24069
def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.id = opts[:id]
  self.local = opts[:local]
  self.name = opts[:name]
  self.quota_mode = opts[:quota_mode]
  self.status = opts[:status]
  self.storage_format = opts[:storage_format]
  self.supported_versions = opts[:supported_versions]
  self.version = opts[:version]
end

Public Instance Methods

comment() click to toggle source

Returns the value of the `comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 23852
def comment
  return @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 23861
def comment=(value)
  @comment = value
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 23870
def description
  return @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 23879
def description=(value)
  @description = value
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 23888
def id
  return @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 23897
def id=(value)
  @id = value
end
local() click to toggle source

Returns the value of the `local` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 23906
def local
  return @local
end
local=(value) click to toggle source

Sets the value of the `local` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 23915
def local=(value)
  @local = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 23924
def name
  return @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 23933
def name=(value)
  @name = value
end
quota_mode() click to toggle source

Returns the value of the `quota_mode` attribute.

@return [QuotaModeType]

# File lib/ovirtsdk4/types.rb, line 23942
def quota_mode
  return @quota_mode
end
quota_mode=(value) click to toggle source

Sets the value of the `quota_mode` attribute.

@param value [QuotaModeType]

# File lib/ovirtsdk4/types.rb, line 23951
def quota_mode=(value)
  @quota_mode = value
end
status() click to toggle source

Returns the value of the `status` attribute.

@return [DataCenterStatus]

# File lib/ovirtsdk4/types.rb, line 23960
def status
  return @status
end
status=(value) click to toggle source

Sets the value of the `status` attribute.

@param value [DataCenterStatus]

# File lib/ovirtsdk4/types.rb, line 23969
def status=(value)
  @status = value
end
storage_format() click to toggle source

Returns the value of the `storage_format` attribute.

@return [StorageFormat]

# File lib/ovirtsdk4/types.rb, line 23978
def storage_format
  return @storage_format
end
storage_format=(value) click to toggle source

Sets the value of the `storage_format` attribute.

@param value [StorageFormat]

# File lib/ovirtsdk4/types.rb, line 23987
def storage_format=(value)
  @storage_format = value
end
supported_versions() click to toggle source

Returns the value of the `supported_versions` attribute.

@return [Array<Version>]

# File lib/ovirtsdk4/types.rb, line 23996
def supported_versions
  return @supported_versions
end
supported_versions=(list) click to toggle source

Sets the value of the `supported_versions` attribute.

@param list [Array<Version>]

# File lib/ovirtsdk4/types.rb, line 24004
def supported_versions=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Version.new(value)
      end
    end
  end
  @supported_versions = list
end
version() click to toggle source

Returns the value of the `version` attribute.

@return [Version]

# File lib/ovirtsdk4/types.rb, line 24021
def version
  return @version
end
version=(value) click to toggle source

Sets the value of the `version` attribute.

@param value [Version, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Version} 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.

# File lib/ovirtsdk4/types.rb, line 24034
def version=(value)
  if value.is_a?(Hash)
    value = Version.new(value)
  end
  @version = value
end