#[non_exhaustive]pub struct TeamSyncAttributes {
pub source: TeamSyncAttributesSource,
pub type_: TeamSyncAttributesType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Team sync attributes.
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.source: TeamSyncAttributesSource
The external source platform for team synchronization. Only “github” is supported.
type_: TeamSyncAttributesType
The type of synchronization operation. Only “link” is supported, which links existing teams by matching names.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl TeamSyncAttributes
impl TeamSyncAttributes
Sourcepub fn new(
source: TeamSyncAttributesSource,
type_: TeamSyncAttributesType,
) -> TeamSyncAttributes
pub fn new( source: TeamSyncAttributesSource, type_: TeamSyncAttributesType, ) -> TeamSyncAttributes
Examples found in repository?
examples/v2_teams_SyncTeams.rs (lines 14-17)
12async fn main() {
13 let body = TeamSyncRequest::new(TeamSyncData::new(
14 TeamSyncAttributes::new(
15 TeamSyncAttributesSource::GITHUB,
16 TeamSyncAttributesType::LINK,
17 ),
18 TeamSyncBulkType::TEAM_SYNC_BULK,
19 ));
20 let mut configuration = datadog::Configuration::new();
21 configuration.set_unstable_operation_enabled("v2.SyncTeams", true);
22 let api = TeamsAPI::with_config(configuration);
23 let resp = api.sync_teams(body).await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
More examples
examples/v2_teams_SyncTeams_3215592344.rs (lines 14-17)
12async fn main() {
13 let body = TeamSyncRequest::new(TeamSyncData::new(
14 TeamSyncAttributes::new(
15 TeamSyncAttributesSource::GITHUB,
16 TeamSyncAttributesType::LINK,
17 ),
18 TeamSyncBulkType::TEAM_SYNC_BULK,
19 ));
20 let mut configuration = datadog::Configuration::new();
21 configuration.set_unstable_operation_enabled("v2.SyncTeams", true);
22 let api = TeamsAPI::with_config(configuration);
23 let resp = api.sync_teams(body).await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for TeamSyncAttributes
impl Clone for TeamSyncAttributes
Source§fn clone(&self) -> TeamSyncAttributes
fn clone(&self) -> TeamSyncAttributes
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 TeamSyncAttributes
impl Debug for TeamSyncAttributes
Source§impl<'de> Deserialize<'de> for TeamSyncAttributes
impl<'de> Deserialize<'de> for TeamSyncAttributes
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 TeamSyncAttributes
impl PartialEq for TeamSyncAttributes
Source§impl Serialize for TeamSyncAttributes
impl Serialize for TeamSyncAttributes
impl StructuralPartialEq for TeamSyncAttributes
Auto Trait Implementations§
impl Freeze for TeamSyncAttributes
impl RefUnwindSafe for TeamSyncAttributes
impl Send for TeamSyncAttributes
impl Sync for TeamSyncAttributes
impl Unpin for TeamSyncAttributes
impl UnwindSafe for TeamSyncAttributes
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