#[non_exhaustive]pub struct OrgConnectionUpdate {
pub attributes: OrgConnectionUpdateAttributes,
pub id: Uuid,
pub type_: OrgConnectionType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Org connection update 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: OrgConnectionUpdateAttributes
Attributes for updating an org connection.
id: Uuid
The unique identifier of the org connection.
type_: OrgConnectionType
Org connection type.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl OrgConnectionUpdate
impl OrgConnectionUpdate
Sourcepub fn new(
attributes: OrgConnectionUpdateAttributes,
id: Uuid,
type_: OrgConnectionType,
) -> OrgConnectionUpdate
pub fn new( attributes: OrgConnectionUpdateAttributes, id: Uuid, type_: OrgConnectionType, ) -> OrgConnectionUpdate
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 OrgConnectionUpdate
impl Clone for OrgConnectionUpdate
Source§fn clone(&self) -> OrgConnectionUpdate
fn clone(&self) -> OrgConnectionUpdate
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 OrgConnectionUpdate
impl Debug for OrgConnectionUpdate
Source§impl<'de> Deserialize<'de> for OrgConnectionUpdate
impl<'de> Deserialize<'de> for OrgConnectionUpdate
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 OrgConnectionUpdate
impl PartialEq for OrgConnectionUpdate
Source§impl Serialize for OrgConnectionUpdate
impl Serialize for OrgConnectionUpdate
impl StructuralPartialEq for OrgConnectionUpdate
Auto Trait Implementations§
impl Freeze for OrgConnectionUpdate
impl RefUnwindSafe for OrgConnectionUpdate
impl Send for OrgConnectionUpdate
impl Sync for OrgConnectionUpdate
impl Unpin for OrgConnectionUpdate
impl UnwindSafe for OrgConnectionUpdate
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