#[non_exhaustive]pub struct OrgConnectionCreate {
pub attributes: OrgConnectionCreateAttributes,
pub relationships: OrgConnectionCreateRelationships,
pub type_: OrgConnectionType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Org connection creation 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: OrgConnectionCreateAttributes
Attributes for creating an org connection.
relationships: OrgConnectionCreateRelationships
Relationships for org connection creation.
type_: OrgConnectionType
Org connection type.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl OrgConnectionCreate
impl OrgConnectionCreate
Sourcepub fn new(
attributes: OrgConnectionCreateAttributes,
relationships: OrgConnectionCreateRelationships,
type_: OrgConnectionType,
) -> OrgConnectionCreate
pub fn new( attributes: OrgConnectionCreateAttributes, relationships: OrgConnectionCreateRelationships, type_: OrgConnectionType, ) -> OrgConnectionCreate
Examples found in repository?
examples/v2_org-connections_CreateOrgConnections.rs (lines 16-26)
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 OrgConnectionCreate
impl Clone for OrgConnectionCreate
Source§fn clone(&self) -> OrgConnectionCreate
fn clone(&self) -> OrgConnectionCreate
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 OrgConnectionCreate
impl Debug for OrgConnectionCreate
Source§impl<'de> Deserialize<'de> for OrgConnectionCreate
impl<'de> Deserialize<'de> for OrgConnectionCreate
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 OrgConnectionCreate
impl PartialEq for OrgConnectionCreate
Source§impl Serialize for OrgConnectionCreate
impl Serialize for OrgConnectionCreate
impl StructuralPartialEq for OrgConnectionCreate
Auto Trait Implementations§
impl Freeze for OrgConnectionCreate
impl RefUnwindSafe for OrgConnectionCreate
impl Send for OrgConnectionCreate
impl Sync for OrgConnectionCreate
impl Unpin for OrgConnectionCreate
impl UnwindSafe for OrgConnectionCreate
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