Skip to content

Deprecate options from logs aggregate API public spec #576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-03-28 15:07:53.803671",
"spec_repo_commit": "3f3e8eaf"
"regenerated": "2025-03-28 19:43:06.678639",
"spec_repo_commit": "1d2132af"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-03-28 15:07:53.826503",
"spec_repo_commit": "3f3e8eaf"
"regenerated": "2025-03-28 19:43:06.697535",
"spec_repo_commit": "1d2132af"
}
}
}
4 changes: 2 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19109,10 +19109,10 @@ components:
type: string
type: object
LogsQueryOptions:
deprecated: true
description: 'Global query options that are used during the query.

Note: you should supply either timezone or time offset, but not both. Otherwise,
the query will fail.'
Note: These fields are currently deprecated and do not affect the query results.'
properties:
timeOffset:
description: The time offset (in seconds) to apply to the query.
Expand Down
10 changes: 9 additions & 1 deletion src/datadogV2/model/model_logs_aggregate_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ pub struct LogsAggregateRequest {
#[serde(rename = "group_by")]
pub group_by: Option<Vec<crate::datadogV2::model::LogsGroupBy>>,
/// Global query options that are used during the query.
/// Note: you should supply either timezone or time offset, but not both. Otherwise, the query will fail.
/// Note: These fields are currently deprecated and do not affect the query results.
#[deprecated]
#[serde(rename = "options")]
pub options: Option<crate::datadogV2::model::LogsQueryOptions>,
/// Paging settings
Expand All @@ -36,6 +37,7 @@ pub struct LogsAggregateRequest {

impl LogsAggregateRequest {
pub fn new() -> LogsAggregateRequest {
#[allow(deprecated)]
LogsAggregateRequest {
compute: None,
filter: None,
Expand All @@ -47,26 +49,31 @@ impl LogsAggregateRequest {
}
}

#[allow(deprecated)]
pub fn compute(mut self, value: Vec<crate::datadogV2::model::LogsCompute>) -> Self {
self.compute = Some(value);
self
}

#[allow(deprecated)]
pub fn filter(mut self, value: crate::datadogV2::model::LogsQueryFilter) -> Self {
self.filter = Some(value);
self
}

#[allow(deprecated)]
pub fn group_by(mut self, value: Vec<crate::datadogV2::model::LogsGroupBy>) -> Self {
self.group_by = Some(value);
self
}

#[allow(deprecated)]
pub fn options(mut self, value: crate::datadogV2::model::LogsQueryOptions) -> Self {
self.options = Some(value);
self
}

#[allow(deprecated)]
pub fn page(mut self, value: crate::datadogV2::model::LogsAggregateRequestPage) -> Self {
self.page = Some(value);
self
Expand Down Expand Up @@ -155,6 +162,7 @@ impl<'de> Deserialize<'de> for LogsAggregateRequest {
}
}

#[allow(deprecated)]
let content = LogsAggregateRequest {
compute,
filter,
Expand Down
9 changes: 8 additions & 1 deletion src/datadogV2/model/model_logs_list_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ pub struct LogsListRequest {
#[serde(rename = "filter")]
pub filter: Option<crate::datadogV2::model::LogsQueryFilter>,
/// Global query options that are used during the query.
/// Note: you should supply either timezone or time offset, but not both. Otherwise, the query will fail.
/// Note: These fields are currently deprecated and do not affect the query results.
#[deprecated]
#[serde(rename = "options")]
pub options: Option<crate::datadogV2::model::LogsQueryOptions>,
/// Paging attributes for listing logs.
Expand All @@ -33,6 +34,7 @@ pub struct LogsListRequest {

impl LogsListRequest {
pub fn new() -> LogsListRequest {
#[allow(deprecated)]
LogsListRequest {
filter: None,
options: None,
Expand All @@ -43,21 +45,25 @@ impl LogsListRequest {
}
}

#[allow(deprecated)]
pub fn filter(mut self, value: crate::datadogV2::model::LogsQueryFilter) -> Self {
self.filter = Some(value);
self
}

#[allow(deprecated)]
pub fn options(mut self, value: crate::datadogV2::model::LogsQueryOptions) -> Self {
self.options = Some(value);
self
}

#[allow(deprecated)]
pub fn page(mut self, value: crate::datadogV2::model::LogsListRequestPage) -> Self {
self.page = Some(value);
self
}

#[allow(deprecated)]
pub fn sort(mut self, value: crate::datadogV2::model::LogsSort) -> Self {
self.sort = Some(value);
self
Expand Down Expand Up @@ -147,6 +153,7 @@ impl<'de> Deserialize<'de> for LogsListRequest {
}
}

#[allow(deprecated)]
let content = LogsListRequest {
filter,
options,
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV2/model/model_logs_query_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none;
use std::fmt::{self, Formatter};

/// Global query options that are used during the query.
/// Note: you should supply either timezone or time offset, but not both. Otherwise, the query will fail.
/// Note: These fields are currently deprecated and do not affect the query results.
#[non_exhaustive]
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
Expand Down
Loading