Class: GetStream::Generated::Models::SharedLocationResponseData
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::SharedLocationResponseData
- Defined in:
- lib/getstream_ruby/generated/models/shared_location_response_data.rb
Instance Attribute Summary collapse
-
#channel ⇒ ChannelResponse
Represents channel in chat.
-
#channel_cid ⇒ String
The CID (type:id) of the channel that the location is attached to.
-
#created_at ⇒ DateTime
The date when the location was created.
-
#created_by_device_id ⇒ String
The ID of the device that created the location.
-
#end_at ⇒ DateTime
The date when the location sharing ends., If it's empty, it means the location sharing is static instead of live.
-
#latitude ⇒ Float
The latitude of the location.
-
#longitude ⇒ Float
The longitude of the location.
-
#message ⇒ MessageResponse
Represents any chat message.
-
#message_id ⇒ String
The ID of the message that the location is attached to.
-
#updated_at ⇒ DateTime
The date when the location was updated.
-
#user_id ⇒ String
The ID of the user that created the location.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SharedLocationResponseData
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ SharedLocationResponseData
Initialize with attributes
47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 47 def initialize(attributes = {}) super(attributes) @channel_cid = attributes.fetch(:channel_cid) { attributes.fetch('channel_cid', nil) } @created_at = attributes.fetch(:created_at) { attributes.fetch('created_at', nil) } @created_by_device_id = attributes.fetch(:created_by_device_id) { attributes.fetch('created_by_device_id', nil) } @latitude = attributes.fetch(:latitude) { attributes.fetch('latitude', nil) } @longitude = attributes.fetch(:longitude) { attributes.fetch('longitude', nil) } @message_id = attributes.fetch(:message_id) { attributes.fetch('message_id', nil) } @updated_at = attributes.fetch(:updated_at) { attributes.fetch('updated_at', nil) } @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) } @end_at = attributes.fetch(:end_at) { attributes.fetch('end_at', nil) } @channel = attributes.fetch(:channel) { attributes.fetch('channel', nil) } @message = attributes.fetch(:message) { attributes.fetch('message', nil) } end |
Instance Attribute Details
#channel ⇒ ChannelResponse
Returns Represents channel in chat.
41 42 43 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 41 def channel @channel end |
#channel_cid ⇒ String
Returns The CID (type:id) of the channel that the location is attached to.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 14 def channel_cid @channel_cid end |
#created_at ⇒ DateTime
Returns The date when the location was created.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 17 def created_at @created_at end |
#created_by_device_id ⇒ String
Returns The ID of the device that created the location.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 20 def created_by_device_id @created_by_device_id end |
#end_at ⇒ DateTime
Returns The date when the location sharing ends., If it's empty, it means the location sharing is static instead of live.
38 39 40 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 38 def end_at @end_at end |
#latitude ⇒ Float
Returns The latitude of the location.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 23 def latitude @latitude end |
#longitude ⇒ Float
Returns The longitude of the location.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 26 def longitude @longitude end |
#message ⇒ MessageResponse
Returns Represents any chat message.
44 45 46 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 44 def @message end |
#message_id ⇒ String
Returns The ID of the message that the location is attached to.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 29 def @message_id end |
#updated_at ⇒ DateTime
Returns The date when the location was updated.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 32 def updated_at @updated_at end |
#user_id ⇒ String
Returns The ID of the user that created the location.
35 36 37 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 35 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/getstream_ruby/generated/models/shared_location_response_data.rb', line 63 def self.json_field_mappings { channel_cid: 'channel_cid', created_at: 'created_at', created_by_device_id: 'created_by_device_id', 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 |