File: ObjCRequestBox.jinja

package info (click to toggle)
python-stone 3.3.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,036 kB
  • sloc: python: 22,311; objc: 498; sh: 23; makefile: 11
file content (25 lines) | stat: -rw-r--r-- 790 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
///
/// Copyright (c) 2022 Dropbox, Inc. All rights reserved.
///
/// Auto-generated by Stone, do not modify.
///

import Foundation
import SwiftyDropbox

extension {{ class_name }} {
    var objc: DBXRequest {
        {% for route_args_data in background_objc_routes %}
        {% set namespace = route_args_data[0] %}
        {% set route = route_args_data[1] %}
        {% set args_data = route_args_data[2] %}
        if case .{{ fmt_func_namespace(route.name, route.version, namespace.name) }}(let swift) = self {
            return {{ fmt_route_objc_class(namespace, route, args_data) }}(swift: swift)
        }
        {% endfor %}
        else {
            fatalError("For Obj-C compatibility, add this route to the Objective-C compatibility module allow-list")
        }
    }
}