#[non_exhaustive]pub struct ConfluentAccountUpdateRequestData {
pub attributes: ConfluentAccountUpdateRequestAttributes,
pub type_: ConfluentAccountType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Data object 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.attributes: ConfluentAccountUpdateRequestAttributes
Attributes object for updating a Confluent account.
type_: ConfluentAccountType
The JSON:API type for this API. Should always be confluent-cloud-accounts
.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl ConfluentAccountUpdateRequestData
impl ConfluentAccountUpdateRequestData
Sourcepub fn new(
attributes: ConfluentAccountUpdateRequestAttributes,
type_: ConfluentAccountType,
) -> ConfluentAccountUpdateRequestData
pub fn new( attributes: ConfluentAccountUpdateRequestAttributes, type_: ConfluentAccountType, ) -> ConfluentAccountUpdateRequestData
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 ConfluentAccountUpdateRequestData
impl Clone for ConfluentAccountUpdateRequestData
Source§fn clone(&self) -> ConfluentAccountUpdateRequestData
fn clone(&self) -> ConfluentAccountUpdateRequestData
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 ConfluentAccountUpdateRequestData
impl<'de> Deserialize<'de> for ConfluentAccountUpdateRequestData
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 ConfluentAccountUpdateRequestData
impl PartialEq for ConfluentAccountUpdateRequestData
Source§fn eq(&self, other: &ConfluentAccountUpdateRequestData) -> bool
fn eq(&self, other: &ConfluentAccountUpdateRequestData) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ConfluentAccountUpdateRequestData
Auto Trait Implementations§
impl Freeze for ConfluentAccountUpdateRequestData
impl RefUnwindSafe for ConfluentAccountUpdateRequestData
impl Send for ConfluentAccountUpdateRequestData
impl Sync for ConfluentAccountUpdateRequestData
impl Unpin for ConfluentAccountUpdateRequestData
impl UnwindSafe for ConfluentAccountUpdateRequestData
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