"""
    XBIM Flex API v2

    This is the XBIM Flex Swagger service where you can explore the REST API for the platform.  # noqa: E501

    The version of the OpenAPI document: 2.0
    Contact: info@xbim.net
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from xbim_flex.aim.api_client import ApiClient, Endpoint as _Endpoint
from xbim_flex.aim.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from xbim_flex.aim.model.document import Document
from xbim_flex.aim.model.document_create import DocumentCreate
from xbim_flex.aim.model.entity import Entity
from xbim_flex.aim.model.level import Level
from xbim_flex.aim.model.level_create import LevelCreate
from xbim_flex.aim.model.level_edit import LevelEdit
from xbim_flex.aim.model.o_data_list_response_of_attribute_definition import ODataListResponseOfAttributeDefinition
from xbim_flex.aim.model.o_data_list_response_of_entity import ODataListResponseOfEntity
from xbim_flex.aim.model.o_data_list_response_of_level import ODataListResponseOfLevel


class LevelsApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client
        self.levels_add_document_by_assetmodelid_and_entityid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (Document,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Levels(AssetModelId={assetModelId}, EntityId={entityId})/DocumentEntities",
                'operation_id': 'levels_add_document_by_assetmodelid_and_entityid_and_tenantid',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_model_id',
                    'entity_id',
                    'tenant_id',
                    'region',
                    'document',
                ],
                'required': [
                    'asset_model_id',
                    'entity_id',
                    'tenant_id',
                    'region',
                    'document',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope",
                        "SANDBOX": "Sandbox"
                    },
                },
                'openapi_types': {
                    'asset_model_id':
                        (int,),
                    'entity_id':
                        (int,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'document':
                        (DocumentCreate,),
                },
                'attribute_map': {
                    'asset_model_id': 'assetModelId',
                    'entity_id': 'entityId',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                },
                'location_map': {
                    'asset_model_id': 'path',
                    'entity_id': 'path',
                    'tenant_id': 'path',
                    'region': 'path',
                    'document': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.levels_as_of_by_date_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (ODataListResponseOfEntity,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Levels/AsOf(date={date})",
                'operation_id': 'levels_as_of_by_date_and_tenantid',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'date',
                    'tenant_id',
                    'region',
                    'expand',
                    'filter',
                    'select',
                    'orderby',
                    'top',
                    'skip',
                    'count',
                ],
                'required': [
                    'date',
                    'tenant_id',
                    'region',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope",
                        "SANDBOX": "Sandbox"
                    },
                },
                'openapi_types': {
                    'date':
                        (datetime,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'expand':
                        (str,),
                    'filter':
                        (str,),
                    'select':
                        (str,),
                    'orderby':
                        (str,),
                    'top':
                        (int,),
                    'skip':
                        (int,),
                    'count':
                        (bool,),
                },
                'attribute_map': {
                    'date': 'date',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                    'expand': '$expand',
                    'filter': '$filter',
                    'select': '$select',
                    'orderby': '$orderby',
                    'top': '$top',
                    'skip': '$skip',
                    'count': '$count',
                },
                'location_map': {
                    'date': 'path',
                    'tenant_id': 'path',
                    'region': 'path',
                    'expand': 'query',
                    'filter': 'query',
                    'select': 'query',
                    'orderby': 'query',
                    'top': 'query',
                    'skip': 'query',
                    'count': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'application/json;odata.metadata=none',
                    'application/json;odata.metadata=minimal',
                    'application/json;odata.metadata=full',
                    'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.levels_get_available_properties_by_assetid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (ODataListResponseOfAttributeDefinition,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Levels/GetAvailableProperties(assetId={assetId})",
                'operation_id': 'levels_get_available_properties_by_assetid_and_tenantid',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_id',
                    'tenant_id',
                    'region',
                    'expand',
                    'filter',
                    'select',
                    'orderby',
                    'top',
                    'skip',
                    'count',
                ],
                'required': [
                    'asset_id',
                    'tenant_id',
                    'region',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope",
                        "SANDBOX": "Sandbox"
                    },
                },
                'openapi_types': {
                    'asset_id':
                        (int,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'expand':
                        (str,),
                    'filter':
                        (str,),
                    'select':
                        (str,),
                    'orderby':
                        (str,),
                    'top':
                        (int,),
                    'skip':
                        (int,),
                    'count':
                        (bool,),
                },
                'attribute_map': {
                    'asset_id': 'assetId',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                    'expand': '$expand',
                    'filter': '$filter',
                    'select': '$select',
                    'orderby': '$orderby',
                    'top': '$top',
                    'skip': '$skip',
                    'count': '$count',
                },
                'location_map': {
                    'asset_id': 'path',
                    'tenant_id': 'path',
                    'region': 'path',
                    'expand': 'query',
                    'filter': 'query',
                    'select': 'query',
                    'orderby': 'query',
                    'top': 'query',
                    'skip': 'query',
                    'count': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'application/json;odata.metadata=none',
                    'application/json;odata.metadata=minimal',
                    'application/json;odata.metadata=full',
                    'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.levels_get_by_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (ODataListResponseOfLevel,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Levels",
                'operation_id': 'levels_get_by_tenantid',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'tenant_id',
                    'region',
                    'expand',
                    'filter',
                    'select',
                    'orderby',
                    'top',
                    'skip',
                    'count',
                ],
                'required': [
                    'tenant_id',
                    'region',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope",
                        "SANDBOX": "Sandbox"
                    },
                },
                'openapi_types': {
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'expand':
                        (str,),
                    'filter':
                        (str,),
                    'select':
                        (str,),
                    'orderby':
                        (str,),
                    'top':
                        (int,),
                    'skip':
                        (int,),
                    'count':
                        (bool,),
                },
                'attribute_map': {
                    'tenant_id': 'tenantId',
                    'region': 'region',
                    'expand': '$expand',
                    'filter': '$filter',
                    'select': '$select',
                    'orderby': '$orderby',
                    'top': '$top',
                    'skip': '$skip',
                    'count': '$count',
                },
                'location_map': {
                    'tenant_id': 'path',
                    'region': 'path',
                    'expand': 'query',
                    'filter': 'query',
                    'select': 'query',
                    'orderby': 'query',
                    'top': 'query',
                    'skip': 'query',
                    'count': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'application/json;odata.metadata=none',
                    'application/json;odata.metadata=minimal',
                    'application/json;odata.metadata=full',
                    'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.levels_get_single_entity_by_assetmodelid_and_entityid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (Level,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Levels(AssetModelId={assetModelId}, EntityId={entityId})",
                'operation_id': 'levels_get_single_entity_by_assetmodelid_and_entityid_and_tenantid',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_model_id',
                    'entity_id',
                    'tenant_id',
                    'region',
                    'expand',
                    'select',
                ],
                'required': [
                    'asset_model_id',
                    'entity_id',
                    'tenant_id',
                    'region',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope",
                        "SANDBOX": "Sandbox"
                    },
                },
                'openapi_types': {
                    'asset_model_id':
                        (int,),
                    'entity_id':
                        (int,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'expand':
                        (str,),
                    'select':
                        (str,),
                },
                'attribute_map': {
                    'asset_model_id': 'assetModelId',
                    'entity_id': 'entityId',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                    'expand': '$expand',
                    'select': '$select',
                },
                'location_map': {
                    'asset_model_id': 'path',
                    'entity_id': 'path',
                    'tenant_id': 'path',
                    'region': 'path',
                    'expand': 'query',
                    'select': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json',
                    'application/json;odata.metadata=none',
                    'application/json;odata.metadata=minimal',
                    'application/json;odata.metadata=full'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.levels_patch_by_assetmodelid_and_entityid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (Entity,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Levels(AssetModelId={assetModelId}, EntityId={entityId})",
                'operation_id': 'levels_patch_by_assetmodelid_and_entityid_and_tenantid',
                'http_method': 'PATCH',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_model_id',
                    'entity_id',
                    'tenant_id',
                    'region',
                    'patch',
                ],
                'required': [
                    'asset_model_id',
                    'entity_id',
                    'tenant_id',
                    'region',
                    'patch',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope",
                        "SANDBOX": "Sandbox"
                    },
                },
                'openapi_types': {
                    'asset_model_id':
                        (int,),
                    'entity_id':
                        (int,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'patch':
                        (LevelEdit,),
                },
                'attribute_map': {
                    'asset_model_id': 'assetModelId',
                    'entity_id': 'entityId',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                },
                'location_map': {
                    'asset_model_id': 'path',
                    'entity_id': 'path',
                    'tenant_id': 'path',
                    'region': 'path',
                    'patch': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.levels_post_by_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (Entity,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Levels",
                'operation_id': 'levels_post_by_tenantid',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'tenant_id',
                    'region',
                    'level',
                ],
                'required': [
                    'tenant_id',
                    'region',
                    'level',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope",
                        "SANDBOX": "Sandbox"
                    },
                },
                'openapi_types': {
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'level':
                        (LevelCreate,),
                },
                'attribute_map': {
                    'tenant_id': 'tenantId',
                    'region': 'region',
                },
                'location_map': {
                    'tenant_id': 'path',
                    'region': 'path',
                    'level': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )

    def levels_add_document_by_assetmodelid_and_entityid_and_tenantid(
        self,
        asset_model_id,
        entity_id,
        tenant_id,
        document,
        region="UK",
        **kwargs
    ):
        """Post Levels add document by assetmodelid, entityid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Adds a new document to a model entity. Return Type: Document <br/><br/>    # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.levels_add_document_by_assetmodelid_and_entityid_and_tenantid(asset_model_id, entity_id, tenant_id, document, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            asset_model_id (int): The model Id
            entity_id (int): The unique identifier for the target entity (Entity Label)
            tenant_id (str): The unique Tenant ID (UUID or Identifier string)
            document (DocumentCreate): A document to create
            region (str): The data center region the data resides in. defaults to "UK", must be one of ["UK"]

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Document
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['asset_model_id'] = \
            asset_model_id
        kwargs['entity_id'] = \
            entity_id
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        kwargs['document'] = \
            document
        return self.levels_add_document_by_assetmodelid_and_entityid_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def levels_as_of_by_date_and_tenantid(
        self,
        date,
        tenant_id,
        region="UK",
        **kwargs
    ):
        """Get Levels as of by date and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Return Type: ODataListResponseOfEntity For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>. <br/><br/>    # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.levels_as_of_by_date_and_tenantid(date, tenant_id, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            date (datetime):
            tenant_id (str): The unique Tenant ID (UUID or Identifier string)
            region (str): The data center region the data resides in. defaults to "UK", must be one of ["UK"]

        Keyword Args:
            expand (str): Expands related entities inline.. [optional]
            filter (str): Filters the results, based on a Boolean condition.. [optional]
            select (str): Selects which properties to include in the response.. [optional]
            orderby (str): Sorts the results.. [optional]
            top (int): Returns only the first n results.. [optional]
            skip (int): Skips the first n results.. [optional]
            count (bool): Includes a count of the matching results in the response.. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            ODataListResponseOfEntity
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['date'] = \
            date
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        return self.levels_as_of_by_date_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def levels_get_available_properties_by_assetid_and_tenantid(
        self,
        asset_id,
        tenant_id,
        region="UK",
        **kwargs
    ):
        """Get Levels available properties by assetid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Gets the Properties available on this Model. Return Type: ODataListResponseOfAttributeDefinition For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>. <br/><br/>    # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.levels_get_available_properties_by_assetid_and_tenantid(asset_id, tenant_id, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            asset_id (int): The unique key for the asset
            tenant_id (str): The unique Tenant ID (UUID or Identifier string)
            region (str): The data center region the data resides in. defaults to "UK", must be one of ["UK"]

        Keyword Args:
            expand (str): Expands related entities inline.. [optional]
            filter (str): Filters the results, based on a Boolean condition.. [optional]
            select (str): Selects which properties to include in the response.. [optional]
            orderby (str): Sorts the results.. [optional]
            top (int): Returns only the first n results.. [optional]
            skip (int): Skips the first n results.. [optional]
            count (bool): Includes a count of the matching results in the response.. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            ODataListResponseOfAttributeDefinition
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['asset_id'] = \
            asset_id
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        return self.levels_get_available_properties_by_assetid_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def levels_get_by_tenantid(
        self,
        tenant_id,
        region="UK",
        **kwargs
    ):
        """Get Levels by tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Returns the EntitySet Levels. Return Type: ODataListResponseOfLevel For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>. <br/><br/>    # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.levels_get_by_tenantid(tenant_id, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            tenant_id (str): The unique Tenant ID (UUID or Identifier string)
            region (str): The data center region the data resides in. defaults to "UK", must be one of ["UK"]

        Keyword Args:
            expand (str): Expands related entities inline.. [optional]
            filter (str): Filters the results, based on a Boolean condition.. [optional]
            select (str): Selects which properties to include in the response.. [optional]
            orderby (str): Sorts the results.. [optional]
            top (int): Returns only the first n results.. [optional]
            skip (int): Skips the first n results.. [optional]
            count (bool): Includes a count of the matching results in the response.. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            ODataListResponseOfLevel
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        return self.levels_get_by_tenantid_endpoint.call_with_http_info(**kwargs)

    def levels_get_single_entity_by_assetmodelid_and_entityid_and_tenantid(
        self,
        asset_model_id,
        entity_id,
        tenant_id,
        region="UK",
        **kwargs
    ):
        """Get Levels single entity by assetmodelid, entityid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Return Type: Level <br/><br/>    # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.levels_get_single_entity_by_assetmodelid_and_entityid_and_tenantid(asset_model_id, entity_id, tenant_id, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            asset_model_id (int):
            entity_id (int):
            tenant_id (str): The unique Tenant ID (UUID or Identifier string)
            region (str): The data center region the data resides in. defaults to "UK", must be one of ["UK"]

        Keyword Args:
            expand (str): Expands related entities inline.. [optional]
            select (str): Selects which properties to include in the response.. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Level
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['asset_model_id'] = \
            asset_model_id
        kwargs['entity_id'] = \
            entity_id
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        return self.levels_get_single_entity_by_assetmodelid_and_entityid_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def levels_patch_by_assetmodelid_and_entityid_and_tenantid(
        self,
        asset_model_id,
        entity_id,
        tenant_id,
        patch,
        region="UK",
        **kwargs
    ):
        """Patch Levels by assetmodelid, entityid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Return Type: Entity <br/><br/>    # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.levels_patch_by_assetmodelid_and_entityid_and_tenantid(asset_model_id, entity_id, tenant_id, patch, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            asset_model_id (int):
            entity_id (int):
            tenant_id (str): The unique Tenant ID (UUID or Identifier string)
            patch (LevelEdit):
            region (str): The data center region the data resides in. defaults to "UK", must be one of ["UK"]

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Entity
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['asset_model_id'] = \
            asset_model_id
        kwargs['entity_id'] = \
            entity_id
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        kwargs['patch'] = \
            patch
        return self.levels_patch_by_assetmodelid_and_entityid_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def levels_post_by_tenantid(
        self,
        tenant_id,
        level,
        region="UK",
        **kwargs
    ):
        """Post Levels by tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Post a new entity to EntitySet Levels. Return Type: Entity <br/><br/>    # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.levels_post_by_tenantid(tenant_id, level, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            tenant_id (str): The unique Tenant ID (UUID or Identifier string)
            level (LevelCreate): The entity to post
            region (str): The data center region the data resides in. defaults to "UK", must be one of ["UK"]

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Entity
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        kwargs['level'] = \
            level
        return self.levels_post_by_tenantid_endpoint.call_with_http_info(**kwargs)

