gsuite_api/
two_step_verification.rs
1use crate::Client;
2use crate::ClientResult;
3
4pub struct TwoStepVerification {
5 pub client: Client,
6}
7
8impl TwoStepVerification {
9 #[doc(hidden)]
10 pub fn new(client: Client) -> Self {
11 TwoStepVerification { client }
12 }
13
14 pub async fn turn_off(&self, user_key: &str) -> ClientResult<crate::Response<()>> {
24 let url = self.client.url(
25 &format!(
26 "/admin/directory/v1/users/{}/twoStepVerification/turnOff",
27 crate::progenitor_support::encode_path(user_key),
28 ),
29 None,
30 );
31 self.client
32 .post(
33 &url,
34 crate::Message {
35 body: None,
36 content_type: None,
37 },
38 )
39 .await
40 }
41}