#[non_exhaustive]pub struct SearchSLOOptionalParams {
pub query: Option<String>,
pub page_size: Option<i64>,
pub page_number: Option<i64>,
pub include_facets: Option<bool>,
}
Expand description
SearchSLOOptionalParams is a struct for passing parameters to the method ServiceLevelObjectivesAPI::search_slo
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.query: Option<String>
The query string to filter results based on SLO names.
Some examples of queries include service:<service-name>
and <slo-name>
.
page_size: Option<i64>
The number of files to return in the response [default=10]
.
page_number: Option<i64>
The identifier of the first page to return. This parameter is used for the pagination feature [default=0]
.
include_facets: Option<bool>
Whether or not to return facet information in the response [default=false]
.
Implementations§
Source§impl SearchSLOOptionalParams
impl SearchSLOOptionalParams
Sourcepub fn query(self, value: String) -> Self
pub fn query(self, value: String) -> Self
The query string to filter results based on SLO names.
Some examples of queries include service:<service-name>
and <slo-name>
.
Examples found in repository?
7async fn main() {
8 // there is a valid "slo" in the system
9 let slo_data_0_name = std::env::var("SLO_DATA_0_NAME").unwrap();
10 let configuration = datadog::Configuration::new();
11 let api = ServiceLevelObjectivesAPI::with_config(configuration);
12 let resp = api
13 .search_slo(
14 SearchSLOOptionalParams::default()
15 .query(slo_data_0_name.clone())
16 .page_size(20)
17 .page_number(0),
18 )
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
Sourcepub fn page_size(self, value: i64) -> Self
pub fn page_size(self, value: i64) -> Self
The number of files to return in the response [default=10]
.
Examples found in repository?
7async fn main() {
8 // there is a valid "slo" in the system
9 let slo_data_0_name = std::env::var("SLO_DATA_0_NAME").unwrap();
10 let configuration = datadog::Configuration::new();
11 let api = ServiceLevelObjectivesAPI::with_config(configuration);
12 let resp = api
13 .search_slo(
14 SearchSLOOptionalParams::default()
15 .query(slo_data_0_name.clone())
16 .page_size(20)
17 .page_number(0),
18 )
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
Sourcepub fn page_number(self, value: i64) -> Self
pub fn page_number(self, value: i64) -> Self
The identifier of the first page to return. This parameter is used for the pagination feature [default=0]
.
Examples found in repository?
7async fn main() {
8 // there is a valid "slo" in the system
9 let slo_data_0_name = std::env::var("SLO_DATA_0_NAME").unwrap();
10 let configuration = datadog::Configuration::new();
11 let api = ServiceLevelObjectivesAPI::with_config(configuration);
12 let resp = api
13 .search_slo(
14 SearchSLOOptionalParams::default()
15 .query(slo_data_0_name.clone())
16 .page_size(20)
17 .page_number(0),
18 )
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
Sourcepub fn include_facets(self, value: bool) -> Self
pub fn include_facets(self, value: bool) -> Self
Whether or not to return facet information in the response [default=false]
.
Trait Implementations§
Source§impl Clone for SearchSLOOptionalParams
impl Clone for SearchSLOOptionalParams
Source§fn clone(&self) -> SearchSLOOptionalParams
fn clone(&self) -> SearchSLOOptionalParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more