#[non_exhaustive]pub struct WebhooksIntegrationCustomVariable {
pub is_secret: bool,
pub name: String,
pub value: String,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Custom variable for Webhook integration.
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.is_secret: bool
Make custom variable is secret or not. If the custom variable is secret, the value is not returned in the response payload.
name: String
The name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>
.
value: String
Value of the custom variable.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl WebhooksIntegrationCustomVariable
impl WebhooksIntegrationCustomVariable
Sourcepub fn new(
is_secret: bool,
name: String,
value: String,
) -> WebhooksIntegrationCustomVariable
pub fn new( is_secret: bool, name: String, value: String, ) -> WebhooksIntegrationCustomVariable
Examples found in repository?
examples/v1_webhooks-integration_CreateWebhooksIntegrationCustomVariable.rs (lines 8-12)
7async fn main() {
8 let body = WebhooksIntegrationCustomVariable::new(
9 true,
10 "EXAMPLEWEBHOOKSINTEGRATION".to_string(),
11 "CUSTOM_VARIABLE_VALUE".to_string(),
12 );
13 let configuration = datadog::Configuration::new();
14 let api = WebhooksIntegrationAPI::with_config(configuration);
15 let resp = api.create_webhooks_integration_custom_variable(body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for WebhooksIntegrationCustomVariable
impl Clone for WebhooksIntegrationCustomVariable
Source§fn clone(&self) -> WebhooksIntegrationCustomVariable
fn clone(&self) -> WebhooksIntegrationCustomVariable
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de> Deserialize<'de> for WebhooksIntegrationCustomVariable
impl<'de> Deserialize<'de> for WebhooksIntegrationCustomVariable
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 WebhooksIntegrationCustomVariable
impl PartialEq for WebhooksIntegrationCustomVariable
Source§fn eq(&self, other: &WebhooksIntegrationCustomVariable) -> bool
fn eq(&self, other: &WebhooksIntegrationCustomVariable) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for WebhooksIntegrationCustomVariable
Auto Trait Implementations§
impl Freeze for WebhooksIntegrationCustomVariable
impl RefUnwindSafe for WebhooksIntegrationCustomVariable
impl Send for WebhooksIntegrationCustomVariable
impl Sync for WebhooksIntegrationCustomVariable
impl Unpin for WebhooksIntegrationCustomVariable
impl UnwindSafe for WebhooksIntegrationCustomVariable
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