Skip to content

Commit

Permalink
Merge pull request #7 from waylayio/chore/regenerate
Browse files Browse the repository at this point in the history
Regenerate alarms sdk 🔁
  • Loading branch information
plankthom authored Aug 2, 2024
2 parents c1ebdc5 + a4f8ca4 commit 98fd8da
Show file tree
Hide file tree
Showing 23 changed files with 58 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.0
7.7.0
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ It consists of two sub-packages that are both plugins for the waylay-sdk-core pa
This package requires Python 3.9+.

## Installation
Typically this package is installed when installing the [waylay-sdk-core](https://pypi.org/project/waylay-sdk/) package to enable the service's functionality.
When the service api methods are required, waylay-sdk-alarms is included in:
- ```pip install waylay-sdk-core[alarms]``` to install `waylay-sdk-core` along with only this service, or
- ```pip install waylay-sdk-core[services]``` to install `waylay-sdk-core` along with all services.
When the typed models are required, both waylay-sdk-alarms and waylay-sdk-alarms-types are included in:
- ```pip install waylay-sdk-core[alarms,alarms-types]``` to install `waylay-sdk-core` along with only this service including the typed models, or
- ```pip install waylay-sdk-core[services,services-types]``` to install `waylay-sdk-core` along with all services along with the typed models.

Normally this package is installed together with support for other services using the [waylay-sdk](https://pypi.org/project/waylay-sdk/) umbrella package:
* `pip install waylay-sdk` will install `waylay-sdk-alarms` together with the SDK api packages for other services.
* `pip install waylay-sdk[types-alarms]` will additionally install the types package `waylay-sdk-alarms-types`.
* `pip install waylay-sdk[types]` will install the types packages for this and all other services.

Alternatively, you can install support for this _alarms_ service only, installing or extending an existing [waylay-sdk-core](https://pypi.org/project/waylay-sdk-core/):

- `pip install waylay-sdk-alarms` to only install api support for _alarms_.
- `pip install waylay-sdk-alarms[types]` to additionally install type support for _alarms_.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/AlarmEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name | Type | Description | Notes
**timestamp** | **datetime** | |
**source** | [**IdObject**](IdObject.md) | |
**severity** | [**AlarmSeverity**](AlarmSeverity.md) | |
**status** | [**AlarmStatus**](AlarmStatus.md) | |
**status** | [**AlarmStatus**](AlarmStatus.md) | | [default to AlarmStatus.ACTIVE]
**count** | **int** | The number of times this alarm has been sent |
**assignee** | **str** | String field to indicate an assignee for the alarm. | [optional]
**history** | [**List[AlarmAuditRecord]**](AlarmAuditRecord.md) | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/AlarmEventAlarm.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name | Type | Description | Notes
**timestamp** | **datetime** | |
**source** | [**IdObject**](IdObject.md) | |
**severity** | [**AlarmSeverity**](AlarmSeverity.md) | |
**status** | [**AlarmStatus**](AlarmStatus.md) | |
**status** | [**AlarmStatus**](AlarmStatus.md) | | [default to AlarmStatus.ACTIVE]
**count** | **int** | |

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/AlarmTimelineInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Name | Type | Description | Notes
**type** | **str** | Type of the alarm. |
**text** | **str** | Description of the alarm. |
**severity** | [**AlarmSeverity**](AlarmSeverity.md) | |
**status** | [**AlarmStatus**](AlarmStatus.md) | |
**status** | [**AlarmStatus**](AlarmStatus.md) | | [default to AlarmStatus.ACTIVE]
**assignee** | **str** | String field to indicate an assignee for the alarm. | [optional]

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/AlarmUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ At least one field must be specified.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**severity** | [**AlarmSeverity**](AlarmSeverity.md) | | [optional]
**status** | [**AlarmStatus**](AlarmStatus.md) | | [optional]
**status** | [**AlarmStatus**](AlarmStatus.md) | | [optional] [default to AlarmStatus.ACTIVE]
**assignee** | **str** | | [optional]

## Example
Expand Down
8 changes: 4 additions & 4 deletions docs/AlarmsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ try:
'lastUpdatedTo': 56
'lastTriggeredFrom': 56
'lastTriggeredTo': 56
'sort': 'timestamp'
'order': 'asc'
'sort': timestamp
'order': desc
'page': 1
'size': 50
'additionalQueryParams': {'key': waylay.services.alarms.ListAdditionalQueryParamsParameterValue()}
Expand Down Expand Up @@ -296,8 +296,8 @@ Name | Type | API binding | Description | Notes
**query['lastUpdatedTo']** (dict) <br> **query.last_updated_to** (Query) | **int** | query parameter `"lastUpdatedTo"` | Filter on alarm lastUpdateTime (equal or below). | [optional]
**query['lastTriggeredFrom']** (dict) <br> **query.last_triggered_from** (Query) | **int** | query parameter `"lastTriggeredFrom"` | Filter on alarm lastTriggeredTime (equal or above). | [optional]
**query['lastTriggeredTo']** (dict) <br> **query.last_triggered_to** (Query) | **int** | query parameter `"lastTriggeredTo"` | Filter on alarm lastTriggeredTime (equal or below). | [optional]
**query['sort']** (dict) <br> **query.sort** (Query) | [**ListSortParameter**](.md) | query parameter `"sort"` | (Pagination) field used to sort the alarms Ignored in combination with &#x60;Accept: application/vnd.waylay.alarms.timeseries+json&#x60; | [optional]
**query['order']** (dict) <br> **query.order** (Query) | [**ListOrderParameter**](.md) | query parameter `"order"` | (Pagination) sort order Ignored in combination with &#x60;Accept: application/vnd.waylay.alarms.timeseries+json&#x60; | [optional]
**query['sort']** (dict) <br> **query.sort** (Query) | [**ListSortParameter**](.md) | query parameter `"sort"` | (Pagination) field used to sort the alarms Ignored in combination with &#x60;Accept: application/vnd.waylay.alarms.timeseries+json&#x60; | [optional] [default timestamp]
**query['order']** (dict) <br> **query.order** (Query) | [**ListOrderParameter**](.md) | query parameter `"order"` | (Pagination) sort order Ignored in combination with &#x60;Accept: application/vnd.waylay.alarms.timeseries+json&#x60; | [optional] [default desc]
**query['page']** (dict) <br> **query.page** (Query) | **int** | query parameter `"page"` | (Pagination) page Number Ignored in combination with &#x60;Accept: application/vnd.waylay.alarms.timeseries+json&#x60; | [optional] [default 1]
**query['size']** (dict) <br> **query.size** (Query) | **int** | query parameter `"size"` | (Pagination) size of a page Ignored in combination with &#x60;Accept: application/vnd.waylay.alarms.timeseries+json&#x60; | [optional] [default 50]
**query['additionalQueryParams']** (dict) <br> **query.additional_query_params** (Query) | [**Dict[str, ListAdditionalQueryParamsParameterValue]**](ListAdditionalQueryParamsParameterValue.md) | query parameter `"additionalQueryParams"` | To query the alarms based on the value of an additional property of the alarm, you can add the key of the additional property as query parameter with value the value you expect the alarm to have. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/CreateAlarm.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**text** | **str** | Description of the alarm. |
**severity** | [**AlarmSeverity**](AlarmSeverity.md) | |
**source** | [**IdObject**](IdObject.md) | |
**status** | [**AlarmStatus**](AlarmStatus.md) | | [optional]
**status** | [**AlarmStatus**](AlarmStatus.md) | | [optional] [default to AlarmStatus.ACTIVE]
**timestamp** | [**SO8601TimestampOrMillis**](SO8601TimestampOrMillis.md) | | [optional]
**assignee** | **str** | String field to indicate an assignee for the alarm. | [optional]

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
include = ["pyproject.toml", "test/**/*.py"]

[tool.ruff.lint]
ignore-init-module-imports = true
# allow duplicate imports
ignore=["F811"]
# https://docs.astral.sh/ruff/rules
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pydantic ~= 2.6
typing-extensions ~= 4.9
waylay-sdk-core ~= 0.2.1
waylay-sdk-core ~= 0.2.3
2 changes: 1 addition & 1 deletion waylay-sdk-alarms-types/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.0
7.7.0
17 changes: 10 additions & 7 deletions waylay-sdk-alarms-types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ It is considered an extension of the waylay-sdk-alarms package, and it consists
This package requires Python 3.9+.

## Installation
Typically this package is installed when installing the [waylay-sdk-core](https://pypi.org/project/waylay-sdk/) package to enable the service's functionality.
When the service api methods are required, waylay-sdk-alarms is included in:
- ```pip install waylay-sdk-core[alarms]``` to install `waylay-sdk-core` along with only this service, or
- ```pip install waylay-sdk-core[services]``` to install `waylay-sdk-core` along with all services.
When the typed models are required, both waylay-sdk-alarms and waylay-sdk-alarms-types are included in:
- ```pip install waylay-sdk-core[alarms,alarms-types]``` to install `waylay-sdk-core` along with only this service including the typed models, or
- ```pip install waylay-sdk-core[services,services-types]``` to install `waylay-sdk-core` along with all services along with the typed models.

Normally this package is installed together with support for other services using the [waylay-sdk](https://pypi.org/project/waylay-sdk/) umbrella package:
* `pip install waylay-sdk` will install `waylay-sdk-alarms` together with the SDK api packages for other services.
* `pip install waylay-sdk[types-alarms]` will additionally install the types package `waylay-sdk-alarms-types`.
* `pip install waylay-sdk[types]` will install the types packages for this and all other services.

Alternatively, you can install support for this _alarms_ service only, installing or extending an existing [waylay-sdk-core](https://pypi.org/project/waylay-sdk-core/):

- `pip install waylay-sdk-alarms` to only install api support for _alarms_.
- `pip install waylay-sdk-alarms[types]` to additionally install type support for _alarms_.

## Usage

Expand Down
7 changes: 3 additions & 4 deletions waylay-sdk-alarms-types/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ build-backend = "setuptools.build_meta"

[project]
name = "waylay-sdk-alarms-types"
version = "1.11.0.20240430"
version = "1.11.0.20240802"
description = "Waylay Alarms Types "
authors = [
{ name = "Waylay", email = "[email protected]"}
]
keywords = ["Waylay Alarms" , "Types"]
requires-python = ">= 3.9"
dependencies = [
"waylay-sdk-core ~= 0.2.1",
"waylay-sdk-alarms == 1.11.0.20240430",
"waylay-sdk-core ~= 0.2.3",
"waylay-sdk-alarms == 1.11.0.20240802",
"pydantic ~= 2.6",
"typing-extensions ~= 4.10",
"eval-type-backport ~= 0.1.3; python_version < '3.10'",
Expand Down Expand Up @@ -54,7 +54,6 @@ namespaces = true
include = ["pyproject.toml", "src/**/*.py"]

[tool.ruff.lint]
ignore-init-module-imports = true
# allow duplicate imports
ignore=["F811"]
# https://docs.astral.sh/ruff/rules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Do not edit the class manually.
"""

__version__ = "1.11.0.20240430"
__version__ = "1.11.0.20240802"

# import models into model package
from .a_batch_alarms_specification import ABatchAlarmsSpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AlarmUpdate(WaylayBaseModel):
"""At least one field must be specified.."""

severity: AlarmSeverity | None = None
status: AlarmStatus | None = None
status: AlarmStatus | None = AlarmStatus.ACTIVE
assignee: Any | None = None

model_config = ConfigDict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from __future__ import annotations

from datetime import datetime
from typing import Any, Dict
from typing import Any

from pydantic import (
ConfigDict,
Expand All @@ -27,8 +27,8 @@
class CloudAlarmEvent(WaylayBaseModel):
"""CloudAlarmEvent."""

id: Dict[str, Any] | None = None
source: Dict[str, Any] | None = None
id: Any | None = None
source: Any | None = None
subject: StrictStr
type: CloudAlarmEventDataType | None = None
data: AlarmEvent | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CreateAlarm(WaylayBaseModel):
text: StrictStr = Field(description="Description of the alarm.")
severity: AlarmSeverity
source: IdObject
status: AlarmStatus | None = None
status: AlarmStatus | None = AlarmStatus.ACTIVE
timestamp: SO8601TimestampOrMillis | None = None
assignee: StrictStr | None = Field(
default=None, description="String field to indicate an assignee for the alarm."
Expand Down
2 changes: 1 addition & 1 deletion waylay-sdk-alarms/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.0
7.7.0
17 changes: 10 additions & 7 deletions waylay-sdk-alarms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ Note that the typed model classes for all path params, query params, body params
This package requires Python 3.9+.

## Installation
Typically this package is installed when installing the [waylay-sdk-core](https://pypi.org/project/waylay-sdk/) package to enable the service's functionality.
When the service api methods are required, waylay-sdk-alarms is included in:
- ```pip install waylay-sdk-core[alarms]``` to install `waylay-sdk-core` along with only this service, or
- ```pip install waylay-sdk-core[services]``` to install `waylay-sdk-core` along with all services.
When the typed models are required, both waylay-sdk-alarms and waylay-sdk-alarms-types are included in:
- ```pip install waylay-sdk-core[alarms,alarms-types]``` to install `waylay-sdk-core` along with only this service including the typed models, or
- ```pip install waylay-sdk-core[services,services-types]``` to install `waylay-sdk-core` along with all services along with the typed models.

Normally this package is installed together with support for other services using the [waylay-sdk](https://pypi.org/project/waylay-sdk/) umbrella package:
* `pip install waylay-sdk` will install `waylay-sdk-alarms` together with the SDK api packages for other services.
* `pip install waylay-sdk[types-alarms]` will additionally install the types package `waylay-sdk-alarms-types`.
* `pip install waylay-sdk[types]` will install the types packages for this and all other services.

Alternatively, you can install support for this _alarms_ service only, installing or extending an existing [waylay-sdk-core](https://pypi.org/project/waylay-sdk-core/):

- `pip install waylay-sdk-alarms` to only install api support for _alarms_.
- `pip install waylay-sdk-alarms[types]` to additionally install type support for _alarms_.

## Usage

Expand Down
5 changes: 2 additions & 3 deletions waylay-sdk-alarms/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ build-backend = "setuptools.build_meta"

[project]
name = "waylay-sdk-alarms"
version = "1.11.0.20240430"
version = "1.11.0.20240802"
description = "Waylay Alarms"
authors = [
{ name = "Waylay", email = "[email protected]"}
]
keywords = ["Waylay Alarms"]
requires-python = ">= 3.9"
dependencies = [
"waylay-sdk-core ~= 0.2.1",
"waylay-sdk-core ~= 0.2.3",
"pydantic ~= 2.6",
"typing-extensions ~= 4.10",
"eval-type-backport ~= 0.1.3; python_version < '3.10'",
Expand Down Expand Up @@ -57,7 +57,6 @@ namespaces = true
include = ["pyproject.toml", "src/**/*.py"]

[tool.ruff.lint]
ignore-init-module-imports = true
# allow duplicate imports
ignore=["F811"]
# https://docs.astral.sh/ruff/rules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ async def create(
## named body parameters
body_args: Dict[str, Any] = {}
if json is not None and validate_request:
body_adapter = TypeAdapter(
body_adapter: Any = TypeAdapter(
Annotated[CreateAlarm, Field(description="Alarm Operations")]
)
json = body_adapter.validate_python(json) # type: ignore # https://github.com/pydantic/pydantic/discussions/7094
Expand Down Expand Up @@ -881,7 +881,7 @@ async def update(
## named body parameters
body_args: Dict[str, Any] = {}
if json is not None and validate_request:
body_adapter = TypeAdapter(AlarmUpdate)
body_adapter: Any = TypeAdapter(AlarmUpdate)
json = body_adapter.validate_python(json) # type: ignore # https://github.com/pydantic/pydantic/discussions/7094
body_args["json"] = json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ async def start(
## named body parameters
body_args: Dict[str, Any] = {}
if json is not None and validate_request:
body_adapter = TypeAdapter(
body_adapter: Any = TypeAdapter(
Annotated[
ABatchAlarmsSpecification,
Field(description="Batch Alarm Operation"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Do not edit the class manually.
"""

__version__ = "1.11.0.20240430"
__version__ = "1.11.0.20240802"

from .service import AlarmsService

Expand Down

0 comments on commit 98fd8da

Please sign in to comment.