#[non_exhaustive]pub struct FastlyAccountUpdateRequestData {
pub attributes: Option<FastlyAccountUpdateRequestAttributes>,
pub type_: Option<FastlyAccountType>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Data 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.attributes: Option<FastlyAccountUpdateRequestAttributes>
Attributes object for updating a Fastly account.
type_: Option<FastlyAccountType>
The JSON:API type for this API. Should always be fastly-accounts
.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl FastlyAccountUpdateRequestData
impl FastlyAccountUpdateRequestData
Sourcepub fn new() -> FastlyAccountUpdateRequestData
pub fn new() -> FastlyAccountUpdateRequestData
Examples found in repository?
examples/v2_fastly-integration_UpdateFastlyAccount.rs (line 14)
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 attributes(self, value: FastlyAccountUpdateRequestAttributes) -> Self
pub fn attributes(self, value: FastlyAccountUpdateRequestAttributes) -> Self
Examples found in repository?
examples/v2_fastly-integration_UpdateFastlyAccount.rs (lines 15-17)
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 type_(self, value: FastlyAccountType) -> Self
pub fn type_(self, value: FastlyAccountType) -> Self
Examples found in repository?
examples/v2_fastly-integration_UpdateFastlyAccount.rs (line 18)
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 additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for FastlyAccountUpdateRequestData
impl Clone for FastlyAccountUpdateRequestData
Source§fn clone(&self) -> FastlyAccountUpdateRequestData
fn clone(&self) -> FastlyAccountUpdateRequestData
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 FastlyAccountUpdateRequestData
impl<'de> Deserialize<'de> for FastlyAccountUpdateRequestData
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 FastlyAccountUpdateRequestData
impl PartialEq for FastlyAccountUpdateRequestData
Source§fn eq(&self, other: &FastlyAccountUpdateRequestData) -> bool
fn eq(&self, other: &FastlyAccountUpdateRequestData) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for FastlyAccountUpdateRequestData
Auto Trait Implementations§
impl Freeze for FastlyAccountUpdateRequestData
impl RefUnwindSafe for FastlyAccountUpdateRequestData
impl Send for FastlyAccountUpdateRequestData
impl Sync for FastlyAccountUpdateRequestData
impl Unpin for FastlyAccountUpdateRequestData
impl UnwindSafe for FastlyAccountUpdateRequestData
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