diff --git a/activitysmith_openapi/__init__.py b/activitysmith_openapi/__init__.py index 6c01606..6727222 100644 --- a/activitysmith_openapi/__init__.py +++ b/activitysmith_openapi/__init__.py @@ -37,6 +37,7 @@ from activitysmith_openapi.models.activity_metric import ActivityMetric from activitysmith_openapi.models.activity_metric_value import ActivityMetricValue from activitysmith_openapi.models.alert_payload import AlertPayload +from activitysmith_openapi.models.app_icon_badge_count_update_error import AppIconBadgeCountUpdateError from activitysmith_openapi.models.app_icon_badge_count_update_request import AppIconBadgeCountUpdateRequest from activitysmith_openapi.models.app_icon_badge_count_update_response import AppIconBadgeCountUpdateResponse from activitysmith_openapi.models.bad_request_error import BadRequestError @@ -76,3 +77,4 @@ from activitysmith_openapi.models.rate_limit_error import RateLimitError from activitysmith_openapi.models.send_push_notification429_response import SendPushNotification429Response from activitysmith_openapi.models.stream_content_state import StreamContentState +from activitysmith_openapi.models.update_app_icon_badge_count422_response import UpdateAppIconBadgeCount422Response diff --git a/activitysmith_openapi/api/app_icon_badges_api.py b/activitysmith_openapi/api/app_icon_badges_api.py index 29d22f6..e832526 100644 --- a/activitysmith_openapi/api/app_icon_badges_api.py +++ b/activitysmith_openapi/api/app_icon_badges_api.py @@ -94,7 +94,8 @@ def update_app_icon_badge_count( '200': "AppIconBadgeCountUpdateResponse", '400': "BadRequestError", '403': "ForbiddenError", - '404': "NoRecipientsError", + '422': "UpdateAppIconBadgeCount422Response", + '502': "AppIconBadgeCountUpdateError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -165,7 +166,8 @@ def update_app_icon_badge_count_with_http_info( '200': "AppIconBadgeCountUpdateResponse", '400': "BadRequestError", '403': "ForbiddenError", - '404': "NoRecipientsError", + '422': "UpdateAppIconBadgeCount422Response", + '502': "AppIconBadgeCountUpdateError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -236,7 +238,8 @@ def update_app_icon_badge_count_without_preload_content( '200': "AppIconBadgeCountUpdateResponse", '400': "BadRequestError", '403': "ForbiddenError", - '404': "NoRecipientsError", + '422': "UpdateAppIconBadgeCount422Response", + '502': "AppIconBadgeCountUpdateError", '429': "RateLimitError", } response_data = self.api_client.call_api( diff --git a/activitysmith_openapi/docs/AppIconBadgeCountUpdateError.md b/activitysmith_openapi/docs/AppIconBadgeCountUpdateError.md new file mode 100644 index 0000000..8aec0cf --- /dev/null +++ b/activitysmith_openapi/docs/AppIconBadgeCountUpdateError.md @@ -0,0 +1,37 @@ +# AppIconBadgeCountUpdateError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | +**code** | **str** | | +**message** | **str** | | +**badge** | **int** | | +**devices_targeted** | **int** | | [optional] +**devices_updated** | **int** | | +**users_updated** | **int** | | [optional] +**devices_notified** | **int** | Deprecated compatibility alias for devices_updated. | [optional] +**effective_channel_slugs** | **List[str]** | | [optional] + +## Example + +```python +from activitysmith_openapi.models.app_icon_badge_count_update_error import AppIconBadgeCountUpdateError + +# TODO update the JSON string below +json = "{}" +# create an instance of AppIconBadgeCountUpdateError from a JSON string +app_icon_badge_count_update_error_instance = AppIconBadgeCountUpdateError.from_json(json) +# print the JSON string representation of the object +print(AppIconBadgeCountUpdateError.to_json()) + +# convert the object into a dict +app_icon_badge_count_update_error_dict = app_icon_badge_count_update_error_instance.to_dict() +# create an instance of AppIconBadgeCountUpdateError from a dict +app_icon_badge_count_update_error_from_dict = AppIconBadgeCountUpdateError.from_dict(app_icon_badge_count_update_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/activitysmith_openapi/docs/AppIconBadgeCountUpdateResponse.md b/activitysmith_openapi/docs/AppIconBadgeCountUpdateResponse.md index 74dd986..072e90e 100644 --- a/activitysmith_openapi/docs/AppIconBadgeCountUpdateResponse.md +++ b/activitysmith_openapi/docs/AppIconBadgeCountUpdateResponse.md @@ -7,8 +7,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **success** | **bool** | | **badge** | **int** | | -**devices_notified** | **int** | | -**users_notified** | **int** | | +**devices_updated** | **int** | Number of devices whose App Icon Badge Count was updated. | +**users_updated** | **int** | Number of account users with at least one updated device. | +**devices_notified** | **int** | Deprecated compatibility alias for devices_updated. | [optional] +**users_notified** | **int** | Deprecated compatibility alias for users_updated. | [optional] **effective_channel_slugs** | **List[str]** | | **timestamp** | **datetime** | | diff --git a/activitysmith_openapi/docs/AppIconBadgesApi.md b/activitysmith_openapi/docs/AppIconBadgesApi.md index 6ae3264..76505cf 100644 --- a/activitysmith_openapi/docs/AppIconBadgesApi.md +++ b/activitysmith_openapi/docs/AppIconBadgesApi.md @@ -85,7 +85,8 @@ Name | Type | Description | Notes **200** | App Icon Badge Count updated | - | **400** | Bad request | - | **403** | Forbidden | - | -**404** | No recipients found for effective channel target | - | +**422** | No matching devices found, or a targeted device needs to reconnect | - | +**502** | App Icon Badge Count could not be updated | - | **429** | Rate limit exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/activitysmith_openapi/docs/LiveActivityLimitError.md b/activitysmith_openapi/docs/LiveActivityLimitError.md index d661fc6..25cb51a 100644 --- a/activitysmith_openapi/docs/LiveActivityLimitError.md +++ b/activitysmith_openapi/docs/LiveActivityLimitError.md @@ -8,7 +8,9 @@ Name | Type | Description | Notes **error** | **str** | | **message** | **str** | | **limit** | **int** | | -**active** | **int** | Current number of active Live Activities. | +**active** | **int** | Highest number of active Live Activities among the targeted devices. | +**blocked_devices** | **int** | Number of targeted devices that have reached the enforced iOS Live Activity concurrency threshold. Included only when targeted devices have mixed capacity. | [optional] +**targeted_devices** | **int** | Total number of targeted devices. Included only when targeted devices have mixed capacity. | [optional] ## Example diff --git a/activitysmith_openapi/docs/SendPushNotification429Response.md b/activitysmith_openapi/docs/SendPushNotification429Response.md index e1738e1..b4847aa 100644 --- a/activitysmith_openapi/docs/SendPushNotification429Response.md +++ b/activitysmith_openapi/docs/SendPushNotification429Response.md @@ -8,7 +8,9 @@ Name | Type | Description | Notes **error** | **str** | | **message** | **str** | | **limit** | **int** | | -**active** | **int** | Current number of active Live Activities. | +**active** | **int** | Highest number of active Live Activities among the targeted devices. | +**blocked_devices** | **int** | Number of targeted devices that have reached the enforced iOS Live Activity concurrency threshold. Included only when targeted devices have mixed capacity. | [optional] +**targeted_devices** | **int** | Total number of targeted devices. Included only when targeted devices have mixed capacity. | [optional] ## Example diff --git a/activitysmith_openapi/docs/UpdateAppIconBadgeCount422Response.md b/activitysmith_openapi/docs/UpdateAppIconBadgeCount422Response.md new file mode 100644 index 0000000..f7cbbfe --- /dev/null +++ b/activitysmith_openapi/docs/UpdateAppIconBadgeCount422Response.md @@ -0,0 +1,37 @@ +# UpdateAppIconBadgeCount422Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | +**message** | **str** | | +**effective_channel_slugs** | **List[str]** | | [optional] +**code** | **str** | | +**badge** | **int** | | +**devices_targeted** | **int** | | [optional] +**devices_updated** | **int** | | +**users_updated** | **int** | | [optional] +**devices_notified** | **int** | Deprecated compatibility alias for devices_updated. | [optional] + +## Example + +```python +from activitysmith_openapi.models.update_app_icon_badge_count422_response import UpdateAppIconBadgeCount422Response + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateAppIconBadgeCount422Response from a JSON string +update_app_icon_badge_count422_response_instance = UpdateAppIconBadgeCount422Response.from_json(json) +# print the JSON string representation of the object +print(UpdateAppIconBadgeCount422Response.to_json()) + +# convert the object into a dict +update_app_icon_badge_count422_response_dict = update_app_icon_badge_count422_response_instance.to_dict() +# create an instance of UpdateAppIconBadgeCount422Response from a dict +update_app_icon_badge_count422_response_from_dict = UpdateAppIconBadgeCount422Response.from_dict(update_app_icon_badge_count422_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/activitysmith_openapi/models/__init__.py b/activitysmith_openapi/models/__init__.py index b9576c7..87a38e2 100644 --- a/activitysmith_openapi/models/__init__.py +++ b/activitysmith_openapi/models/__init__.py @@ -17,6 +17,7 @@ from activitysmith_openapi.models.activity_metric import ActivityMetric from activitysmith_openapi.models.activity_metric_value import ActivityMetricValue from activitysmith_openapi.models.alert_payload import AlertPayload +from activitysmith_openapi.models.app_icon_badge_count_update_error import AppIconBadgeCountUpdateError from activitysmith_openapi.models.app_icon_badge_count_update_request import AppIconBadgeCountUpdateRequest from activitysmith_openapi.models.app_icon_badge_count_update_response import AppIconBadgeCountUpdateResponse from activitysmith_openapi.models.bad_request_error import BadRequestError @@ -56,3 +57,4 @@ from activitysmith_openapi.models.rate_limit_error import RateLimitError from activitysmith_openapi.models.send_push_notification429_response import SendPushNotification429Response from activitysmith_openapi.models.stream_content_state import StreamContentState +from activitysmith_openapi.models.update_app_icon_badge_count422_response import UpdateAppIconBadgeCount422Response diff --git a/activitysmith_openapi/models/app_icon_badge_count_update_error.py b/activitysmith_openapi/models/app_icon_badge_count_update_error.py new file mode 100644 index 0000000..0b9c9c7 --- /dev/null +++ b/activitysmith_openapi/models/app_icon_badge_count_update_error.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AppIconBadgeCountUpdateError(BaseModel): + """ + AppIconBadgeCountUpdateError + """ # noqa: E501 + error: StrictStr + code: StrictStr + message: StrictStr + badge: Annotated[int, Field(le=2147483647, strict=True, ge=0)] + devices_targeted: Optional[StrictInt] = None + devices_updated: StrictInt + users_updated: Optional[StrictInt] = None + devices_notified: Optional[StrictInt] = Field(default=None, description="Deprecated compatibility alias for devices_updated.") + effective_channel_slugs: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["error", "code", "message", "badge", "devices_targeted", "devices_updated", "users_updated", "devices_notified", "effective_channel_slugs"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['badge_device_disconnected', 'badge_update_failed']): + raise ValueError("must be one of enum values ('badge_device_disconnected', 'badge_update_failed')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AppIconBadgeCountUpdateError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AppIconBadgeCountUpdateError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "code": obj.get("code"), + "message": obj.get("message"), + "badge": obj.get("badge"), + "devices_targeted": obj.get("devices_targeted"), + "devices_updated": obj.get("devices_updated"), + "users_updated": obj.get("users_updated"), + "devices_notified": obj.get("devices_notified"), + "effective_channel_slugs": obj.get("effective_channel_slugs") + }) + return _obj + + diff --git a/activitysmith_openapi/models/app_icon_badge_count_update_response.py b/activitysmith_openapi/models/app_icon_badge_count_update_response.py index 4818c20..e0582ba 100644 --- a/activitysmith_openapi/models/app_icon_badge_count_update_response.py +++ b/activitysmith_openapi/models/app_icon_badge_count_update_response.py @@ -19,7 +19,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,13 @@ class AppIconBadgeCountUpdateResponse(BaseModel): """ # noqa: E501 success: StrictBool badge: Annotated[int, Field(le=2147483647, strict=True, ge=0)] - devices_notified: StrictInt - users_notified: StrictInt + devices_updated: StrictInt = Field(description="Number of devices whose App Icon Badge Count was updated.") + users_updated: StrictInt = Field(description="Number of account users with at least one updated device.") + devices_notified: Optional[StrictInt] = Field(default=None, description="Deprecated compatibility alias for devices_updated.") + users_notified: Optional[StrictInt] = Field(default=None, description="Deprecated compatibility alias for users_updated.") effective_channel_slugs: List[StrictStr] timestamp: datetime - __properties: ClassVar[List[str]] = ["success", "badge", "devices_notified", "users_notified", "effective_channel_slugs", "timestamp"] + __properties: ClassVar[List[str]] = ["success", "badge", "devices_updated", "users_updated", "devices_notified", "users_notified", "effective_channel_slugs", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -89,6 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "success": obj.get("success"), "badge": obj.get("badge"), + "devices_updated": obj.get("devices_updated"), + "users_updated": obj.get("users_updated"), "devices_notified": obj.get("devices_notified"), "users_notified": obj.get("users_notified"), "effective_channel_slugs": obj.get("effective_channel_slugs"), diff --git a/activitysmith_openapi/models/live_activity_limit_error.py b/activitysmith_openapi/models/live_activity_limit_error.py index f33b7e4..e3862e1 100644 --- a/activitysmith_openapi/models/live_activity_limit_error.py +++ b/activitysmith_openapi/models/live_activity_limit_error.py @@ -18,7 +18,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,8 +29,10 @@ class LiveActivityLimitError(BaseModel): error: StrictStr message: StrictStr limit: StrictInt - active: StrictInt = Field(description="Current number of active Live Activities.") - __properties: ClassVar[List[str]] = ["error", "message", "limit", "active"] + active: StrictInt = Field(description="Highest number of active Live Activities among the targeted devices.") + blocked_devices: Optional[StrictInt] = Field(default=None, description="Number of targeted devices that have reached the enforced iOS Live Activity concurrency threshold. Included only when targeted devices have mixed capacity.") + targeted_devices: Optional[StrictInt] = Field(default=None, description="Total number of targeted devices. Included only when targeted devices have mixed capacity.") + __properties: ClassVar[List[str]] = ["error", "message", "limit", "active", "blocked_devices", "targeted_devices"] model_config = ConfigDict( populate_by_name=True, @@ -86,7 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "error": obj.get("error"), "message": obj.get("message"), "limit": obj.get("limit"), - "active": obj.get("active") + "active": obj.get("active"), + "blocked_devices": obj.get("blocked_devices"), + "targeted_devices": obj.get("targeted_devices") }) return _obj diff --git a/activitysmith_openapi/models/update_app_icon_badge_count422_response.py b/activitysmith_openapi/models/update_app_icon_badge_count422_response.py new file mode 100644 index 0000000..ebf28ab --- /dev/null +++ b/activitysmith_openapi/models/update_app_icon_badge_count422_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from activitysmith_openapi.models.app_icon_badge_count_update_error import AppIconBadgeCountUpdateError +from activitysmith_openapi.models.no_recipients_error import NoRecipientsError +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +UPDATEAPPICONBADGECOUNT422RESPONSE_ONE_OF_SCHEMAS = ["AppIconBadgeCountUpdateError", "NoRecipientsError"] + +class UpdateAppIconBadgeCount422Response(BaseModel): + """ + UpdateAppIconBadgeCount422Response + """ + # data type: NoRecipientsError + oneof_schema_1_validator: Optional[NoRecipientsError] = None + # data type: AppIconBadgeCountUpdateError + oneof_schema_2_validator: Optional[AppIconBadgeCountUpdateError] = None + actual_instance: Optional[Union[AppIconBadgeCountUpdateError, NoRecipientsError]] = None + one_of_schemas: Set[str] = { "AppIconBadgeCountUpdateError", "NoRecipientsError" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = UpdateAppIconBadgeCount422Response.model_construct() + error_messages = [] + match = 0 + # validate data type: NoRecipientsError + if not isinstance(v, NoRecipientsError): + error_messages.append(f"Error! Input type `{type(v)}` is not `NoRecipientsError`") + else: + match += 1 + # validate data type: AppIconBadgeCountUpdateError + if not isinstance(v, AppIconBadgeCountUpdateError): + error_messages.append(f"Error! Input type `{type(v)}` is not `AppIconBadgeCountUpdateError`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in UpdateAppIconBadgeCount422Response with oneOf schemas: AppIconBadgeCountUpdateError, NoRecipientsError. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in UpdateAppIconBadgeCount422Response with oneOf schemas: AppIconBadgeCountUpdateError, NoRecipientsError. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into NoRecipientsError + try: + instance.actual_instance = NoRecipientsError.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AppIconBadgeCountUpdateError + try: + instance.actual_instance = AppIconBadgeCountUpdateError.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into UpdateAppIconBadgeCount422Response with oneOf schemas: AppIconBadgeCountUpdateError, NoRecipientsError. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into UpdateAppIconBadgeCount422Response with oneOf schemas: AppIconBadgeCountUpdateError, NoRecipientsError. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AppIconBadgeCountUpdateError, NoRecipientsError]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/activitysmith_openapi/test/test_app_icon_badge_count_update_error.py b/activitysmith_openapi/test/test_app_icon_badge_count_update_error.py new file mode 100644 index 0000000..b6b6f1e --- /dev/null +++ b/activitysmith_openapi/test/test_app_icon_badge_count_update_error.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from activitysmith_openapi.models.app_icon_badge_count_update_error import AppIconBadgeCountUpdateError + +class TestAppIconBadgeCountUpdateError(unittest.TestCase): + """AppIconBadgeCountUpdateError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppIconBadgeCountUpdateError: + """Test AppIconBadgeCountUpdateError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AppIconBadgeCountUpdateError` + """ + model = AppIconBadgeCountUpdateError() + if include_optional: + return AppIconBadgeCountUpdateError( + error = '', + code = 'badge_device_disconnected', + message = '', + badge = 0, + devices_targeted = 56, + devices_updated = 56, + users_updated = 56, + devices_notified = 56, + effective_channel_slugs = [ + '' + ] + ) + else: + return AppIconBadgeCountUpdateError( + error = '', + code = 'badge_device_disconnected', + message = '', + badge = 0, + devices_updated = 56, + ) + """ + + def testAppIconBadgeCountUpdateError(self): + """Test AppIconBadgeCountUpdateError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/activitysmith_openapi/test/test_app_icon_badge_count_update_response.py b/activitysmith_openapi/test/test_app_icon_badge_count_update_response.py index 82f2555..ada9340 100644 --- a/activitysmith_openapi/test/test_app_icon_badge_count_update_response.py +++ b/activitysmith_openapi/test/test_app_icon_badge_count_update_response.py @@ -37,6 +37,8 @@ def make_instance(self, include_optional) -> AppIconBadgeCountUpdateResponse: return AppIconBadgeCountUpdateResponse( success = True, badge = 0, + devices_updated = 56, + users_updated = 56, devices_notified = 56, users_notified = 56, effective_channel_slugs = [ @@ -48,8 +50,8 @@ def make_instance(self, include_optional) -> AppIconBadgeCountUpdateResponse: return AppIconBadgeCountUpdateResponse( success = True, badge = 0, - devices_notified = 56, - users_notified = 56, + devices_updated = 56, + users_updated = 56, effective_channel_slugs = [ '' ], diff --git a/activitysmith_openapi/test/test_live_activity_limit_error.py b/activitysmith_openapi/test/test_live_activity_limit_error.py index c618fef..99a9502 100644 --- a/activitysmith_openapi/test/test_live_activity_limit_error.py +++ b/activitysmith_openapi/test/test_live_activity_limit_error.py @@ -38,7 +38,9 @@ def make_instance(self, include_optional) -> LiveActivityLimitError: error = '', message = '', limit = 56, - active = 56 + active = 56, + blocked_devices = 56, + targeted_devices = 56 ) else: return LiveActivityLimitError( diff --git a/activitysmith_openapi/test/test_send_push_notification429_response.py b/activitysmith_openapi/test/test_send_push_notification429_response.py index 5466f95..d47464f 100644 --- a/activitysmith_openapi/test/test_send_push_notification429_response.py +++ b/activitysmith_openapi/test/test_send_push_notification429_response.py @@ -38,7 +38,9 @@ def make_instance(self, include_optional) -> SendPushNotification429Response: error = '', message = '', limit = 56, - active = 56 + active = 56, + blocked_devices = 56, + targeted_devices = 56 ) else: return SendPushNotification429Response( diff --git a/activitysmith_openapi/test/test_update_app_icon_badge_count422_response.py b/activitysmith_openapi/test/test_update_app_icon_badge_count422_response.py new file mode 100644 index 0000000..23bea2e --- /dev/null +++ b/activitysmith_openapi/test/test_update_app_icon_badge_count422_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from activitysmith_openapi.models.update_app_icon_badge_count422_response import UpdateAppIconBadgeCount422Response + +class TestUpdateAppIconBadgeCount422Response(unittest.TestCase): + """UpdateAppIconBadgeCount422Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateAppIconBadgeCount422Response: + """Test UpdateAppIconBadgeCount422Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateAppIconBadgeCount422Response` + """ + model = UpdateAppIconBadgeCount422Response() + if include_optional: + return UpdateAppIconBadgeCount422Response( + error = '', + message = '', + effective_channel_slugs = [ + '' + ], + code = 'badge_device_disconnected', + badge = 0, + devices_targeted = 56, + devices_updated = 56, + users_updated = 56, + devices_notified = 56 + ) + else: + return UpdateAppIconBadgeCount422Response( + error = '', + message = '', + code = 'badge_device_disconnected', + badge = 0, + devices_updated = 56, + ) + """ + + def testUpdateAppIconBadgeCount422Response(self): + """Test UpdateAppIconBadgeCount422Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()