#[non_exhaustive]pub struct IPAllowlistData {
pub attributes: Option<IPAllowlistAttributes>,
pub id: Option<String>,
pub type_: IPAllowlistType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
IP allowlist data.
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.attributes: Option<IPAllowlistAttributes>
Attributes of the IP allowlist.
id: Option<String>
The unique identifier of the org.
type_: IPAllowlistType
IP allowlist type.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl IPAllowlistData
impl IPAllowlistData
Sourcepub fn new(type_: IPAllowlistType) -> IPAllowlistData
pub fn new(type_: IPAllowlistType) -> IPAllowlistData
Examples found in repository?
examples/v2_ip-allowlist_UpdateIPAllowlist.rs (line 16)
14async fn main() {
15 let body = IPAllowlistUpdateRequest::new(
16 IPAllowlistData::new(IPAllowlistType::IP_ALLOWLIST).attributes(
17 IPAllowlistAttributes::new()
18 .enabled(false)
19 .entries(vec![IPAllowlistEntry::new(
20 IPAllowlistEntryData::new(IPAllowlistEntryType::IP_ALLOWLIST_ENTRY).attributes(
21 IPAllowlistEntryAttributes::new()
22 .cidr_block("127.0.0.1".to_string())
23 .note("Example-IP-Allowlist".to_string()),
24 ),
25 )]),
26 ),
27 );
28 let configuration = datadog::Configuration::new();
29 let api = IPAllowlistAPI::with_config(configuration);
30 let resp = api.update_ip_allowlist(body).await;
31 if let Ok(value) = resp {
32 println!("{:#?}", value);
33 } else {
34 println!("{:#?}", resp.unwrap_err());
35 }
36}
Sourcepub fn attributes(self, value: IPAllowlistAttributes) -> Self
pub fn attributes(self, value: IPAllowlistAttributes) -> Self
Examples found in repository?
examples/v2_ip-allowlist_UpdateIPAllowlist.rs (lines 16-26)
14async fn main() {
15 let body = IPAllowlistUpdateRequest::new(
16 IPAllowlistData::new(IPAllowlistType::IP_ALLOWLIST).attributes(
17 IPAllowlistAttributes::new()
18 .enabled(false)
19 .entries(vec![IPAllowlistEntry::new(
20 IPAllowlistEntryData::new(IPAllowlistEntryType::IP_ALLOWLIST_ENTRY).attributes(
21 IPAllowlistEntryAttributes::new()
22 .cidr_block("127.0.0.1".to_string())
23 .note("Example-IP-Allowlist".to_string()),
24 ),
25 )]),
26 ),
27 );
28 let configuration = datadog::Configuration::new();
29 let api = IPAllowlistAPI::with_config(configuration);
30 let resp = api.update_ip_allowlist(body).await;
31 if let Ok(value) = resp {
32 println!("{:#?}", value);
33 } else {
34 println!("{:#?}", resp.unwrap_err());
35 }
36}
pub fn id(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for IPAllowlistData
impl Clone for IPAllowlistData
Source§fn clone(&self) -> IPAllowlistData
fn clone(&self) -> IPAllowlistData
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 Debug for IPAllowlistData
impl Debug for IPAllowlistData
Source§impl<'de> Deserialize<'de> for IPAllowlistData
impl<'de> Deserialize<'de> for IPAllowlistData
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 IPAllowlistData
impl PartialEq for IPAllowlistData
Source§impl Serialize for IPAllowlistData
impl Serialize for IPAllowlistData
impl StructuralPartialEq for IPAllowlistData
Auto Trait Implementations§
impl Freeze for IPAllowlistData
impl RefUnwindSafe for IPAllowlistData
impl Send for IPAllowlistData
impl Sync for IPAllowlistData
impl Unpin for IPAllowlistData
impl UnwindSafe for IPAllowlistData
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