Class: Azure::ARM::Compute::Models::ImageReference
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::ImageReference
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/image_reference.rb
Overview
The image reference.
Instance Attribute Summary collapse
-
#offer ⇒ String
Gets or sets the image offer.
-
#publisher ⇒ String
Gets or sets the image publisher.
-
#sku ⇒ String
Gets or sets the image sku.
-
#version ⇒ String
are Major.Minor.Build or ‘latest’.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ ImageReference
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
#offer ⇒ String
Returns Gets or sets the image offer.
19 20 21 |
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 19 def offer @offer end |
#publisher ⇒ String
Returns Gets or sets the image publisher.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 16 def publisher @publisher end |
#sku ⇒ String
Returns Gets or sets the image sku.
22 23 24 |
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 22 def sku @sku end |
#version ⇒ String
are Major.Minor.Build or ‘latest’. Major, Minor and Build being decimal numbers. Specify ‘latest’ to use the latest version of image.
27 28 29 |
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 27 def version @version end |
Class Method Details
.deserialize_object(object) ⇒ ImageReference
Deserializes given Ruby Hash into Model object.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 65 def self.deserialize_object(object) return if object.nil? output_object = ImageReference.new deserialized_property = object['publisher'] output_object.publisher = deserialized_property deserialized_property = object['offer'] output_object.offer = deserialized_property deserialized_property = object['sku'] output_object.sku = deserialized_property deserialized_property = object['version'] output_object.version = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 41 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.offer output_object['offer'] = serialized_property unless serialized_property.nil? serialized_property = object.sku output_object['sku'] = 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.
32 33 34 |
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 32 def validate # Nothing to validate end |