Class: MicrosoftGraph::Models::DeviceManagementTroubleshootingEvent

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/device_management_troubleshooting_event.rb

Overview

Event representing an general failure.

Direct Known Subclasses

EnrollmentTroubleshootingEvent

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new deviceManagementTroubleshootingEvent and sets the default values.



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

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a device_management_troubleshooting_event

Raises:

  • (StandardError)


45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/models/device_management_troubleshooting_event.rb', line 45

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.enrollmentTroubleshootingEvent"
                return EnrollmentTroubleshootingEvent.new
        end
    end
    return DeviceManagementTroubleshootingEvent.new
end

Instance Method Details

#correlation_idObject

Gets the correlationId property value. Id used for tracing the failure in the service.

Returns:

  • a string



29
30
31
# File 'lib/models/device_management_troubleshooting_event.rb', line 29

def correlation_id
    return @correlation_id
end

#correlation_id=(value) ⇒ Object

Sets the correlationId property value. Id used for tracing the failure in the service.

Parameters:

  • value

    Value to set for the correlationId property.

Returns:

  • a void



37
38
39
# File 'lib/models/device_management_troubleshooting_event.rb', line 37

def correlation_id=(value)
    @correlation_id = value
end

#event_date_timeObject

Gets the eventDateTime property value. Time when the event occurred .

Returns:

  • a date_time



61
62
63
# File 'lib/models/device_management_troubleshooting_event.rb', line 61

def event_date_time
    return @event_date_time
end

#event_date_time=(value) ⇒ Object

Sets the eventDateTime property value. Time when the event occurred .

Parameters:

  • value

    Value to set for the eventDateTime property.

Returns:

  • a void



69
70
71
# File 'lib/models/device_management_troubleshooting_event.rb', line 69

def event_date_time=(value)
    @event_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



76
77
78
79
80
81
# File 'lib/models/device_management_troubleshooting_event.rb', line 76

def get_field_deserializers()
    return super.merge({
        "correlationId" => lambda {|n| @correlation_id = n.get_string_value() },
        "eventDateTime" => lambda {|n| @event_date_time = n.get_date_time_value() },
    })
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


87
88
89
90
91
92
# File 'lib/models/device_management_troubleshooting_event.rb', line 87

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("correlationId", @correlation_id)
    writer.write_date_time_value("eventDateTime", @event_date_time)
end