Class: Azure::ARM::Compute::Models::InstanceViewStatus
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::InstanceViewStatus
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/instance_view_status.rb
Overview
Instance view status.
Instance Attribute Summary collapse
-
#code ⇒ String
Gets or sets the status Code.
-
#display_status ⇒ String
status.
-
#level ⇒ StatusLevelTypes
values for this property include: ‘Info’, ‘Warning’, ‘Error’.
-
#message ⇒ String
for alerts and error messages.
-
#time ⇒ DateTime
Gets or sets the time of the status.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ InstanceViewStatus
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
#code ⇒ String
Returns Gets or sets the status Code.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/instance_view_status.rb', line 16 def code @code end |
#display_status ⇒ String
status.
24 25 26 |
# File 'lib/azure_mgmt_compute/models/instance_view_status.rb', line 24 def display_status @display_status end |
#level ⇒ StatusLevelTypes
values for this property include: ‘Info’, ‘Warning’, ‘Error’.
20 21 22 |
# File 'lib/azure_mgmt_compute/models/instance_view_status.rb', line 20 def level @level end |
#message ⇒ String
for alerts and error messages.
28 29 30 |
# File 'lib/azure_mgmt_compute/models/instance_view_status.rb', line 28 def @message end |
#time ⇒ DateTime
Returns Gets or sets the time of the status.
31 32 33 |
# File 'lib/azure_mgmt_compute/models/instance_view_status.rb', line 31 def time @time end |
Class Method Details
.deserialize_object(object) ⇒ InstanceViewStatus
Deserializes given Ruby Hash into Model object.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/azure_mgmt_compute/models/instance_view_status.rb', line 72 def self.deserialize_object(object) return if object.nil? output_object = InstanceViewStatus.new deserialized_property = object['code'] output_object.code = deserialized_property deserialized_property = object['level'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = StatusLevelTypes.constants.any? { |e| StatusLevelTypes.const_get(e).to_s.downcase == deserialized_property.downcase } fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid end output_object.level = deserialized_property deserialized_property = object['displayStatus'] output_object.display_status = deserialized_property deserialized_property = object['message'] output_object. = deserialized_property deserialized_property = object['time'] deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty? output_object.time = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/azure_mgmt_compute/models/instance_view_status.rb', line 44 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.code output_object['code'] = serialized_property unless serialized_property.nil? serialized_property = object.level output_object['level'] = serialized_property unless serialized_property.nil? serialized_property = object.display_status output_object['displayStatus'] = serialized_property unless serialized_property.nil? serialized_property = object. output_object['message'] = serialized_property unless serialized_property.nil? serialized_property = object.time serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ') output_object['time'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
36 37 |
# File 'lib/azure_mgmt_compute/models/instance_view_status.rb', line 36 def validate end |