File: SwiftRequestBox.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 (27 lines) | stat: -rw-r--r-- 974 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
26
27
///
/// Copyright (c) 2022 Dropbox, Inc. All rights reserved.
///
/// Auto-generated by Stone, do not modify.
///

import Foundation

/// Allows for heterogenous collections of typed requests
public enum {{ class_name }}: CustomStringConvertible {
    {% for route_namespace_pair in background_compatible_routes %}
    {% set namespace = route_namespace_pair[0] %}
    {% set route = route_namespace_pair[1] %}
    case {{ fmt_func_namespace(route.name, route.version, namespace.name) }}({{ request_type_signature(route) }})
    {% endfor %}

    public var description: String {
        switch self {
        {% for route_namespace_pair in background_compatible_routes %}
        {% set namespace = route_namespace_pair[0] %}
        {% set route = route_namespace_pair[1] %}
        case .{{ fmt_func_namespace(route.name, route.version, namespace.name) }}:
            return "{{ fmt_route_name_namespace(route, namespace.name) }}"
        {% endfor %}
        }
    }
}