Skip to content
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

Add frequency and remove request as required field from synthetics test #426

Merged
merged 1 commit into from
May 10, 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.dev6",
"regenerated": "2021-05-10 13:53:45.621068",
"spec_repo_commit": "dcadb1c"
"regenerated": "2021-05-10 15:07:07.260739",
"spec_repo_commit": "b9a2b4b"
},
"v2": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-05-10 13:54:13.229744",
"spec_repo_commit": "dcadb1c"
"regenerated": "2021-05-10 15:07:35.493870",
"spec_repo_commit": "b9a2b4b"
}
}
}
8 changes: 4 additions & 4 deletions docs/v1/SyntheticsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ with ApiClient(configuration) as api_client:
count=1,
interval=3.14,
),
tick_every=SyntheticsTickInterval(60),
tick_every=SyntheticsTickInterval(30),
),
public_id="public_id_example",
status=SyntheticsTestPauseStatus("live"),
Expand Down Expand Up @@ -490,7 +490,7 @@ with ApiClient(configuration) as api_client:
count=1,
interval=3.14,
),
tick_every=SyntheticsTickInterval(60),
tick_every=SyntheticsTickInterval(30),
),
public_id="public_id_example",
status=SyntheticsTestPauseStatus("live"),
Expand Down Expand Up @@ -1842,7 +1842,7 @@ with ApiClient(configuration) as api_client:
count=1,
interval=3.14,
),
tick_every=SyntheticsTickInterval(60),
tick_every=SyntheticsTickInterval(30),
),
public_id="public_id_example",
status=SyntheticsTestPauseStatus("live"),
Expand Down Expand Up @@ -1993,7 +1993,7 @@ with ApiClient(configuration) as api_client:
count=1,
interval=3.14,
),
tick_every=SyntheticsTickInterval(60),
tick_every=SyntheticsTickInterval(30),
),
public_id="public_id_example",
status=SyntheticsTestPauseStatus("live"),
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/SyntheticsTestConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Configuration object for a Synthetic test.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**request** | [**SyntheticsTestRequest**](SyntheticsTestRequest.md) | |
**assertions** | [**[SyntheticsAssertion]**](SyntheticsAssertion.md) | Array of assertions used for the test. | defaults to []
**config_variables** | [**[SyntheticsConfigVariable]**](SyntheticsConfigVariable.md) | API tests only - array of variables used for the test. | [optional]
**request** | [**SyntheticsTestRequest**](SyntheticsTestRequest.md) | | [optional]
**variables** | [**[SyntheticsBrowserVariable]**](SyntheticsBrowserVariable.md) | Browser tests only - array of variables used for the test steps. | [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
2 changes: 1 addition & 1 deletion docs/v1/SyntheticsTickInterval.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The frequency at which to run the Synthetic test (in seconds).
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **int** | The frequency at which to run the Synthetic test (in seconds). | must be one of [60, 300, 900, 1800, 3600, 21600, 43200, 86400, 604800, ]
**value** | **int** | The frequency at which to run the Synthetic test (in seconds). | must be one of [30, 60, 300, 900, 1800, 3600, 21600, 43200, 86400, 604800, ]

[[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
9 changes: 4 additions & 5 deletions src/datadog_api_client/v1/model/synthetics_test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def openapi_types():
lazy_import()
return {
"assertions": ([SyntheticsAssertion],), # noqa: E501
"request": (SyntheticsTestRequest,), # noqa: E501
"config_variables": ([SyntheticsConfigVariable],), # noqa: E501
"request": (SyntheticsTestRequest,), # noqa: E501
"variables": ([SyntheticsBrowserVariable],), # noqa: E501
}

Expand All @@ -90,8 +90,8 @@ def discriminator():

attribute_map = {
"assertions": "assertions", # noqa: E501
"request": "request", # noqa: E501
"config_variables": "configVariables", # noqa: E501
"request": "request", # noqa: E501
"variables": "variables", # noqa: E501
}

Expand All @@ -109,11 +109,10 @@ def discriminator():
)

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

Args:
request (SyntheticsTestRequest):

Keyword Args:
assertions ([SyntheticsAssertion]): Array of assertions used for the test.. defaults to [] # noqa: E501
Expand Down Expand Up @@ -148,6 +147,7 @@ def __init__(self, request, *args, **kwargs): # noqa: E501
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
config_variables ([SyntheticsConfigVariable]): API tests only - array of variables used for the test.. [optional] # noqa: E501
request (SyntheticsTestRequest): [optional] # noqa: E501
variables ([SyntheticsBrowserVariable]): Browser tests only - array of variables used for the test steps.. [optional] # noqa: E501
"""

Expand Down Expand Up @@ -177,7 +177,6 @@ def __init__(self, request, *args, **kwargs): # noqa: E501
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)

self.assertions = assertions
self.request = request
for var_name, var_value in kwargs.items():
if (
var_name not in self.attribute_map
Expand Down
5 changes: 3 additions & 2 deletions src/datadog_api_client/v1/model/synthetics_tick_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class SyntheticsTickInterval(ModelSimple):

allowed_values = {
("value",): {
"THIRTY_SECONDS": 30,
"MINUTE": 60,
"FIVE_MINUTES": 300,
"FIFTEEN_MINUTES": 900,
Expand Down Expand Up @@ -102,10 +103,10 @@ def __init__(self, *args, **kwargs):
Note that value can be passed either in args or in kwargs, but not in both.

Args:
args[0] (int): The frequency at which to run the Synthetic test (in seconds).., must be one of [60, 300, 900, 1800, 3600, 21600, 43200, 86400, 604800, ] # noqa: E501
args[0] (int): The frequency at which to run the Synthetic test (in seconds).., must be one of [30, 60, 300, 900, 1800, 3600, 21600, 43200, 86400, 604800, ] # noqa: E501

Keyword Args:
value (int): The frequency at which to run the Synthetic test (in seconds).., must be one of [60, 300, 900, 1800, 3600, 21600, 43200, 86400, 604800, ] # noqa: E501
value (int): The frequency at which to run the Synthetic test (in seconds).., must be one of [30, 60, 300, 900, 1800, 3600, 21600, 43200, 86400, 604800, ] # noqa: E501
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Expand Down
3 changes: 2 additions & 1 deletion src/datadog_api_client/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8498,7 +8498,6 @@ components:
$ref: '#/components/schemas/SyntheticsBrowserVariable'
type: array
required:
- request
- assertions
type: object
SyntheticsTestDetails:
Expand Down Expand Up @@ -8776,6 +8775,7 @@ components:
SyntheticsTickInterval:
description: The frequency at which to run the Synthetic test (in seconds).
enum:
- 30
- 60
- 300
- 900
Expand All @@ -8788,6 +8788,7 @@ components:
format: int64
type: integer
x-enum-varnames:
- THIRTY_SECONDS
- MINUTE
- FIVE_MINUTES
- FIFTEEN_MINUTES
Expand Down
Loading