Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV-6167 Added type annotations in the __init__ method of all the models #51

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 22 additions & 2 deletions sdk/lusid/models/access_controlled_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import six


class AccessControlledAction(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Expand All @@ -30,6 +29,8 @@ class AccessControlledAction(object):
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
required_map (dict): The key is attribute name
and the value is whether it is 'required' or 'optional'.
"""
openapi_types = {
'description': 'str',
Expand All @@ -45,8 +46,27 @@ class AccessControlledAction(object):
'links': 'links'
}

required_map = {
'description': 'required',
'action': 'required',
'limited_set': 'optional',
'links': 'optional'
}

def __init__(self, description=None, action=None, limited_set=None, links=None): # noqa: E501
"""AccessControlledAction - a model defined in OpenAPI""" # noqa: E501
"""
AccessControlledAction - a model defined in OpenAPI

:param description: The description of the action (required)
:type description: str
:param action: (required)
:type action: lusid.ActionId
:param limited_set: When populated, the provided values are the limited set of resources that are allowed to be specified for access control for this action
:type limited_set: list[lusid.IdSelectorDefinition]
:param links:
:type links: list[lusid.Link]

""" # noqa: E501

self._description = None
self._action = None
Expand Down
30 changes: 28 additions & 2 deletions sdk/lusid/models/access_controlled_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import six


class AccessControlledResource(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Expand All @@ -30,6 +29,8 @@ class AccessControlledResource(object):
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
required_map (dict): The key is attribute name
and the value is whether it is 'required' or 'optional'.
"""
openapi_types = {
'application': 'str',
Expand All @@ -49,8 +50,33 @@ class AccessControlledResource(object):
'links': 'links'
}

required_map = {
'application': 'optional',
'name': 'optional',
'description': 'required',
'actions': 'required',
'identifier_parts': 'optional',
'links': 'optional'
}

def __init__(self, application=None, name=None, description=None, actions=None, identifier_parts=None, links=None): # noqa: E501
"""AccessControlledResource - a model defined in OpenAPI""" # noqa: E501
"""
AccessControlledResource - a model defined in OpenAPI

:param application: The application to which this resource belongs
:type application: str
:param name: The display name of the resource
:type name: str
:param description: The description of the resource (required)
:type description: str
:param actions: The actions acceptable for this type of resource (required)
:type actions: list[lusid.AccessControlledAction]
:param identifier_parts: The constituent parts of a valid identifier for this resource
:type identifier_parts: list[lusid.IdentifierPartSchema]
:param links:
:type links: list[lusid.Link]

""" # noqa: E501

self._application = None
self._name = None
Expand Down
21 changes: 19 additions & 2 deletions sdk/lusid/models/action_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import six


class ActionId(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Expand All @@ -30,6 +29,8 @@ class ActionId(object):
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
required_map (dict): The key is attribute name
and the value is whether it is 'required' or 'optional'.
"""
openapi_types = {
'scope': 'str',
Expand All @@ -43,8 +44,24 @@ class ActionId(object):
'entity': 'entity'
}

required_map = {
'scope': 'required',
'activity': 'required',
'entity': 'required'
}

def __init__(self, scope=None, activity=None, entity=None): # noqa: E501
"""ActionId - a model defined in OpenAPI""" # noqa: E501
"""
ActionId - a model defined in OpenAPI

:param scope: (required)
:type scope: str
:param activity: (required)
:type activity: str
:param entity: (required)
:type entity: str

""" # noqa: E501

self._scope = None
self._activity = None
Expand Down
21 changes: 19 additions & 2 deletions sdk/lusid/models/adjust_holding.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import six


class AdjustHolding(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Expand All @@ -30,6 +29,8 @@ class AdjustHolding(object):
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
required_map (dict): The key is attribute name
and the value is whether it is 'required' or 'optional'.
"""
openapi_types = {
'href': 'str',
Expand All @@ -43,8 +44,24 @@ class AdjustHolding(object):
'links': 'links'
}

required_map = {
'href': 'optional',
'version': 'required',
'links': 'optional'
}

def __init__(self, href=None, version=None, links=None): # noqa: E501
"""AdjustHolding - a model defined in OpenAPI""" # noqa: E501
"""
AdjustHolding - a model defined in OpenAPI

:param href: The specifc Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.
:type href: str
:param version: (required)
:type version: lusid.Version
:param links:
:type links: list[lusid.Link]

""" # noqa: E501

self._href = None
self._version = None
Expand Down
24 changes: 22 additions & 2 deletions sdk/lusid/models/adjust_holding_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import six


class AdjustHoldingRequest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Expand All @@ -30,6 +29,8 @@ class AdjustHoldingRequest(object):
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
required_map (dict): The key is attribute name
and the value is whether it is 'required' or 'optional'.
"""
openapi_types = {
'instrument_identifiers': 'dict(str, str)',
Expand All @@ -45,8 +46,27 @@ class AdjustHoldingRequest(object):
'tax_lots': 'taxLots'
}

required_map = {
'instrument_identifiers': 'required',
'sub_holding_keys': 'optional',
'properties': 'optional',
'tax_lots': 'required'
}

def __init__(self, instrument_identifiers=None, sub_holding_keys=None, properties=None, tax_lots=None): # noqa: E501
"""AdjustHoldingRequest - a model defined in OpenAPI""" # noqa: E501
"""
AdjustHoldingRequest - a model defined in OpenAPI

:param instrument_identifiers: A set of instrument identifiers to use to resolve the holding adjustment to a unique instrument. (required)
:type instrument_identifiers: dict(str, str)
:param sub_holding_keys: Set of unique transaction properties and associated values to store with the holding adjustment transaction automatically created by LUSID. Each property must be from the 'Transaction' domain.
:type sub_holding_keys: dict[str, lusid.PerpetualProperty]
:param properties: Set of unique holding properties and associated values to store with the target holding. Each property must be from the 'Holding' domain.
:type properties: dict[str, lusid.PerpetualProperty]
:param tax_lots: The tax-lots that together make up the target holding. (required)
:type tax_lots: list[lusid.TargetTaxLotRequest]

""" # noqa: E501

self._instrument_identifiers = None
self._sub_holding_keys = None
Expand Down
48 changes: 46 additions & 2 deletions sdk/lusid/models/complete_portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import six


class CompletePortfolio(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Expand All @@ -30,6 +29,8 @@ class CompletePortfolio(object):
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
required_map (dict): The key is attribute name
and the value is whether it is 'required' or 'optional'.
"""
openapi_types = {
'id': 'ResourceId',
Expand Down Expand Up @@ -61,8 +62,51 @@ class CompletePortfolio(object):
'links': 'links'
}

required_map = {
'id': 'required',
'href': 'optional',
'description': 'optional',
'display_name': 'optional',
'created': 'optional',
'parent_portfolio_id': 'optional',
'is_derived': 'optional',
'type': 'optional',
'version': 'required',
'properties': 'optional',
'base_currency': 'optional',
'links': 'optional'
}

def __init__(self, id=None, href=None, description=None, display_name=None, created=None, parent_portfolio_id=None, is_derived=None, type=None, version=None, properties=None, base_currency=None, links=None): # noqa: E501
"""CompletePortfolio - a model defined in OpenAPI""" # noqa: E501
"""
CompletePortfolio - a model defined in OpenAPI

:param id: (required)
:type id: lusid.ResourceId
:param href: The specifc Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.
:type href: str
:param description: The long form description of the portfolio.
:type description: str
:param display_name: The name of the portfolio.
:type display_name: str
:param created: The effective datetime at which the portfolio was created. No transactions or constituents can be added to the portfolio before this date.
:type created: datetime
:param parent_portfolio_id:
:type parent_portfolio_id: lusid.ResourceId
:param is_derived: Whether or not this is a derived portfolio.
:type is_derived: bool
:param type: The type of the portfolio.
:type type: str
:param version: (required)
:type version: lusid.Version
:param properties: The requested portfolio properties. These will be from the 'Portfolio' domain.
:type properties: list[lusid.ModelProperty]
:param base_currency: If the portfolio is a transaction portfolio or derived transaction portfolio, this is the base currency of the portfolio.
:type base_currency: str
:param links:
:type links: list[lusid.Link]

""" # noqa: E501

self._id = None
self._href = None
Expand Down
21 changes: 19 additions & 2 deletions sdk/lusid/models/constituents_adjustment_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import six


class ConstituentsAdjustmentHeader(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Expand All @@ -30,6 +29,8 @@ class ConstituentsAdjustmentHeader(object):
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
required_map (dict): The key is attribute name
and the value is whether it is 'required' or 'optional'.
"""
openapi_types = {
'effective_at': 'datetime',
Expand All @@ -43,8 +44,24 @@ class ConstituentsAdjustmentHeader(object):
'links': 'links'
}

required_map = {
'effective_at': 'optional',
'version': 'optional',
'links': 'optional'
}

def __init__(self, effective_at=None, version=None, links=None): # noqa: E501
"""ConstituentsAdjustmentHeader - a model defined in OpenAPI""" # noqa: E501
"""
ConstituentsAdjustmentHeader - a model defined in OpenAPI

:param effective_at: There can be at most one holdings adjustment for a portfolio at a specific effective time so this uniquely identifies the adjustment.
:type effective_at: datetime
:param version:
:type version: lusid.Version
:param links:
:type links: list[lusid.Link]

""" # noqa: E501

self._effective_at = None
self._version = None
Expand Down
27 changes: 25 additions & 2 deletions sdk/lusid/models/create_cut_label_definition_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import six


class CreateCutLabelDefinitionRequest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Expand All @@ -30,6 +29,8 @@ class CreateCutLabelDefinitionRequest(object):
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
required_map (dict): The key is attribute name
and the value is whether it is 'required' or 'optional'.
"""
openapi_types = {
'code': 'str',
Expand All @@ -47,8 +48,30 @@ class CreateCutLabelDefinitionRequest(object):
'time_zone': 'timeZone'
}

required_map = {
'code': 'required',
'display_name': 'required',
'description': 'optional',
'cut_local_time': 'required',
'time_zone': 'required'
}

def __init__(self, code=None, display_name=None, description=None, cut_local_time=None, time_zone=None): # noqa: E501
"""CreateCutLabelDefinitionRequest - a model defined in OpenAPI""" # noqa: E501
"""
CreateCutLabelDefinitionRequest - a model defined in OpenAPI

:param code: (required)
:type code: str
:param display_name: (required)
:type display_name: str
:param description:
:type description: str
:param cut_local_time: (required)
:type cut_local_time: lusid.CutLocalTime
:param time_zone: (required)
:type time_zone: str

""" # noqa: E501

self._code = None
self._display_name = None
Expand Down