Class: MicrosoftGraph::Models::ExternalConnectorsExternalActivity

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

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 externalConnectorsExternalActivity and sets the default values.



23
24
25
# File 'lib/models/external_connectors_external_activity.rb', line 23

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 external_connectors_external_activity

Raises:

  • (StandardError)


31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/models/external_connectors_external_activity.rb', line 31

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.externalConnectors.externalActivityResult"
                return ExternalConnectorsExternalActivityResult.new
        end
    end
    return ExternalConnectorsExternalActivity.new
end

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



47
48
49
50
51
52
53
# File 'lib/models/external_connectors_external_activity.rb', line 47

def get_field_deserializers()
    return super.merge({
        "performedBy" => lambda {|n| @performed_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ExternalConnectorsIdentity.create_from_discriminator_value(pn) }) },
        "startDateTime" => lambda {|n| @start_date_time = n.get_date_time_value() },
        "type" => lambda {|n| @type = n.get_enum_value(MicrosoftGraph::Models::ExternalConnectorsExternalActivityType) },
    })
end

#performed_byObject

Gets the performedBy property value. Represents an identity used to identify who is responsible for the activity.

Returns:

  • a external_connectors_identity



58
59
60
# File 'lib/models/external_connectors_external_activity.rb', line 58

def performed_by
    return @performed_by
end

#performed_by=(value) ⇒ Object

Sets the performedBy property value. Represents an identity used to identify who is responsible for the activity.

Parameters:

  • value

    Value to set for the performedBy property.

Returns:

  • a void



66
67
68
# File 'lib/models/external_connectors_external_activity.rb', line 66

def performed_by=(value)
    @performed_by = 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)


74
75
76
77
78
79
80
# File 'lib/models/external_connectors_external_activity.rb', line 74

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("performedBy", @performed_by)
    writer.write_date_time_value("startDateTime", @start_date_time)
    writer.write_enum_value("type", @type)
end

#start_date_timeObject

Gets the startDateTime property value. The date and time when the particular activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



85
86
87
# File 'lib/models/external_connectors_external_activity.rb', line 85

def start_date_time
    return @start_date_time
end

#start_date_time=(value) ⇒ Object

Sets the startDateTime property value. The date and time when the particular activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the startDateTime property.

Returns:

  • a void



93
94
95
# File 'lib/models/external_connectors_external_activity.rb', line 93

def start_date_time=(value)
    @start_date_time = value
end

#typeObject

Gets the type property value. The type property

Returns:

  • a external_connectors_external_activity_type



100
101
102
# File 'lib/models/external_connectors_external_activity.rb', line 100

def type
    return @type
end

#type=(value) ⇒ Object

Sets the type property value. The type property

Parameters:

  • value

    Value to set for the type property.

Returns:

  • a void



108
109
110
# File 'lib/models/external_connectors_external_activity.rb', line 108

def type=(value)
    @type = value
end