"""
BackendStatisticTag automatically generated by SDKgen please do not edit this file manually
https://sdkgen.app
"""

import requests
import sdkgen
from requests import RequestException
from typing import List
from typing import Dict
from typing import Any
from urllib.parse import parse_qs

from .backend_statistic_chart import BackendStatisticChart
from .backend_statistic_count import BackendStatisticCount
from .common_message import CommonMessage
from .common_message_exception import CommonMessageException

class BackendStatisticTag(sdkgen.TagAbstract):
    def __init__(self, http_client: requests.Session, parser: sdkgen.Parser):
        super().__init__(http_client, parser)


    def get_activities_per_user(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the activities per user
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/activities_per_user', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_count_requests(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticCount:
        """
        Returns a statistic containing the request count
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/count_requests', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticCount.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_errors_per_operation(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the errors per operation
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/errors_per_operation', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_incoming_requests(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the incoming requests
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/incoming_requests', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_incoming_transactions(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the incoming transactions
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/incoming_transactions', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_issued_tokens(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the issues tokens
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/issued_tokens', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_most_used_activities(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the most used activities
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/most_used_activities', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_most_used_apps(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the most used apps
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/most_used_apps', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_most_used_operations(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the most used operations
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/most_used_operations', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_requests_per_ip(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the requests per ip
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/requests_per_ip', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_requests_per_operation(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the requests per operation
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/requests_per_operation', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_requests_per_user(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the requests per user
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/requests_per_user', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_test_coverage(self) -> BackendStatisticChart:
        """
        Returns a statistic containing the test coverage
        """
        try:
            path_params = {}

            query_params = {}

            query_struct_names = []

            url = self.parser.url('/backend/statistic/test_coverage', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_time_average(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the time average
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/time_average', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_time_per_operation(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the time per operation
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/time_per_operation', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_used_points(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the used points
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/used_points', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))

    def get_user_registrations(self, start_index: int, count: int, search: str, from_: str, to: str, operation_id: int, app_id: int, user_id: int, ip: str, user_agent: str, method: str, path: str, header: str, body: str) -> BackendStatisticChart:
        """
        Returns a statistic containing the user registrations
        """
        try:
            path_params = {}

            query_params = {}
            query_params['startIndex'] = start_index
            query_params['count'] = count
            query_params['search'] = search
            query_params['from'] = from_
            query_params['to'] = to
            query_params['operationId'] = operation_id
            query_params['appId'] = app_id
            query_params['userId'] = user_id
            query_params['ip'] = ip
            query_params['userAgent'] = user_agent
            query_params['method'] = method
            query_params['path'] = path
            query_params['header'] = header
            query_params['body'] = body

            query_struct_names = []

            url = self.parser.url('/backend/statistic/user_registrations', path_params)

            options = {}
            options['headers'] = {}
            options['params'] = self.parser.query(query_params, query_struct_names)



            response = self.http_client.request('GET', url, **options)

            if response.status_code >= 200 and response.status_code < 300:
                data = BackendStatisticChart.model_validate_json(json_data=response.content)

                return data

            statusCode = response.status_code
            if statusCode >= 0 and statusCode <= 999:
                data = CommonMessage.model_validate_json(json_data=response.content)

                raise CommonMessageException(data)

            raise sdkgen.UnknownStatusCodeException('The server returned an unknown status code: ' + str(statusCode))
        except RequestException as e:
            raise sdkgen.ClientException('An unknown error occurred: ' + str(e))



