#[non_exhaustive]pub struct ListTeamsOptionalParams {
pub page_number: Option<i64>,
pub page_size: Option<i64>,
pub sort: Option<ListTeamsSort>,
pub include: Option<Vec<ListTeamsInclude>>,
pub filter_keyword: Option<String>,
pub filter_me: Option<bool>,
pub fields_team: Option<Vec<TeamsField>>,
}
Expand description
ListTeamsOptionalParams is a struct for passing parameters to the method TeamsAPI::list_teams
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.page_number: Option<i64>
Specific page number to return.
page_size: Option<i64>
Size for a given page. The maximum allowed value is 100.
sort: Option<ListTeamsSort>
Specifies the order of the returned teams
include: Option<Vec<ListTeamsInclude>>
Included related resources optionally requested. Allowed enum values: team_links, user_team_permissions
filter_keyword: Option<String>
Search query. Can be team name, team handle, or email of team member
filter_me: Option<bool>
When true, only returns teams the current user belongs to
fields_team: Option<Vec<TeamsField>>
List of fields that need to be fetched.
Implementations§
Source§impl ListTeamsOptionalParams
impl ListTeamsOptionalParams
Sourcepub fn page_number(self, value: i64) -> Self
pub fn page_number(self, value: i64) -> Self
Specific page number to return.
Sourcepub fn page_size(self, value: i64) -> Self
pub fn page_size(self, value: i64) -> Self
Size for a given page. The maximum allowed value is 100.
Examples found in repository?
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = TeamsAPI::with_config(configuration);
12 let response = api.list_teams_with_pagination(ListTeamsOptionalParams::default().page_size(2));
13 pin_mut!(response);
14 while let Some(resp) = response.next().await {
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20 }
21}
Sourcepub fn sort(self, value: ListTeamsSort) -> Self
pub fn sort(self, value: ListTeamsSort) -> Self
Specifies the order of the returned teams
Sourcepub fn include(self, value: Vec<ListTeamsInclude>) -> Self
pub fn include(self, value: Vec<ListTeamsInclude>) -> Self
Included related resources optionally requested. Allowed enum values: team_links, user_team_permissions
Sourcepub fn filter_keyword(self, value: String) -> Self
pub fn filter_keyword(self, value: String) -> Self
Search query. Can be team name, team handle, or email of team member
Sourcepub fn filter_me(self, value: bool) -> Self
pub fn filter_me(self, value: bool) -> Self
When true, only returns teams the current user belongs to
Sourcepub fn fields_team(self, value: Vec<TeamsField>) -> Self
pub fn fields_team(self, value: Vec<TeamsField>) -> Self
List of fields that need to be fetched.
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = TeamsAPI::with_config(configuration);
11 let resp = api
12 .list_teams(ListTeamsOptionalParams::default().fields_team(vec![
13 TeamsField::ID,
14 TeamsField::NAME,
15 TeamsField::HANDLE,
16 ]))
17 .await;
18 if let Ok(value) = resp {
19 println!("{:#?}", value);
20 } else {
21 println!("{:#?}", resp.unwrap_err());
22 }
23}
Trait Implementations§
Source§impl Clone for ListTeamsOptionalParams
impl Clone for ListTeamsOptionalParams
Source§fn clone(&self) -> ListTeamsOptionalParams
fn clone(&self) -> ListTeamsOptionalParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more