Class: Azure::ARM::CDN::Models::ProfilePropertiesCreateParameters
- Inherits:
-
Object
- Object
- Azure::ARM::CDN::Models::ProfilePropertiesCreateParameters
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_cdn/models/profile_properties_create_parameters.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#sku ⇒ Sku
Profile sku.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ ProfilePropertiesCreateParameters
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
#sku ⇒ Sku
Returns Profile sku.
16 17 18 |
# File 'lib/azure_mgmt_cdn/models/profile_properties_create_parameters.rb', line 16 def sku @sku end |
Class Method Details
.deserialize_object(object) ⇒ ProfilePropertiesCreateParameters
Deserializes given Ruby Hash into Model object.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/azure_mgmt_cdn/models/profile_properties_create_parameters.rb', line 49 def self.deserialize_object(object) return if object.nil? output_object = ProfilePropertiesCreateParameters.new deserialized_property = object['sku'] unless deserialized_property.nil? deserialized_property = Sku.deserialize_object(deserialized_property) end output_object.sku = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/azure_mgmt_cdn/models/profile_properties_create_parameters.rb', line 31 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.sku unless serialized_property.nil? serialized_property = Sku.serialize_object(serialized_property) end output_object['sku'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
21 22 23 24 |
# File 'lib/azure_mgmt_cdn/models/profile_properties_create_parameters.rb', line 21 def validate fail MsRest::ValidationError, 'property sku is nil' if @sku.nil? @sku.validate unless @sku.nil? end |