Class: Azure::ARM::Resources::Models::TagDetails
- Inherits:
-
Object
- Object
- Azure::ARM::Resources::Models::TagDetails
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_resources/Models/tag_details.rb
Overview
Tag details.
Instance Attribute Summary collapse
-
#count ⇒ TagCount
Gets or sets the tag count.
-
#id ⇒ String
Gets or sets the tag ID.
-
#tag_name ⇒ String
Gets or sets the tag name.
-
#values ⇒ Array<TagValue>
Gets or sets the list of tag values.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ TagDetails
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
#count ⇒ TagCount
Returns Gets or sets the tag count.
22 23 24 |
# File 'lib/azure_mgmt_resources/Models/tag_details.rb', line 22 def count @count end |
#id ⇒ String
Returns Gets or sets the tag ID.
16 17 18 |
# File 'lib/azure_mgmt_resources/Models/tag_details.rb', line 16 def id @id end |
#tag_name ⇒ String
Returns Gets or sets the tag name.
19 20 21 |
# File 'lib/azure_mgmt_resources/Models/tag_details.rb', line 19 def tag_name @tag_name end |
#values ⇒ Array<TagValue>
Returns Gets or sets the list of tag values.
25 26 27 |
# File 'lib/azure_mgmt_resources/Models/tag_details.rb', line 25 def values @values end |
Class Method Details
.deserialize_object(object) ⇒ TagDetails
Deserializes given Ruby Hash into Model object.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/azure_mgmt_resources/Models/tag_details.rb', line 77 def self.deserialize_object(object) return if object.nil? output_object = TagDetails.new deserialized_property = object['id'] output_object.id = deserialized_property deserialized_property = object['tagName'] output_object.tag_name = deserialized_property deserialized_property = object['count'] unless deserialized_property.nil? deserialized_property = TagCount.deserialize_object(deserialized_property) end output_object.count = deserialized_property deserialized_property = object['values'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element1| unless element1.nil? element1 = TagValue.deserialize_object(element1) end deserializedArray.push(element1); end deserialized_property = deserializedArray; end output_object.values = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/azure_mgmt_resources/Models/tag_details.rb', line 40 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.id output_object['id'] = serialized_property unless serialized_property.nil? serialized_property = object.tag_name output_object['tagName'] = serialized_property unless serialized_property.nil? serialized_property = object.count unless serialized_property.nil? serialized_property = TagCount.serialize_object(serialized_property) end output_object['count'] = serialized_property unless serialized_property.nil? serialized_property = object.values unless serialized_property.nil? serializedArray = [] serialized_property.each do |element| unless element.nil? element = TagValue.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['values'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
30 31 32 33 |
# File 'lib/azure_mgmt_resources/Models/tag_details.rb', line 30 def validate @count.validate unless @count.nil? @values.each{ |e| e.validate if e.respond_to?(:validate) } unless @values.nil? end |