#[non_exhaustive]pub struct FastlyServiceAttributes {
pub tags: Option<Vec<String>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Attributes 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.A list of tags for the Fastly service.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl FastlyServiceAttributes
impl FastlyServiceAttributes
Sourcepub fn new() -> FastlyServiceAttributes
pub fn new() -> FastlyServiceAttributes
Examples found in repository?
examples/v2_fastly-integration_CreateFastlyService.rs (line 14)
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 14)
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}
Examples found in repository?
examples/v2_fastly-integration_CreateFastlyService.rs (line 15)
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 15)
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 FastlyServiceAttributes
impl Clone for FastlyServiceAttributes
Source§fn clone(&self) -> FastlyServiceAttributes
fn clone(&self) -> FastlyServiceAttributes
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 FastlyServiceAttributes
impl Debug for FastlyServiceAttributes
Source§impl Default for FastlyServiceAttributes
impl Default for FastlyServiceAttributes
Source§impl<'de> Deserialize<'de> for FastlyServiceAttributes
impl<'de> Deserialize<'de> for FastlyServiceAttributes
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 FastlyServiceAttributes
impl PartialEq for FastlyServiceAttributes
Source§impl Serialize for FastlyServiceAttributes
impl Serialize for FastlyServiceAttributes
impl StructuralPartialEq for FastlyServiceAttributes
Auto Trait Implementations§
impl Freeze for FastlyServiceAttributes
impl RefUnwindSafe for FastlyServiceAttributes
impl Send for FastlyServiceAttributes
impl Sync for FastlyServiceAttributes
impl Unpin for FastlyServiceAttributes
impl UnwindSafe for FastlyServiceAttributes
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