#[non_exhaustive]pub struct OrgConnectionUpdateRequest {
pub data: OrgConnectionUpdate,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Request to update 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.data: OrgConnectionUpdate
Org connection update data.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl OrgConnectionUpdateRequest
impl OrgConnectionUpdateRequest
Sourcepub fn new(data: OrgConnectionUpdate) -> OrgConnectionUpdateRequest
pub fn new(data: OrgConnectionUpdate) -> OrgConnectionUpdateRequest
Examples found in repository?
examples/v2_org-connections_UpdateOrgConnections.rs (lines 16-23)
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 OrgConnectionUpdateRequest
impl Clone for OrgConnectionUpdateRequest
Source§fn clone(&self) -> OrgConnectionUpdateRequest
fn clone(&self) -> OrgConnectionUpdateRequest
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 OrgConnectionUpdateRequest
impl Debug for OrgConnectionUpdateRequest
Source§impl<'de> Deserialize<'de> for OrgConnectionUpdateRequest
impl<'de> Deserialize<'de> for OrgConnectionUpdateRequest
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
impl StructuralPartialEq for OrgConnectionUpdateRequest
Auto Trait Implementations§
impl Freeze for OrgConnectionUpdateRequest
impl RefUnwindSafe for OrgConnectionUpdateRequest
impl Send for OrgConnectionUpdateRequest
impl Sync for OrgConnectionUpdateRequest
impl Unpin for OrgConnectionUpdateRequest
impl UnwindSafe for OrgConnectionUpdateRequest
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