graph_rs_sdk/devices/
request.rs1use crate::api_default_imports::*;
4use crate::devices::*;
5use crate::users::MemberOfApiClient;
6use crate::users::MemberOfIdApiClient;
7use crate::users::TransitiveMemberOfApiClient;
8use crate::users::TransitiveMemberOfIdApiClient;
9
10api_client!(
11 DevicesApiClient,
12 DevicesIdApiClient,
13 ResourceIdentity::Devices
14);
15
16impl DevicesApiClient {
17 post!(
18 doc: "Create device",
19 name: create_device,
20 path: "/devices",
21 body: true
22 );
23 get!(
24 doc: "List devices",
25 name: list_device,
26 path: "/devices"
27 );
28 delete!(
29 doc: "Delete device",
30 name: delete_device_by_device_id,
31 path: "/devices(deviceId='{{id}}')",
32 params: device_id
33 );
34 get!(
35 doc: "Get device",
36 name: get_device_by_device_id,
37 path: "/devices(deviceId='{{id}}')",
38 params: device_id
39 );
40 patch!(
41 doc: "Update device",
42 name: update_device_by_device_id,
43 path: "/devices(deviceId='{{id}}')",
44 body: true,
45 params: device_id
46 );
47 get!(
48 doc: "Get the number of the resource",
49 name: get_devices_count,
50 path: "/devices/$count"
51 );
52 get!(
53 doc: "Invoke function delta",
54 name: delta,
55 path: "/devices/delta()"
56 );
57 post!(
58 doc: "Invoke action getAvailableExtensionProperties",
59 name: get_available_extension_properties,
60 path: "/devices/getAvailableExtensionProperties",
61 body: true
62 );
63 post!(
64 doc: "Invoke action getByIds",
65 name: get_by_ids,
66 path: "/devices/getByIds",
67 body: true
68 );
69 post!(
70 doc: "Invoke action validateProperties",
71 name: validate_properties,
72 path: "/devices/validateProperties",
73 body: true
74 );
75}
76
77impl DevicesIdApiClient {
78 api_client_link!(registered_users, DevicesRegisteredUsersApiClient);
79 api_client_link_id!(registered_user, DevicesRegisteredUsersIdApiClient);
80 api_client_link!(members_of, MemberOfApiClient);
81 api_client_link_id!(registered_owner, DevicesRegisteredOwnersIdApiClient);
82 api_client_link!(transitive_members_of, TransitiveMemberOfApiClient);
83 api_client_link_id!(member_of, MemberOfIdApiClient);
84 api_client_link_id!(transitive_member_of, TransitiveMemberOfIdApiClient);
85 api_client_link!(registered_owners, DevicesRegisteredOwnersApiClient);
86
87 delete!(
88 doc: "Delete device",
89 name: delete_device,
90 path: "/devices/{{RID}}"
91 );
92 get!(
93 doc: "Get device",
94 name: get_device,
95 path: "/devices/{{RID}}"
96 );
97 patch!(
98 doc: "Update device",
99 name: update_device,
100 path: "/devices/{{RID}}",
101 body: true
102 );
103 post!(
104 doc: "Invoke action checkMemberGroups",
105 name: check_member_groups,
106 path: "/devices/{{RID}}/checkMemberGroups",
107 body: true
108 );
109 post!(
110 doc: "Invoke action checkMemberObjects",
111 name: check_member_objects,
112 path: "/devices/{{RID}}/checkMemberObjects",
113 body: true
114 );
115 post!(
116 doc: "Create new navigation property to extensions for devices",
117 name: create_extensions,
118 path: "/devices/{{RID}}/extensions",
119 body: true
120 );
121 get!(
122 doc: "Get extensions from devices",
123 name: list_extensions,
124 path: "/devices/{{RID}}/extensions"
125 );
126 get!(
127 doc: "Get the number of the resource",
128 name: get_extensions_count,
129 path: "/devices/{{RID}}/extensions/$count"
130 );
131 delete!(
132 doc: "Delete navigation property extensions for devices",
133 name: delete_extensions,
134 path: "/devices/{{RID}}/extensions/{{id}}",
135 params: extension_id
136 );
137 get!(
138 doc: "Get extensions from devices",
139 name: get_extensions,
140 path: "/devices/{{RID}}/extensions/{{id}}",
141 params: extension_id
142 );
143 patch!(
144 doc: "Update the navigation property extensions in devices",
145 name: update_extensions,
146 path: "/devices/{{RID}}/extensions/{{id}}",
147 body: true,
148 params: extension_id
149 );
150 post!(
151 doc: "Invoke action getMemberGroups",
152 name: get_member_groups,
153 path: "/devices/{{RID}}/getMemberGroups",
154 body: true
155 );
156 post!(
157 doc: "Invoke action getMemberObjects",
158 name: get_member_objects,
159 path: "/devices/{{RID}}/getMemberObjects",
160 body: true
161 );
162 post!(
163 doc: "Invoke action restore",
164 name: restore,
165 path: "/devices/{{RID}}/restore"
166 );
167}