#[non_exhaustive]pub struct OrgConnectionUpdateAttributes {
pub connection_types: Vec<OrgConnectionTypeEnum>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Attributes for updating an org connection.
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.connection_types: Vec<OrgConnectionTypeEnum>
Updated list of connection types.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl OrgConnectionUpdateAttributes
impl OrgConnectionUpdateAttributes
Sourcepub fn new(
connection_types: Vec<OrgConnectionTypeEnum>,
) -> OrgConnectionUpdateAttributes
pub fn new( connection_types: Vec<OrgConnectionTypeEnum>, ) -> OrgConnectionUpdateAttributes
Examples found in repository?
examples/v2_org-connections_UpdateOrgConnections.rs (lines 17-20)
11async fn main() {
12 // there is a valid "org_connection" in the system
13 let org_connection_data_id =
14 uuid::Uuid::parse_str(&std::env::var("ORG_CONNECTION_DATA_ID").unwrap())
15 .expect("Invalid UUID");
16 let body = OrgConnectionUpdateRequest::new(OrgConnectionUpdate::new(
17 OrgConnectionUpdateAttributes::new(vec![
18 OrgConnectionTypeEnum::LOGS,
19 OrgConnectionTypeEnum::METRICS,
20 ]),
21 org_connection_data_id.clone(),
22 OrgConnectionType::ORG_CONNECTION,
23 ));
24 let configuration = datadog::Configuration::new();
25 let api = OrgConnectionsAPI::with_config(configuration);
26 let resp = api
27 .update_org_connections(org_connection_data_id.clone(), body)
28 .await;
29 if let Ok(value) = resp {
30 println!("{:#?}", value);
31 } else {
32 println!("{:#?}", resp.unwrap_err());
33 }
34}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for OrgConnectionUpdateAttributes
impl Clone for OrgConnectionUpdateAttributes
Source§fn clone(&self) -> OrgConnectionUpdateAttributes
fn clone(&self) -> OrgConnectionUpdateAttributes
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 OrgConnectionUpdateAttributes
impl<'de> Deserialize<'de> for OrgConnectionUpdateAttributes
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 OrgConnectionUpdateAttributes
impl PartialEq for OrgConnectionUpdateAttributes
Source§fn eq(&self, other: &OrgConnectionUpdateAttributes) -> bool
fn eq(&self, other: &OrgConnectionUpdateAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for OrgConnectionUpdateAttributes
Auto Trait Implementations§
impl Freeze for OrgConnectionUpdateAttributes
impl RefUnwindSafe for OrgConnectionUpdateAttributes
impl Send for OrgConnectionUpdateAttributes
impl Sync for OrgConnectionUpdateAttributes
impl Unpin for OrgConnectionUpdateAttributes
impl UnwindSafe for OrgConnectionUpdateAttributes
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