# coding: utf-8

"""


    Generated by: https://openapi-generator.tech
"""

from dataclasses import dataclass
import typing_extensions
import urllib3
from urllib3._collections import HTTPHeaderDict

from banyanclient import api_client, exceptions
from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from banyanclient import schemas  # noqa: F401

from . import path

# query params
NameSchema = schemas.StrSchema
SerialnumberSchema = schemas.StrSchema
ModelSchema = schemas.StrSchema
TrustLevelSchema = schemas.StrSchema
CreatedAtSchema = schemas.StrSchema
LastLoginSchema = schemas.StrSchema
PlatformSchema = schemas.StrSchema
OrderSchema = schemas.StrSchema
OrderBySchema = schemas.StrSchema
ActiveSchema = schemas.BoolSchema
RequestRequiredQueryParams = typing_extensions.TypedDict(
    'RequestRequiredQueryParams',
    {
    }
)
RequestOptionalQueryParams = typing_extensions.TypedDict(
    'RequestOptionalQueryParams',
    {
        'name': typing.Union[NameSchema, str, ],
        'serialnumber': typing.Union[SerialnumberSchema, str, ],
        'model': typing.Union[ModelSchema, str, ],
        'trust_level': typing.Union[TrustLevelSchema, str, ],
        'created_at': typing.Union[CreatedAtSchema, str, ],
        'last_login': typing.Union[LastLoginSchema, str, ],
        'platform': typing.Union[PlatformSchema, str, ],
        'order': typing.Union[OrderSchema, str, ],
        'order_by': typing.Union[OrderBySchema, str, ],
        'active': typing.Union[ActiveSchema, bool, ],
    },
    total=False
)


class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams):
    pass


request_query_name = api_client.QueryParameter(
    name="name",
    style=api_client.ParameterStyle.FORM,
    schema=NameSchema,
    explode=True,
)
request_query_serialnumber = api_client.QueryParameter(
    name="serialnumber",
    style=api_client.ParameterStyle.FORM,
    schema=SerialnumberSchema,
    explode=True,
)
request_query_model = api_client.QueryParameter(
    name="model",
    style=api_client.ParameterStyle.FORM,
    schema=ModelSchema,
    explode=True,
)
request_query_trust_level = api_client.QueryParameter(
    name="trust_level",
    style=api_client.ParameterStyle.FORM,
    schema=TrustLevelSchema,
    explode=True,
)
request_query_created_at = api_client.QueryParameter(
    name="created_at",
    style=api_client.ParameterStyle.FORM,
    schema=CreatedAtSchema,
    explode=True,
)
request_query_last_login = api_client.QueryParameter(
    name="last_login",
    style=api_client.ParameterStyle.FORM,
    schema=LastLoginSchema,
    explode=True,
)
request_query_platform = api_client.QueryParameter(
    name="platform",
    style=api_client.ParameterStyle.FORM,
    schema=PlatformSchema,
    explode=True,
)
request_query_order = api_client.QueryParameter(
    name="order",
    style=api_client.ParameterStyle.FORM,
    schema=OrderSchema,
    explode=True,
)
request_query_order_by = api_client.QueryParameter(
    name="order_by",
    style=api_client.ParameterStyle.FORM,
    schema=OrderBySchema,
    explode=True,
)
request_query_active = api_client.QueryParameter(
    name="active",
    style=api_client.ParameterStyle.FORM,
    schema=ActiveSchema,
    explode=True,
)
_auth = [
    'bearerAuthToken',
]


class SchemaFor200ResponseBodyTextCsv(
    schemas.DictSchema
):


    class MetaOapg:
        
        class properties:
            ID = schemas.StrSchema
            serial_number = schemas.StrSchema
            Name = schemas.StrSchema
            Model = schemas.StrSchema
            Ownership = schemas.StrSchema
            Platform = schemas.StrSchema
            Architecture = schemas.StrSchema
            Source = schemas.StrSchema
            Banned = schemas.StrSchema
            OS = schemas.StrSchema
            mdm_present = schemas.StrSchema
            mdm_vendor_name = schemas.StrSchema
            mdm_vendor_udid_ = schemas.StrSchema
            last_mdm_data_synced_at = schemas.StrSchema
            mdm_compliant = schemas.StrSchema
            app_version = schemas.StrSchema
            created_at = schemas.StrSchema
            last_login = schemas.StrSchema
            number_of_users = schemas.IntSchema
            Emails = schemas.StrSchema
            role_names = schemas.StrSchema
            Status = schemas.StrSchema
            Archived_At = schemas.StrSchema
            Trustscore = schemas.IntSchema
            UpToDateOS = schemas.BoolSchema
            AutoUpdateEnabled = schemas.StrSchema
            FirewallEnabled = schemas.StrSchema
            ScreenLockEnabled = schemas.StrSchema
            DiskEncryptionEnabled = schemas.StrSchema
            NotJailbroken = schemas.StrSchema
            OrgPreferredAppsRunning = schemas.StrSchema
            __annotations__ = {
                "ID": ID,
                "Serial Number": serial_number,
                "Name": Name,
                "Model": Model,
                "Ownership": Ownership,
                "Platform": Platform,
                "Architecture": Architecture,
                "Source": Source,
                "Banned": Banned,
                "OS": OS,
                "MDM Present": mdm_present,
                "MDM Vendor Name": mdm_vendor_name,
                "MDM Vendor UDID ": mdm_vendor_udid_,
                "Last MDM Data Synced At": last_mdm_data_synced_at,
                "MDM Compliant": mdm_compliant,
                "App Version": app_version,
                "Created At": created_at,
                "Last Login": last_login,
                "Number Of Users": number_of_users,
                "Emails": Emails,
                "Role Names": role_names,
                "Status": Status,
                "Archived_At": Archived_At,
                "Trustscore": Trustscore,
                "UpToDateOS": UpToDateOS,
                "AutoUpdateEnabled": AutoUpdateEnabled,
                "FirewallEnabled": FirewallEnabled,
                "ScreenLockEnabled": ScreenLockEnabled,
                "DiskEncryptionEnabled": DiskEncryptionEnabled,
                "NotJailbroken": NotJailbroken,
                "OrgPreferredAppsRunning": OrgPreferredAppsRunning,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["ID"]) -> MetaOapg.properties.ID: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Serial Number"]) -> MetaOapg.properties.serial_number: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Name"]) -> MetaOapg.properties.Name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Model"]) -> MetaOapg.properties.Model: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Ownership"]) -> MetaOapg.properties.Ownership: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Platform"]) -> MetaOapg.properties.Platform: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Architecture"]) -> MetaOapg.properties.Architecture: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Source"]) -> MetaOapg.properties.Source: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Banned"]) -> MetaOapg.properties.Banned: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["OS"]) -> MetaOapg.properties.OS: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["MDM Present"]) -> MetaOapg.properties.mdm_present: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["MDM Vendor Name"]) -> MetaOapg.properties.mdm_vendor_name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["MDM Vendor UDID "]) -> MetaOapg.properties.mdm_vendor_udid_: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Last MDM Data Synced At"]) -> MetaOapg.properties.last_mdm_data_synced_at: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["MDM Compliant"]) -> MetaOapg.properties.mdm_compliant: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["App Version"]) -> MetaOapg.properties.app_version: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Created At"]) -> MetaOapg.properties.created_at: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Last Login"]) -> MetaOapg.properties.last_login: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Number Of Users"]) -> MetaOapg.properties.number_of_users: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Emails"]) -> MetaOapg.properties.Emails: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Role Names"]) -> MetaOapg.properties.role_names: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Status"]) -> MetaOapg.properties.Status: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Archived_At"]) -> MetaOapg.properties.Archived_At: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Trustscore"]) -> MetaOapg.properties.Trustscore: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["UpToDateOS"]) -> MetaOapg.properties.UpToDateOS: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["AutoUpdateEnabled"]) -> MetaOapg.properties.AutoUpdateEnabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["FirewallEnabled"]) -> MetaOapg.properties.FirewallEnabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["ScreenLockEnabled"]) -> MetaOapg.properties.ScreenLockEnabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["DiskEncryptionEnabled"]) -> MetaOapg.properties.DiskEncryptionEnabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["NotJailbroken"]) -> MetaOapg.properties.NotJailbroken: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["OrgPreferredAppsRunning"]) -> MetaOapg.properties.OrgPreferredAppsRunning: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["ID", "Serial Number", "Name", "Model", "Ownership", "Platform", "Architecture", "Source", "Banned", "OS", "MDM Present", "MDM Vendor Name", "MDM Vendor UDID ", "Last MDM Data Synced At", "MDM Compliant", "App Version", "Created At", "Last Login", "Number Of Users", "Emails", "Role Names", "Status", "Archived_At", "Trustscore", "UpToDateOS", "AutoUpdateEnabled", "FirewallEnabled", "ScreenLockEnabled", "DiskEncryptionEnabled", "NotJailbroken", "OrgPreferredAppsRunning", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["ID"]) -> typing.Union[MetaOapg.properties.ID, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Serial Number"]) -> typing.Union[MetaOapg.properties.serial_number, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Name"]) -> typing.Union[MetaOapg.properties.Name, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Model"]) -> typing.Union[MetaOapg.properties.Model, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Ownership"]) -> typing.Union[MetaOapg.properties.Ownership, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Platform"]) -> typing.Union[MetaOapg.properties.Platform, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Architecture"]) -> typing.Union[MetaOapg.properties.Architecture, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Source"]) -> typing.Union[MetaOapg.properties.Source, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Banned"]) -> typing.Union[MetaOapg.properties.Banned, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["OS"]) -> typing.Union[MetaOapg.properties.OS, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["MDM Present"]) -> typing.Union[MetaOapg.properties.mdm_present, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["MDM Vendor Name"]) -> typing.Union[MetaOapg.properties.mdm_vendor_name, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["MDM Vendor UDID "]) -> typing.Union[MetaOapg.properties.mdm_vendor_udid_, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Last MDM Data Synced At"]) -> typing.Union[MetaOapg.properties.last_mdm_data_synced_at, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["MDM Compliant"]) -> typing.Union[MetaOapg.properties.mdm_compliant, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["App Version"]) -> typing.Union[MetaOapg.properties.app_version, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Created At"]) -> typing.Union[MetaOapg.properties.created_at, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Last Login"]) -> typing.Union[MetaOapg.properties.last_login, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Number Of Users"]) -> typing.Union[MetaOapg.properties.number_of_users, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Emails"]) -> typing.Union[MetaOapg.properties.Emails, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Role Names"]) -> typing.Union[MetaOapg.properties.role_names, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Status"]) -> typing.Union[MetaOapg.properties.Status, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Archived_At"]) -> typing.Union[MetaOapg.properties.Archived_At, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Trustscore"]) -> typing.Union[MetaOapg.properties.Trustscore, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["UpToDateOS"]) -> typing.Union[MetaOapg.properties.UpToDateOS, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["AutoUpdateEnabled"]) -> typing.Union[MetaOapg.properties.AutoUpdateEnabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["FirewallEnabled"]) -> typing.Union[MetaOapg.properties.FirewallEnabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["ScreenLockEnabled"]) -> typing.Union[MetaOapg.properties.ScreenLockEnabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["DiskEncryptionEnabled"]) -> typing.Union[MetaOapg.properties.DiskEncryptionEnabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["NotJailbroken"]) -> typing.Union[MetaOapg.properties.NotJailbroken, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["OrgPreferredAppsRunning"]) -> typing.Union[MetaOapg.properties.OrgPreferredAppsRunning, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ID", "Serial Number", "Name", "Model", "Ownership", "Platform", "Architecture", "Source", "Banned", "OS", "MDM Present", "MDM Vendor Name", "MDM Vendor UDID ", "Last MDM Data Synced At", "MDM Compliant", "App Version", "Created At", "Last Login", "Number Of Users", "Emails", "Role Names", "Status", "Archived_At", "Trustscore", "UpToDateOS", "AutoUpdateEnabled", "FirewallEnabled", "ScreenLockEnabled", "DiskEncryptionEnabled", "NotJailbroken", "OrgPreferredAppsRunning", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        ID: typing.Union[MetaOapg.properties.ID, str, schemas.Unset] = schemas.unset,
        Name: typing.Union[MetaOapg.properties.Name, str, schemas.Unset] = schemas.unset,
        Model: typing.Union[MetaOapg.properties.Model, str, schemas.Unset] = schemas.unset,
        Ownership: typing.Union[MetaOapg.properties.Ownership, str, schemas.Unset] = schemas.unset,
        Platform: typing.Union[MetaOapg.properties.Platform, str, schemas.Unset] = schemas.unset,
        Architecture: typing.Union[MetaOapg.properties.Architecture, str, schemas.Unset] = schemas.unset,
        Source: typing.Union[MetaOapg.properties.Source, str, schemas.Unset] = schemas.unset,
        Banned: typing.Union[MetaOapg.properties.Banned, str, schemas.Unset] = schemas.unset,
        OS: typing.Union[MetaOapg.properties.OS, str, schemas.Unset] = schemas.unset,
        Emails: typing.Union[MetaOapg.properties.Emails, str, schemas.Unset] = schemas.unset,
        Status: typing.Union[MetaOapg.properties.Status, str, schemas.Unset] = schemas.unset,
        Archived_At: typing.Union[MetaOapg.properties.Archived_At, str, schemas.Unset] = schemas.unset,
        Trustscore: typing.Union[MetaOapg.properties.Trustscore, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        UpToDateOS: typing.Union[MetaOapg.properties.UpToDateOS, bool, schemas.Unset] = schemas.unset,
        AutoUpdateEnabled: typing.Union[MetaOapg.properties.AutoUpdateEnabled, str, schemas.Unset] = schemas.unset,
        FirewallEnabled: typing.Union[MetaOapg.properties.FirewallEnabled, str, schemas.Unset] = schemas.unset,
        ScreenLockEnabled: typing.Union[MetaOapg.properties.ScreenLockEnabled, str, schemas.Unset] = schemas.unset,
        DiskEncryptionEnabled: typing.Union[MetaOapg.properties.DiskEncryptionEnabled, str, schemas.Unset] = schemas.unset,
        NotJailbroken: typing.Union[MetaOapg.properties.NotJailbroken, str, schemas.Unset] = schemas.unset,
        OrgPreferredAppsRunning: typing.Union[MetaOapg.properties.OrgPreferredAppsRunning, str, schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
    ) -> 'SchemaFor200ResponseBodyTextCsv':
        return super().__new__(
            cls,
            *args,
            ID=ID,
            Name=Name,
            Model=Model,
            Ownership=Ownership,
            Platform=Platform,
            Architecture=Architecture,
            Source=Source,
            Banned=Banned,
            OS=OS,
            Emails=Emails,
            Status=Status,
            Archived_At=Archived_At,
            Trustscore=Trustscore,
            UpToDateOS=UpToDateOS,
            AutoUpdateEnabled=AutoUpdateEnabled,
            FirewallEnabled=FirewallEnabled,
            ScreenLockEnabled=ScreenLockEnabled,
            DiskEncryptionEnabled=DiskEncryptionEnabled,
            NotJailbroken=NotJailbroken,
            OrgPreferredAppsRunning=OrgPreferredAppsRunning,
            _configuration=_configuration,
            **kwargs,
        )


@dataclass
class ApiResponseFor200(api_client.ApiResponse):
    response: urllib3.HTTPResponse
    body: typing.Union[
        SchemaFor200ResponseBodyTextCsv,
    ]
    headers: schemas.Unset = schemas.unset


_response_for_200 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor200,
    content={
        'text/csv': api_client.MediaType(
            schema=SchemaFor200ResponseBodyTextCsv),
    },
)


@dataclass
class ApiResponseFor400(api_client.ApiResponse):
    response: urllib3.HTTPResponse
    body: schemas.Unset = schemas.unset
    headers: schemas.Unset = schemas.unset


_response_for_400 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor400,
)


@dataclass
class ApiResponseFor500(api_client.ApiResponse):
    response: urllib3.HTTPResponse
    body: schemas.Unset = schemas.unset
    headers: schemas.Unset = schemas.unset


_response_for_500 = api_client.OpenApiResponse(
    response_cls=ApiResponseFor500,
)
_status_code_to_response = {
    '200': _response_for_200,
    '400': _response_for_400,
    '500': _response_for_500,
}
_all_accept_content_types = (
    'text/csv',
)


class BaseApi(api_client.Api):

    def _v2_devices_csv_get_oapg(
        self: api_client.Api,
        query_params: RequestQueryParams = frozendict.frozendict(),
        accept_content_types: typing.Tuple[str] = _all_accept_content_types,
        stream: bool = False,
        timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
        skip_deserialization: bool = False,
    ) -> typing.Union[
        ApiResponseFor200,
        api_client.ApiResponseWithoutDeserialization
    ]:
        """
        Get the Devices from an Organization in CSV format
        :param skip_deserialization: If true then api_response.response will be set but
            api_response.body and api_response.headers will not be deserialized into schema
            class instances
        """
        self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params)
        used_path = path.value

        prefix_separator_iterator = None
        for parameter in (
            request_query_name,
            request_query_serialnumber,
            request_query_model,
            request_query_trust_level,
            request_query_created_at,
            request_query_last_login,
            request_query_platform,
            request_query_order,
            request_query_order_by,
            request_query_active,
        ):
            parameter_data = query_params.get(parameter.name, schemas.unset)
            if parameter_data is schemas.unset:
                continue
            if prefix_separator_iterator is None:
                prefix_separator_iterator = parameter.get_prefix_separator_iterator()
            serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator)
            for serialized_value in serialized_data.values():
                used_path += serialized_value

        _headers = HTTPHeaderDict()
        # TODO add cookie handling
        if accept_content_types:
            for accept_content_type in accept_content_types:
                _headers.add('Accept', accept_content_type)

        response = self.api_client.call_api(
            resource_path=used_path,
            method='get'.upper(),
            headers=_headers,
            auth_settings=_auth,
            stream=stream,
            timeout=timeout,
        )

        if skip_deserialization:
            api_response = api_client.ApiResponseWithoutDeserialization(response=response)
        else:
            response_for_status = _status_code_to_response.get(str(response.status))
            if response_for_status:
                api_response = response_for_status.deserialize(response, self.api_client.configuration)
            else:
                api_response = api_client.ApiResponseWithoutDeserialization(response=response)

        if not 200 <= response.status <= 299:
            raise exceptions.ApiException(api_response=api_response)

        return api_response


class V2DevicesCsvGet(BaseApi):
    # this class is used by api classes that refer to endpoints with operationId fn names

    def v2_devices_csv_get(
        self: BaseApi,
        query_params: RequestQueryParams = frozendict.frozendict(),
        accept_content_types: typing.Tuple[str] = _all_accept_content_types,
        stream: bool = False,
        timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
        skip_deserialization: bool = False,
    ) -> typing.Union[
        ApiResponseFor200,
        api_client.ApiResponseWithoutDeserialization
    ]:
        return self._v2_devices_csv_get_oapg(
            query_params=query_params,
            accept_content_types=accept_content_types,
            stream=stream,
            timeout=timeout,
            skip_deserialization=skip_deserialization
        )


class ApiForget(BaseApi):
    # this class is used by api classes that refer to endpoints by path and http method names

    def get(
        self: BaseApi,
        query_params: RequestQueryParams = frozendict.frozendict(),
        accept_content_types: typing.Tuple[str] = _all_accept_content_types,
        stream: bool = False,
        timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
        skip_deserialization: bool = False,
    ) -> typing.Union[
        ApiResponseFor200,
        api_client.ApiResponseWithoutDeserialization
    ]:
        return self._v2_devices_csv_get_oapg(
            query_params=query_params,
            accept_content_types=accept_content_types,
            stream=stream,
            timeout=timeout,
            skip_deserialization=skip_deserialization
        )


