#[non_exhaustive]pub struct EntityV3Service {
pub api_version: EntityV3APIVersion,
pub datadog: Option<EntityV3ServiceDatadog>,
pub extensions: Option<BTreeMap<String, Value>>,
pub integrations: Option<EntityV3Integrations>,
pub kind: EntityV3ServiceKind,
pub metadata: EntityV3Metadata,
pub spec: Option<EntityV3ServiceSpec>,
/* private fields */
}
Expand description
Schema for service entities.
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_version: EntityV3APIVersion
The schema version of entity type. The field is known as schema-version in the previous version.
datadog: Option<EntityV3ServiceDatadog>
Datadog product integrations for the service entity.
extensions: Option<BTreeMap<String, Value>>
Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field.
integrations: Option<EntityV3Integrations>
A base schema for defining third-party integrations.
kind: EntityV3ServiceKind
The definition of Entity V3 Service Kind object.
metadata: EntityV3Metadata
The definition of Entity V3 Metadata object.
spec: Option<EntityV3ServiceSpec>
The definition of Entity V3 Service Spec object.
Implementations§
Source§impl EntityV3Service
impl EntityV3Service
Sourcepub fn new(
api_version: EntityV3APIVersion,
kind: EntityV3ServiceKind,
metadata: EntityV3Metadata,
) -> EntityV3Service
pub fn new( api_version: EntityV3APIVersion, kind: EntityV3ServiceKind, metadata: EntityV3Metadata, ) -> EntityV3Service
Examples found in repository?
examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs (lines 27-44)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("service-examplesoftwarecatalog".to_string())
31 .additional_owners(vec![])
32 .contacts(vec![EntityV3MetadataContactsItems::new(
33 "https://slack/".to_string(),
34 "slack".to_string(),
35 )])
36 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
37 .inherit_from("application:default/myapp".to_string())
38 .links(vec![EntityV3MetadataLinksItems::new(
39 "mylink".to_string(),
40 "link".to_string(),
41 "https://mylink".to_string(),
42 )])
43 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
44 )
45 .datadog(
46 EntityV3ServiceDatadog::new()
47 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
48 .events(vec![EntityV3DatadogEventItem::new()])
49 .logs(vec![EntityV3DatadogLogItem::new()])
50 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
51 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
52 )
53 .integrations(
54 EntityV3Integrations::new()
55 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
56 "https://www.opsgenie.com/service/shopping-cart".to_string(),
57 ))
58 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
59 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
60 )),
61 )
62 .spec(
63 EntityV3ServiceSpec::new()
64 .depends_on(vec![])
65 .languages(vec![]),
66 ),
67 ))));
68 let configuration = datadog::Configuration::new();
69 let api = SoftwareCatalogAPI::with_config(configuration);
70 let resp = api.upsert_catalog_entity(body).await;
71 if let Ok(value) = resp {
72 println!("{:#?}", value);
73 } else {
74 println!("{:#?}", resp.unwrap_err());
75 }
76}
More examples
examples/v2_software-catalog_UpsertCatalogEntity.rs (lines 27-47)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("myService".to_string())
31 .additional_owners(vec![EntityV3MetadataAdditionalOwnersItems::new(
32 "".to_string(),
33 )])
34 .contacts(vec![EntityV3MetadataContactsItems::new(
35 "https://slack/".to_string(),
36 "slack".to_string(),
37 )])
38 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
39 .inherit_from("application:default/myapp".to_string())
40 .links(vec![EntityV3MetadataLinksItems::new(
41 "mylink".to_string(),
42 "link".to_string(),
43 "https://mylink".to_string(),
44 )])
45 .namespace("default".to_string())
46 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
47 )
48 .datadog(
49 EntityV3ServiceDatadog::new()
50 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
51 .events(vec![EntityV3DatadogEventItem::new()])
52 .logs(vec![EntityV3DatadogLogItem::new()])
53 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
54 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
55 )
56 .integrations(
57 EntityV3Integrations::new()
58 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
59 "https://www.opsgenie.com/service/shopping-cart".to_string(),
60 ))
61 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
62 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
63 )),
64 )
65 .spec(
66 EntityV3ServiceSpec::new()
67 .component_of(vec![])
68 .depends_on(vec![])
69 .languages(vec![]),
70 ),
71 ))));
72 let configuration = datadog::Configuration::new();
73 let api = SoftwareCatalogAPI::with_config(configuration);
74 let resp = api.upsert_catalog_entity(body).await;
75 if let Ok(value) = resp {
76 println!("{:#?}", value);
77 } else {
78 println!("{:#?}", resp.unwrap_err());
79 }
80}
Sourcepub fn datadog(self, value: EntityV3ServiceDatadog) -> Self
pub fn datadog(self, value: EntityV3ServiceDatadog) -> Self
Examples found in repository?
examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs (lines 45-52)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("service-examplesoftwarecatalog".to_string())
31 .additional_owners(vec![])
32 .contacts(vec![EntityV3MetadataContactsItems::new(
33 "https://slack/".to_string(),
34 "slack".to_string(),
35 )])
36 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
37 .inherit_from("application:default/myapp".to_string())
38 .links(vec![EntityV3MetadataLinksItems::new(
39 "mylink".to_string(),
40 "link".to_string(),
41 "https://mylink".to_string(),
42 )])
43 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
44 )
45 .datadog(
46 EntityV3ServiceDatadog::new()
47 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
48 .events(vec![EntityV3DatadogEventItem::new()])
49 .logs(vec![EntityV3DatadogLogItem::new()])
50 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
51 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
52 )
53 .integrations(
54 EntityV3Integrations::new()
55 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
56 "https://www.opsgenie.com/service/shopping-cart".to_string(),
57 ))
58 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
59 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
60 )),
61 )
62 .spec(
63 EntityV3ServiceSpec::new()
64 .depends_on(vec![])
65 .languages(vec![]),
66 ),
67 ))));
68 let configuration = datadog::Configuration::new();
69 let api = SoftwareCatalogAPI::with_config(configuration);
70 let resp = api.upsert_catalog_entity(body).await;
71 if let Ok(value) = resp {
72 println!("{:#?}", value);
73 } else {
74 println!("{:#?}", resp.unwrap_err());
75 }
76}
More examples
examples/v2_software-catalog_UpsertCatalogEntity.rs (lines 48-55)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("myService".to_string())
31 .additional_owners(vec![EntityV3MetadataAdditionalOwnersItems::new(
32 "".to_string(),
33 )])
34 .contacts(vec![EntityV3MetadataContactsItems::new(
35 "https://slack/".to_string(),
36 "slack".to_string(),
37 )])
38 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
39 .inherit_from("application:default/myapp".to_string())
40 .links(vec![EntityV3MetadataLinksItems::new(
41 "mylink".to_string(),
42 "link".to_string(),
43 "https://mylink".to_string(),
44 )])
45 .namespace("default".to_string())
46 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
47 )
48 .datadog(
49 EntityV3ServiceDatadog::new()
50 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
51 .events(vec![EntityV3DatadogEventItem::new()])
52 .logs(vec![EntityV3DatadogLogItem::new()])
53 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
54 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
55 )
56 .integrations(
57 EntityV3Integrations::new()
58 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
59 "https://www.opsgenie.com/service/shopping-cart".to_string(),
60 ))
61 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
62 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
63 )),
64 )
65 .spec(
66 EntityV3ServiceSpec::new()
67 .component_of(vec![])
68 .depends_on(vec![])
69 .languages(vec![]),
70 ),
71 ))));
72 let configuration = datadog::Configuration::new();
73 let api = SoftwareCatalogAPI::with_config(configuration);
74 let resp = api.upsert_catalog_entity(body).await;
75 if let Ok(value) = resp {
76 println!("{:#?}", value);
77 } else {
78 println!("{:#?}", resp.unwrap_err());
79 }
80}
pub fn extensions(self, value: BTreeMap<String, Value>) -> Self
Sourcepub fn integrations(self, value: EntityV3Integrations) -> Self
pub fn integrations(self, value: EntityV3Integrations) -> Self
Examples found in repository?
examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs (lines 53-61)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("service-examplesoftwarecatalog".to_string())
31 .additional_owners(vec![])
32 .contacts(vec![EntityV3MetadataContactsItems::new(
33 "https://slack/".to_string(),
34 "slack".to_string(),
35 )])
36 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
37 .inherit_from("application:default/myapp".to_string())
38 .links(vec![EntityV3MetadataLinksItems::new(
39 "mylink".to_string(),
40 "link".to_string(),
41 "https://mylink".to_string(),
42 )])
43 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
44 )
45 .datadog(
46 EntityV3ServiceDatadog::new()
47 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
48 .events(vec![EntityV3DatadogEventItem::new()])
49 .logs(vec![EntityV3DatadogLogItem::new()])
50 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
51 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
52 )
53 .integrations(
54 EntityV3Integrations::new()
55 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
56 "https://www.opsgenie.com/service/shopping-cart".to_string(),
57 ))
58 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
59 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
60 )),
61 )
62 .spec(
63 EntityV3ServiceSpec::new()
64 .depends_on(vec![])
65 .languages(vec![]),
66 ),
67 ))));
68 let configuration = datadog::Configuration::new();
69 let api = SoftwareCatalogAPI::with_config(configuration);
70 let resp = api.upsert_catalog_entity(body).await;
71 if let Ok(value) = resp {
72 println!("{:#?}", value);
73 } else {
74 println!("{:#?}", resp.unwrap_err());
75 }
76}
More examples
examples/v2_software-catalog_UpsertCatalogEntity.rs (lines 56-64)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("myService".to_string())
31 .additional_owners(vec![EntityV3MetadataAdditionalOwnersItems::new(
32 "".to_string(),
33 )])
34 .contacts(vec![EntityV3MetadataContactsItems::new(
35 "https://slack/".to_string(),
36 "slack".to_string(),
37 )])
38 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
39 .inherit_from("application:default/myapp".to_string())
40 .links(vec![EntityV3MetadataLinksItems::new(
41 "mylink".to_string(),
42 "link".to_string(),
43 "https://mylink".to_string(),
44 )])
45 .namespace("default".to_string())
46 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
47 )
48 .datadog(
49 EntityV3ServiceDatadog::new()
50 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
51 .events(vec![EntityV3DatadogEventItem::new()])
52 .logs(vec![EntityV3DatadogLogItem::new()])
53 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
54 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
55 )
56 .integrations(
57 EntityV3Integrations::new()
58 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
59 "https://www.opsgenie.com/service/shopping-cart".to_string(),
60 ))
61 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
62 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
63 )),
64 )
65 .spec(
66 EntityV3ServiceSpec::new()
67 .component_of(vec![])
68 .depends_on(vec![])
69 .languages(vec![]),
70 ),
71 ))));
72 let configuration = datadog::Configuration::new();
73 let api = SoftwareCatalogAPI::with_config(configuration);
74 let resp = api.upsert_catalog_entity(body).await;
75 if let Ok(value) = resp {
76 println!("{:#?}", value);
77 } else {
78 println!("{:#?}", resp.unwrap_err());
79 }
80}
Sourcepub fn spec(self, value: EntityV3ServiceSpec) -> Self
pub fn spec(self, value: EntityV3ServiceSpec) -> Self
Examples found in repository?
examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs (lines 62-66)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("service-examplesoftwarecatalog".to_string())
31 .additional_owners(vec![])
32 .contacts(vec![EntityV3MetadataContactsItems::new(
33 "https://slack/".to_string(),
34 "slack".to_string(),
35 )])
36 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
37 .inherit_from("application:default/myapp".to_string())
38 .links(vec![EntityV3MetadataLinksItems::new(
39 "mylink".to_string(),
40 "link".to_string(),
41 "https://mylink".to_string(),
42 )])
43 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
44 )
45 .datadog(
46 EntityV3ServiceDatadog::new()
47 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
48 .events(vec![EntityV3DatadogEventItem::new()])
49 .logs(vec![EntityV3DatadogLogItem::new()])
50 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
51 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
52 )
53 .integrations(
54 EntityV3Integrations::new()
55 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
56 "https://www.opsgenie.com/service/shopping-cart".to_string(),
57 ))
58 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
59 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
60 )),
61 )
62 .spec(
63 EntityV3ServiceSpec::new()
64 .depends_on(vec![])
65 .languages(vec![]),
66 ),
67 ))));
68 let configuration = datadog::Configuration::new();
69 let api = SoftwareCatalogAPI::with_config(configuration);
70 let resp = api.upsert_catalog_entity(body).await;
71 if let Ok(value) = resp {
72 println!("{:#?}", value);
73 } else {
74 println!("{:#?}", resp.unwrap_err());
75 }
76}
More examples
examples/v2_software-catalog_UpsertCatalogEntity.rs (lines 65-70)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("myService".to_string())
31 .additional_owners(vec![EntityV3MetadataAdditionalOwnersItems::new(
32 "".to_string(),
33 )])
34 .contacts(vec![EntityV3MetadataContactsItems::new(
35 "https://slack/".to_string(),
36 "slack".to_string(),
37 )])
38 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
39 .inherit_from("application:default/myapp".to_string())
40 .links(vec![EntityV3MetadataLinksItems::new(
41 "mylink".to_string(),
42 "link".to_string(),
43 "https://mylink".to_string(),
44 )])
45 .namespace("default".to_string())
46 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
47 )
48 .datadog(
49 EntityV3ServiceDatadog::new()
50 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
51 .events(vec![EntityV3DatadogEventItem::new()])
52 .logs(vec![EntityV3DatadogLogItem::new()])
53 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
54 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
55 )
56 .integrations(
57 EntityV3Integrations::new()
58 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
59 "https://www.opsgenie.com/service/shopping-cart".to_string(),
60 ))
61 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
62 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
63 )),
64 )
65 .spec(
66 EntityV3ServiceSpec::new()
67 .component_of(vec![])
68 .depends_on(vec![])
69 .languages(vec![]),
70 ),
71 ))));
72 let configuration = datadog::Configuration::new();
73 let api = SoftwareCatalogAPI::with_config(configuration);
74 let resp = api.upsert_catalog_entity(body).await;
75 if let Ok(value) = resp {
76 println!("{:#?}", value);
77 } else {
78 println!("{:#?}", resp.unwrap_err());
79 }
80}
Trait Implementations§
Source§impl Clone for EntityV3Service
impl Clone for EntityV3Service
Source§fn clone(&self) -> EntityV3Service
fn clone(&self) -> EntityV3Service
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 EntityV3Service
impl Debug for EntityV3Service
Source§impl<'de> Deserialize<'de> for EntityV3Service
impl<'de> Deserialize<'de> for EntityV3Service
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 EntityV3Service
impl PartialEq for EntityV3Service
Source§impl Serialize for EntityV3Service
impl Serialize for EntityV3Service
impl StructuralPartialEq for EntityV3Service
Auto Trait Implementations§
impl Freeze for EntityV3Service
impl RefUnwindSafe for EntityV3Service
impl Send for EntityV3Service
impl Sync for EntityV3Service
impl Unpin for EntityV3Service
impl UnwindSafe for EntityV3Service
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