Class: Azure::ARM::Compute::Models::ImageReference

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_compute/models/image_reference.rb

Overview

The image reference.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#offerString

Returns Gets or sets the image offer.

Returns:

  • (String)

    Gets or sets the image offer.



19
20
21
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 19

def offer
  @offer
end

#publisherString

Returns Gets or sets the image publisher.

Returns:

  • (String)

    Gets or sets the image publisher.



16
17
18
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 16

def publisher
  @publisher
end

#skuString

Returns Gets or sets the image sku.

Returns:

  • (String)

    Gets or sets the image sku.



22
23
24
# File 'lib/azure_mgmt_compute/models/image_reference.rb', line 22

def sku
  @sku
end

#versionString

are Major.Minor.Build or ‘latest’. Major, Minor and Build being decimal numbers. Specify ‘latest’ to use the latest version of image.

Returns:

  • (String)

    Gets or sets the image version. The allowed formats



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.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of 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

#validateObject

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