// Generated by Create API
// https://github.com/CreateAPI/CreateAPI

import Foundation
import Get
import URLQueryEncoder

extension Paths {
    public static var notification: Notification {
        Notification(path: "/api/notification")
    }

    public struct Notification {
        /// Path: `/api/notification`
        public let path: String

        /// Get Notifications
        ///
        /// Fetch the notifications.
        public func get(afterDatetimeUtc: Date? = nil) -> Request<GenAPI.UserNotificationSchema> {
            Request(path: path, method: "GET", query: makeGetQuery(afterDatetimeUtc), id: "studio_api_bots_notification_api_get_notifications")
        }

        private func makeGetQuery(_ afterDatetimeUtc: Date?) -> [(String, String?)] {
            let encoder = URLQueryEncoder()
            encoder.encode(afterDatetimeUtc, forKey: "after_datetime_utc")
            return encoder.items
        }
    }
}
