#[non_exhaustive]pub struct FastlyAccountUpdateRequestAttributes {
pub api_key: Option<String>,
pub name: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Attributes object for updating a Fastly 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: Option<String>
The API key of the Fastly account.
name: Option<String>
The name of the Fastly account.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl FastlyAccountUpdateRequestAttributes
impl FastlyAccountUpdateRequestAttributes
Sourcepub fn new() -> FastlyAccountUpdateRequestAttributes
pub fn new() -> FastlyAccountUpdateRequestAttributes
Examples found in repository?
examples/v2_fastly-integration_UpdateFastlyAccount.rs (line 16)
10async fn main() {
11 // there is a valid "fastly_account" in the system
12 let fastly_account_data_id = std::env::var("FASTLY_ACCOUNT_DATA_ID").unwrap();
13 let body = FastlyAccountUpdateRequest::new(
14 FastlyAccountUpdateRequestData::new()
15 .attributes(
16 FastlyAccountUpdateRequestAttributes::new().api_key("update-secret".to_string()),
17 )
18 .type_(FastlyAccountType::FASTLY_ACCOUNTS),
19 );
20 let configuration = datadog::Configuration::new();
21 let api = FastlyIntegrationAPI::with_config(configuration);
22 let resp = api
23 .update_fastly_account(fastly_account_data_id.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Sourcepub fn api_key(self, value: String) -> Self
pub fn api_key(self, value: String) -> Self
Examples found in repository?
examples/v2_fastly-integration_UpdateFastlyAccount.rs (line 16)
10async fn main() {
11 // there is a valid "fastly_account" in the system
12 let fastly_account_data_id = std::env::var("FASTLY_ACCOUNT_DATA_ID").unwrap();
13 let body = FastlyAccountUpdateRequest::new(
14 FastlyAccountUpdateRequestData::new()
15 .attributes(
16 FastlyAccountUpdateRequestAttributes::new().api_key("update-secret".to_string()),
17 )
18 .type_(FastlyAccountType::FASTLY_ACCOUNTS),
19 );
20 let configuration = datadog::Configuration::new();
21 let api = FastlyIntegrationAPI::with_config(configuration);
22 let resp = api
23 .update_fastly_account(fastly_account_data_id.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
pub fn name(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for FastlyAccountUpdateRequestAttributes
impl Clone for FastlyAccountUpdateRequestAttributes
Source§fn clone(&self) -> FastlyAccountUpdateRequestAttributes
fn clone(&self) -> FastlyAccountUpdateRequestAttributes
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 FastlyAccountUpdateRequestAttributes
impl<'de> Deserialize<'de> for FastlyAccountUpdateRequestAttributes
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 FastlyAccountUpdateRequestAttributes
impl PartialEq for FastlyAccountUpdateRequestAttributes
Source§fn eq(&self, other: &FastlyAccountUpdateRequestAttributes) -> bool
fn eq(&self, other: &FastlyAccountUpdateRequestAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for FastlyAccountUpdateRequestAttributes
Auto Trait Implementations§
impl Freeze for FastlyAccountUpdateRequestAttributes
impl RefUnwindSafe for FastlyAccountUpdateRequestAttributes
impl Send for FastlyAccountUpdateRequestAttributes
impl Sync for FastlyAccountUpdateRequestAttributes
impl Unpin for FastlyAccountUpdateRequestAttributes
impl UnwindSafe for FastlyAccountUpdateRequestAttributes
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