#[non_exhaustive]pub struct ConfluentAccountUpdateRequestAttributes {
pub api_key: String,
pub api_secret: String,
pub tags: Option<Vec<String>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Attributes 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.api_key: String
The API key associated with your Confluent account.
api_secret: String
The API secret associated with your Confluent account.
A list of strings representing tags. Can be a single key, or key-value pairs separated by a colon.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl ConfluentAccountUpdateRequestAttributes
impl ConfluentAccountUpdateRequestAttributes
Sourcepub fn new(
api_key: String,
api_secret: String,
) -> ConfluentAccountUpdateRequestAttributes
pub fn new( api_key: String, api_secret: String, ) -> ConfluentAccountUpdateRequestAttributes
Examples found in repository?
examples/v2_confluent-cloud_UpdateConfluentAccount.rs (lines 16-19)
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}
Examples found in repository?
examples/v2_confluent-cloud_UpdateConfluentAccount.rs (line 20)
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 ConfluentAccountUpdateRequestAttributes
impl Clone for ConfluentAccountUpdateRequestAttributes
Source§fn clone(&self) -> ConfluentAccountUpdateRequestAttributes
fn clone(&self) -> ConfluentAccountUpdateRequestAttributes
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 ConfluentAccountUpdateRequestAttributes
impl<'de> Deserialize<'de> for ConfluentAccountUpdateRequestAttributes
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 ConfluentAccountUpdateRequestAttributes
impl PartialEq for ConfluentAccountUpdateRequestAttributes
Source§fn eq(&self, other: &ConfluentAccountUpdateRequestAttributes) -> bool
fn eq(&self, other: &ConfluentAccountUpdateRequestAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ConfluentAccountUpdateRequestAttributes
Auto Trait Implementations§
impl Freeze for ConfluentAccountUpdateRequestAttributes
impl RefUnwindSafe for ConfluentAccountUpdateRequestAttributes
impl Send for ConfluentAccountUpdateRequestAttributes
impl Sync for ConfluentAccountUpdateRequestAttributes
impl Unpin for ConfluentAccountUpdateRequestAttributes
impl UnwindSafe for ConfluentAccountUpdateRequestAttributes
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