sdk/communication/AzureCommunicationChat/Source/Generated/Models/SendReadReceiptRequest.swift (21 lines of code) (raw):

// -------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for // license information. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. // -------------------------------------------------------------------------- import AzureCore import Foundation // swiftlint:disable superfluous_disable_command // swiftlint:disable identifier_name // swiftlint:disable line_length // swiftlint:disable cyclomatic_complexity /// Request payload for sending a read receipt. public struct SendReadReceiptRequest: Codable { // MARK: Properties /// Id of the latest chat message read by the user. public let chatMessageId: String // MARK: Initializers /// Initialize a `SendReadReceiptRequest` structure. /// - Parameters: /// - chatMessageId: Id of the latest chat message read by the user. public init( chatMessageId: String ) { self.chatMessageId = chatMessageId } // MARK: Codable enum CodingKeys: String, CodingKey { case chatMessageId = "chatMessageId" } /// Initialize a `SendReadReceiptRequest` structure from decoder public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) self.chatMessageId = try container.decode(String.self, forKey: .chatMessageId) } /// Encode a `SendReadReceiptRequest` structure public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(chatMessageId, forKey: .chatMessageId) } }