#[non_exhaustive]pub struct OpsgenieServiceUpdateRequest {
pub data: OpsgenieServiceUpdateData,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Update request for an Opsgenie service.
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.data: OpsgenieServiceUpdateData
Opsgenie service for an update request.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl OpsgenieServiceUpdateRequest
impl OpsgenieServiceUpdateRequest
Sourcepub fn new(data: OpsgenieServiceUpdateData) -> OpsgenieServiceUpdateRequest
pub fn new(data: OpsgenieServiceUpdateData) -> OpsgenieServiceUpdateRequest
Examples found in repository?
examples/v2_opsgenie-integration_UpdateOpsgenieService.rs (lines 14-21)
11async fn main() {
12 // there is a valid "opsgenie_service" in the system
13 let opsgenie_service_data_id = std::env::var("OPSGENIE_SERVICE_DATA_ID").unwrap();
14 let body = OpsgenieServiceUpdateRequest::new(OpsgenieServiceUpdateData::new(
15 OpsgenieServiceUpdateAttributes::new()
16 .name("fake-opsgenie-service-name--updated".to_string())
17 .opsgenie_api_key("00000000-0000-0000-0000-000000000000".to_string())
18 .region(OpsgenieServiceRegionType::EU),
19 opsgenie_service_data_id.clone(),
20 OpsgenieServiceType::OPSGENIE_SERVICE,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = OpsgenieIntegrationAPI::with_config(configuration);
24 let resp = api
25 .update_opsgenie_service(opsgenie_service_data_id.clone(), body)
26 .await;
27 if let Ok(value) = resp {
28 println!("{:#?}", value);
29 } else {
30 println!("{:#?}", resp.unwrap_err());
31 }
32}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for OpsgenieServiceUpdateRequest
impl Clone for OpsgenieServiceUpdateRequest
Source§fn clone(&self) -> OpsgenieServiceUpdateRequest
fn clone(&self) -> OpsgenieServiceUpdateRequest
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 OpsgenieServiceUpdateRequest
impl Debug for OpsgenieServiceUpdateRequest
Source§impl<'de> Deserialize<'de> for OpsgenieServiceUpdateRequest
impl<'de> Deserialize<'de> for OpsgenieServiceUpdateRequest
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 OpsgenieServiceUpdateRequest
impl PartialEq for OpsgenieServiceUpdateRequest
Source§fn eq(&self, other: &OpsgenieServiceUpdateRequest) -> bool
fn eq(&self, other: &OpsgenieServiceUpdateRequest) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for OpsgenieServiceUpdateRequest
Auto Trait Implementations§
impl Freeze for OpsgenieServiceUpdateRequest
impl RefUnwindSafe for OpsgenieServiceUpdateRequest
impl Send for OpsgenieServiceUpdateRequest
impl Sync for OpsgenieServiceUpdateRequest
impl Unpin for OpsgenieServiceUpdateRequest
impl UnwindSafe for OpsgenieServiceUpdateRequest
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