"""
    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.attribute_definition_create import AttributeDefinitionCreate
from xbim_flex.aim.model.attribute_definition_edit import AttributeDefinitionEdit
from xbim_flex.aim.model.attribute_definition_entity import AttributeDefinitionEntity
from xbim_flex.aim.model.o_data_list_response_of_attribute_definition_entity import ODataListResponseOfAttributeDefinitionEntity
from xbim_flex.aim.model.o_data_list_response_of_attribute_value import ODataListResponseOfAttributeValue
from xbim_flex.aim.model.o_data_list_response_of_complex_value_base import ODataListResponseOfComplexValueBase
from xbim_flex.aim.model.o_data_response_of_boolean import ODataResponseOfBoolean


class AttributesApi(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.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (ODataResponseOfBoolean,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})/ChangeDataType()",
                'operation_id': 'attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_model_id',
                    'definition_id',
                    'data_type',
                    'tenant_id',
                    'region',
                ],
                'required': [
                    'asset_model_id',
                    'definition_id',
                    'data_type',
                    'tenant_id',
                    'region',
                ],
                'nullable': [
                ],
                'enum': [
                    'data_type',
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('data_type',): {

                        "INTEGER": "Integer",
                        "REAL": "Real",
                        "DATE": "Date",
                        "LOGICAL": "Logical",
                        "TEXT": "Text"
                    },
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope",
                        "SANDBOX": "Sandbox"
                    },
                },
                'openapi_types': {
                    'asset_model_id':
                        (int,),
                    'definition_id':
                        (int,),
                    'data_type':
                        (str,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                },
                'attribute_map': {
                    'asset_model_id': 'assetModelId',
                    'definition_id': 'definitionId',
                    'data_type': 'dataType',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                },
                'location_map': {
                    'asset_model_id': 'path',
                    'definition_id': 'path',
                    'data_type': 'query',
                    'tenant_id': 'path',
                    'region': 'path',
                },
                '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.attributes_get_by_assetmodelid_and_definitionid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (AttributeDefinitionEntity,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})",
                'operation_id': 'attributes_get_by_assetmodelid_and_definitionid_and_tenantid',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_model_id',
                    'definition_id',
                    'tenant_id',
                    'region',
                    'expand',
                    'select',
                ],
                'required': [
                    'asset_model_id',
                    'definition_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,),
                    'definition_id':
                        (int,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'expand':
                        (str,),
                    'select':
                        (str,),
                },
                'attribute_map': {
                    'asset_model_id': 'assetModelId',
                    'definition_id': 'definitionId',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                    'expand': '$expand',
                    'select': '$select',
                },
                'location_map': {
                    'asset_model_id': 'path',
                    'definition_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.attributes_get_by_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (ODataListResponseOfAttributeDefinitionEntity,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Attributes",
                'operation_id': 'attributes_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.attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (ODataListResponseOfComplexValueBase,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})/GetModelValues()",
                'operation_id': 'attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_model_id',
                    'definition_id',
                    'tenant_id',
                    'region',
                    'expand',
                    'filter',
                    'select',
                    'orderby',
                    'top',
                    'skip',
                    'count',
                ],
                'required': [
                    'asset_model_id',
                    'definition_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,),
                    'definition_id':
                        (int,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'expand':
                        (str,),
                    'filter':
                        (str,),
                    'select':
                        (str,),
                    'orderby':
                        (str,),
                    'top':
                        (int,),
                    'skip':
                        (int,),
                    'count':
                        (bool,),
                },
                'attribute_map': {
                    'asset_model_id': 'assetModelId',
                    'definition_id': 'definitionId',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                    'expand': '$expand',
                    'filter': '$filter',
                    'select': '$select',
                    'orderby': '$orderby',
                    'top': '$top',
                    'skip': '$skip',
                    'count': '$count',
                },
                'location_map': {
                    'asset_model_id': 'path',
                    'definition_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'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (ODataListResponseOfAttributeValue,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Attributes/GetValuesForEntity(assetModelId={assetModelId},entityId={entityId})",
                'operation_id': 'attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_model_id',
                    'entity_id',
                    'tenant_id',
                    'region',
                    'expand',
                    'filter',
                    'select',
                    'orderby',
                    'top',
                    'skip',
                    'count',
                ],
                '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,),
                    'filter':
                        (str,),
                    'select':
                        (str,),
                    'orderby':
                        (str,),
                    'top':
                        (int,),
                    'skip':
                        (int,),
                    'count':
                        (bool,),
                },
                'attribute_map': {
                    'asset_model_id': 'assetModelId',
                    'entity_id': 'entityId',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                    'expand': '$expand',
                    'filter': '$filter',
                    'select': '$select',
                    'orderby': '$orderby',
                    'top': '$top',
                    'skip': '$skip',
                    'count': '$count',
                },
                'location_map': {
                    'asset_model_id': 'path',
                    'entity_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'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.attributes_import_by_assetmodelid_and_definitionid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (ODataResponseOfBoolean,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})/Import()",
                'operation_id': 'attributes_import_by_assetmodelid_and_definitionid_and_tenantid',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_model_id',
                    'definition_id',
                    'tenant_id',
                    'region',
                ],
                'required': [
                    'asset_model_id',
                    'definition_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,),
                    'definition_id':
                        (int,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                },
                'attribute_map': {
                    'asset_model_id': 'assetModelId',
                    'definition_id': 'definitionId',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                },
                'location_map': {
                    'asset_model_id': 'path',
                    'definition_id': 'path',
                    'tenant_id': 'path',
                    'region': 'path',
                },
                '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.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (AttributeDefinitionEntity,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Attributes(AssetModelId={assetModelId},AttributeDefinitionId={definitionId})",
                'operation_id': 'attributes_patch_by_assetmodelid_and_definitionid_and_tenantid',
                'http_method': 'PATCH',
                'servers': None,
            },
            params_map={
                'all': [
                    'asset_model_id',
                    'definition_id',
                    'tenant_id',
                    'region',
                    'patch',
                ],
                'required': [
                    'asset_model_id',
                    'definition_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,),
                    'definition_id':
                        (int,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'patch':
                        (AttributeDefinitionEdit,),
                },
                'attribute_map': {
                    'asset_model_id': 'assetModelId',
                    'definition_id': 'definitionId',
                    'tenant_id': 'tenantId',
                    'region': 'region',
                },
                'location_map': {
                    'asset_model_id': 'path',
                    'definition_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.attributes_post_by_tenantid_endpoint = _Endpoint(
            settings={
                'response_type': (AttributeDefinitionEntity,),
                'auth': [
                    'oauth2'
                ],
                'endpoint_path': "/{region}/aim/2.0/{tenantId}/Attributes",
                'operation_id': 'attributes_post_by_tenantid',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'tenant_id',
                    'region',
                    'attribute_definition_entity',
                ],
                'required': [
                    'tenant_id',
                    'region',
                    'attribute_definition_entity',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

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

    def attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid(
        self,
        asset_model_id,
        definition_id,
        data_type,
        tenant_id,
        region="UK",
        **kwargs
    ):
        """Post Attributes change data type by assetmodelid, definitionid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Change the underlying data type for the attribute, migrating any existing data where possible. This operation will attempt to generate new typed data values from the current value. Note this may result in an empty value               if no conversion can be made - however the original values will be kept allowing the process to be reversed, so this is not permanently lossy.              <br />E.g. converting Text value '15' to a Real or Integer will produce expected results, but an original value of 'FIVE' would fail to parse.              <br />              Equally, some conversions make little sense, such as Logical converting to Date, and will be rejected.. Return Type: ODataResponseOfBoolean 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.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, data_type, tenant_id, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            asset_model_id (int): The model Id
            definition_id (int): The attribute definition Id
            data_type (str):
            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:
            _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:
            ODataResponseOfBoolean
                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['definition_id'] = \
            definition_id
        kwargs['data_type'] = \
            data_type
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        return self.attributes_change_data_type_by_assetmodelid_and_definitionid_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def attributes_get_by_assetmodelid_and_definitionid_and_tenantid(
        self,
        asset_model_id,
        definition_id,
        tenant_id,
        region="UK",
        **kwargs
    ):
        """Get Attributes by assetmodelid, definitionid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Operation to interrogate a single attribute definition. This service returns a single attribute definition for the provided keys, or responds with a not found (404). Return Type: AttributeDefinitionEntity <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.attributes_get_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, tenant_id, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            asset_model_id (int): The model Id
            definition_id (int): The attribute definition ID
            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:
            AttributeDefinitionEntity
                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['definition_id'] = \
            definition_id
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        return self.attributes_get_by_assetmodelid_and_definitionid_and_tenantid_endpoint.call_with_http_info(**kwargs)

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

        <span style='font-size: 17px;'>Summary</span><br/>Returns the EntitySet Attributes. Return Type: ODataListResponseOfAttributeDefinitionEntity 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.attributes_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:
            ODataListResponseOfAttributeDefinitionEntity
                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.attributes_get_by_tenantid_endpoint.call_with_http_info(**kwargs)

    def attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid(
        self,
        asset_model_id,
        definition_id,
        tenant_id,
        region="UK",
        **kwargs
    ):
        """Get Attributes model values by assetmodelid, definitionid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Gets a sample of the attribute values for the definition. Return Type: ODataListResponseOfComplexValueBase 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.attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, tenant_id, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            asset_model_id (int): The model Id
            definition_id (int): The attribute definition Id
            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:
            ODataListResponseOfComplexValueBase
                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['definition_id'] = \
            definition_id
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        return self.attributes_get_model_values_by_assetmodelid_and_definitionid_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid(
        self,
        asset_model_id,
        entity_id,
        tenant_id,
        region="UK",
        **kwargs
    ):
        """Get Attributes values for entity by assetmodelid, entityid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Gets the unimported attribute values for an entity from the source model. Can be used to see values not yet imported. Return Type: ODataListResponseOfAttributeValue 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.attributes_get_values_for_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): The model Id
            entity_id (int): The entity Id
            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:
            ODataListResponseOfAttributeValue
                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.attributes_get_values_for_entity_by_assetmodelid_and_entityid_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def attributes_import_by_assetmodelid_and_definitionid_and_tenantid(
        self,
        asset_model_id,
        definition_id,
        tenant_id,
        region="UK",
        **kwargs
    ):
        """Post Attributes import by assetmodelid, definitionid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Imports attribute values from the source model file. Return Type: ODataResponseOfBoolean 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.attributes_import_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, tenant_id, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            asset_model_id (int): The model Id
            definition_id (int): The attribute definition Id
            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:
            _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:
            ODataResponseOfBoolean
                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['definition_id'] = \
            definition_id
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        return self.attributes_import_by_assetmodelid_and_definitionid_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def attributes_patch_by_assetmodelid_and_definitionid_and_tenantid(
        self,
        asset_model_id,
        definition_id,
        tenant_id,
        patch,
        region="UK",
        **kwargs
    ):
        """Patch Attributes by assetmodelid, definitionid and tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Update an AttributeDefinition for a model. 'EditPermissions' for a model is required to amend an attribute. Return Type: AttributeDefinitionEntity <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.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid(asset_model_id, definition_id, tenant_id, patch, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            asset_model_id (int):
            definition_id (int):
            tenant_id (str): The unique Tenant ID (UUID or Identifier string)
            patch (AttributeDefinitionEdit):
            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:
            AttributeDefinitionEntity
                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['definition_id'] = \
            definition_id
        kwargs['tenant_id'] = \
            tenant_id
        kwargs['region'] = \
            region
        kwargs['patch'] = \
            patch
        return self.attributes_patch_by_assetmodelid_and_definitionid_and_tenantid_endpoint.call_with_http_info(**kwargs)

    def attributes_post_by_tenantid(
        self,
        tenant_id,
        attribute_definition_entity,
        region="UK",
        **kwargs
    ):
        """Post Attributes by tenantid  # noqa: E501

        <span style='font-size: 17px;'>Summary</span><br/>Creates a new AttributeDefinition for a model. 'EditPermissions' for a model is required to create an attribute. Return Type: AttributeDefinitionEntity <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.attributes_post_by_tenantid(tenant_id, attribute_definition_entity, region="UK", async_req=True)
        >>> result = thread.get()

        Args:
            tenant_id (str): The unique Tenant ID (UUID or Identifier string)
            attribute_definition_entity (AttributeDefinitionCreate): 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:
            AttributeDefinitionEntity
                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['attribute_definition_entity'] = \
            attribute_definition_entity
        return self.attributes_post_by_tenantid_endpoint.call_with_http_info(**kwargs)

