Struct datadog_api_client::datadogV1::model::model_shared_dashboard_invites_data_object::SharedDashboardInvitesDataObject
source · #[non_exhaustive]pub struct SharedDashboardInvitesDataObject {
pub attributes: SharedDashboardInvitesDataObjectAttributes,
pub type_: DashboardInviteType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
Object containing the information for an invitation to a shared dashboard.
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: SharedDashboardInvitesDataObjectAttributesAttributes of the shared dashboard invitation
type_: DashboardInviteTypeType for shared dashboard invitation request body.
additional_properties: BTreeMap<String, Value>Implementations§
sourcepub fn new(
attributes: SharedDashboardInvitesDataObjectAttributes,
type_: DashboardInviteType,
) -> SharedDashboardInvitesDataObject
pub fn new( attributes: SharedDashboardInvitesDataObjectAttributes, type_: DashboardInviteType, ) -> SharedDashboardInvitesDataObject
Examples found in repository?
examples/v1_dashboards_DeletePublicDashboardInvitation.rs (lines 14-18)
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
async fn main() {
let body =
SharedDashboardInvites::new(SharedDashboardInvitesData::SharedDashboardInvitesDataList(
vec![SharedDashboardInvitesDataObject::new(
SharedDashboardInvitesDataObjectAttributes::new()
.email("test@datadoghq.com".to_string()),
DashboardInviteType::PUBLIC_DASHBOARD_INVITATION,
)],
));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api
.delete_public_dashboard_invitation("token".to_string(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
examples/v1_dashboards_SendPublicDashboardInvitation.rs (lines 16-20)
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
async fn main() {
// there is a valid "shared_dashboard" in the system
let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
let body = SharedDashboardInvites::new(
SharedDashboardInvitesData::SharedDashboardInvitesDataObject(Box::new(
SharedDashboardInvitesDataObject::new(
SharedDashboardInvitesDataObjectAttributes::new()
.email("exampledashboard@datadoghq.com".to_string()),
DashboardInviteType::PUBLIC_DASHBOARD_INVITATION,
),
)),
);
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api
.send_public_dashboard_invitation(shared_dashboard_token.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§fn clone(&self) -> SharedDashboardInvitesDataObject
fn clone(&self) -> SharedDashboardInvitesDataObject
Returns a copy 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§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§fn eq(&self, other: &SharedDashboardInvitesDataObject) -> bool
fn eq(&self, other: &SharedDashboardInvitesDataObject) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)