// Code generated by protoc-gen-connect-swift. DO NOT EDIT.
//
// Source: event/metric.proto
//

import Connect
import Foundation
import SwiftProtobuf

public protocol Event_EventServiceClientInterface: Sendable {

    @discardableResult
    func `send`(request: Event_Metric, headers: Connect.Headers, completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable

    @available(iOS 13, *)
    func `send`(request: Event_Metric, headers: Connect.Headers) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>
}

/// Concrete implementation of `Event_EventServiceClientInterface`.
public final class Event_EventServiceClient: Event_EventServiceClientInterface, Sendable {
    private let client: Connect.ProtocolClientInterface

    public init(client: Connect.ProtocolClientInterface) {
        self.client = client
    }

    @discardableResult
    public func `send`(request: Event_Metric, headers: Connect.Headers = [:], completion: @escaping @Sendable (ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty>) -> Void) -> Connect.Cancelable {
        return self.client.unary(path: "/event.EventService/Send", request: request, headers: headers, completion: completion)
    }

    @available(iOS 13, *)
    public func `send`(request: Event_Metric, headers: Connect.Headers = [:]) async -> ResponseMessage<SwiftProtobuf.Google_Protobuf_Empty> {
        return await self.client.unary(path: "/event.EventService/Send", request: request, headers: headers)
    }

    public enum Metadata {
        public enum Methods {
            public static let send = Connect.MethodSpec(name: "Send", service: "event.EventService", type: .unary)
        }
    }
}
