diff --git a/api/client/python/src/openmeter/_operations/_operations.py b/api/client/python/src/openmeter/_operations/_operations.py index af099290c..5c04d76e2 100644 --- a/api/client/python/src/openmeter/_operations/_operations.py +++ b/api/client/python/src/openmeter/_operations/_operations.py @@ -876,7 +876,14 @@ def build_get_debug_metrics_request(**kwargs: Any) -> HttpRequest: def build_list_notification_channels_request( - *, limit: int = 1000, offset: int = 0, order_by: str = "id", include_disabled: bool = False, **kwargs: Any + *, + page: int = 1, + page_size: int = 100, + order_by: str = "id", + order: str = "ASC", + include_disabled: bool = False, + include_deleted: bool = False, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -887,14 +894,18 @@ def build_list_notification_channels_request( _url = "/api/v1/notification/channels" # Construct parameters - if limit is not None: - _params["limit"] = _SERIALIZER.query("limit", limit, "int", maximum=1000, minimum=1) - if offset is not None: - _params["offset"] = _SERIALIZER.query("offset", offset, "int", minimum=0) + if page is not None: + _params["page"] = _SERIALIZER.query("page", page, "int", minimum=1) + if page_size is not None: + _params["pageSize"] = _SERIALIZER.query("page_size", page_size, "int", maximum=1000, minimum=1) if order_by is not None: _params["orderBy"] = _SERIALIZER.query("order_by", order_by, "str") + if order is not None: + _params["order"] = _SERIALIZER.query("order", order, "str") if include_disabled is not None: _params["includeDisabled"] = _SERIALIZER.query("include_disabled", include_disabled, "bool") + if include_deleted is not None: + _params["includeDeleted"] = _SERIALIZER.query("include_deleted", include_deleted, "bool") # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") @@ -985,11 +996,14 @@ def build_update_notification_channel_request( # pylint: disable=name-too-long def build_list_notification_rules_request( *, - limit: int = 1000, - offset: int = 0, + page: int = 1, + page_size: int = 100, order_by: str = "id", + order: str = "ASC", include_disabled: bool = False, + include_deleted: bool = False, feature: Optional[List[str]] = None, + channel: Optional[List[str]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -1001,16 +1015,22 @@ def build_list_notification_rules_request( _url = "/api/v1/notification/rules" # Construct parameters - if limit is not None: - _params["limit"] = _SERIALIZER.query("limit", limit, "int", maximum=1000, minimum=1) - if offset is not None: - _params["offset"] = _SERIALIZER.query("offset", offset, "int", minimum=0) + if page is not None: + _params["page"] = _SERIALIZER.query("page", page, "int", minimum=1) + if page_size is not None: + _params["pageSize"] = _SERIALIZER.query("page_size", page_size, "int", maximum=1000, minimum=1) if order_by is not None: _params["orderBy"] = _SERIALIZER.query("order_by", order_by, "str") + if order is not None: + _params["order"] = _SERIALIZER.query("order", order, "str") if include_disabled is not None: _params["includeDisabled"] = _SERIALIZER.query("include_disabled", include_disabled, "bool") + if include_deleted is not None: + _params["includeDeleted"] = _SERIALIZER.query("include_deleted", include_deleted, "bool") if feature is not None: _params["feature"] = _SERIALIZER.query("feature", feature, "[str]") + if channel is not None: + _params["channel"] = _SERIALIZER.query("channel", channel, "[str]") # Construct headers _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") @@ -1097,9 +1117,12 @@ def build_update_notification_rule_request(rule_id: str, **kwargs: Any) -> HttpR def build_list_notification_events_request( *, - limit: int = 1000, - offset: int = 0, - order_by: str = "id", + page: int = 1, + page_size: int = 100, + order_by: str = "createdAt", + order: str = "ASC", + from_parameter: Optional[datetime.datetime] = None, + to: Optional[datetime.datetime] = None, feature: Optional[List[str]] = None, subject: Optional[List[str]] = None, **kwargs: Any @@ -1113,12 +1136,18 @@ def build_list_notification_events_request( _url = "/api/v1/notification/events" # Construct parameters - if limit is not None: - _params["limit"] = _SERIALIZER.query("limit", limit, "int", maximum=1000, minimum=1) - if offset is not None: - _params["offset"] = _SERIALIZER.query("offset", offset, "int", minimum=0) + if page is not None: + _params["page"] = _SERIALIZER.query("page", page, "int", minimum=1) + if page_size is not None: + _params["pageSize"] = _SERIALIZER.query("page_size", page_size, "int", maximum=1000, minimum=1) if order_by is not None: _params["orderBy"] = _SERIALIZER.query("order_by", order_by, "str") + if order is not None: + _params["order"] = _SERIALIZER.query("order", order, "str") + if from_parameter is not None: + _params["from"] = _SERIALIZER.query("from_parameter", from_parameter, "iso-8601") + if to is not None: + _params["to"] = _SERIALIZER.query("to", to, "iso-8601") if feature is not None: _params["feature"] = _SERIALIZER.query("feature", feature, "[str]") if subject is not None: @@ -5358,32 +5387,51 @@ def get_debug_metrics(self, **kwargs: Any) -> str: @distributed_trace def list_notification_channels( - self, *, limit: int = 1000, offset: int = 0, order_by: str = "id", include_disabled: bool = False, **kwargs: Any - ) -> List[JSON]: + self, + *, + page: int = 1, + page_size: int = 100, + order_by: str = "id", + order: str = "ASC", + include_disabled: bool = False, + include_deleted: bool = False, + **kwargs: Any + ) -> JSON: """List notification channels. List all notification channels. - :keyword limit: Number of entries to return. Default value is 1000. - :paramtype limit: int - :keyword offset: Number of entries to skip. Default value is 0. - :paramtype offset: int + :keyword page: Page number to return. Default value is 1. + :paramtype page: int + :keyword page_size: Number of entries to return per page. Default value is 100. + :paramtype page_size: int :keyword order_by: Order by field. Known values are: "id", "type", "createdAt", and "updatedAt". Default value is "id". :paramtype order_by: str + :keyword order: Order by field. + + Usage: ``?order=ASC``. Known values are: "ASC" and "DESC". Default value is "ASC". + :paramtype order: str :keyword include_disabled: Include disabled entries. Default value is False. :paramtype include_disabled: bool - :return: list of JSON object - :rtype: list[JSON] + :keyword include_deleted: Include deleted entries. Default value is False. + :paramtype include_deleted: bool + :return: JSON object + :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: Example: .. code-block:: python # response body for status code(s): 200 - response == [ - {} - ] + response == { + "items": [ + {} + ], + "page": 0, # Current page number. Required. + "pageSize": 0, # Number of channels per page. Required. + "totalCount": 0 # Total number of channels. Required. + } """ error_map = { 404: ResourceNotFoundError, @@ -5397,13 +5445,15 @@ def list_notification_channels( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[JSON]] = kwargs.pop("cls", None) + cls: ClsType[JSON] = kwargs.pop("cls", None) _request = build_list_notification_channels_request( - limit=limit, - offset=offset, + page=page, + page_size=page_size, order_by=order_by, + order=order, include_disabled=include_disabled, + include_deleted=include_deleted, headers=_headers, params=_params, ) @@ -5428,9 +5478,9 @@ def list_notification_channels( deserialized = None if cls: - return cls(pipeline_response, cast(List[JSON], deserialized), {}) # type: ignore + return cls(pipeline_response, cast(JSON, deserialized), {}) # type: ignore - return cast(List[JSON], deserialized) # type: ignore + return cast(JSON, deserialized) # type: ignore @overload def create_notification_channel(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> JSON: @@ -5841,41 +5891,59 @@ def update_notification_channel(self, channel_id: str, body: Union[JSON, IO[byte def list_notification_rules( self, *, - limit: int = 1000, - offset: int = 0, + page: int = 1, + page_size: int = 100, order_by: str = "id", + order: str = "ASC", include_disabled: bool = False, + include_deleted: bool = False, feature: Optional[List[str]] = None, + channel: Optional[List[str]] = None, **kwargs: Any - ) -> List[JSON]: + ) -> JSON: """List notification rules. List all notification rules. - :keyword limit: Number of entries to return. Default value is 1000. - :paramtype limit: int - :keyword offset: Number of entries to skip. Default value is 0. - :paramtype offset: int + :keyword page: Page number to return. Default value is 1. + :paramtype page: int + :keyword page_size: Number of entries to return per page. Default value is 100. + :paramtype page_size: int :keyword order_by: Order by field. Known values are: "id", "type", "createdAt", and "updatedAt". Default value is "id". :paramtype order_by: str + :keyword order: Order by field. + + Usage: ``?order=ASC``. Known values are: "ASC" and "DESC". Default value is "ASC". + :paramtype order: str :keyword include_disabled: Include disabled entries. Default value is False. :paramtype include_disabled: bool + :keyword include_deleted: Include deleted entries. Default value is False. + :paramtype include_deleted: bool :keyword feature: Filtering by multiple features. Usage: ``?feature=feature-1&feature=feature-2``. Default value is None. :paramtype feature: list[str] - :return: list of JSON object - :rtype: list[JSON] + :keyword channel: Filtering by multiple notification channels. + + Usage: ``?channel=channel-1&channel=channel-2``. Default value is None. + :paramtype channel: list[str] + :return: JSON object + :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: Example: .. code-block:: python # response body for status code(s): 200 - response == [ - {} - ] + response == { + "items": [ + {} + ], + "page": 0, # Current page number. Required. + "pageSize": 0, # Number of rules per page. Required. + "totalCount": 0 # Total number of rules. Required. + } """ error_map = { 404: ResourceNotFoundError, @@ -5889,14 +5957,17 @@ def list_notification_rules( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[JSON]] = kwargs.pop("cls", None) + cls: ClsType[JSON] = kwargs.pop("cls", None) _request = build_list_notification_rules_request( - limit=limit, - offset=offset, + page=page, + page_size=page_size, order_by=order_by, + order=order, include_disabled=include_disabled, + include_deleted=include_deleted, feature=feature, + channel=channel, headers=_headers, params=_params, ) @@ -5921,9 +5992,9 @@ def list_notification_rules( deserialized = None if cls: - return cls(pipeline_response, cast(List[JSON], deserialized), {}) # type: ignore + return cls(pipeline_response, cast(JSON, deserialized), {}) # type: ignore - return cast(List[JSON], deserialized) # type: ignore + return cast(JSON, deserialized) # type: ignore @overload def create_notification_rule(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> JSON: @@ -6334,24 +6405,37 @@ def update_notification_rule(self, rule_id: str, body: Union[JSON, IO[bytes]], * def list_notification_events( self, *, - limit: int = 1000, - offset: int = 0, - order_by: str = "id", + page: int = 1, + page_size: int = 100, + order_by: str = "createdAt", + order: str = "ASC", + from_parameter: Optional[datetime.datetime] = None, + to: Optional[datetime.datetime] = None, feature: Optional[List[str]] = None, subject: Optional[List[str]] = None, **kwargs: Any - ) -> List[JSON]: + ) -> JSON: """List notification evens. List all notification events. - :keyword limit: Number of entries to return. Default value is 1000. - :paramtype limit: int - :keyword offset: Number of entries to skip. Default value is 0. - :paramtype offset: int + :keyword page: Page number to return. Default value is 1. + :paramtype page: int + :keyword page_size: Number of entries to return per page. Default value is 100. + :paramtype page_size: int :keyword order_by: Order by field. Known values are: "id" and "createdAt". Default value is - "id". + "createdAt". :paramtype order_by: str + :keyword order: Order by field. + + Usage: ``?order=ASC``. Known values are: "ASC" and "DESC". Default value is "ASC". + :paramtype order: str + :keyword from_parameter: Start date-time in RFC 3339 format. + Inclusive. Default value is None. + :paramtype from_parameter: ~datetime.datetime + :keyword to: End date-time in RFC 3339 format. + Inclusive. Default value is None. + :paramtype to: ~datetime.datetime :keyword feature: Filtering by multiple features. Usage: ``?feature=feature-1&feature=feature-2``. Default value is None. @@ -6360,42 +6444,43 @@ def list_notification_events( Usage: ``?subject=customer-1&subject=customer-2``. Default value is None. :paramtype subject: list[str] - :return: list of JSON object - :rtype: list[JSON] + :return: JSON object + :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: Example: .. code-block:: python # response body for status code(s): 200 - response == [ - { - "createdAt": "2020-02-20 00:00:00", # Timestamp when the - notification event was created. Required. - "deliveryStatus": [ - { - "channel": { - "id": "str", # A unique identifier for the - notification channel. Required. - "type": "str" # The type of the notification - channel. Required. "WEBHOOK" - }, - "state": "str", # Required. Known values are: - "SUCCESS", "FAILED", and "SENDING". - "updatedAt": "2020-02-20 00:00:00" # Required. - } - ], - "id": "str", # A unique identifier for the notification event. - Required. - "payload": {}, - "rule": { + response == { + "items": [ + { + "createdAt": "2020-02-20 00:00:00", # Timestamp when the + notification event was created. Required. + "deliveryStatus": [ + { + "channel": { + "id": "str", # A unique identifier + for the notification channel. Required. + "type": "str" # The type of the + notification channel. Required. "WEBHOOK" + }, + "state": "str", # Required. Known values + are: "SUCCESS", "FAILED", and "SENDING". + "updatedAt": "2020-02-20 00:00:00" # + Required. + } + ], "id": "str", # A unique identifier for the notification - rule. Required. - "type": "str" # The type of the notification event. - Required. "entitlements.balance.threshold" + event. Required. + "payload": {}, + "rule": {} } - } - ] + ], + "page": 0, # Current page number. Required. + "pageSize": 0, # Number of rules per page. Required. + "totalCount": 0 # Total number of rules. Required. + } """ error_map = { 404: ResourceNotFoundError, @@ -6409,12 +6494,15 @@ def list_notification_events( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[JSON]] = kwargs.pop("cls", None) + cls: ClsType[JSON] = kwargs.pop("cls", None) _request = build_list_notification_events_request( - limit=limit, - offset=offset, + page=page, + page_size=page_size, order_by=order_by, + order=order, + from_parameter=from_parameter, + to=to, feature=feature, subject=subject, headers=_headers, @@ -6441,9 +6529,9 @@ def list_notification_events( deserialized = None if cls: - return cls(pipeline_response, cast(List[JSON], deserialized), {}) # type: ignore + return cls(pipeline_response, cast(JSON, deserialized), {}) # type: ignore - return cast(List[JSON], deserialized) # type: ignore + return cast(JSON, deserialized) # type: ignore @distributed_trace def get_notification_event(self, event_id: str, **kwargs: Any) -> JSON: diff --git a/api/client/python/src/openmeter/aio/_operations/_operations.py b/api/client/python/src/openmeter/aio/_operations/_operations.py index bb45e045d..d2349ce6d 100644 --- a/api/client/python/src/openmeter/aio/_operations/_operations.py +++ b/api/client/python/src/openmeter/aio/_operations/_operations.py @@ -4298,32 +4298,51 @@ async def get_debug_metrics(self, **kwargs: Any) -> str: @distributed_trace_async async def list_notification_channels( - self, *, limit: int = 1000, offset: int = 0, order_by: str = "id", include_disabled: bool = False, **kwargs: Any - ) -> List[JSON]: + self, + *, + page: int = 1, + page_size: int = 100, + order_by: str = "id", + order: str = "ASC", + include_disabled: bool = False, + include_deleted: bool = False, + **kwargs: Any + ) -> JSON: """List notification channels. List all notification channels. - :keyword limit: Number of entries to return. Default value is 1000. - :paramtype limit: int - :keyword offset: Number of entries to skip. Default value is 0. - :paramtype offset: int + :keyword page: Page number to return. Default value is 1. + :paramtype page: int + :keyword page_size: Number of entries to return per page. Default value is 100. + :paramtype page_size: int :keyword order_by: Order by field. Known values are: "id", "type", "createdAt", and "updatedAt". Default value is "id". :paramtype order_by: str + :keyword order: Order by field. + + Usage: ``?order=ASC``. Known values are: "ASC" and "DESC". Default value is "ASC". + :paramtype order: str :keyword include_disabled: Include disabled entries. Default value is False. :paramtype include_disabled: bool - :return: list of JSON object - :rtype: list[JSON] + :keyword include_deleted: Include deleted entries. Default value is False. + :paramtype include_deleted: bool + :return: JSON object + :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: Example: .. code-block:: python # response body for status code(s): 200 - response == [ - {} - ] + response == { + "items": [ + {} + ], + "page": 0, # Current page number. Required. + "pageSize": 0, # Number of channels per page. Required. + "totalCount": 0 # Total number of channels. Required. + } """ error_map = { 404: ResourceNotFoundError, @@ -4337,13 +4356,15 @@ async def list_notification_channels( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[JSON]] = kwargs.pop("cls", None) + cls: ClsType[JSON] = kwargs.pop("cls", None) _request = build_list_notification_channels_request( - limit=limit, - offset=offset, + page=page, + page_size=page_size, order_by=order_by, + order=order, include_disabled=include_disabled, + include_deleted=include_deleted, headers=_headers, params=_params, ) @@ -4368,9 +4389,9 @@ async def list_notification_channels( deserialized = None if cls: - return cls(pipeline_response, cast(List[JSON], deserialized), {}) # type: ignore + return cls(pipeline_response, cast(JSON, deserialized), {}) # type: ignore - return cast(List[JSON], deserialized) # type: ignore + return cast(JSON, deserialized) # type: ignore @overload async def create_notification_channel( @@ -4783,41 +4804,59 @@ async def update_notification_channel(self, channel_id: str, body: Union[JSON, I async def list_notification_rules( self, *, - limit: int = 1000, - offset: int = 0, + page: int = 1, + page_size: int = 100, order_by: str = "id", + order: str = "ASC", include_disabled: bool = False, + include_deleted: bool = False, feature: Optional[List[str]] = None, + channel: Optional[List[str]] = None, **kwargs: Any - ) -> List[JSON]: + ) -> JSON: """List notification rules. List all notification rules. - :keyword limit: Number of entries to return. Default value is 1000. - :paramtype limit: int - :keyword offset: Number of entries to skip. Default value is 0. - :paramtype offset: int + :keyword page: Page number to return. Default value is 1. + :paramtype page: int + :keyword page_size: Number of entries to return per page. Default value is 100. + :paramtype page_size: int :keyword order_by: Order by field. Known values are: "id", "type", "createdAt", and "updatedAt". Default value is "id". :paramtype order_by: str + :keyword order: Order by field. + + Usage: ``?order=ASC``. Known values are: "ASC" and "DESC". Default value is "ASC". + :paramtype order: str :keyword include_disabled: Include disabled entries. Default value is False. :paramtype include_disabled: bool + :keyword include_deleted: Include deleted entries. Default value is False. + :paramtype include_deleted: bool :keyword feature: Filtering by multiple features. Usage: ``?feature=feature-1&feature=feature-2``. Default value is None. :paramtype feature: list[str] - :return: list of JSON object - :rtype: list[JSON] + :keyword channel: Filtering by multiple notification channels. + + Usage: ``?channel=channel-1&channel=channel-2``. Default value is None. + :paramtype channel: list[str] + :return: JSON object + :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: Example: .. code-block:: python # response body for status code(s): 200 - response == [ - {} - ] + response == { + "items": [ + {} + ], + "page": 0, # Current page number. Required. + "pageSize": 0, # Number of rules per page. Required. + "totalCount": 0 # Total number of rules. Required. + } """ error_map = { 404: ResourceNotFoundError, @@ -4831,14 +4870,17 @@ async def list_notification_rules( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[JSON]] = kwargs.pop("cls", None) + cls: ClsType[JSON] = kwargs.pop("cls", None) _request = build_list_notification_rules_request( - limit=limit, - offset=offset, + page=page, + page_size=page_size, order_by=order_by, + order=order, include_disabled=include_disabled, + include_deleted=include_deleted, feature=feature, + channel=channel, headers=_headers, params=_params, ) @@ -4863,9 +4905,9 @@ async def list_notification_rules( deserialized = None if cls: - return cls(pipeline_response, cast(List[JSON], deserialized), {}) # type: ignore + return cls(pipeline_response, cast(JSON, deserialized), {}) # type: ignore - return cast(List[JSON], deserialized) # type: ignore + return cast(JSON, deserialized) # type: ignore @overload async def create_notification_rule( @@ -5278,24 +5320,37 @@ async def update_notification_rule(self, rule_id: str, body: Union[JSON, IO[byte async def list_notification_events( self, *, - limit: int = 1000, - offset: int = 0, - order_by: str = "id", + page: int = 1, + page_size: int = 100, + order_by: str = "createdAt", + order: str = "ASC", + from_parameter: Optional[datetime.datetime] = None, + to: Optional[datetime.datetime] = None, feature: Optional[List[str]] = None, subject: Optional[List[str]] = None, **kwargs: Any - ) -> List[JSON]: + ) -> JSON: """List notification evens. List all notification events. - :keyword limit: Number of entries to return. Default value is 1000. - :paramtype limit: int - :keyword offset: Number of entries to skip. Default value is 0. - :paramtype offset: int + :keyword page: Page number to return. Default value is 1. + :paramtype page: int + :keyword page_size: Number of entries to return per page. Default value is 100. + :paramtype page_size: int :keyword order_by: Order by field. Known values are: "id" and "createdAt". Default value is - "id". + "createdAt". :paramtype order_by: str + :keyword order: Order by field. + + Usage: ``?order=ASC``. Known values are: "ASC" and "DESC". Default value is "ASC". + :paramtype order: str + :keyword from_parameter: Start date-time in RFC 3339 format. + Inclusive. Default value is None. + :paramtype from_parameter: ~datetime.datetime + :keyword to: End date-time in RFC 3339 format. + Inclusive. Default value is None. + :paramtype to: ~datetime.datetime :keyword feature: Filtering by multiple features. Usage: ``?feature=feature-1&feature=feature-2``. Default value is None. @@ -5304,42 +5359,43 @@ async def list_notification_events( Usage: ``?subject=customer-1&subject=customer-2``. Default value is None. :paramtype subject: list[str] - :return: list of JSON object - :rtype: list[JSON] + :return: JSON object + :rtype: JSON :raises ~azure.core.exceptions.HttpResponseError: Example: .. code-block:: python # response body for status code(s): 200 - response == [ - { - "createdAt": "2020-02-20 00:00:00", # Timestamp when the - notification event was created. Required. - "deliveryStatus": [ - { - "channel": { - "id": "str", # A unique identifier for the - notification channel. Required. - "type": "str" # The type of the notification - channel. Required. "WEBHOOK" - }, - "state": "str", # Required. Known values are: - "SUCCESS", "FAILED", and "SENDING". - "updatedAt": "2020-02-20 00:00:00" # Required. - } - ], - "id": "str", # A unique identifier for the notification event. - Required. - "payload": {}, - "rule": { + response == { + "items": [ + { + "createdAt": "2020-02-20 00:00:00", # Timestamp when the + notification event was created. Required. + "deliveryStatus": [ + { + "channel": { + "id": "str", # A unique identifier + for the notification channel. Required. + "type": "str" # The type of the + notification channel. Required. "WEBHOOK" + }, + "state": "str", # Required. Known values + are: "SUCCESS", "FAILED", and "SENDING". + "updatedAt": "2020-02-20 00:00:00" # + Required. + } + ], "id": "str", # A unique identifier for the notification - rule. Required. - "type": "str" # The type of the notification event. - Required. "entitlements.balance.threshold" + event. Required. + "payload": {}, + "rule": {} } - } - ] + ], + "page": 0, # Current page number. Required. + "pageSize": 0, # Number of rules per page. Required. + "totalCount": 0 # Total number of rules. Required. + } """ error_map = { 404: ResourceNotFoundError, @@ -5353,12 +5409,15 @@ async def list_notification_events( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[JSON]] = kwargs.pop("cls", None) + cls: ClsType[JSON] = kwargs.pop("cls", None) _request = build_list_notification_events_request( - limit=limit, - offset=offset, + page=page, + page_size=page_size, order_by=order_by, + order=order, + from_parameter=from_parameter, + to=to, feature=feature, subject=subject, headers=_headers, @@ -5385,9 +5444,9 @@ async def list_notification_events( deserialized = None if cls: - return cls(pipeline_response, cast(List[JSON], deserialized), {}) # type: ignore + return cls(pipeline_response, cast(JSON, deserialized), {}) # type: ignore - return cast(List[JSON], deserialized) # type: ignore + return cast(JSON, deserialized) # type: ignore @distributed_trace_async async def get_notification_event(self, event_id: str, **kwargs: Any) -> JSON: