#[non_exhaustive]pub struct ConfluentAccountUpdateRequest {
pub data: ConfluentAccountUpdateRequestData,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The JSON:API request for updating a Confluent account.
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: ConfluentAccountUpdateRequestData
Data object for updating a Confluent account.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl ConfluentAccountUpdateRequest
impl ConfluentAccountUpdateRequest
Sourcepub fn new(
data: ConfluentAccountUpdateRequestData,
) -> ConfluentAccountUpdateRequest
pub fn new( data: ConfluentAccountUpdateRequestData, ) -> ConfluentAccountUpdateRequest
Examples found in repository?
examples/v2_confluent-cloud_UpdateConfluentAccount.rs (lines 15-22)
10async fn main() {
11 // there is a valid "confluent_account" in the system
12 let confluent_account_data_attributes_api_key =
13 std::env::var("CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY").unwrap();
14 let confluent_account_data_id = std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();
15 let body = ConfluentAccountUpdateRequest::new(ConfluentAccountUpdateRequestData::new(
16 ConfluentAccountUpdateRequestAttributes::new(
17 confluent_account_data_attributes_api_key.clone(),
18 "update-secret".to_string(),
19 )
20 .tags(vec!["updated_tag:val".to_string()]),
21 ConfluentAccountType::CONFLUENT_CLOUD_ACCOUNTS,
22 ));
23 let configuration = datadog::Configuration::new();
24 let api = ConfluentCloudAPI::with_config(configuration);
25 let resp = api
26 .update_confluent_account(confluent_account_data_id.clone(), body)
27 .await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for ConfluentAccountUpdateRequest
impl Clone for ConfluentAccountUpdateRequest
Source§fn clone(&self) -> ConfluentAccountUpdateRequest
fn clone(&self) -> ConfluentAccountUpdateRequest
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 ConfluentAccountUpdateRequest
impl<'de> Deserialize<'de> for ConfluentAccountUpdateRequest
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 ConfluentAccountUpdateRequest
impl PartialEq for ConfluentAccountUpdateRequest
Source§fn eq(&self, other: &ConfluentAccountUpdateRequest) -> bool
fn eq(&self, other: &ConfluentAccountUpdateRequest) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ConfluentAccountUpdateRequest
Auto Trait Implementations§
impl Freeze for ConfluentAccountUpdateRequest
impl RefUnwindSafe for ConfluentAccountUpdateRequest
impl Send for ConfluentAccountUpdateRequest
impl Sync for ConfluentAccountUpdateRequest
impl Unpin for ConfluentAccountUpdateRequest
impl UnwindSafe for ConfluentAccountUpdateRequest
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