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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// GENERATED CODE

use crate::api_default_imports::*;

resource_api_client!(
    ContactsApiClient,
    ContactsIdApiClient,
    ResourceIdentity::Contacts
);

impl ContactsApiClient {
    post!(
        doc: "Create contact",
        name: create_contacts,
        path: "/contacts",
        body: true
    );
    get!(
        doc: "List contacts",
        name: list_contacts,
        path: "/contacts"
    );
    get!(
        doc: "Get the number of the resource",
        name: get_contacts_count,
        path: "/contacts/$count"
    );
    get!(
        doc: "Invoke function delta",
        name: delta,
        path: "/contacts/delta()"
    );
}

impl ContactsIdApiClient {
    delete!(
        doc: "Delete navigation property contacts for users",
        name: delete_contacts,
        path: "/contacts/{{RID}}"
    );
    get!(
        doc: "Get contacts from users",
        name: get_contacts,
        path: "/contacts/{{RID}}"
    );
    patch!(
        doc: "Update the navigation property contacts in users",
        name: update_contacts,
        path: "/contacts/{{RID}}",
        body: true
    );
    post!(
        doc: "Create new navigation property to extensions for users",
        name: create_extensions,
        path: "/contacts/{{RID}}/extensions",
        body: true
    );
    get!(
        doc: "Get extensions from users",
        name: list_extensions,
        path: "/contacts/{{RID}}/extensions"
    );
    get!(
        doc: "Get the number of the resource",
        name: get_extensions_count,
        path: "/contacts/{{RID}}/extensions/$count"
    );
    delete!(
        doc: "Delete navigation property extensions for users",
        name: delete_extensions,
        path: "/contacts/{{RID}}/extensions/{{id}}",
        params: extension_id
    );
    get!(
        doc: "Get extensions from users",
        name: get_extensions,
        path: "/contacts/{{RID}}/extensions/{{id}}",
        params: extension_id
    );
    patch!(
        doc: "Update the navigation property extensions in users",
        name: update_extensions,
        path: "/contacts/{{RID}}/extensions/{{id}}",
        body: true,
        params: extension_id
    );
    get!(
        doc: "Get photo from users",
        name: get_photo,
        path: "/contacts/{{RID}}/photo"
    );
    patch!(
        doc: "Update the navigation property photo in users",
        name: update_photo,
        path: "/contacts/{{RID}}/photo",
        body: true
    );
    get!(
        doc: "Get media content for the navigation property photo from users",
        name: get_photo_content,
        path: "/contacts/{{RID}}/photo/$value"
    );
    put!(
        doc: "Update media content for the navigation property photo in users",
        name: update_photo_content,
        path: "/contacts/{{RID}}/photo/$value",
        body: true
    );
}