#[non_exhaustive]pub struct FastlyAccountCreateRequestAttributes {
pub api_key: String,
pub name: String,
pub services: Option<Vec<FastlyService>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Attributes object for creating 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: String
The API key for the Fastly account.
name: String
The name of the Fastly account.
services: Option<Vec<FastlyService>>
A list of services belonging to the parent account.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl FastlyAccountCreateRequestAttributes
impl FastlyAccountCreateRequestAttributes
Sourcepub fn new(
api_key: String,
name: String,
) -> FastlyAccountCreateRequestAttributes
pub fn new( api_key: String, name: String, ) -> FastlyAccountCreateRequestAttributes
Examples found in repository?
examples/v2_fastly-integration_CreateFastlyAccount.rs (lines 12-15)
10async fn main() {
11 let body = FastlyAccountCreateRequest::new(FastlyAccountCreateRequestData::new(
12 FastlyAccountCreateRequestAttributes::new(
13 "ExampleFastlyIntegration".to_string(),
14 "Example-Fastly-Integration".to_string(),
15 )
16 .services(vec![]),
17 FastlyAccountType::FASTLY_ACCOUNTS,
18 ));
19 let configuration = datadog::Configuration::new();
20 let api = FastlyIntegrationAPI::with_config(configuration);
21 let resp = api.create_fastly_account(body).await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
Sourcepub fn services(self, value: Vec<FastlyService>) -> Self
pub fn services(self, value: Vec<FastlyService>) -> Self
Examples found in repository?
examples/v2_fastly-integration_CreateFastlyAccount.rs (line 16)
10async fn main() {
11 let body = FastlyAccountCreateRequest::new(FastlyAccountCreateRequestData::new(
12 FastlyAccountCreateRequestAttributes::new(
13 "ExampleFastlyIntegration".to_string(),
14 "Example-Fastly-Integration".to_string(),
15 )
16 .services(vec![]),
17 FastlyAccountType::FASTLY_ACCOUNTS,
18 ));
19 let configuration = datadog::Configuration::new();
20 let api = FastlyIntegrationAPI::with_config(configuration);
21 let resp = api.create_fastly_account(body).await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for FastlyAccountCreateRequestAttributes
impl Clone for FastlyAccountCreateRequestAttributes
Source§fn clone(&self) -> FastlyAccountCreateRequestAttributes
fn clone(&self) -> FastlyAccountCreateRequestAttributes
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 FastlyAccountCreateRequestAttributes
impl<'de> Deserialize<'de> for FastlyAccountCreateRequestAttributes
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 FastlyAccountCreateRequestAttributes
impl PartialEq for FastlyAccountCreateRequestAttributes
Source§fn eq(&self, other: &FastlyAccountCreateRequestAttributes) -> bool
fn eq(&self, other: &FastlyAccountCreateRequestAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for FastlyAccountCreateRequestAttributes
Auto Trait Implementations§
impl Freeze for FastlyAccountCreateRequestAttributes
impl RefUnwindSafe for FastlyAccountCreateRequestAttributes
impl Send for FastlyAccountCreateRequestAttributes
impl Sync for FastlyAccountCreateRequestAttributes
impl Unpin for FastlyAccountCreateRequestAttributes
impl UnwindSafe for FastlyAccountCreateRequestAttributes
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