Class: Azure::ARM::Web::Models::StampCapacity
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::StampCapacity
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/stamp_capacity.rb
Overview
Class containing stamp capacity information
Instance Attribute Summary collapse
-
#available_capacity ⇒ Integer
etc…).
-
#compute_mode ⇒ ComputeModeOptions
include: ‘Shared’, ‘Dedicated’, ‘Dynamic’.
-
#exclude_from_capacity_allocation ⇒ Boolean
Basic sites are not used for capacity allocation.
-
#is_applicable_for_all_compute_modes ⇒ Boolean
Is capacity applicable for all sites?.
-
#name ⇒ String
Name of the stamp.
-
#site_mode ⇒ String
Shared or Dedicated.
-
#total_capacity ⇒ Integer
etc…).
-
#unit ⇒ String
Name of the unit.
-
#worker_size ⇒ WorkerSizeOptions
include: ‘Default’, ‘Small’, ‘Medium’, ‘Large’.
-
#worker_size_id ⇒ Integer
0 - Small 1 - Medium 2 - Large.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ StampCapacity
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#available_capacity ⇒ Integer
etc…)
20 21 22 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 20 def available_capacity @available_capacity end |
#compute_mode ⇒ ComputeModeOptions
include: ‘Shared’, ‘Dedicated’, ‘Dynamic’
31 32 33 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 31 def compute_mode @compute_mode end |
#exclude_from_capacity_allocation ⇒ Boolean
Basic sites are not used for capacity allocation.
45 46 47 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 45 def exclude_from_capacity_allocation @exclude_from_capacity_allocation end |
#is_applicable_for_all_compute_modes ⇒ Boolean
Returns Is capacity applicable for all sites?.
48 49 50 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 48 def is_applicable_for_all_compute_modes @is_applicable_for_all_compute_modes end |
#name ⇒ String
Returns Name of the stamp.
16 17 18 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 16 def name @name end |
#site_mode ⇒ String
Returns Shared or Dedicated.
51 52 53 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 51 def site_mode @site_mode end |
#total_capacity ⇒ Integer
etc…)
24 25 26 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 24 def total_capacity @total_capacity end |
#unit ⇒ String
Returns Name of the unit.
27 28 29 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 27 def unit @unit end |
#worker_size ⇒ WorkerSizeOptions
include: ‘Default’, ‘Small’, ‘Medium’, ‘Large’
35 36 37 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 35 def worker_size @worker_size end |
#worker_size_id ⇒ Integer
0 - Small 1 - Medium 2 - Large
41 42 43 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 41 def worker_size_id @worker_size_id end |
Class Method Details
.deserialize_object(object) ⇒ StampCapacity
Deserializes given Ruby Hash into Model object.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 106 def self.deserialize_object(object) return if object.nil? output_object = StampCapacity.new deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['availableCapacity'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.available_capacity = deserialized_property deserialized_property = object['totalCapacity'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.total_capacity = deserialized_property deserialized_property = object['unit'] output_object.unit = deserialized_property deserialized_property = object['computeMode'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = ComputeModeOptions.constants.any? { |e| ComputeModeOptions.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum ComputeModeOptions does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.compute_mode = deserialized_property deserialized_property = object['workerSize'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = WorkerSizeOptions.constants.any? { |e| WorkerSizeOptions.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum WorkerSizeOptions does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.worker_size = deserialized_property deserialized_property = object['workerSizeId'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.worker_size_id = deserialized_property deserialized_property = object['excludeFromCapacityAllocation'] output_object.exclude_from_capacity_allocation = deserialized_property deserialized_property = object['isApplicableForAllComputeModes'] output_object.is_applicable_for_all_compute_modes = deserialized_property deserialized_property = object['siteMode'] output_object.site_mode = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 64 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.name output_object['name'] = serialized_property unless serialized_property.nil? serialized_property = object.available_capacity output_object['availableCapacity'] = serialized_property unless serialized_property.nil? serialized_property = object.total_capacity output_object['totalCapacity'] = serialized_property unless serialized_property.nil? serialized_property = object.unit output_object['unit'] = serialized_property unless serialized_property.nil? serialized_property = object.compute_mode output_object['computeMode'] = serialized_property unless serialized_property.nil? serialized_property = object.worker_size output_object['workerSize'] = serialized_property unless serialized_property.nil? serialized_property = object.worker_size_id output_object['workerSizeId'] = serialized_property unless serialized_property.nil? serialized_property = object.exclude_from_capacity_allocation output_object['excludeFromCapacityAllocation'] = serialized_property unless serialized_property.nil? serialized_property = object.is_applicable_for_all_compute_modes output_object['isApplicableForAllComputeModes'] = serialized_property unless serialized_property.nil? serialized_property = object.site_mode output_object['siteMode'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
56 57 |
# File 'lib/azure_mgmt_web/models/stamp_capacity.rb', line 56 def validate end |