Class: MicrosoftGraph::Models::Presence

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/presence.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 presence and sets the default values.



49
50
51
# File 'lib/models/presence.rb', line 49

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 presence

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Presence.new
end

Instance Method Details

#activityObject

Gets the activity property value. The supplemental information to a user’s availability. Possible values are Available, Away, BeRightBack, Busy, DoNotDisturb, InACall, InAConferenceCall, Inactive, InAMeeting, Offline, OffWork, OutOfOffice, PresenceUnknown, Presenting, UrgentInterruptionsOnly.

Returns:

  • a string



19
20
21
# File 'lib/models/presence.rb', line 19

def activity
    return @activity
end

#activity=(value) ⇒ Object

Sets the activity property value. The supplemental information to a user’s availability. Possible values are Available, Away, BeRightBack, Busy, DoNotDisturb, InACall, InAConferenceCall, Inactive, InAMeeting, Offline, OffWork, OutOfOffice, PresenceUnknown, Presenting, UrgentInterruptionsOnly.

Parameters:

  • value

    Value to set for the activity property.

Returns:

  • a void



27
28
29
# File 'lib/models/presence.rb', line 27

def activity=(value)
    @activity = value
end

#availabilityObject

Gets the availability property value. The base presence information for a user. Possible values are Available, AvailableIdle, Away, BeRightBack, Busy, BusyIdle, DoNotDisturb, Offline, PresenceUnknown

Returns:

  • a string



34
35
36
# File 'lib/models/presence.rb', line 34

def availability
    return @availability
end

#availability=(value) ⇒ Object

Sets the availability property value. The base presence information for a user. Possible values are Available, AvailableIdle, Away, BeRightBack, Busy, BusyIdle, DoNotDisturb, Offline, PresenceUnknown

Parameters:

  • value

    Value to set for the availability property.

Returns:

  • a void



42
43
44
# File 'lib/models/presence.rb', line 42

def availability=(value)
    @availability = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



65
66
67
68
69
70
# File 'lib/models/presence.rb', line 65

def get_field_deserializers()
    return super.merge({
        "activity" => lambda {|n| @activity = n.get_string_value() },
        "availability" => lambda {|n| @availability = n.get_string_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)


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("activity", @activity)
    writer.write_string_value("availability", @availability)
end