Class: Azure::ARM::Web::Models::SkuCapacity

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_web/models/sku_capacity.rb

Overview

Description of the App Service Plan scale options

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#defaultInteger

SKU

Returns:

  • (Integer)

    Default number of Workers for this App Service Plan



25
26
27
# File 'lib/azure_mgmt_web/models/sku_capacity.rb', line 25

def default
  @default
end

#maximumInteger

SKU

Returns:

  • (Integer)

    Maximum number of Workers for this App Service Plan



21
22
23
# File 'lib/azure_mgmt_web/models/sku_capacity.rb', line 21

def maximum
  @maximum
end

#minimumInteger

SKU

Returns:

  • (Integer)

    Minimum number of Workers for this App Service Plan



17
18
19
# File 'lib/azure_mgmt_web/models/sku_capacity.rb', line 17

def minimum
  @minimum
end

#scale_typeString

Returns Available scale configurations for an App Service Plan.

Returns:

  • (String)

    Available scale configurations for an App Service Plan



28
29
30
# File 'lib/azure_mgmt_web/models/sku_capacity.rb', line 28

def scale_type
  @scale_type
end

Class Method Details

.deserialize_object(object) ⇒ SkuCapacity

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/azure_mgmt_web/models/sku_capacity.rb', line 66

def self.deserialize_object(object)
  return if object.nil?
  output_object = SkuCapacity.new

  deserialized_property = object['minimum']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.minimum = deserialized_property

  deserialized_property = object['maximum']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.maximum = deserialized_property

  deserialized_property = object['default']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.default = deserialized_property

  deserialized_property = object['scaleType']
  output_object.scale_type = deserialized_property

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/azure_mgmt_web/models/sku_capacity.rb', line 42

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.minimum
  output_object['minimum'] = serialized_property unless serialized_property.nil?

  serialized_property = object.maximum
  output_object['maximum'] = serialized_property unless serialized_property.nil?

  serialized_property = object.default
  output_object['default'] = serialized_property unless serialized_property.nil?

  serialized_property = object.scale_type
  output_object['scaleType'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



33
34
35
# File 'lib/azure_mgmt_web/models/sku_capacity.rb', line 33

def validate
  # Nothing to validate
end