Skip to content

Fix paging parameter names for logs aggregate queries #248

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 10 commits into from
Jan 28, 2021
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.4.1.dev2",
"regenerated": "2021-01-26 17:14:37.006309",
"spec_repo_commit": "db8c9ba"
"regenerated": "2021-01-28 16:02:52.771548",
"spec_repo_commit": "c2cedbf"
},
"v2": {
"apigentools_version": "1.4.1.dev2",
"regenerated": "2021-01-26 17:14:48.762263",
"spec_repo_commit": "db8c9ba"
"regenerated": "2021-01-28 16:03:03.187204",
"spec_repo_commit": "c2cedbf"
}
}
}
6 changes: 3 additions & 3 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ datadog_api_client/v2/model/logs_aggregate_bucket_value.py
datadog_api_client/v2/model/logs_aggregate_bucket_value_timeseries.py
datadog_api_client/v2/model/logs_aggregate_bucket_value_timeseries_point.py
datadog_api_client/v2/model/logs_aggregate_request.py
datadog_api_client/v2/model/logs_aggregate_request_paging.py
datadog_api_client/v2/model/logs_aggregate_request_page.py
datadog_api_client/v2/model/logs_aggregate_response.py
datadog_api_client/v2/model/logs_aggregate_response_data.py
datadog_api_client/v2/model/logs_aggregate_response_status.py
Expand Down Expand Up @@ -405,7 +405,7 @@ docs/LogsAggregateBucketValue.md
docs/LogsAggregateBucketValueTimeseries.md
docs/LogsAggregateBucketValueTimeseriesPoint.md
docs/LogsAggregateRequest.md
docs/LogsAggregateRequestPaging.md
docs/LogsAggregateRequestPage.md
docs/LogsAggregateResponse.md
docs/LogsAggregateResponseData.md
docs/LogsAggregateResponseStatus.md
Expand Down Expand Up @@ -691,7 +691,7 @@ test/test_logs_aggregate_bucket_value.py
test/test_logs_aggregate_bucket_value_timeseries.py
test/test_logs_aggregate_bucket_value_timeseries_point.py
test/test_logs_aggregate_request.py
test/test_logs_aggregate_request_paging.py
test/test_logs_aggregate_request_page.py
test/test_logs_aggregate_response.py
test/test_logs_aggregate_response_data.py
test/test_logs_aggregate_response_status.py
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/LogsAggregateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Name | Type | Description | Notes
**filter** | [**LogsQueryFilter**](LogsQueryFilter.md) | | [optional]
**group_by** | [**[LogsGroupBy]**](LogsGroupBy.md) | The rules for the group by | [optional]
**options** | [**LogsQueryOptions**](LogsQueryOptions.md) | | [optional]
**paging** | [**LogsAggregateRequestPaging**](LogsAggregateRequestPaging.md) | | [optional]
**page** | [**LogsAggregateRequestPage**](LogsAggregateRequestPage.md) | | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# LogsAggregateRequestPaging
# LogsAggregateRequestPage

Paging settings
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**after** | **str** | The returned paging point to use to get the next results | [optional]
**cursor** | **str** | The returned paging point to use to get the next results | [optional]

[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/v2/LogsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ with ApiClient(configuration) as api_client:
time_offset=1,
timezone="GMT",
),
paging=LogsAggregateRequestPaging(
after="eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
page=LogsAggregateRequestPage(
cursor="eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
),
) # LogsAggregateRequest |

Expand Down
2 changes: 1 addition & 1 deletion docs/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Class | Method | HTTP request | Description
- [LogsAggregateBucketValueTimeseries](LogsAggregateBucketValueTimeseries.md)
- [LogsAggregateBucketValueTimeseriesPoint](LogsAggregateBucketValueTimeseriesPoint.md)
- [LogsAggregateRequest](LogsAggregateRequest.md)
- [LogsAggregateRequestPaging](LogsAggregateRequestPaging.md)
- [LogsAggregateRequestPage](LogsAggregateRequestPage.md)
- [LogsAggregateResponse](LogsAggregateResponse.md)
- [LogsAggregateResponseData](LogsAggregateResponseData.md)
- [LogsAggregateResponseStatus](LogsAggregateResponseStatus.md)
Expand Down
10 changes: 5 additions & 5 deletions src/datadog_api_client/v2/model/logs_aggregate_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
)

def lazy_import():
from datadog_api_client.v2.model.logs_aggregate_request_paging import LogsAggregateRequestPaging
from datadog_api_client.v2.model.logs_aggregate_request_page import LogsAggregateRequestPage
from datadog_api_client.v2.model.logs_compute import LogsCompute
from datadog_api_client.v2.model.logs_group_by import LogsGroupBy
from datadog_api_client.v2.model.logs_query_filter import LogsQueryFilter
from datadog_api_client.v2.model.logs_query_options import LogsQueryOptions
globals()['LogsAggregateRequestPaging'] = LogsAggregateRequestPaging
globals()['LogsAggregateRequestPage'] = LogsAggregateRequestPage
globals()['LogsCompute'] = LogsCompute
globals()['LogsGroupBy'] = LogsGroupBy
globals()['LogsQueryFilter'] = LogsQueryFilter
Expand Down Expand Up @@ -86,7 +86,7 @@ def openapi_types():
'filter': (LogsQueryFilter,), # noqa: E501
'group_by': ([LogsGroupBy],), # noqa: E501
'options': (LogsQueryOptions,), # noqa: E501
'paging': (LogsAggregateRequestPaging,), # noqa: E501
'page': (LogsAggregateRequestPage,), # noqa: E501
}

@cached_property
Expand All @@ -99,7 +99,7 @@ def discriminator():
'filter': 'filter', # noqa: E501
'group_by': 'group_by', # noqa: E501
'options': 'options', # noqa: E501
'paging': 'paging', # noqa: E501
'page': 'page', # noqa: E501
}

_composed_schemas = {}
Expand Down Expand Up @@ -152,7 +152,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
filter (LogsQueryFilter): [optional] # noqa: E501
group_by ([LogsGroupBy]): The rules for the group by. [optional] # noqa: E501
options (LogsQueryOptions): [optional] # noqa: E501
paging (LogsAggregateRequestPaging): [optional] # noqa: E501
page (LogsAggregateRequestPage): [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
)


class LogsAggregateRequestPaging(ModelNormal):
class LogsAggregateRequestPage(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech

Expand Down Expand Up @@ -69,7 +69,7 @@ def openapi_types():
and the value is attribute type.
"""
return {
'after': (str,), # noqa: E501
'cursor': (str,), # noqa: E501
}

@cached_property
Expand All @@ -78,7 +78,7 @@ def discriminator():


attribute_map = {
'after': 'after', # noqa: E501
'cursor': 'cursor', # noqa: E501
}

_composed_schemas = {}
Expand All @@ -94,7 +94,7 @@ def discriminator():

@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""LogsAggregateRequestPaging - a model defined in OpenAPI
"""LogsAggregateRequestPage - a model defined in OpenAPI

Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
Expand Down Expand Up @@ -127,7 +127,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
after (str): The returned paging point to use to get the next results. [optional] # noqa: E501
cursor (str): The returned paging point to use to get the next results. [optional] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down
2 changes: 1 addition & 1 deletion src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
from datadog_api_client.v2.model.logs_aggregate_bucket_value_timeseries import LogsAggregateBucketValueTimeseries
from datadog_api_client.v2.model.logs_aggregate_bucket_value_timeseries_point import LogsAggregateBucketValueTimeseriesPoint
from datadog_api_client.v2.model.logs_aggregate_request import LogsAggregateRequest
from datadog_api_client.v2.model.logs_aggregate_request_paging import LogsAggregateRequestPaging
from datadog_api_client.v2.model.logs_aggregate_request_page import LogsAggregateRequestPage
from datadog_api_client.v2.model.logs_aggregate_response import LogsAggregateResponse
from datadog_api_client.v2.model.logs_aggregate_response_data import LogsAggregateResponseData
from datadog_api_client.v2.model.logs_aggregate_response_status import LogsAggregateResponseStatus
Expand Down
4 changes: 2 additions & 2 deletions src/datadog_api_client/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1917,10 +1917,10 @@ components:
type: array
options:
$ref: '#/components/schemas/LogsQueryOptions'
paging:
page:
description: Paging settings
properties:
after:
cursor:
description: The returned paging point to use to get the next results
example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==
type: string
Expand Down
6 changes: 3 additions & 3 deletions tests/v2/test_logs_aggregate_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

import datadog_api_client.v2
try:
from datadog_api_client.v2.model import logs_aggregate_request_paging
from datadog_api_client.v2.model import logs_aggregate_request_page
except ImportError:
logs_aggregate_request_paging = sys.modules[
'datadog_api_client.v2.model.logs_aggregate_request_paging']
logs_aggregate_request_page = sys.modules[
'datadog_api_client.v2.model.logs_aggregate_request_page']
try:
from datadog_api_client.v2.model import logs_compute
except ImportError:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
# coding: utf-8

# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.


from __future__ import absolute_import
import sys
import unittest

import datadog_api_client.v2
from datadog_api_client.v2.model.logs_aggregate_request_paging import LogsAggregateRequestPaging
from datadog_api_client.v2.model.logs_aggregate_request_page import LogsAggregateRequestPage


class TestLogsAggregateRequestPaging(unittest.TestCase):
"""LogsAggregateRequestPaging unit test stubs"""
class TestLogsAggregateRequestPage(unittest.TestCase):
"""LogsAggregateRequestPage unit test stubs"""

def setUp(self):
pass

def tearDown(self):
pass

def testLogsAggregateRequestPaging(self):
"""Test LogsAggregateRequestPaging"""
def testLogsAggregateRequestPage(self):
"""Test LogsAggregateRequestPage"""
# FIXME: construct object with mandatory attributes with example values
# model = LogsAggregateRequestPaging() # noqa: E501
# model = LogsAggregateRequestPage() # noqa: E501
pass


Expand Down