Class: OvirtSDK4::QuotaStorageLimit

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

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ QuotaStorageLimit

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

  • :id (String)

    The value of attribute id.

  • :limit (Integer)

    The value of attribute limit.

  • :name (String)

    The value of attribute name.

  • :quota (Quota, Hash)

    The value of attribute quota.

  • :storage_domain (StorageDomain, Hash)

    The value of attribute storage_domain.

  • :usage (Float)

    The value of attribute usage.



16091
16092
16093
16094
16095
16096
16097
# File 'lib/ovirtsdk4/types.rb', line 16091

def initialize(opts = {})
  super(opts)
  self.limit = opts[:limit]
  self.quota = opts[:quota]
  self.storage_domain = opts[:storage_domain]
  self.usage = opts[:usage]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



16102
16103
16104
16105
16106
16107
16108
# File 'lib/ovirtsdk4/types.rb', line 16102

def ==(other)
  super &&
  @limit == other.limit &&
  @quota == other.quota &&
  @storage_domain == other.storage_domain &&
  @usage == other.usage
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


15914
15915
15916
# File 'lib/ovirtsdk4/types.rb', line 15914

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


15923
15924
15925
# File 'lib/ovirtsdk4/types.rb', line 15923

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


15932
15933
15934
# File 'lib/ovirtsdk4/types.rb', line 15932

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


15941
15942
15943
# File 'lib/ovirtsdk4/types.rb', line 15941

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



16113
16114
16115
16116
16117
16118
16119
# File 'lib/ovirtsdk4/types.rb', line 16113

def hash
  super +
  @limit.hash +
  @quota.hash +
  @storage_domain.hash +
  @usage.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


15950
15951
15952
# File 'lib/ovirtsdk4/types.rb', line 15950

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


15959
15960
15961
# File 'lib/ovirtsdk4/types.rb', line 15959

def id=(value)
  @id = value
end

#limitInteger

Returns the value of the limit attribute.

Returns:

  • (Integer)


15968
15969
15970
# File 'lib/ovirtsdk4/types.rb', line 15968

def limit
  @limit
end

#limit=(value) ⇒ Object

Sets the value of the limit attribute.

Parameters:

  • value (Integer)


15977
15978
15979
# File 'lib/ovirtsdk4/types.rb', line 15977

def limit=(value)
  @limit = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


15986
15987
15988
# File 'lib/ovirtsdk4/types.rb', line 15986

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


15995
15996
15997
# File 'lib/ovirtsdk4/types.rb', line 15995

def name=(value)
  @name = value
end

#quotaQuota

Returns the value of the quota attribute.

Returns:



16004
16005
16006
# File 'lib/ovirtsdk4/types.rb', line 16004

def quota
  @quota
end

#quota=(value) ⇒ Object

Sets the value of the quota attribute.

The value parameter can be an instance of OvirtSDK4::Quota 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:



16017
16018
16019
16020
16021
16022
# File 'lib/ovirtsdk4/types.rb', line 16017

def quota=(value)
  if value.is_a?(Hash)
    value = Quota.new(value)
  end
  @quota = value
end

#storage_domainStorageDomain

Returns the value of the storage_domain attribute.

Returns:



16029
16030
16031
# File 'lib/ovirtsdk4/types.rb', line 16029

def storage_domain
  @storage_domain
end

#storage_domain=(value) ⇒ Object

Sets the value of the storage_domain attribute.

The value parameter can be an instance of StorageDomain 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:



16042
16043
16044
16045
16046
16047
# File 'lib/ovirtsdk4/types.rb', line 16042

def storage_domain=(value)
  if value.is_a?(Hash)
    value = StorageDomain.new(value)
  end
  @storage_domain = value
end

#usageFloat

Returns the value of the usage attribute.

Returns:

  • (Float)


16054
16055
16056
# File 'lib/ovirtsdk4/types.rb', line 16054

def usage
  @usage
end

#usage=(value) ⇒ Object

Sets the value of the usage attribute.

Parameters:

  • value (Float)


16063
16064
16065
# File 'lib/ovirtsdk4/types.rb', line 16063

def usage=(value)
  @usage = value
end