#[non_exhaustive]pub struct FastlyServiceData {
pub attributes: Option<FastlyServiceAttributes>,
pub id: String,
pub type_: FastlyServiceType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Data object for Fastly service requests.
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<FastlyServiceAttributes>
Attributes object for Fastly service requests.
id: String
The ID of the Fastly service.
type_: FastlyServiceType
The JSON:API type for this API. Should always be fastly-services
.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl FastlyServiceData
impl FastlyServiceData
Sourcepub fn new(id: String, type_: FastlyServiceType) -> FastlyServiceData
pub fn new(id: String, type_: FastlyServiceType) -> FastlyServiceData
Examples found in repository?
examples/v2_fastly-integration_CreateFastlyService.rs (line 12)
10async fn main() {
11 let body = FastlyServiceRequest::new(
12 FastlyServiceData::new("abc123".to_string(), FastlyServiceType::FASTLY_SERVICES)
13 .attributes(
14 FastlyServiceAttributes::new()
15 .tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]),
16 ),
17 );
18 let configuration = datadog::Configuration::new();
19 let api = FastlyIntegrationAPI::with_config(configuration);
20 let resp = api
21 .create_fastly_service("account_id".to_string(), body)
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
More examples
examples/v2_fastly-integration_UpdateFastlyService.rs (line 12)
10async fn main() {
11 let body = FastlyServiceRequest::new(
12 FastlyServiceData::new("abc123".to_string(), FastlyServiceType::FASTLY_SERVICES)
13 .attributes(
14 FastlyServiceAttributes::new()
15 .tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]),
16 ),
17 );
18 let configuration = datadog::Configuration::new();
19 let api = FastlyIntegrationAPI::with_config(configuration);
20 let resp = api
21 .update_fastly_service("account_id".to_string(), "service_id".to_string(), body)
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
Sourcepub fn attributes(self, value: FastlyServiceAttributes) -> Self
pub fn attributes(self, value: FastlyServiceAttributes) -> Self
Examples found in repository?
examples/v2_fastly-integration_CreateFastlyService.rs (lines 13-16)
10async fn main() {
11 let body = FastlyServiceRequest::new(
12 FastlyServiceData::new("abc123".to_string(), FastlyServiceType::FASTLY_SERVICES)
13 .attributes(
14 FastlyServiceAttributes::new()
15 .tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]),
16 ),
17 );
18 let configuration = datadog::Configuration::new();
19 let api = FastlyIntegrationAPI::with_config(configuration);
20 let resp = api
21 .create_fastly_service("account_id".to_string(), body)
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
More examples
examples/v2_fastly-integration_UpdateFastlyService.rs (lines 13-16)
10async fn main() {
11 let body = FastlyServiceRequest::new(
12 FastlyServiceData::new("abc123".to_string(), FastlyServiceType::FASTLY_SERVICES)
13 .attributes(
14 FastlyServiceAttributes::new()
15 .tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]),
16 ),
17 );
18 let configuration = datadog::Configuration::new();
19 let api = FastlyIntegrationAPI::with_config(configuration);
20 let resp = api
21 .update_fastly_service("account_id".to_string(), "service_id".to_string(), body)
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for FastlyServiceData
impl Clone for FastlyServiceData
Source§fn clone(&self) -> FastlyServiceData
fn clone(&self) -> FastlyServiceData
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 Debug for FastlyServiceData
impl Debug for FastlyServiceData
Source§impl<'de> Deserialize<'de> for FastlyServiceData
impl<'de> Deserialize<'de> for FastlyServiceData
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 FastlyServiceData
impl PartialEq for FastlyServiceData
Source§impl Serialize for FastlyServiceData
impl Serialize for FastlyServiceData
impl StructuralPartialEq for FastlyServiceData
Auto Trait Implementations§
impl Freeze for FastlyServiceData
impl RefUnwindSafe for FastlyServiceData
impl Send for FastlyServiceData
impl Sync for FastlyServiceData
impl Unpin for FastlyServiceData
impl UnwindSafe for FastlyServiceData
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