Class: OvirtSDK4::QuotaClusterLimit

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 = {}) ⇒ QuotaClusterLimit

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

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :memory_limit (Float)

    The value of attribute memory_limit.

  • :memory_usage (Float)

    The value of attribute memory_usage.

  • :name (String)

    The value of attribute name.

  • :quota (Quota, Hash)

    The value of attribute quota.

  • :vcpu_limit (Integer)

    The value of attribute vcpu_limit.

  • :vcpu_usage (Integer)

    The value of attribute vcpu_usage.


16277
16278
16279
16280
16281
16282
16283
16284
16285
# File 'lib/ovirtsdk4/types.rb', line 16277

def initialize(opts = {})
  super(opts)
  self.cluster = opts[:cluster]
  self.memory_limit = opts[:memory_limit]
  self.memory_usage = opts[:memory_usage]
  self.quota = opts[:quota]
  self.vcpu_limit = opts[:vcpu_limit]
  self.vcpu_usage = opts[:vcpu_usage]
end

Instance Method Details

#==(other) ⇒ Object

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


16290
16291
16292
16293
16294
16295
16296
16297
16298
# File 'lib/ovirtsdk4/types.rb', line 16290

def ==(other)
  super &&
  @cluster == other.cluster &&
  @memory_limit == other.memory_limit &&
  @memory_usage == other.memory_usage &&
  @quota == other.quota &&
  @vcpu_limit == other.vcpu_limit &&
  @vcpu_usage == other.vcpu_usage
end

#clusterCluster

Returns the value of the cluster attribute.

Returns:


16060
16061
16062
# File 'lib/ovirtsdk4/types.rb', line 16060

def cluster
  @cluster
end

#cluster=(value) ⇒ Object

Sets the value of the cluster attribute.

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


16073
16074
16075
16076
16077
16078
# File 'lib/ovirtsdk4/types.rb', line 16073

def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

16085
16086
16087
# File 'lib/ovirtsdk4/types.rb', line 16085

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

16094
16095
16096
# File 'lib/ovirtsdk4/types.rb', line 16094

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

16103
16104
16105
# File 'lib/ovirtsdk4/types.rb', line 16103

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

16112
16113
16114
# File 'lib/ovirtsdk4/types.rb', line 16112

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


16303
16304
16305
16306
16307
16308
16309
16310
16311
# File 'lib/ovirtsdk4/types.rb', line 16303

def hash
  super +
  @cluster.hash +
  @memory_limit.hash +
  @memory_usage.hash +
  @quota.hash +
  @vcpu_limit.hash +
  @vcpu_usage.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

16121
16122
16123
# File 'lib/ovirtsdk4/types.rb', line 16121

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

16130
16131
16132
# File 'lib/ovirtsdk4/types.rb', line 16130

def id=(value)
  @id = value
end

#memory_limitFloat

Returns the value of the memory_limit attribute.

Returns:

  • (Float)

16139
16140
16141
# File 'lib/ovirtsdk4/types.rb', line 16139

def memory_limit
  @memory_limit
end

#memory_limit=(value) ⇒ Object

Sets the value of the memory_limit attribute.

Parameters:

  • value (Float)

16148
16149
16150
# File 'lib/ovirtsdk4/types.rb', line 16148

def memory_limit=(value)
  @memory_limit = value
end

#memory_usageFloat

Returns the value of the memory_usage attribute.

Returns:

  • (Float)

16157
16158
16159
# File 'lib/ovirtsdk4/types.rb', line 16157

def memory_usage
  @memory_usage
end

#memory_usage=(value) ⇒ Object

Sets the value of the memory_usage attribute.

Parameters:

  • value (Float)

16166
16167
16168
# File 'lib/ovirtsdk4/types.rb', line 16166

def memory_usage=(value)
  @memory_usage = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

16175
16176
16177
# File 'lib/ovirtsdk4/types.rb', line 16175

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

16184
16185
16186
# File 'lib/ovirtsdk4/types.rb', line 16184

def name=(value)
  @name = value
end

#quotaQuota

Returns the value of the quota attribute.

Returns:


16193
16194
16195
# File 'lib/ovirtsdk4/types.rb', line 16193

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:


16206
16207
16208
16209
16210
16211
# File 'lib/ovirtsdk4/types.rb', line 16206

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

#vcpu_limitInteger

Returns the value of the vcpu_limit attribute.

Returns:

  • (Integer)

16218
16219
16220
# File 'lib/ovirtsdk4/types.rb', line 16218

def vcpu_limit
  @vcpu_limit
end

#vcpu_limit=(value) ⇒ Object

Sets the value of the vcpu_limit attribute.

Parameters:

  • value (Integer)

16227
16228
16229
# File 'lib/ovirtsdk4/types.rb', line 16227

def vcpu_limit=(value)
  @vcpu_limit = value
end

#vcpu_usageInteger

Returns the value of the vcpu_usage attribute.

Returns:

  • (Integer)

16236
16237
16238
# File 'lib/ovirtsdk4/types.rb', line 16236

def vcpu_usage
  @vcpu_usage
end

#vcpu_usage=(value) ⇒ Object

Sets the value of the vcpu_usage attribute.

Parameters:

  • value (Integer)

16245
16246
16247
# File 'lib/ovirtsdk4/types.rb', line 16245

def vcpu_usage=(value)
  @vcpu_usage = value
end