"""
    XBIM Flex API v1

    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: v1
    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/odata/{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"
                    },
                },
                '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/odata/{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"
                    },
                },
                '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/odata/{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"
                    },
                },
                '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/odata/{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"
                    },
                },
                '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/odata/{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"
                    },
                },
                '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/odata/{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"
                    },
                },
                '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/odata/{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',
                    'attribute_definition_edit',
                ],
                'required': [
                    'asset_model_id',
                    'definition_id',
                    'tenant_id',
                    'region',
                    'attribute_definition_edit',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope"
                    },
                },
                'openapi_types': {
                    'asset_model_id':
                        (int,),
                    'definition_id':
                        (int,),
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'attribute_definition_edit':
                        (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',
                    'attribute_definition_edit': '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/odata/{tenantId}/Attributes',
                'operation_id': 'attributes_post_by_tenantid',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'tenant_id',
                    'region',
                    'attribute_definition_create',
                ],
                'required': [
                    'tenant_id',
                    'region',
                    'attribute_definition_create',
                ],
                'nullable': [
                ],
                'enum': [
                    'region',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('region',): {

                        "UK": "UK",
                        "WESTEUROPE": "WestEurope"
                    },
                },
                'openapi_types': {
                    'tenant_id':
                        (str,),
                    'region':
                        (str,),
                    'attribute_definition_create':
                        (AttributeDefinitionCreate,),
                },
                'attribute_map': {
                    'tenant_id': 'tenantId',
                    'region': 'region',
                },
                'location_map': {
                    'tenant_id': 'path',
                    'region': 'path',
                    'attribute_definition_create': '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
    ):
        """Change the underlying data type for the attribute, migrating any existing data where possible  # noqa: E501

        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.  # 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
    ):
        """Operation to interrogate a single attribute definition  # noqa: E501

        This service returns a single attribute definition for the provided keys, or responds with a not found (404)  # 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
    ):
        """Returns the EntitySet Attributes  # 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
    ):
        """Gets a sample of the attribute values for the definition  # 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
    ):
        """Gets the unimported attribute values for an entity from the source model  # noqa: E501

        Can be used to see values not yet imported  # 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
    ):
        """Imports attribute values from the source model file  # 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,
        attribute_definition_edit,
        region="UK",
        **kwargs
    ):
        """Update an AttributeDefinition for a model  # noqa: E501

        'EditPermissions' for a model is required to amend an attribute  # 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, attribute_definition_edit, 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)
            attribute_definition_edit (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['attribute_definition_edit'] = \
            attribute_definition_edit
        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_create,
        region="UK",
        **kwargs
    ):
        """Creates a new AttributeDefinition for a model  # noqa: E501

        'EditPermissions' for a model is required to create an attribute  # 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_create, region="UK", async_req=True)
        >>> result = thread.get()

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

