Class: Azure::ARM::Web::Models::ArmPlan
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::ArmPlan
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/arm_plan.rb
Overview
The plan object in an ARM, represents a marketplace plan
Instance Attribute Summary collapse
-
#name ⇒ String
The name.
-
#product ⇒ String
The product.
-
#promotion_code ⇒ String
The promotion code.
-
#publisher ⇒ String
The publisher.
-
#version ⇒ String
Version of product.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ ArmPlan
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
#name ⇒ String
Returns The name.
16 17 18 |
# File 'lib/azure_mgmt_web/models/arm_plan.rb', line 16 def name @name end |
#product ⇒ String
Returns The product.
22 23 24 |
# File 'lib/azure_mgmt_web/models/arm_plan.rb', line 22 def product @product end |
#promotion_code ⇒ String
Returns The promotion code.
25 26 27 |
# File 'lib/azure_mgmt_web/models/arm_plan.rb', line 25 def promotion_code @promotion_code end |
#publisher ⇒ String
Returns The publisher.
19 20 21 |
# File 'lib/azure_mgmt_web/models/arm_plan.rb', line 19 def publisher @publisher end |
#version ⇒ String
Returns Version of product.
28 29 30 |
# File 'lib/azure_mgmt_web/models/arm_plan.rb', line 28 def version @version end |
Class Method Details
.deserialize_object(object) ⇒ ArmPlan
Deserializes given Ruby Hash into Model object.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/azure_mgmt_web/models/arm_plan.rb', line 69 def self.deserialize_object(object) return if object.nil? output_object = ArmPlan.new deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['publisher'] output_object.publisher = deserialized_property deserialized_property = object['product'] output_object.product = deserialized_property deserialized_property = object['promotionCode'] output_object.promotion_code = deserialized_property deserialized_property = object['version'] output_object.version = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/azure_mgmt_web/models/arm_plan.rb', line 42 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.publisher output_object['publisher'] = serialized_property unless serialized_property.nil? serialized_property = object.product output_object['product'] = serialized_property unless serialized_property.nil? serialized_property = object.promotion_code output_object['promotionCode'] = serialized_property unless serialized_property.nil? serialized_property = object.version output_object['version'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
33 34 35 |
# File 'lib/azure_mgmt_web/models/arm_plan.rb', line 33 def validate # Nothing to validate end |