Class: Azure::ARM::Web::Models::WorkerPoolProperties
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::WorkerPoolProperties
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/worker_pool_properties.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#compute_mode ⇒ ComputeModeOptions
Possible values include: ‘Shared’, ‘Dedicated’, ‘Dynamic’.
-
#instance_names ⇒ Array<String>
(read only).
-
#worker_count ⇒ Integer
Number of instances in the worker pool.
-
#worker_size ⇒ String
VM size of the worker pool instances.
-
#worker_size_id ⇒ Integer
Worker size id for referencing this worker pool.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ WorkerPoolProperties
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
#compute_mode ⇒ ComputeModeOptions
Possible values include: ‘Shared’, ‘Dedicated’, ‘Dynamic’
20 21 22 |
# File 'lib/azure_mgmt_web/models/worker_pool_properties.rb', line 20 def compute_mode @compute_mode end |
#instance_names ⇒ Array<String>
(read only)
30 31 32 |
# File 'lib/azure_mgmt_web/models/worker_pool_properties.rb', line 30 def instance_names @instance_names end |
#worker_count ⇒ Integer
Returns Number of instances in the worker pool.
26 27 28 |
# File 'lib/azure_mgmt_web/models/worker_pool_properties.rb', line 26 def worker_count @worker_count end |
#worker_size ⇒ String
Returns VM size of the worker pool instances.
23 24 25 |
# File 'lib/azure_mgmt_web/models/worker_pool_properties.rb', line 23 def worker_size @worker_size end |
#worker_size_id ⇒ Integer
Returns Worker size id for referencing this worker pool.
16 17 18 |
# File 'lib/azure_mgmt_web/models/worker_pool_properties.rb', line 16 def worker_size_id @worker_size_id end |
Class Method Details
.deserialize_object(object) ⇒ WorkerPoolProperties
Deserializes given Ruby Hash into Model object.
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 |
# File 'lib/azure_mgmt_web/models/worker_pool_properties.rb', line 71 def self.deserialize_object(object) return if object.nil? output_object = WorkerPoolProperties.new 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['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'] output_object.worker_size = deserialized_property deserialized_property = object['workerCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.worker_count = deserialized_property deserialized_property = object['instanceNames'] output_object.instance_names = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/azure_mgmt_web/models/worker_pool_properties.rb', line 44 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.worker_size_id output_object['workerSizeId'] = 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_count output_object['workerCount'] = serialized_property unless serialized_property.nil? serialized_property = object.instance_names output_object['instanceNames'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
35 36 37 |
# File 'lib/azure_mgmt_web/models/worker_pool_properties.rb', line 35 def validate @instance_names.each{ |e| e.validate if e.respond_to?(:validate) } unless @instance_names.nil? end |