Class: GetStream::Generated::Models::SharedLocationResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/shared_location_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ SharedLocationResponse

Initialize with attributes



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 50

def initialize(attributes = {})
  super(attributes)
  @channel_cid = attributes[:channel_cid] || attributes['channel_cid']
  @created_at = attributes[:created_at] || attributes['created_at']
  @created_by_device_id = attributes[:created_by_device_id] || attributes['created_by_device_id']
  @duration = attributes[:duration] || attributes['duration']
  @latitude = attributes[:latitude] || attributes['latitude']
  @longitude = attributes[:longitude] || attributes['longitude']
  @message_id = attributes[:message_id] || attributes['message_id']
  @updated_at = attributes[:updated_at] || attributes['updated_at']
  @user_id = attributes[:user_id] || attributes['user_id']
  @end_at = attributes[:end_at] || attributes['end_at'] || nil
  @channel = attributes[:channel] || attributes['channel'] || nil
  @message = attributes[:message] || attributes['message'] || nil
end

Instance Attribute Details

#channelChannelResponse

Returns:



44
45
46
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 44

def channel
  @channel
end

#channel_cidString

Returns Channel CID.

Returns:

  • (String)

    Channel CID



14
15
16
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 14

def channel_cid
  @channel_cid
end

#created_atDateTime

Returns Date/time of creation.

Returns:

  • (DateTime)

    Date/time of creation



17
18
19
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 17

def created_at
  @created_at
end

#created_by_device_idString

Returns Device ID that created the live location.

Returns:

  • (String)

    Device ID that created the live location



20
21
22
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 20

def created_by_device_id
  @created_by_device_id
end

#durationString

Returns:

  • (String)


23
24
25
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 23

def duration
  @duration
end

#end_atDateTime

Returns Time when the live location expires.

Returns:

  • (DateTime)

    Time when the live location expires



41
42
43
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 41

def end_at
  @end_at
end

#latitudeFloat

Returns Latitude coordinate.

Returns:

  • (Float)

    Latitude coordinate



26
27
28
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 26

def latitude
  @latitude
end

#longitudeFloat

Returns Longitude coordinate.

Returns:

  • (Float)

    Longitude coordinate



29
30
31
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 29

def longitude
  @longitude
end

#messageMessageResponse

Returns:



47
48
49
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 47

def message
  @message
end

#message_idString

Returns Message ID.

Returns:

  • (String)

    Message ID



32
33
34
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 32

def message_id
  @message_id
end

#updated_atDateTime

Returns Date/time of the last update.

Returns:

  • (DateTime)

    Date/time of the last update



35
36
37
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 35

def updated_at
  @updated_at
end

#user_idString

Returns User ID.

Returns:

  • (String)

    User ID



38
39
40
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 38

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/getstream_ruby/generated/models/shared_location_response.rb', line 67

def self.json_field_mappings
  {
    channel_cid: 'channel_cid',
    created_at: 'created_at',
    created_by_device_id: 'created_by_device_id',
    duration: 'duration',
    latitude: 'latitude',
    longitude: 'longitude',
    message_id: 'message_id',
    updated_at: 'updated_at',
    user_id: 'user_id',
    end_at: 'end_at',
    channel: 'channel',
    message: 'message'
  }
end