graph_rs_sdk/service_principals/
request.rs

1// GENERATED CODE
2
3use crate::api_default_imports::*;
4use crate::service_principals::*;
5use crate::users::*;
6
7api_client!(
8    ServicePrincipalsApiClient,
9    ServicePrincipalsIdApiClient,
10    ResourceIdentity::ServicePrincipals
11);
12
13impl ServicePrincipalsApiClient {
14    post!(
15        doc: "Create servicePrincipal",
16        name: create_service_principal,
17        path: "/servicePrincipals",
18        body: true
19    );
20    get!(
21        doc: "List servicePrincipals",
22        name: list_service_principal,
23        path: "/servicePrincipals"
24    );
25    get!(
26        doc: "Get the number of the resource",
27        name: get_service_principals_count,
28        path: "/servicePrincipals/$count"
29    );
30    get!(
31        doc: "Invoke function delta",
32        name: delta,
33        path: "/servicePrincipals/delta()"
34    );
35    post!(
36        doc: "Invoke action getAvailableExtensionProperties",
37        name: get_available_extension_properties,
38        path: "/servicePrincipals/getAvailableExtensionProperties",
39        body: true
40    );
41    post!(
42        doc: "Invoke action getByIds",
43        name: get_by_ids,
44        path: "/servicePrincipals/getByIds",
45        body: true
46    );
47    post!(
48        doc: "Invoke action validateProperties",
49        name: validate_properties,
50        path: "/servicePrincipals/validateProperties",
51        body: true
52    );
53}
54
55impl ServicePrincipalsIdApiClient {
56    api_client_link_id!(owner, ServicePrincipalsOwnersIdApiClient);
57    api_client_link!(member_of, MemberOfApiClient);
58    api_client_link!(transitive_member_of, TransitiveMemberOfApiClient);
59    api_client_link!(owners, ServicePrincipalsOwnersApiClient);
60
61    delete!(
62        doc: "Delete servicePrincipal",
63        name: delete_service_principal,
64        path: "/servicePrincipals/{{RID}}"
65    );
66    get!(
67        doc: "Get servicePrincipal",
68        name: get_service_principal,
69        path: "/servicePrincipals/{{RID}}"
70    );
71    patch!(
72        doc: "Update entity in servicePrincipals",
73        name: update_service_principal,
74        path: "/servicePrincipals/{{RID}}",
75        body: true
76    );
77    post!(
78        doc: "Invoke action addKey",
79        name: add_key,
80        path: "/servicePrincipals/{{RID}}/addKey",
81        body: true
82    );
83    post!(
84        doc: "Invoke action addPassword",
85        name: add_password,
86        path: "/servicePrincipals/{{RID}}/addPassword",
87        body: true
88    );
89    post!(
90        doc: "Invoke action addTokenSigningCertificate",
91        name: add_token_signing_certificate,
92        path: "/servicePrincipals/{{RID}}/addTokenSigningCertificate",
93        body: true
94    );
95    get!(
96        doc: "Get appManagementPolicies from servicePrincipals",
97        name: list_app_management_policies,
98        path: "/servicePrincipals/{{RID}}/appManagementPolicies"
99    );
100    get!(
101        doc: "Get the number of the resource",
102        name: count,
103        path: "/servicePrincipals/{{RID}}/appManagementPolicies/$count"
104    );
105    get!(
106        doc: "Get appManagementPolicies from servicePrincipals",
107        name: get_app_management_policies,
108        path: "/servicePrincipals/{{RID}}/appManagementPolicies/{{id}}",
109        params: app_management_policy_id
110    );
111    post!(
112        doc: "Grant an appRoleAssignment for a service principal",
113        name: create_app_role_assigned_to,
114        path: "/servicePrincipals/{{RID}}/appRoleAssignedTo",
115        body: true
116    );
117    get!(
118        doc: "List appRoleAssignments granted for a service principal",
119        name: list_app_role_assigned_to,
120        path: "/servicePrincipals/{{RID}}/appRoleAssignedTo"
121    );
122    get!(
123        doc: "Get the number of the resource",
124        name: get_app_role_assigned_to_count,
125        path: "/servicePrincipals/{{RID}}/appRoleAssignedTo/$count"
126    );
127    delete!(
128        doc: "Delete navigation property appRoleAssignedTo for servicePrincipals",
129        name: delete_app_role_assigned_to,
130        path: "/servicePrincipals/{{RID}}/appRoleAssignedTo/{{id}}",
131        params: app_role_assignment_id
132    );
133    get!(
134        doc: "Get appRoleAssignedTo from servicePrincipals",
135        name: get_app_role_assigned_to,
136        path: "/servicePrincipals/{{RID}}/appRoleAssignedTo/{{id}}",
137        params: app_role_assignment_id
138    );
139    patch!(
140        doc: "Update the navigation property appRoleAssignedTo in servicePrincipals",
141        name: update_app_role_assigned_to,
142        path: "/servicePrincipals/{{RID}}/appRoleAssignedTo/{{id}}",
143        body: true,
144        params: app_role_assignment_id
145    );
146    get!(
147        doc: "Get appRoleAssignments from servicePrincipals",
148        name: list_app_role_assignments,
149        path: "/servicePrincipals/{{RID}}/appRoleAssignments"
150    );
151    post!(
152        doc: "Grant an appRoleAssignment to a service principal",
153        name: create_app_role_assignments,
154        path: "/servicePrincipals/{{RID}}/appRoleAssignments",
155        body: true
156    );
157    get!(
158        doc: "Get the number of the resource",
159        name: get_app_role_assignments_count,
160        path: "/servicePrincipals/{{RID}}/appRoleAssignments/$count"
161    );
162    delete!(
163        doc: "Delete navigation property appRoleAssignments for servicePrincipals",
164        name: delete_app_role_assignments,
165        path: "/servicePrincipals/{{RID}}/appRoleAssignments/{{id}}",
166        params: app_role_assignment_id
167    );
168    get!(
169        doc: "Get appRoleAssignments from servicePrincipals",
170        name: get_app_role_assignments,
171        path: "/servicePrincipals/{{RID}}/appRoleAssignments/{{id}}",
172        params: app_role_assignment_id
173    );
174    patch!(
175        doc: "Update the navigation property appRoleAssignments in servicePrincipals",
176        name: update_app_role_assignments,
177        path: "/servicePrincipals/{{RID}}/appRoleAssignments/{{id}}",
178        body: true,
179        params: app_role_assignment_id
180    );
181    post!(
182        doc: "Invoke action checkMemberGroups",
183        name: check_member_groups,
184        path: "/servicePrincipals/{{RID}}/checkMemberGroups",
185        body: true
186    );
187    post!(
188        doc: "Invoke action checkMemberObjects",
189        name: check_member_objects,
190        path: "/servicePrincipals/{{RID}}/checkMemberObjects",
191        body: true
192    );
193    get!(
194        doc: "List assigned claimsMappingPolicy",
195        name: list_claims_mapping_policies,
196        path: "/servicePrincipals/{{RID}}/claimsMappingPolicies"
197    );
198    get!(
199        doc: "Get the number of the resource",
200        name: get_claims_mapping_policies_count,
201        path: "/servicePrincipals/{{RID}}/claimsMappingPolicies/$count"
202    );
203    post!(
204        doc: "Create new navigation property ref to claimsMappingPolicies for servicePrincipals",
205        name: create_ref_claims_mapping_policies,
206        path: "/servicePrincipals/{{RID}}/claimsMappingPolicies/$ref",
207        body: true
208    );
209    get!(
210        doc: "List assigned claimsMappingPolicy",
211        name: list_ref_claims_mapping_policies,
212        path: "/servicePrincipals/{{RID}}/claimsMappingPolicies/$ref"
213    );
214    delete!(
215        doc: "Delete ref of navigation property claimsMappingPolicies for servicePrincipals",
216        name: delete_ref_claims_mapping_policies,
217        path: "/servicePrincipals/{{RID}}/claimsMappingPolicies/{{id}}/$ref",
218        params: claims_mapping_policy_id
219    );
220    post!(
221        doc: "Create delegatedPermissionClassification",
222        name: create_delegated_permission_classifications,
223        path: "/servicePrincipals/{{RID}}/delegatedPermissionClassifications",
224        body: true
225    );
226    get!(
227        doc: "List delegatedPermissionClassifications collection of servicePrincipal",
228        name: list_delegated_permission_classifications,
229        path: "/servicePrincipals/{{RID}}/delegatedPermissionClassifications"
230    );
231    get!(
232        doc: "Get the number of the resource",
233        name: get_delegated_permission_classifications_count,
234        path: "/servicePrincipals/{{RID}}/delegatedPermissionClassifications/$count"
235    );
236    delete!(
237        doc: "Delete navigation property delegatedPermissionClassifications for servicePrincipals",
238        name: delete_delegated_permission_classifications,
239        path: "/servicePrincipals/{{RID}}/delegatedPermissionClassifications/{{id}}",
240        params: delegated_permission_classification_id
241    );
242    get!(
243        doc: "Get delegatedPermissionClassifications from servicePrincipals",
244        name: get_delegated_permission_classifications,
245        path: "/servicePrincipals/{{RID}}/delegatedPermissionClassifications/{{id}}",
246        params: delegated_permission_classification_id
247    );
248    patch!(
249        doc: "Update the navigation property delegatedPermissionClassifications in servicePrincipals",
250        name: update_delegated_permission_classifications,
251        path: "/servicePrincipals/{{RID}}/delegatedPermissionClassifications/{{id}}",
252        body: true,
253        params: delegated_permission_classification_id
254    );
255    post!(
256        doc: "Create new navigation property to endpoints for servicePrincipals",
257        name: create_endpoints,
258        path: "/servicePrincipals/{{RID}}/endpoints",
259        body: true
260    );
261    get!(
262        doc: "Get endpoints from servicePrincipals",
263        name: list_endpoints,
264        path: "/servicePrincipals/{{RID}}/endpoints"
265    );
266    get!(
267        doc: "Get the number of the resource",
268        name: get_endpoints_count,
269        path: "/servicePrincipals/{{RID}}/endpoints/$count"
270    );
271    delete!(
272        doc: "Delete navigation property endpoints for servicePrincipals",
273        name: delete_endpoints,
274        path: "/servicePrincipals/{{RID}}/endpoints/{{id}}",
275        params: endpoint_id
276    );
277    get!(
278        doc: "Get endpoints from servicePrincipals",
279        name: get_endpoints,
280        path: "/servicePrincipals/{{RID}}/endpoints/{{id}}",
281        params: endpoint_id
282    );
283    patch!(
284        doc: "Update the navigation property endpoints in servicePrincipals",
285        name: update_endpoints,
286        path: "/servicePrincipals/{{RID}}/endpoints/{{id}}",
287        body: true,
288        params: endpoint_id
289    );
290    post!(
291        doc: "Create new navigation property to federatedIdentityCredentials for servicePrincipals",
292        name: create_federated_identity_credentials,
293        path: "/servicePrincipals/{{RID}}/federatedIdentityCredentials",
294        body: true
295    );
296    get!(
297        doc: "Get federatedIdentityCredentials from servicePrincipals",
298        name: list_federated_identity_credentials,
299        path: "/servicePrincipals/{{RID}}/federatedIdentityCredentials"
300    );
301    get!(
302        doc: "Get the number of the resource",
303        name: get_federated_identity_credentials_count,
304        path: "/servicePrincipals/{{RID}}/federatedIdentityCredentials/$count"
305    );
306    delete!(
307        doc: "Delete navigation property federatedIdentityCredentials for servicePrincipals",
308        name: delete_federated_identity_credentials,
309        path: "/servicePrincipals/{{RID}}/federatedIdentityCredentials/{{id}}",
310        params: federated_identity_credential_id
311    );
312    get!(
313        doc: "Get federatedIdentityCredentials from servicePrincipals",
314        name: get_federated_identity_credentials,
315        path: "/servicePrincipals/{{RID}}/federatedIdentityCredentials/{{id}}",
316        params: federated_identity_credential_id
317    );
318    patch!(
319        doc: "Update the navigation property federatedIdentityCredentials in servicePrincipals",
320        name: update_federated_identity_credentials,
321        path: "/servicePrincipals/{{RID}}/federatedIdentityCredentials/{{id}}",
322        body: true,
323        params: federated_identity_credential_id
324    );
325    post!(
326        doc: "Invoke action getMemberGroups",
327        name: get_member_groups,
328        path: "/servicePrincipals/{{RID}}/getMemberGroups",
329        body: true
330    );
331    post!(
332        doc: "Invoke action getMemberObjects",
333        name: get_member_objects,
334        path: "/servicePrincipals/{{RID}}/getMemberObjects",
335        body: true
336    );
337    get!(
338        doc: "List assigned homeRealmDiscoveryPolicy",
339        name: list_home_realm_discovery_policies,
340        path: "/servicePrincipals/{{RID}}/homeRealmDiscoveryPolicies"
341    );
342    get!(
343        doc: "Get the number of the resource",
344        name: get_home_realm_discovery_policies_count,
345        path: "/servicePrincipals/{{RID}}/homeRealmDiscoveryPolicies/$count"
346    );
347    post!(
348        doc: "Create new navigation property ref to homeRealmDiscoveryPolicies for servicePrincipals",
349        name: create_ref_home_realm_discovery_policies,
350        path: "/servicePrincipals/{{RID}}/homeRealmDiscoveryPolicies/$ref",
351        body: true
352    );
353    get!(
354        doc: "List assigned homeRealmDiscoveryPolicy",
355        name: list_ref_home_realm_discovery_policies,
356        path: "/servicePrincipals/{{RID}}/homeRealmDiscoveryPolicies/$ref"
357    );
358    delete!(
359        doc: "Delete ref of navigation property homeRealmDiscoveryPolicies for servicePrincipals",
360        name: delete_ref_home_realm_discovery_policies,
361        path: "/servicePrincipals/{{RID}}/homeRealmDiscoveryPolicies/{{id}}/$ref",
362        params: home_realm_discovery_policy_id
363    );
364    post!(
365        doc: "Invoke action removeKey",
366        name: remove_key,
367        path: "/servicePrincipals/{{RID}}/removeKey",
368        body: true
369    );
370    post!(
371        doc: "Invoke action removePassword",
372        name: remove_password,
373        path: "/servicePrincipals/{{RID}}/removePassword",
374        body: true
375    );
376    post!(
377        doc: "Invoke action restore",
378        name: restore,
379        path: "/servicePrincipals/{{RID}}/restore"
380    );
381    get!(
382        doc: "Get tokenIssuancePolicies from servicePrincipals",
383        name: list_token_issuance_policies,
384        path: "/servicePrincipals/{{RID}}/tokenIssuancePolicies"
385    );
386    get!(
387        doc: "Get the number of the resource",
388        name: get_token_issuance_policies_count,
389        path: "/servicePrincipals/{{RID}}/tokenIssuancePolicies/$count"
390    );
391    get!(
392        doc: "Get tokenIssuancePolicies from servicePrincipals",
393        name: get_token_issuance_policies,
394        path: "/servicePrincipals/{{RID}}/tokenIssuancePolicies/{{id}}",
395        params: token_issuance_policy_id
396    );
397    get!(
398        doc: "Get tokenLifetimePolicies from servicePrincipals",
399        name: list_token_lifetime_policies,
400        path: "/servicePrincipals/{{RID}}/tokenLifetimePolicies"
401    );
402    get!(
403        doc: "Get the number of the resource",
404        name: get_token_lifetime_policies_count,
405        path: "/servicePrincipals/{{RID}}/tokenLifetimePolicies/$count"
406    );
407    get!(
408        doc: "Get tokenLifetimePolicies from servicePrincipals",
409        name: get_token_lifetime_policies,
410        path: "/servicePrincipals/{{RID}}/tokenLifetimePolicies/{{id}}",
411        params: token_lifetime_policy_id
412    );
413}