Source code for sdk.lusid.api.legal_entities_api

# coding: utf-8

"""
    LUSID API

    FINBOURNE Technology  # noqa: E501

    Contact: info@finbourne.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""


import re  # noqa: F401
import io
import warnings

from pydantic.v1 import validate_arguments, ValidationError
from typing import overload, Optional, Union, Awaitable

from typing_extensions import Annotated
from datetime import datetime

from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator

from typing import Dict, List, Optional

from lusid.models.access_metadata_operation import AccessMetadataOperation
from lusid.models.access_metadata_value import AccessMetadataValue
from lusid.models.deleted_entity_response import DeletedEntityResponse
from lusid.models.legal_entity import LegalEntity
from lusid.models.paged_resource_list_of_legal_entity import PagedResourceListOfLegalEntity
from lusid.models.resource_list_of_access_metadata_value_of import ResourceListOfAccessMetadataValueOf
from lusid.models.resource_list_of_legal_entity import ResourceListOfLegalEntity
from lusid.models.resource_list_of_property_interval import ResourceListOfPropertyInterval
from lusid.models.resource_list_of_relation import ResourceListOfRelation
from lusid.models.resource_list_of_relationship import ResourceListOfRelationship
from lusid.models.set_legal_entity_identifiers_request import SetLegalEntityIdentifiersRequest
from lusid.models.set_legal_entity_properties_request import SetLegalEntityPropertiesRequest
from lusid.models.upsert_legal_entities_response import UpsertLegalEntitiesResponse
from lusid.models.upsert_legal_entity_access_metadata_request import UpsertLegalEntityAccessMetadataRequest
from lusid.models.upsert_legal_entity_request import UpsertLegalEntityRequest

from lusid.api_client import ApiClient
from lusid.api_response import ApiResponse
from lusid.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


[docs] class LegalEntitiesApi: """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) -> None: if api_client is None: api_client = ApiClient.get_default() self.api_client = api_client @overload async def delete_legal_entity(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with defined identifier type uniquely identifies the legal entity to delete.")], **kwargs) -> DeletedEntityResponse: # noqa: E501 ... @overload def delete_legal_entity(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="The code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with defined identifier type uniquely identifies the legal entity to delete.")], async_req: Optional[bool]=True, **kwargs) -> DeletedEntityResponse: # noqa: E501 ... @overload async def delete_legal_entity_access_metadata(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], metadata_key : Annotated[constr(strict=True, max_length=100, min_length=1), Field(..., description="Key of the metadata entry to retrieve")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective date to delete at, if this is not supplied, it will delete all data found")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective date until which the delete is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' date of the Access Metadata")] = None, **kwargs) -> DeletedEntityResponse: # noqa: E501 ... @overload def delete_legal_entity_access_metadata(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], metadata_key : Annotated[constr(strict=True, max_length=100, min_length=1), Field(..., description="Key of the metadata entry to retrieve")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective date to delete at, if this is not supplied, it will delete all data found")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective date until which the delete is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' date of the Access Metadata")] = None, async_req: Optional[bool]=True, **kwargs) -> DeletedEntityResponse: # noqa: E501 ... @overload async def delete_legal_entity_identifiers(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], property_keys : Annotated[conlist(StrictStr), Field(..., description="The property keys of the identifiers to delete. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/CreditAgency/Identifier\". Each property must be from the \"LegalEntity\" domain. Identifiers or identifiers not specified in request will not be changed.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to delete the identifiers. Defaults to the current LUSID system datetime if not specified. Must not include an effective datetime if identifiers are perpetual.")] = None, **kwargs) -> DeletedEntityResponse: # noqa: E501 ... @overload def delete_legal_entity_identifiers(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], property_keys : Annotated[conlist(StrictStr), Field(..., description="The property keys of the identifiers to delete. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/CreditAgency/Identifier\". Each property must be from the \"LegalEntity\" domain. Identifiers or identifiers not specified in request will not be changed.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to delete the identifiers. Defaults to the current LUSID system datetime if not specified. Must not include an effective datetime if identifiers are perpetual.")] = None, async_req: Optional[bool]=True, **kwargs) -> DeletedEntityResponse: # noqa: E501 ... @overload async def delete_legal_entity_properties(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], property_keys : Annotated[conlist(StrictStr), Field(..., description="The property keys of the legal entities properties to delete. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/CompanyDetails/Role\". Each property must be from the \"LegalEntity\" domain. Properties or identifiers not specified in request will not be changed.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to delete time-variant properties from. The property must exist at the specified 'effectiveAt' datetime. If the 'effectiveAt' is not provided or is before the time-variant property exists then a failure is returned. Do not specify this parameter if any of the properties to delete are perpetual.")] = None, **kwargs) -> DeletedEntityResponse: # noqa: E501 ... @overload def delete_legal_entity_properties(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], property_keys : Annotated[conlist(StrictStr), Field(..., description="The property keys of the legal entities properties to delete. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/CompanyDetails/Role\". Each property must be from the \"LegalEntity\" domain. Properties or identifiers not specified in request will not be changed.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to delete time-variant properties from. The property must exist at the specified 'effectiveAt' datetime. If the 'effectiveAt' is not provided or is before the time-variant property exists then a failure is returned. Do not specify this parameter if any of the properties to delete are perpetual.")] = None, async_req: Optional[bool]=True, **kwargs) -> DeletedEntityResponse: # noqa: E501 ... @overload async def get_all_legal_entity_access_metadata(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effectiveAt datetime at which to retrieve the Access Metadata")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Access Metadata")] = None, **kwargs) -> Dict[str, List[AccessMetadataValue]]: # noqa: E501 ... @overload def get_all_legal_entity_access_metadata(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], effective_at : Annotated[Optional[StrictStr], Field(description="The effectiveAt datetime at which to retrieve the Access Metadata")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Access Metadata")] = None, async_req: Optional[bool]=True, **kwargs) -> Dict[str, List[AccessMetadataValue]]: # noqa: E501 ... @overload async def get_legal_entity(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys or identifier types (as property keys) from the \"LegalEntity\" domain to include for found legal entity, or from any domain that supports relationships to decorate onto related entities. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/ContactDetails/Address\".")] = None, effective_at : Annotated[Optional[constr(strict=True, max_length=256, min_length=0)], Field(description="The effective datetime or cut label at which to retrieve the legal entity. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the legal entity. Defaults to return the latest version of the legal entity if not specified.")] = None, relationship_definition_ids : Annotated[Optional[conlist(StrictStr)], Field(description="A list of relationship definitions that are used to decorate related entities onto the legal entity in the response. These must take the form {relationshipDefinitionScope}/{relationshipDefinitionCode}.")] = None, **kwargs) -> LegalEntity: # noqa: E501 ... @overload def get_legal_entity(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys or identifier types (as property keys) from the \"LegalEntity\" domain to include for found legal entity, or from any domain that supports relationships to decorate onto related entities. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/ContactDetails/Address\".")] = None, effective_at : Annotated[Optional[constr(strict=True, max_length=256, min_length=0)], Field(description="The effective datetime or cut label at which to retrieve the legal entity. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the legal entity. Defaults to return the latest version of the legal entity if not specified.")] = None, relationship_definition_ids : Annotated[Optional[conlist(StrictStr)], Field(description="A list of relationship definitions that are used to decorate related entities onto the legal entity in the response. These must take the form {relationshipDefinitionScope}/{relationshipDefinitionCode}.")] = None, async_req: Optional[bool]=True, **kwargs) -> LegalEntity: # noqa: E501 ... @overload async def get_legal_entity_access_metadata_by_key(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], metadata_key : Annotated[constr(strict=True, max_length=100, min_length=1), Field(..., description="Key of the metadata entry to retrieve")], effective_at : Annotated[Optional[StrictStr], Field(description="The effectiveAt datetime at which to retrieve the Access Metadata")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Access Metadata")] = None, **kwargs) -> List[AccessMetadataValue]: # noqa: E501 ... @overload def get_legal_entity_access_metadata_by_key(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], metadata_key : Annotated[constr(strict=True, max_length=100, min_length=1), Field(..., description="Key of the metadata entry to retrieve")], effective_at : Annotated[Optional[StrictStr], Field(description="The effectiveAt datetime at which to retrieve the Access Metadata")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the Access Metadata")] = None, async_req: Optional[bool]=True, **kwargs) -> List[AccessMetadataValue]: # noqa: E501 ... @overload async def get_legal_entity_property_time_series(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], property_key : Annotated[StrictStr, Field(..., description="The property key of the property that will have its history shown. These must be in the format {domain}/{scope}/{code} e.g. \"LegalEntity/ContactDetails/Address\". Each property must be from the \"LegalEntity\" domain.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the person's property history. Defaults to return the current datetime if not supplied.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing properties from a previous call to get property time series. This value is returned from the previous call. If a pagination token is provided the filter and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many.")] = None, **kwargs) -> ResourceListOfPropertyInterval: # noqa: E501 ... @overload def get_legal_entity_property_time_series(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], property_key : Annotated[StrictStr, Field(..., description="The property key of the property that will have its history shown. These must be in the format {domain}/{scope}/{code} e.g. \"LegalEntity/ContactDetails/Address\". Each property must be from the \"LegalEntity\" domain.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the person's property history. Defaults to return the current datetime if not supplied.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing properties from a previous call to get property time series. This value is returned from the previous call. If a pagination token is provided the filter and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many.")] = None, async_req: Optional[bool]=True, **kwargs) -> ResourceListOfPropertyInterval: # noqa: E501 ... @overload async def get_legal_entity_relations(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], effective_at : Annotated[Optional[constr(strict=True, max_length=256, min_length=0)], Field(description="The effective datetime or cut label at which to get relations. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the legal entity's relations. Defaults to return the latest LUSID AsAt time if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the relations. Users should provide null or empty string for this field until further notice.")] = None, identifier_types : Annotated[Optional[conlist(StrictStr)], Field(description="Identifiers types (as property keys) used for referencing Persons or Legal Entities. These take the format {domain}/{scope}/{code} e.g. \"Person/CompanyDetails/Role\". They must be from the \"Person\" or \"LegalEntity\" domain. Only identifier types stated will be used to look up relevant entities in relations. If not applicable, provide an empty array.")] = None, **kwargs) -> ResourceListOfRelation: # noqa: E501 ... @overload def get_legal_entity_relations(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], effective_at : Annotated[Optional[constr(strict=True, max_length=256, min_length=0)], Field(description="The effective datetime or cut label at which to get relations. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the legal entity's relations. Defaults to return the latest LUSID AsAt time if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the relations. Users should provide null or empty string for this field until further notice.")] = None, identifier_types : Annotated[Optional[conlist(StrictStr)], Field(description="Identifiers types (as property keys) used for referencing Persons or Legal Entities. These take the format {domain}/{scope}/{code} e.g. \"Person/CompanyDetails/Role\". They must be from the \"Person\" or \"LegalEntity\" domain. Only identifier types stated will be used to look up relevant entities in relations. If not applicable, provide an empty array.")] = None, async_req: Optional[bool]=True, **kwargs) -> ResourceListOfRelation: # noqa: E501 ... @overload async def get_legal_entity_relationships(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity's identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity's identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], effective_at : Annotated[Optional[constr(strict=True, max_length=256, min_length=0)], Field(description="The effective datetime or cut label at which to get relationships. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve relationships. Defaults to return the latest LUSID AsAt time if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter relationships. Users should provide null or empty string for this field until further notice.")] = None, identifier_types : Annotated[Optional[conlist(StrictStr)], Field(description="Identifier types (as property keys) used for referencing Persons or Legal Entities. These can be specified from the 'Person' or 'LegalEntity' domains and have the format {domain}/{scope}/{code}, for example 'Person/CompanyDetails/Role'. An Empty array may be used to return all related Entities.")] = None, **kwargs) -> ResourceListOfRelationship: # noqa: E501 ... @overload def get_legal_entity_relationships(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity's identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity's identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], effective_at : Annotated[Optional[constr(strict=True, max_length=256, min_length=0)], Field(description="The effective datetime or cut label at which to get relationships. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve relationships. Defaults to return the latest LUSID AsAt time if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter relationships. Users should provide null or empty string for this field until further notice.")] = None, identifier_types : Annotated[Optional[conlist(StrictStr)], Field(description="Identifier types (as property keys) used for referencing Persons or Legal Entities. These can be specified from the 'Person' or 'LegalEntity' domains and have the format {domain}/{scope}/{code}, for example 'Person/CompanyDetails/Role'. An Empty array may be used to return all related Entities.")] = None, async_req: Optional[bool]=True, **kwargs) -> ResourceListOfRelationship: # noqa: E501 ... @overload async def list_all_legal_entities(self, effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to list the legal entities. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the legal entities. Defaults to return the latest version of each legal entities if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing legal entities from a previous call to list legal entities. This value is returned from the previous call. If a pagination token is provided the filter, effectiveAt, sortBy and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many. Defaults to 5000 if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\".")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys or identifier types (as property keys) from the \"LegalEntity\" domain to include for each legal entity, or from any domain that supports relationships to decorate onto related entities. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/ContactDetails/Address\".")] = None, relationship_definition_ids : Annotated[Optional[conlist(StrictStr)], Field(description="A list of relationship definitions that are used to decorate related entities onto each portfolio in the response. These must take the form {relationshipDefinitionScope}/{relationshipDefinitionCode}.")] = None, **kwargs) -> ResourceListOfLegalEntity: # noqa: E501 ... @overload def list_all_legal_entities(self, effective_at : Annotated[Optional[StrictStr], Field(description="The effective datetime or cut label at which to list the legal entities. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the legal entities. Defaults to return the latest version of each legal entities if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing legal entities from a previous call to list legal entities. This value is returned from the previous call. If a pagination token is provided the filter, effectiveAt, sortBy and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many. Defaults to 5000 if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\".")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys or identifier types (as property keys) from the \"LegalEntity\" domain to include for each legal entity, or from any domain that supports relationships to decorate onto related entities. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/ContactDetails/Address\".")] = None, relationship_definition_ids : Annotated[Optional[conlist(StrictStr)], Field(description="A list of relationship definitions that are used to decorate related entities onto each portfolio in the response. These must take the form {relationshipDefinitionScope}/{relationshipDefinitionCode}.")] = None, async_req: Optional[bool]=True, **kwargs) -> ResourceListOfLegalEntity: # noqa: E501 ... @overload async def list_legal_entities(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], effective_at : Annotated[Optional[constr(strict=True, max_length=256, min_length=0)], Field(description="The effective datetime or cut label at which to list the people. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the people. Defaults to return the latest version of each people if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing legal entities from a previous call to list legal entities. This value is returned from the previous call. If a pagination token is provided the filter, effectiveAt, sortBy and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\".")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys or identifier types (as property keys) from the \"LegalEntity\" domain to include for each legal entity, or from any domain that supports relationships to decorate onto related entities. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/ContactDetails/Address\".")] = None, relationship_definition_ids : Annotated[Optional[conlist(StrictStr)], Field(description="A list of relationship definitions that are used to decorate related entities onto each portfolio in the response. These must take the form {relationshipDefinitionScope}/{relationshipDefinitionCode}.")] = None, **kwargs) -> PagedResourceListOfLegalEntity: # noqa: E501 ... @overload def list_legal_entities(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], effective_at : Annotated[Optional[constr(strict=True, max_length=256, min_length=0)], Field(description="The effective datetime or cut label at which to list the people. Defaults to the current LUSID system datetime if not specified.")] = None, as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to list the people. Defaults to return the latest version of each people if not specified.")] = None, page : Annotated[Optional[constr(strict=True, max_length=500, min_length=1)], Field(description="The pagination token to use to continue listing legal entities from a previous call to list legal entities. This value is returned from the previous call. If a pagination token is provided the filter, effectiveAt, sortBy and asAt fields must not have changed since the original request.")] = None, limit : Annotated[Optional[conint(strict=True, le=5000, ge=1)], Field(description="When paginating, limit the number of returned results to this many. Defaults to 100 if not specified.")] = None, filter : Annotated[Optional[constr(strict=True, max_length=16384, min_length=0)], Field(description="Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = None, sort_by : Annotated[Optional[conlist(StrictStr)], Field(description="A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\".")] = None, property_keys : Annotated[Optional[conlist(StrictStr)], Field(description="A list of property keys or identifier types (as property keys) from the \"LegalEntity\" domain to include for each legal entity, or from any domain that supports relationships to decorate onto related entities. These take the format {domain}/{scope}/{code} e.g. \"LegalEntity/ContactDetails/Address\".")] = None, relationship_definition_ids : Annotated[Optional[conlist(StrictStr)], Field(description="A list of relationship definitions that are used to decorate related entities onto each portfolio in the response. These must take the form {relationshipDefinitionScope}/{relationshipDefinitionCode}.")] = None, async_req: Optional[bool]=True, **kwargs) -> PagedResourceListOfLegalEntity: # noqa: E501 ... @overload async def patch_legal_entity_access_metadata(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], access_metadata_operation : Annotated[conlist(AccessMetadataOperation), Field(..., description="The Json Patch document")], effective_at : Annotated[Optional[StrictStr], Field(description="The effectiveAt datetime at which to upsert the Access Metadata")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective datetime until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' datetime of the Access Metadata")] = None, **kwargs) -> Dict[str, List[AccessMetadataValue]]: # noqa: E501 ... @overload def patch_legal_entity_access_metadata(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], access_metadata_operation : Annotated[conlist(AccessMetadataOperation), Field(..., description="The Json Patch document")], effective_at : Annotated[Optional[StrictStr], Field(description="The effectiveAt datetime at which to upsert the Access Metadata")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective datetime until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' datetime of the Access Metadata")] = None, async_req: Optional[bool]=True, **kwargs) -> Dict[str, List[AccessMetadataValue]]: # noqa: E501 ... @overload async def set_legal_entity_identifiers(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], set_legal_entity_identifiers_request : Annotated[SetLegalEntityIdentifiersRequest, Field(..., description="Request containing identifiers to set for the legal entity. Identifiers not specified in request will not be changed.")], **kwargs) -> LegalEntity: # noqa: E501 ... @overload def set_legal_entity_identifiers(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], set_legal_entity_identifiers_request : Annotated[SetLegalEntityIdentifiersRequest, Field(..., description="Request containing identifiers to set for the legal entity. Identifiers not specified in request will not be changed.")], async_req: Optional[bool]=True, **kwargs) -> LegalEntity: # noqa: E501 ... @overload async def set_legal_entity_properties(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], set_legal_entity_properties_request : Annotated[SetLegalEntityPropertiesRequest, Field(..., description="Request containing properties to set for the legal entity. Properties not specified in request will not be changed.")], **kwargs) -> LegalEntity: # noqa: E501 ... @overload def set_legal_entity_properties(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the legal entity identifier type.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity identifier type.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the legal entity under specified identifier type's scope and code. This together with stated identifier type uniquely identifies the legal entity.")], set_legal_entity_properties_request : Annotated[SetLegalEntityPropertiesRequest, Field(..., description="Request containing properties to set for the legal entity. Properties not specified in request will not be changed.")], async_req: Optional[bool]=True, **kwargs) -> LegalEntity: # noqa: E501 ... @overload async def upsert_legal_entities(self, success_mode : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial")], request_body : Annotated[Dict[str, UpsertLegalEntityRequest], Field(..., description="A collection of requests to create or update Legal Entities.")], **kwargs) -> UpsertLegalEntitiesResponse: # noqa: E501 ... @overload def upsert_legal_entities(self, success_mode : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Whether the batch request should fail Atomically or in a Partial fashion - Allowed Values: Atomic, Partial")], request_body : Annotated[Dict[str, UpsertLegalEntityRequest], Field(..., description="A collection of requests to create or update Legal Entities.")], async_req: Optional[bool]=True, **kwargs) -> UpsertLegalEntitiesResponse: # noqa: E501 ... @overload async def upsert_legal_entity(self, upsert_legal_entity_request : Annotated[UpsertLegalEntityRequest, Field(..., description="Request to create or update a legal entity.")], **kwargs) -> LegalEntity: # noqa: E501 ... @overload def upsert_legal_entity(self, upsert_legal_entity_request : Annotated[UpsertLegalEntityRequest, Field(..., description="Request to create or update a legal entity.")], async_req: Optional[bool]=True, **kwargs) -> LegalEntity: # noqa: E501 ... @overload async def upsert_legal_entity_access_metadata(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], metadata_key : Annotated[constr(strict=True, max_length=100, min_length=1), Field(..., description="Key of the metadata entry to retrieve")], upsert_legal_entity_access_metadata_request : Annotated[UpsertLegalEntityAccessMetadataRequest, Field(..., description="The Legal Entity Access Metadata entry to upsert")], effective_at : Annotated[Optional[StrictStr], Field(description="The effectiveAt datetime at which to upsert the Access Metadata")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective datetime until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' datetime of the Access Metadata")] = None, **kwargs) -> ResourceListOfAccessMetadataValueOf: # noqa: E501 ... @overload def upsert_legal_entity_access_metadata(self, id_type_scope : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Scope of the Legal Entity identifier.")], id_type_code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity identifier.")], code : Annotated[constr(strict=True, max_length=64, min_length=1), Field(..., description="Code of the Legal Entity under specified identifier type's scope and code.")], metadata_key : Annotated[constr(strict=True, max_length=100, min_length=1), Field(..., description="Key of the metadata entry to retrieve")], upsert_legal_entity_access_metadata_request : Annotated[UpsertLegalEntityAccessMetadataRequest, Field(..., description="The Legal Entity Access Metadata entry to upsert")], effective_at : Annotated[Optional[StrictStr], Field(description="The effectiveAt datetime at which to upsert the Access Metadata")] = None, effective_until : Annotated[Optional[datetime], Field(description="The effective datetime until which the Access Metadata is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveAt' datetime of the Access Metadata")] = None, async_req: Optional[bool]=True, **kwargs) -> ResourceListOfAccessMetadataValueOf: # noqa: E501 ...