Skip to content

Commit

Permalink
Updates for v2.1.680
Browse files Browse the repository at this point in the history
  • Loading branch information
Concourse committed Jan 8, 2025
1 parent 15690ab commit 11fd6cd
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ This code is automatically generated by the [OpenAPI Generator](https://openapi-

## Versions

- API version: 0.11.7291
- SDK version: 2.1.679
- API version: 0.11.7295
- SDK version: 2.1.680

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion sdk/docs/DataTypesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ def main():
api_instance = api_client_factory.build(DataTypesApi)
scope = 'scope_example' # str | The scope of the data type
code = 'code_example' # str | The code of the data type
field_value = [{"value":"FRA","fields":{"english_short_name":"France","continent":"Europe"}},{"value":"DEU","fields":{"english_short_name":"Germany","continent":"Europe"}}] # List[FieldValue] | The updated reference values
field_value = [{"value":"FRA","fields":{"english_short_name":"France","continent":"Europe"},"numericFields":{"population_in_millions":68}},{"value":"DEU","fields":{"english_short_name":"Germany","continent":"Europe"},"numericFields":{"population_in_millions":84}}] # List[FieldValue] | The updated reference values

try:
# uncomment the below to set overrides at the request level
Expand Down
1 change: 1 addition & 0 deletions sdk/docs/FieldDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**key** | **str** | |
**is_required** | **bool** | |
**is_unique** | **bool** | |
**value_type** | **str** | | [optional]

## Example

Expand Down
3 changes: 2 additions & 1 deletion sdk/docs/FieldValue.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | |
**fields** | **Dict[str, str]** | |
**fields** | **Dict[str, str]** | | [optional]
**numeric_fields** | **Dict[str, float]** | | [optional]

## Example

Expand Down
1 change: 1 addition & 0 deletions sdk/docs/TransactionTypePropertyMapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**map_from** | **str** | The Property Key of the Property to map from | [optional]
**set_to** | **str** | A pointer to the Property being mapped from | [optional]
**template_from** | **str** | The template that defines how the property value is constructed from transaction, instrument and portfolio details. | [optional]
**nullify** | **bool** | Flag to unset the Property Key for the mapping | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion sdk/lusid/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def to_debug_report(self):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 0.11.7291\n"\
"Version of the API: 0.11.7295\n"\
"SDK Package Version: {package_version}".\
format(env=sys.platform, pyversion=sys.version, package_version=package_version)

Expand Down
15 changes: 11 additions & 4 deletions sdk/lusid/models/field_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import json


from typing import Any, Dict
from pydantic.v1 import BaseModel, Field, StrictBool, constr, validator
from typing import Any, Dict, Optional
from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, constr, validator

class FieldDefinition(BaseModel):
"""
Expand All @@ -28,7 +28,8 @@ class FieldDefinition(BaseModel):
key: constr(strict=True, max_length=512, min_length=1) = Field(...)
is_required: StrictBool = Field(..., alias="isRequired")
is_unique: StrictBool = Field(..., alias="isUnique")
__properties = ["key", "isRequired", "isUnique"]
value_type: Optional[StrictStr] = Field(None, alias="valueType")
__properties = ["key", "isRequired", "isUnique", "valueType"]

@validator('key')
def key_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -69,6 +70,11 @@ def to_dict(self):
exclude={
},
exclude_none=True)
# set to None if value_type (nullable) is None
# and __fields_set__ contains the field
if self.value_type is None and "value_type" in self.__fields_set__:
_dict['valueType'] = None

return _dict

@classmethod
Expand All @@ -83,6 +89,7 @@ def from_dict(cls, obj: dict) -> FieldDefinition:
_obj = FieldDefinition.parse_obj({
"key": obj.get("key"),
"is_required": obj.get("isRequired"),
"is_unique": obj.get("isUnique")
"is_unique": obj.get("isUnique"),
"value_type": obj.get("valueType")
})
return _obj
22 changes: 17 additions & 5 deletions sdk/lusid/models/field_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@
import json


from typing import Any, Dict
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
from typing import Any, Dict, Optional, Union
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr, constr, validator

class FieldValue(BaseModel):
"""
FieldValue
"""
value: constr(strict=True, max_length=512, min_length=1) = Field(...)
fields: Dict[str, StrictStr] = Field(...)
__properties = ["value", "fields"]
fields: Optional[Dict[str, StrictStr]] = None
numeric_fields: Optional[Dict[str, Union[StrictFloat, StrictInt]]] = Field(None, alias="numericFields")
__properties = ["value", "fields", "numericFields"]

@validator('value')
def value_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -68,6 +69,16 @@ def to_dict(self):
exclude={
},
exclude_none=True)
# set to None if fields (nullable) is None
# and __fields_set__ contains the field
if self.fields is None and "fields" in self.__fields_set__:
_dict['fields'] = None

# set to None if numeric_fields (nullable) is None
# and __fields_set__ contains the field
if self.numeric_fields is None and "numeric_fields" in self.__fields_set__:
_dict['numericFields'] = None

return _dict

@classmethod
Expand All @@ -81,6 +92,7 @@ def from_dict(cls, obj: dict) -> FieldValue:

_obj = FieldValue.parse_obj({
"value": obj.get("value"),
"fields": obj.get("fields")
"fields": obj.get("fields"),
"numeric_fields": obj.get("numericFields")
})
return _obj
13 changes: 10 additions & 3 deletions sdk/lusid/models/transaction_type_property_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


from typing import Any, Dict, Optional
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, constr, validator

class TransactionTypePropertyMapping(BaseModel):
"""
Expand All @@ -29,7 +29,8 @@ class TransactionTypePropertyMapping(BaseModel):
map_from: Optional[StrictStr] = Field(None, alias="mapFrom", description="The Property Key of the Property to map from")
set_to: Optional[constr(strict=True, max_length=512, min_length=0)] = Field(None, alias="setTo", description="A pointer to the Property being mapped from")
template_from: Optional[constr(strict=True, max_length=512, min_length=1)] = Field(None, alias="templateFrom", description="The template that defines how the property value is constructed from transaction, instrument and portfolio details.")
__properties = ["propertyKey", "mapFrom", "setTo", "templateFrom"]
nullify: Optional[StrictBool] = Field(None, description="Flag to unset the Property Key for the mapping")
__properties = ["propertyKey", "mapFrom", "setTo", "templateFrom", "nullify"]

@validator('set_to')
def set_to_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -98,6 +99,11 @@ def to_dict(self):
if self.template_from is None and "template_from" in self.__fields_set__:
_dict['templateFrom'] = None

# set to None if nullify (nullable) is None
# and __fields_set__ contains the field
if self.nullify is None and "nullify" in self.__fields_set__:
_dict['nullify'] = None

return _dict

@classmethod
Expand All @@ -113,6 +119,7 @@ def from_dict(cls, obj: dict) -> TransactionTypePropertyMapping:
"property_key": obj.get("propertyKey"),
"map_from": obj.get("mapFrom"),
"set_to": obj.get("setTo"),
"template_from": obj.get("templateFrom")
"template_from": obj.get("templateFrom"),
"nullify": obj.get("nullify")
})
return _obj
2 changes: 1 addition & 1 deletion sdk/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "lusid-sdk"
version = "2.1.679"
version = "2.1.680"
description = "LUSID API"
authors = ["FINBOURNE Technology <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 11fd6cd

Please sign in to comment.