#[non_exhaustive]pub struct OrgConnectionCreateAttributes {
pub connection_types: Vec<OrgConnectionTypeEnum>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Attributes for creating 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>
List of connection types to establish.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl OrgConnectionCreateAttributes
impl OrgConnectionCreateAttributes
Sourcepub fn new(
connection_types: Vec<OrgConnectionTypeEnum>,
) -> OrgConnectionCreateAttributes
pub fn new( connection_types: Vec<OrgConnectionTypeEnum>, ) -> OrgConnectionCreateAttributes
Examples found in repository?
examples/v2_org-connections_CreateOrgConnections.rs (line 17)
15async fn main() {
16 let body = OrgConnectionCreateRequest::new(OrgConnectionCreate::new(
17 OrgConnectionCreateAttributes::new(vec![OrgConnectionTypeEnum::LOGS]),
18 OrgConnectionCreateRelationships::new(
19 OrgConnectionOrgRelationship::new().data(
20 OrgConnectionOrgRelationshipData::new()
21 .id("83999dcd-7f97-11f0-8de1-1ecf66f1aa85".to_string())
22 .type_(OrgConnectionOrgRelationshipDataType::ORGS),
23 ),
24 ),
25 OrgConnectionType::ORG_CONNECTION,
26 ));
27 let configuration = datadog::Configuration::new();
28 let api = OrgConnectionsAPI::with_config(configuration);
29 let resp = api.create_org_connections(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for OrgConnectionCreateAttributes
impl Clone for OrgConnectionCreateAttributes
Source§fn clone(&self) -> OrgConnectionCreateAttributes
fn clone(&self) -> OrgConnectionCreateAttributes
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 OrgConnectionCreateAttributes
impl<'de> Deserialize<'de> for OrgConnectionCreateAttributes
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 OrgConnectionCreateAttributes
impl PartialEq for OrgConnectionCreateAttributes
Source§fn eq(&self, other: &OrgConnectionCreateAttributes) -> bool
fn eq(&self, other: &OrgConnectionCreateAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for OrgConnectionCreateAttributes
Auto Trait Implementations§
impl Freeze for OrgConnectionCreateAttributes
impl RefUnwindSafe for OrgConnectionCreateAttributes
impl Send for OrgConnectionCreateAttributes
impl Sync for OrgConnectionCreateAttributes
impl Unpin for OrgConnectionCreateAttributes
impl UnwindSafe for OrgConnectionCreateAttributes
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