Class: Azure::ARM::Resources::Models::TagValue
- Inherits:
-
Object
- Object
- Azure::ARM::Resources::Models::TagValue
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_resources/models/tag_value.rb
Overview
Tag information.
Instance Attribute Summary collapse
-
#count ⇒ TagCount
Gets or sets the tag value count.
-
#id ⇒ String
Gets or sets the tag ID.
-
#tag_value ⇒ String
Gets or sets the tag value.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ TagValue
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 value count.
22 23 24 |
# File 'lib/azure_mgmt_resources/models/tag_value.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_value.rb', line 16 def id @id end |
#tag_value ⇒ String
Returns Gets or sets the tag value.
19 20 21 |
# File 'lib/azure_mgmt_resources/models/tag_value.rb', line 19 def tag_value @tag_value end |
Class Method Details
.deserialize_object(object) ⇒ TagValue
Deserializes given Ruby Hash into Model object.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/azure_mgmt_resources/models/tag_value.rb', line 60 def self.deserialize_object(object) return if object.nil? output_object = TagValue.new deserialized_property = object['id'] output_object.id = deserialized_property deserialized_property = object['tagValue'] output_object.tag_value = deserialized_property deserialized_property = object['count'] unless deserialized_property.nil? deserialized_property = TagCount.deserialize_object(deserialized_property) end output_object.count = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/azure_mgmt_resources/models/tag_value.rb', line 36 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_value output_object['tagValue'] = 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? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
27 28 29 |
# File 'lib/azure_mgmt_resources/models/tag_value.rb', line 27 def validate @count.validate unless @count.nil? end |