Class: Azure::ARM::Compute::Models::PurchasePlan
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::PurchasePlan
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/Models/purchase_plan.rb
Overview
Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
Instance Attribute Summary collapse
-
#name ⇒ String
Gets or sets the plan ID.
-
#product ⇒ String
Gets or sets the product ID.
-
#publisher ⇒ String
Gets or sets the publisher ID.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ PurchasePlan
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 Gets or sets the plan ID.
20 21 22 |
# File 'lib/azure_mgmt_compute/Models/purchase_plan.rb', line 20 def name @name end |
#product ⇒ String
Returns Gets or sets the product ID.
23 24 25 |
# File 'lib/azure_mgmt_compute/Models/purchase_plan.rb', line 23 def product @product end |
#publisher ⇒ String
Returns Gets or sets the publisher ID.
17 18 19 |
# File 'lib/azure_mgmt_compute/Models/purchase_plan.rb', line 17 def publisher @publisher end |
Class Method Details
.deserialize_object(object) ⇒ PurchasePlan
Deserializes given Ruby Hash into Model object.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/azure_mgmt_compute/Models/purchase_plan.rb', line 58 def self.deserialize_object(object) return if object.nil? output_object = PurchasePlan.new deserialized_property = object['publisher'] output_object.publisher = deserialized_property deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['product'] output_object.product = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/azure_mgmt_compute/Models/purchase_plan.rb', line 37 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.publisher output_object['publisher'] = serialized_property unless serialized_property.nil? serialized_property = object.name output_object['name'] = serialized_property unless serialized_property.nil? serialized_property = object.product output_object['product'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
28 29 30 |
# File 'lib/azure_mgmt_compute/Models/purchase_plan.rb', line 28 def validate # Nothing to validate end |