#[non_exhaustive]pub struct SyntheticsGlobalVariableTOTPParameters {
pub digits: Option<i32>,
pub refresh_interval: Option<i32>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Parameters for the TOTP/MFA variable
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.digits: Option<i32>
Number of digits for the OTP code.
refresh_interval: Option<i32>
Interval for which to refresh the token (in seconds).
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl SyntheticsGlobalVariableTOTPParameters
impl SyntheticsGlobalVariableTOTPParameters
Sourcepub fn new() -> SyntheticsGlobalVariableTOTPParameters
pub fn new() -> SyntheticsGlobalVariableTOTPParameters
Examples found in repository?
examples/v1_synthetics_CreateGlobalVariable_3397718516.rs (line 21)
10async fn main() {
11 let body = SyntheticsGlobalVariableRequest::new(
12 "".to_string(),
13 "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
14 vec![],
15 )
16 .is_totp(true)
17 .value(
18 SyntheticsGlobalVariableValue::new()
19 .options(
20 SyntheticsGlobalVariableOptions::new().totp_parameters(
21 SyntheticsGlobalVariableTOTPParameters::new()
22 .digits(6)
23 .refresh_interval(30),
24 ),
25 )
26 .secure(false)
27 .value("".to_string()),
28 );
29 let configuration = datadog::Configuration::new();
30 let api = SyntheticsAPI::with_config(configuration);
31 let resp = api.create_global_variable(body).await;
32 if let Ok(value) = resp {
33 println!("{:#?}", value);
34 } else {
35 println!("{:#?}", resp.unwrap_err());
36 }
37}
Sourcepub fn digits(self, value: i32) -> Self
pub fn digits(self, value: i32) -> Self
Examples found in repository?
examples/v1_synthetics_CreateGlobalVariable_3397718516.rs (line 22)
10async fn main() {
11 let body = SyntheticsGlobalVariableRequest::new(
12 "".to_string(),
13 "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
14 vec![],
15 )
16 .is_totp(true)
17 .value(
18 SyntheticsGlobalVariableValue::new()
19 .options(
20 SyntheticsGlobalVariableOptions::new().totp_parameters(
21 SyntheticsGlobalVariableTOTPParameters::new()
22 .digits(6)
23 .refresh_interval(30),
24 ),
25 )
26 .secure(false)
27 .value("".to_string()),
28 );
29 let configuration = datadog::Configuration::new();
30 let api = SyntheticsAPI::with_config(configuration);
31 let resp = api.create_global_variable(body).await;
32 if let Ok(value) = resp {
33 println!("{:#?}", value);
34 } else {
35 println!("{:#?}", resp.unwrap_err());
36 }
37}
Sourcepub fn refresh_interval(self, value: i32) -> Self
pub fn refresh_interval(self, value: i32) -> Self
Examples found in repository?
examples/v1_synthetics_CreateGlobalVariable_3397718516.rs (line 23)
10async fn main() {
11 let body = SyntheticsGlobalVariableRequest::new(
12 "".to_string(),
13 "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
14 vec![],
15 )
16 .is_totp(true)
17 .value(
18 SyntheticsGlobalVariableValue::new()
19 .options(
20 SyntheticsGlobalVariableOptions::new().totp_parameters(
21 SyntheticsGlobalVariableTOTPParameters::new()
22 .digits(6)
23 .refresh_interval(30),
24 ),
25 )
26 .secure(false)
27 .value("".to_string()),
28 );
29 let configuration = datadog::Configuration::new();
30 let api = SyntheticsAPI::with_config(configuration);
31 let resp = api.create_global_variable(body).await;
32 if let Ok(value) = resp {
33 println!("{:#?}", value);
34 } else {
35 println!("{:#?}", resp.unwrap_err());
36 }
37}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for SyntheticsGlobalVariableTOTPParameters
impl Clone for SyntheticsGlobalVariableTOTPParameters
Source§fn clone(&self) -> SyntheticsGlobalVariableTOTPParameters
fn clone(&self) -> SyntheticsGlobalVariableTOTPParameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de> Deserialize<'de> for SyntheticsGlobalVariableTOTPParameters
impl<'de> Deserialize<'de> for SyntheticsGlobalVariableTOTPParameters
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SyntheticsGlobalVariableTOTPParameters
impl PartialEq for SyntheticsGlobalVariableTOTPParameters
Source§fn eq(&self, other: &SyntheticsGlobalVariableTOTPParameters) -> bool
fn eq(&self, other: &SyntheticsGlobalVariableTOTPParameters) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for SyntheticsGlobalVariableTOTPParameters
Auto Trait Implementations§
impl Freeze for SyntheticsGlobalVariableTOTPParameters
impl RefUnwindSafe for SyntheticsGlobalVariableTOTPParameters
impl Send for SyntheticsGlobalVariableTOTPParameters
impl Sync for SyntheticsGlobalVariableTOTPParameters
impl Unpin for SyntheticsGlobalVariableTOTPParameters
impl UnwindSafe for SyntheticsGlobalVariableTOTPParameters
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more