diff --git a/sdk/api/openapi.yaml b/sdk/api/openapi.yaml index ab339ff690c..0e5e929f385 100644 --- a/sdk/api/openapi.yaml +++ b/sdk/api/openapi.yaml @@ -348,7 +348,7 @@ info: | 887|Cannot apply clear down module.| | termsOfService: https://www.finbourne.com/legal/terms-conditions title: LUSID API - version: 0.11.6349 + version: 0.11.6354 x-logo: url: https://www.lusid.com/app/assets/logo_white.png backgroundColor: '#415464' @@ -421,6 +421,8 @@ tags: \ updates are effective at the as-at time of update, and its not possible to make\ \ retroactive (or forward) changes." name: Executions +- description: Methods to create and manage Fund entities. + name: Funds - description: Methods for interacting with instrument event types. name: Instrument Event Types - description: Methods for querying for instrument events. @@ -933,8 +935,8 @@ paths: x-nullable: true - description: "A list of property keys from the 'Abor' domain to decorate onto\ \ the Abor.\r\n These must take the format {domain}/{scope}/{code}, for\ - \ example 'Abor/Manager/Id'. If not provided will return all the entitled\ - \ properties for that Abor." + \ example 'Abor/Manager/Id'. If no properties are specified, then no properties\ + \ will be returned." explode: true in: query name: propertyKeys @@ -3094,7 +3096,7 @@ paths: - description: "A list of property keys from the 'AborConfiguration' domain\ \ to decorate onto the AborConfiguration.\r\n These must take the format\ \ {domain}/{scope}/{code}, for example 'AborConfiguration/Manager/Id'. If\ - \ not provided will return all the entitled properties for that AborConfiguration." + \ no properties are specified, then no properties will be returned." explode: true in: query name: propertyKeys @@ -7993,8 +7995,8 @@ paths: x-nullable: true - description: "A list of property keys from the 'ChartOfAccounts' domain to\ \ decorate onto the Chart of Accounts.\r\n These must take the format {domain}/{scope}/{code},\ - \ for example 'ChartOfAccounts/Manager/Id'. If not provided will return\ - \ all the entitled properties for that Chart of Accounts." + \ for example 'ChartOfAccounts/Manager/Id'. If no properties are specified,\ + \ then no properties will be returned." explode: true in: query name: propertyKeys @@ -23087,6 +23089,837 @@ paths: - Executions x-fbn-apistatus: EarlyAccess x-accepts: application/json + /api/funds: + get: + description: List all the Funds matching particular criteria. + operationId: ListFunds + parameters: + - description: "The effective datetime or cut label at which to list the TimeVariant\ + \ properties for the Funds. Defaults to the current LUSID\r\n system datetime\ + \ if not specified." + explode: true + in: query + name: effectiveAt + required: false + schema: + format: dateorcutlabel + type: string + style: form + - description: The asAt datetime at which to list the Funds. Defaults to returning + the latest version of each Fund if not specified. + explode: true + in: query + name: asAt + required: false + schema: + format: date-time + type: string + style: form + x-nullable: true + - description: "The pagination token to use to continue listing Funds; this\r\ + \n value is returned from the previous call. If a pagination token is provided,\ + \ the filter, effectiveAt\r\n and asAt fields must not have changed since\ + \ the original request." + explode: true + in: query + name: page + required: false + schema: + maxLength: 500 + minLength: 1 + pattern: "^[a-zA-Z0-9\\+/]*={0,3}$" + type: string + style: form + - description: "When paginating, limit the results to this number. Defaults\ + \ to 100 if not specified." + explode: true + in: query + name: limit + required: false + schema: + format: int32 + maximum: 5000 + minimum: 1 + type: integer + style: form + x-nullable: true + - description: "Expression to filter the results.\r\n For example, to filter\ + \ on the Fund type, specify \"id.Code eq 'Fund1'\". For more information\ + \ about filtering\r\n results, see https://support.lusid.com/knowledgebase/article/KA-01914." + explode: true + in: query + name: filter + required: false + schema: + maxLength: 16384 + minLength: 0 + pattern: "^[\\s\\S]*$" + type: string + style: form + - description: "A list of field names or properties to sort by, each suffixed\ + \ by \" ASC\" or \" DESC\"" + explode: true + in: query + name: sortBy + required: false + schema: + items: + type: string + type: array + style: form + x-nullable: true + - description: "A list of property keys from the 'Fund' domain to decorate onto\ + \ each Fund.\r\n These must take the format {domain}/{scope}/{code}, for\ + \ example 'Fund/Manager/Id'." + explode: true + in: query + name: propertyKeys + required: false + schema: + items: + description: "The key that uniquely identifies the property. It has the\ + \ format {domain}/{scope}/{code}." + type: string + type: array + style: form + x-nullable: true + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/PagedResourceListOfFund' + application/json: + schema: + $ref: '#/components/schemas/PagedResourceListOfFund' + text/json: + schema: + $ref: '#/components/schemas/PagedResourceListOfFund' + description: The requested Funds. + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + description: The details of the input related failure + default: + content: + application/json: + schema: + $ref: '#/components/schemas/LusidProblemDetails' + description: Error response + security: + - oauth2: [] + summary: "[EXPERIMENTAL] ListFunds: List Funds." + tags: + - Funds + x-fbn-apistatus: Experimental + x-accepts: application/json + /api/funds/{scope}: + post: + description: Create the given Fund. + operationId: CreateFund + parameters: + - description: The scope of the Fund. + explode: false + in: path + name: scope + required: true + schema: + maxLength: 64 + minLength: 1 + pattern: "^[a-zA-Z0-9\\-_]+$" + type: string + style: simple + requestBody: + content: + application/json-patch+json: + example: + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstrumentScopes: + - Scope1 + - Scope2 + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + type: Master + inceptionDate: 9999-12-31T23:59:59.9999999+00:00 + decimalPlaces: 6 + yearEndDate: + day: 1 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/FundRequest' + application/json: + example: + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstrumentScopes: + - Scope1 + - Scope2 + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + type: Master + inceptionDate: 9999-12-31T23:59:59.9999999+00:00 + decimalPlaces: 6 + yearEndDate: + day: 1 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/FundRequest' + text/json: + example: + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstrumentScopes: + - Scope1 + - Scope2 + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + type: Master + inceptionDate: 9999-12-31T23:59:59.9999999+00:00 + decimalPlaces: 6 + yearEndDate: + day: 1 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/FundRequest' + application/*+json: + example: + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstrumentScopes: + - Scope1 + - Scope2 + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + type: Master + inceptionDate: 9999-12-31T23:59:59.9999999+00:00 + decimalPlaces: 6 + yearEndDate: + day: 1 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/FundRequest' + description: The definition of the Fund. + required: true + responses: + "201": + content: + text/plain: + example: + href: http://example.com + id: + scope: FundScope + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + lusidInstrumentId: LUID_00000123 + instrumentScope: MyScope + type: Master + inceptionDate: 2024-01-01T00:00:00.0000000+00:00 + decimalPlaces: 6 + yearEndDate: + day: 31 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/Fund' + application/json: + example: + href: http://example.com + id: + scope: FundScope + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + lusidInstrumentId: LUID_00000123 + instrumentScope: MyScope + type: Master + inceptionDate: 2024-01-01T00:00:00.0000000+00:00 + decimalPlaces: 6 + yearEndDate: + day: 31 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/Fund' + text/json: + example: + href: http://example.com + id: + scope: FundScope + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + lusidInstrumentId: LUID_00000123 + instrumentScope: MyScope + type: Master + inceptionDate: 2024-01-01T00:00:00.0000000+00:00 + decimalPlaces: 6 + yearEndDate: + day: 31 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/Fund' + description: The newly created Fund. + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + description: The details of the input related failure + default: + content: + application/json: + schema: + $ref: '#/components/schemas/LusidProblemDetails' + description: Error response + security: + - oauth2: [] + summary: "[EXPERIMENTAL] CreateFund: Create a Fund." + tags: + - Funds + x-fbn-apistatus: Experimental + x-content-type: application/json-patch+json + x-accepts: application/json + /api/funds/{scope}/{code}: + delete: + description: Delete the given Fund. + operationId: DeleteFund + parameters: + - description: The scope of the Fund to be deleted. + explode: false + in: path + name: scope + required: true + schema: + maxLength: 64 + minLength: 1 + pattern: "^[a-zA-Z0-9\\-_]+$" + type: string + style: simple + - description: The code of the Fund to be deleted. Together with the scope this + uniquely identifies the Fund. + explode: false + in: path + name: code + required: true + schema: + maxLength: 64 + minLength: 1 + pattern: "^[a-zA-Z0-9\\-_]+$" + type: string + style: simple + responses: + "200": + content: + text/plain: + example: + asAt: 2018-03-05T10:10:10.0000000+00:00 + schema: + $ref: '#/components/schemas/DeletedEntityResponse' + application/json: + example: + asAt: 2018-03-05T10:10:10.0000000+00:00 + schema: + $ref: '#/components/schemas/DeletedEntityResponse' + text/json: + example: + asAt: 2018-03-05T10:10:10.0000000+00:00 + schema: + $ref: '#/components/schemas/DeletedEntityResponse' + description: The datetime that the Fund was deleted + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + description: The details of the input related failure + default: + content: + application/json: + schema: + $ref: '#/components/schemas/LusidProblemDetails' + description: Error response + security: + - oauth2: [] + summary: "[EXPERIMENTAL] DeleteFund: Delete a Fund." + tags: + - Funds + x-fbn-apistatus: Experimental + x-accepts: application/json + get: + description: Retrieve the definition of a particular Fund. + operationId: GetFund + parameters: + - description: The scope of the Fund. + explode: false + in: path + name: scope + required: true + schema: + maxLength: 64 + minLength: 1 + pattern: "^[a-zA-Z0-9\\-_]+$" + type: string + style: simple + - description: The code of the Fund. Together with the scope this uniquely identifies + the Fund. + explode: false + in: path + name: code + required: true + schema: + maxLength: 64 + minLength: 1 + pattern: "^[a-zA-Z0-9\\-_]+$" + type: string + style: simple + - description: The effective datetime or cut label at which to retrieve the + Fund properties. Defaults to the current LUSID system datetime if not specified. + explode: true + in: query + name: effectiveAt + required: false + schema: + format: dateorcutlabel + type: string + style: form + - description: The asAt datetime at which to retrieve the Fund definition. Defaults + to returning the latest version of the Fund definition if not specified. + explode: true + in: query + name: asAt + required: false + schema: + format: date-time + type: string + style: form + x-nullable: true + - description: "A list of property keys from the 'Fund' domain to decorate onto\ + \ the Fund.\r\n These must take the format {domain}/{scope}/{code}, for\ + \ example 'Fund/Manager/Id'. If no properties are specified, then no properties\ + \ will be returned." + explode: true + in: query + name: propertyKeys + required: false + schema: + items: + description: "The key that uniquely identifies the property. It has the\ + \ format {domain}/{scope}/{code}." + type: string + type: array + style: form + x-nullable: true + responses: + "200": + content: + text/plain: + example: + href: http://example.com + id: + scope: FundScope + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + lusidInstrumentId: LUID_00000123 + instrumentScope: MyScope + type: Master + inceptionDate: 2024-01-01T00:00:00.0000000+00:00 + decimalPlaces: 6 + yearEndDate: + day: 31 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/Fund' + application/json: + example: + href: http://example.com + id: + scope: FundScope + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + lusidInstrumentId: LUID_00000123 + instrumentScope: MyScope + type: Master + inceptionDate: 2024-01-01T00:00:00.0000000+00:00 + decimalPlaces: 6 + yearEndDate: + day: 31 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/Fund' + text/json: + example: + href: http://example.com + id: + scope: FundScope + code: FundCode + displayName: Fund Name + description: Standard Fund + aborId: + scope: AborScope + code: AborCode + shareClassInstruments: + - instrumentIdentifiers: + Instrument/default/Figi: GB0007980598 + lusidInstrumentId: LUID_00000123 + instrumentScope: MyScope + type: Master + inceptionDate: 2024-01-01T00:00:00.0000000+00:00 + decimalPlaces: 6 + yearEndDate: + day: 31 + month: 12 + properties: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2020-03-05T00:00:00.0000000+00:00 + schema: + $ref: '#/components/schemas/Fund' + description: The requested Fund definition. + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + description: The details of the input related failure + default: + content: + application/json: + schema: + $ref: '#/components/schemas/LusidProblemDetails' + description: Error response + security: + - oauth2: [] + summary: "[EXPERIMENTAL] GetFund: Get a Fund." + tags: + - Funds + x-fbn-apistatus: Experimental + x-accepts: application/json + /api/funds/{scope}/{code}/properties/$upsert: + post: + description: "Update or insert one or more properties onto a single Fund. A\ + \ property will be updated if it\r\nalready exists and inserted if it does\ + \ not. All properties must be of the domain 'Fund'.\r\n \r\nUpserting a property\ + \ that exists for an Fund, with a null value, will delete the instance of\ + \ the property for that group.\r\n \r\nProperties have an effectiveFrom\ + \ datetime for which the property is valid, and an effectiveUntil\r\ + \ndatetime until which the property is valid. Not supplying an effectiveUntil\ + \ datetime results in the property being\r\nvalid indefinitely, or until the\ + \ next effectiveFrom datetime of the property." + operationId: UpsertFundProperties + parameters: + - description: The scope of the Fund to update or insert the properties onto. + explode: false + in: path + name: scope + required: true + schema: + maxLength: 64 + minLength: 1 + pattern: "^[a-zA-Z0-9\\-_]+$" + type: string + style: simple + - description: The code of the Fund to update or insert the properties onto. + Together with the scope this uniquely identifies the Fund. + explode: false + in: path + name: code + required: true + schema: + maxLength: 64 + minLength: 1 + pattern: "^[a-zA-Z0-9\\-_]+$" + type: string + style: simple + requestBody: + content: + application/json-patch+json: + example: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2018-03-05T00:00:00.0000000+00:00 + Fund/MyScope/SomeProperty: + key: Fund/MyScope/SomeProperty + value: + labelValue: SomeValue + effectiveFrom: 2016-01-01T00:00:00.0000000+00:00 + Fund/MyScope/AnotherProperty: + key: Fund/MyScope/AnotherProperty + value: + labelValue: AnotherValue + effectiveFrom: 2018-03-05T00:00:00.0000000+00:00 + effectiveUntil: 2020-01-01T00:00:00.0000000+00:00 + Fund/MyScope/ReBalanceInterval: + key: Fund/MyScope/ReBalanceInterval + value: + metricValue: + value: 30 + unit: Days + schema: + additionalProperties: + $ref: '#/components/schemas/Property' + type: object + application/json: + example: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2018-03-05T00:00:00.0000000+00:00 + Fund/MyScope/SomeProperty: + key: Fund/MyScope/SomeProperty + value: + labelValue: SomeValue + effectiveFrom: 2016-01-01T00:00:00.0000000+00:00 + Fund/MyScope/AnotherProperty: + key: Fund/MyScope/AnotherProperty + value: + labelValue: AnotherValue + effectiveFrom: 2018-03-05T00:00:00.0000000+00:00 + effectiveUntil: 2020-01-01T00:00:00.0000000+00:00 + Fund/MyScope/ReBalanceInterval: + key: Fund/MyScope/ReBalanceInterval + value: + metricValue: + value: 30 + unit: Days + schema: + additionalProperties: + $ref: '#/components/schemas/Property' + type: object + text/json: + example: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2018-03-05T00:00:00.0000000+00:00 + Fund/MyScope/SomeProperty: + key: Fund/MyScope/SomeProperty + value: + labelValue: SomeValue + effectiveFrom: 2016-01-01T00:00:00.0000000+00:00 + Fund/MyScope/AnotherProperty: + key: Fund/MyScope/AnotherProperty + value: + labelValue: AnotherValue + effectiveFrom: 2018-03-05T00:00:00.0000000+00:00 + effectiveUntil: 2020-01-01T00:00:00.0000000+00:00 + Fund/MyScope/ReBalanceInterval: + key: Fund/MyScope/ReBalanceInterval + value: + metricValue: + value: 30 + unit: Days + schema: + additionalProperties: + $ref: '#/components/schemas/Property' + type: object + application/*+json: + example: + Fund/MyScope/FundManagerName: + key: Fund/MyScope/FundManagerName + value: + labelValue: Smith + effectiveFrom: 2018-03-05T00:00:00.0000000+00:00 + Fund/MyScope/SomeProperty: + key: Fund/MyScope/SomeProperty + value: + labelValue: SomeValue + effectiveFrom: 2016-01-01T00:00:00.0000000+00:00 + Fund/MyScope/AnotherProperty: + key: Fund/MyScope/AnotherProperty + value: + labelValue: AnotherValue + effectiveFrom: 2018-03-05T00:00:00.0000000+00:00 + effectiveUntil: 2020-01-01T00:00:00.0000000+00:00 + Fund/MyScope/ReBalanceInterval: + key: Fund/MyScope/ReBalanceInterval + value: + metricValue: + value: 30 + unit: Days + schema: + additionalProperties: + $ref: '#/components/schemas/Property' + type: object + description: "The properties to be updated or inserted onto the Fund. Each\ + \ property in\r\n the request must be keyed by its unique property key.\ + \ This has the format {domain}/{scope}/{code} e.g. \"Fund/Manager/Id\"." + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/FundProperties' + application/json: + schema: + $ref: '#/components/schemas/FundProperties' + text/json: + schema: + $ref: '#/components/schemas/FundProperties' + description: The updated or inserted properties + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + description: The details of the input related failure + default: + content: + application/json: + schema: + $ref: '#/components/schemas/LusidProblemDetails' + description: Error response + security: + - oauth2: [] + summary: "[EXPERIMENTAL] UpsertFundProperties: Upsert Fund properties" + tags: + - Funds + x-fbn-apistatus: Experimental + x-content-type: application/json-patch+json + x-accepts: application/json /api/instrumentevents/$query: post: description: Returns a list of instrument events based on the holdings of the @@ -55387,71 +56220,299 @@ paths: $ref: '#/components/schemas/PropertyDefinition' application/json: example: - href: https://example.lusid.com/api/properties/demo-scope/demo-code - key: Instrument/default/MyDerivedPropertyName - valueType: String - displayName: Value - dataTypeId: - scope: system - code: number - type: Label - unitSchema: NoUnits - domain: Instrument - scope: default - code: MyDerivedPropertyName - valueRequired: true - lifeTime: Perpetual - constraintStyle: Property - propertyDefinitionType: ValueProperty - propertyDescription: A demonstration property definition - derivationFormula: "(Properties[Instrument/default/Price] generate\ - \ justfile test_sdk Properties[Instrument/default/Cost]) / Properties[Instrument/default/Shares]" - version: - effectiveFrom: 0001-01-01T00:00:00.0000000+00:00 - asAtDate: 2018-03-05T10:10:10.0000000+00:00 - asAtCreated: 2018-03-05T10:10:10.0000000+00:00 - userIdCreated: OrderUser1 - requestIdCreated: OrderRequestId1 - asAtModified: 2018-03-08T10:10:10.0000000+00:00 - userIdModified: OrderUser2 - requestIdModified: OrderRequestId2 - asAtVersionNumber: 2 + href: https://example.lusid.com/api/properties/demo-scope/demo-code + key: Instrument/default/MyDerivedPropertyName + valueType: String + displayName: Value + dataTypeId: + scope: system + code: number + type: Label + unitSchema: NoUnits + domain: Instrument + scope: default + code: MyDerivedPropertyName + valueRequired: true + lifeTime: Perpetual + constraintStyle: Property + propertyDefinitionType: ValueProperty + propertyDescription: A demonstration property definition + derivationFormula: "(Properties[Instrument/default/Price] generate\ + \ justfile test_sdk Properties[Instrument/default/Cost]) / Properties[Instrument/default/Shares]" + version: + effectiveFrom: 0001-01-01T00:00:00.0000000+00:00 + asAtDate: 2018-03-05T10:10:10.0000000+00:00 + asAtCreated: 2018-03-05T10:10:10.0000000+00:00 + userIdCreated: OrderUser1 + requestIdCreated: OrderRequestId1 + asAtModified: 2018-03-08T10:10:10.0000000+00:00 + userIdModified: OrderUser2 + requestIdModified: OrderRequestId2 + asAtVersionNumber: 2 + schema: + $ref: '#/components/schemas/PropertyDefinition' + text/json: + example: + href: https://example.lusid.com/api/properties/demo-scope/demo-code + key: Instrument/default/MyDerivedPropertyName + valueType: String + displayName: Value + dataTypeId: + scope: system + code: number + type: Label + unitSchema: NoUnits + domain: Instrument + scope: default + code: MyDerivedPropertyName + valueRequired: true + lifeTime: Perpetual + constraintStyle: Property + propertyDefinitionType: ValueProperty + propertyDescription: A demonstration property definition + derivationFormula: "(Properties[Instrument/default/Price] generate\ + \ justfile test_sdk Properties[Instrument/default/Cost]) / Properties[Instrument/default/Shares]" + version: + effectiveFrom: 0001-01-01T00:00:00.0000000+00:00 + asAtDate: 2018-03-05T10:10:10.0000000+00:00 + asAtCreated: 2018-03-05T10:10:10.0000000+00:00 + userIdCreated: OrderUser1 + requestIdCreated: OrderRequestId1 + asAtModified: 2018-03-08T10:10:10.0000000+00:00 + userIdModified: OrderUser2 + requestIdModified: OrderRequestId2 + asAtVersionNumber: 2 + schema: + $ref: '#/components/schemas/PropertyDefinition' + description: The newly created property definition + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + application/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + text/json: + schema: + $ref: '#/components/schemas/LusidValidationProblemDetails' + description: The details of the input related failure + default: + content: + application/json: + schema: + $ref: '#/components/schemas/LusidProblemDetails' + description: Error response + security: + - oauth2: [] + summary: "CreatePropertyDefinition: Create property definition" + tags: + - Property Definitions + x-fbn-apistatus: Stable + x-content-type: application/json-patch+json + x-accepts: application/json + /api/propertydefinitions/$list: + get: + description: List all the property definitions matching particular criteria. + operationId: ListPropertyDefinitions + parameters: + - description: "The effective datetime or cut label at which to list the property\ + \ definitions. Defaults to the current LUSID\r\n system datetime if not\ + \ specified." + explode: true + in: query + name: effectiveAt + required: false + schema: + format: dateorcutlabel + type: string + style: form + - description: "The asAt datetime at which to list the property definitions.\ + \ Defaults to returning the latest version\r\n of each property definition\ + \ if not specified." + explode: true + in: query + name: asAt + required: false + schema: + format: date-time + type: string + style: form + x-nullable: true + - description: "A list of property keys from the 'Property Definition' domain\ + \ to decorate onto\r\n property definitions. These must take the format\r\ + \n {domain}/{scope}/{code} e.g \"PropertyDefinition/myScope/someAttributeKey\"\ + . Each property must be from the \"PropertyDefinition\" domain." + explode: true + in: query + name: propertyKeys + required: false + schema: + items: + description: "The key that uniquely identifies the property. It has the\ + \ format {domain}/{scope}/{code}." + type: string + type: array + style: form + x-nullable: true + - description: "The pagination token to use to continue listing property definitions;\ + \ this\r\n value is returned from the previous call. If a pagination token\ + \ is provided, the filter, effectiveAt\r\n and asAt fields must not have\ + \ changed since the original request." + explode: true + in: query + name: page + required: false + schema: + maxLength: 500 + minLength: 1 + pattern: "^[a-zA-Z0-9\\+/]*={0,3}$" + type: string + style: form + - description: "When paginating, limit the results to this number. Defaults\ + \ to 100 if not specified." + explode: true + in: query + name: limit + required: false + schema: + format: int32 + maximum: 5000 + minimum: 1 + type: integer + style: form + x-nullable: true + - description: "Expression to filter the results.\r\n For example, to filter\ + \ on the display name, specify \"DisplayName eq 'DisplayName'\". For more\ + \ information about filtering\r\n results, see https://support.lusid.com/knowledgebase/article/KA-01914." + explode: true + in: query + name: filter + required: false + schema: + maxLength: 16384 + minLength: 0 + pattern: "^[\\s\\S]*$" + type: string + style: form + - description: "A list of field names or properties to sort by, each suffixed\ + \ by \" ASC\" or \" DESC\"" + explode: true + in: query + name: sortBy + required: false + schema: + items: + type: string + type: array + style: form + x-nullable: true + responses: + "200": + content: + text/plain: + example: + values: + - href: https://example.lusid.com/api/properties/demo-scope/demo-code + key: Portfolio/default/Country + valueType: String + displayName: Country + dataTypeId: + scope: demo-scope + code: demo-code + type: Information + unitSchema: Basic + domain: Portfolio + scope: default + code: Country + valueRequired: false + lifeTime: Perpetual + constraintStyle: Property + propertyDefinitionType: ValueProperty + propertyDescription: A demonstration property definition + version: + effectiveFrom: 0001-01-01T00:00:00.0000000+00:00 + asAtDate: 2018-03-05T10:10:10.0000000+00:00 + asAtCreated: 2018-03-05T10:10:10.0000000+00:00 + userIdCreated: OrderUser1 + requestIdCreated: OrderRequestId1 + asAtModified: 2018-03-08T10:10:10.0000000+00:00 + userIdModified: OrderUser2 + requestIdModified: OrderRequestId2 + asAtVersionNumber: 2 + href: https://example.lusid.com/api/properties + links: [] schema: - $ref: '#/components/schemas/PropertyDefinition' + $ref: '#/components/schemas/PagedResourceListOfPropertyDefinition' + application/json: + example: + values: + - href: https://example.lusid.com/api/properties/demo-scope/demo-code + key: Portfolio/default/Country + valueType: String + displayName: Country + dataTypeId: + scope: demo-scope + code: demo-code + type: Information + unitSchema: Basic + domain: Portfolio + scope: default + code: Country + valueRequired: false + lifeTime: Perpetual + constraintStyle: Property + propertyDefinitionType: ValueProperty + propertyDescription: A demonstration property definition + version: + effectiveFrom: 0001-01-01T00:00:00.0000000+00:00 + asAtDate: 2018-03-05T10:10:10.0000000+00:00 + asAtCreated: 2018-03-05T10:10:10.0000000+00:00 + userIdCreated: OrderUser1 + requestIdCreated: OrderRequestId1 + asAtModified: 2018-03-08T10:10:10.0000000+00:00 + userIdModified: OrderUser2 + requestIdModified: OrderRequestId2 + asAtVersionNumber: 2 + href: https://example.lusid.com/api/properties + links: [] + schema: + $ref: '#/components/schemas/PagedResourceListOfPropertyDefinition' text/json: example: - href: https://example.lusid.com/api/properties/demo-scope/demo-code - key: Instrument/default/MyDerivedPropertyName - valueType: String - displayName: Value - dataTypeId: - scope: system - code: number - type: Label - unitSchema: NoUnits - domain: Instrument - scope: default - code: MyDerivedPropertyName - valueRequired: true - lifeTime: Perpetual - constraintStyle: Property - propertyDefinitionType: ValueProperty - propertyDescription: A demonstration property definition - derivationFormula: "(Properties[Instrument/default/Price] generate\ - \ justfile test_sdk Properties[Instrument/default/Cost]) / Properties[Instrument/default/Shares]" - version: - effectiveFrom: 0001-01-01T00:00:00.0000000+00:00 - asAtDate: 2018-03-05T10:10:10.0000000+00:00 - asAtCreated: 2018-03-05T10:10:10.0000000+00:00 - userIdCreated: OrderUser1 - requestIdCreated: OrderRequestId1 - asAtModified: 2018-03-08T10:10:10.0000000+00:00 - userIdModified: OrderUser2 - requestIdModified: OrderRequestId2 - asAtVersionNumber: 2 + values: + - href: https://example.lusid.com/api/properties/demo-scope/demo-code + key: Portfolio/default/Country + valueType: String + displayName: Country + dataTypeId: + scope: demo-scope + code: demo-code + type: Information + unitSchema: Basic + domain: Portfolio + scope: default + code: Country + valueRequired: false + lifeTime: Perpetual + constraintStyle: Property + propertyDefinitionType: ValueProperty + propertyDescription: A demonstration property definition + version: + effectiveFrom: 0001-01-01T00:00:00.0000000+00:00 + asAtDate: 2018-03-05T10:10:10.0000000+00:00 + asAtCreated: 2018-03-05T10:10:10.0000000+00:00 + userIdCreated: OrderUser1 + requestIdCreated: OrderRequestId1 + asAtModified: 2018-03-08T10:10:10.0000000+00:00 + userIdModified: OrderUser2 + requestIdModified: OrderRequestId2 + asAtVersionNumber: 2 + href: https://example.lusid.com/api/properties + links: [] schema: - $ref: '#/components/schemas/PropertyDefinition' - description: The newly created property definition + $ref: '#/components/schemas/PagedResourceListOfPropertyDefinition' + description: The requested portfolios "400": content: text/plain: @@ -55472,11 +56533,10 @@ paths: description: Error response security: - oauth2: [] - summary: "CreatePropertyDefinition: Create property definition" + summary: "ListPropertyDefinitions: List property definitions" tags: - Property Definitions x-fbn-apistatus: Stable - x-content-type: application/json-patch+json x-accepts: application/json /api/propertydefinitions/derived: post: @@ -55689,7 +56749,7 @@ paths: \ MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity,\ \ Placement, Execution, Block, Participation, Package, OrderInstruction,\ \ NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts,\ - \ CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition,\ + \ CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition,\ \ Compliance, DiaryEntry, Leg" enum: - NotDefined @@ -55725,6 +56785,7 @@ paths: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -55949,7 +57010,7 @@ paths: \ MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity,\ \ Placement, Execution, Block, Participation, Package, OrderInstruction,\ \ NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts,\ - \ CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition,\ + \ CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition,\ \ Compliance, DiaryEntry, Leg" enum: - NotDefined @@ -55985,6 +57046,7 @@ paths: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -56075,7 +57137,7 @@ paths: \ MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity,\ \ Placement, Execution, Block, Participation, Package, OrderInstruction,\ \ NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts,\ - \ CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition,\ + \ CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition,\ \ Compliance, DiaryEntry, Leg" enum: - NotDefined @@ -56111,6 +57173,7 @@ paths: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -56309,7 +57372,7 @@ paths: \ MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity,\ \ Placement, Execution, Block, Participation, Package, OrderInstruction,\ \ NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts,\ - \ CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition,\ + \ CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition,\ \ Compliance, DiaryEntry, Leg" enum: - NotDefined @@ -56345,6 +57408,7 @@ paths: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -56549,7 +57613,7 @@ paths: \ MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity,\ \ Placement, Execution, Block, Participation, Package, OrderInstruction,\ \ NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts,\ - \ CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition,\ + \ CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition,\ \ Compliance, DiaryEntry, Leg" enum: - NotDefined @@ -56585,6 +57649,7 @@ paths: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -56805,7 +57870,7 @@ paths: \ MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity,\ \ Placement, Execution, Block, Participation, Package, OrderInstruction,\ \ NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts,\ - \ CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition,\ + \ CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition,\ \ Compliance, DiaryEntry, Leg" enum: - NotDefined @@ -56841,6 +57906,7 @@ paths: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -56994,7 +58060,7 @@ paths: \ MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity,\ \ Placement, Execution, Block, Participation, Package, OrderInstruction,\ \ NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts,\ - \ CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition,\ + \ CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition,\ \ Compliance, DiaryEntry, Leg" enum: - NotDefined @@ -57030,6 +58096,7 @@ paths: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -97837,7 +98904,7 @@ components: \ MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity,\ \ Placement, Execution, Block, Participation, Package, OrderInstruction,\ \ NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts,\ - \ CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition,\ + \ CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition,\ \ Compliance, DiaryEntry, Leg" enum: - NotDefined @@ -97873,6 +98940,7 @@ components: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -98128,7 +99196,7 @@ components: \ ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution,\ \ Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity,\ \ InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration,\ - \ Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg" + \ Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg" enum: - NotDefined - Transaction @@ -98163,6 +99231,7 @@ components: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -101646,6 +102715,28 @@ components: - complianceParameterType - value type: object + DayMonth: + additionalProperties: false + example: + month: 2 + day: 19 + properties: + day: + description: "Day part of Day, Month for Year End date specification." + format: int32 + maximum: 31 + minimum: 1 + type: integer + month: + description: "Month part of Day, Month for Year End date specification." + format: int32 + maximum: 12 + minimum: 1 + type: integer + required: + - day + - month + type: object DayOfWeek: enum: - Sunday @@ -105533,6 +106624,135 @@ components: nullable: true type: string type: object + Fund: + additionalProperties: false + description: A Fund entity. + example: + aborId: + code: code + scope: scope + displayName: displayName + yearEndDate: + month: 2 + day: 19 + description: description + shareClassInstruments: + - instrumentScope: instrumentScope + instrumentIdentifiers: + key: instrumentIdentifiers + lusidInstrumentId: lusidInstrumentId + - instrumentScope: instrumentScope + instrumentIdentifiers: + key: instrumentIdentifiers + lusidInstrumentId: lusidInstrumentId + type: type + version: + asAtModified: 2000-01-23T04:56:07.000+00:00 + userIdModified: userIdModified + asAtVersionNumber: 6 + asAtCreated: 2000-01-23T04:56:07.000+00:00 + requestIdCreated: requestIdCreated + userIdCreated: userIdCreated + requestIdModified: requestIdModified + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + asAtDate: 2000-01-23T04:56:07.000+00:00 + decimalPlaces: 2 + inceptionDate: 2000-01-23T04:56:07.000+00:00 + links: + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + href: https://openapi-generator.tech + id: + code: code + scope: scope + properties: + key: + effectiveUntil: 2000-01-23T04:56:07.000+00:00 + value: + metricValue: + unit: unit + value: 0.8008281904610115 + labelValue: labelValue + labelValueSet: + values: + - values + - values + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + key: key + properties: + href: + description: The specific Uniform Resource Identifier (URI) for this resource + at the requested effective and asAt datetime. + format: uri + nullable: true + type: string + id: + $ref: '#/components/schemas/ResourceId' + displayName: + description: The name of the Fund. + maxLength: 256 + minLength: 1 + nullable: true + type: string + description: + description: A description for the Fund. + maxLength: 1024 + minLength: 0 + nullable: true + pattern: "^[\\s\\S]*$" + type: string + aborId: + $ref: '#/components/schemas/ResourceId' + shareClassInstruments: + description: Details the user-provided instrument identifiers and the instrument + resolved from them. + items: + $ref: '#/components/schemas/InstrumentResolutionDetail' + nullable: true + type: array + type: + description: "The type of fund; 'Standalone', 'Master' or 'Feeder'" + minLength: 1 + type: string + inceptionDate: + description: Inception date of the Fund + format: date-time + type: string + decimalPlaces: + description: Number of decimal places for reporting + format: int32 + maximum: 30 + minimum: 0 + nullable: true + type: integer + yearEndDate: + $ref: '#/components/schemas/DayMonth' + properties: + additionalProperties: + $ref: '#/components/schemas/Property' + description: A set of properties for the Fund. + nullable: true + type: object + version: + $ref: '#/components/schemas/Version' + links: + items: + $ref: '#/components/schemas/Link' + nullable: true + type: array + required: + - aborId + - id + - inceptionDate + - type + - yearEndDate + type: object FundingLeg: allOf: - $ref: '#/components/schemas/InstrumentLeg' @@ -105657,6 +106877,171 @@ components: - expectedFundingLegNotional - modelOptionsType type: object + FundProperties: + additionalProperties: false + example: + links: + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + href: https://openapi-generator.tech + version: + asAtModified: 2000-01-23T04:56:07.000+00:00 + userIdModified: userIdModified + asAtVersionNumber: 6 + asAtCreated: 2000-01-23T04:56:07.000+00:00 + requestIdCreated: requestIdCreated + userIdCreated: userIdCreated + requestIdModified: requestIdModified + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + asAtDate: 2000-01-23T04:56:07.000+00:00 + properties: + key: + effectiveUntil: 2000-01-23T04:56:07.000+00:00 + value: + metricValue: + unit: unit + value: 0.8008281904610115 + labelValue: labelValue + labelValueSet: + values: + - values + - values + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + key: key + properties: + href: + description: The specific Uniform Resource Identifier (URI) for this resource + at the requested effective and asAt datetime. + format: uri + nullable: true + type: string + properties: + additionalProperties: + $ref: '#/components/schemas/Property' + description: The Fund properties. These will be from the 'Fund' domain. + nullable: true + type: object + version: + $ref: '#/components/schemas/Version' + links: + items: + $ref: '#/components/schemas/Link' + nullable: true + type: array + type: object + FundRequest: + additionalProperties: false + description: The request used to create a Fund. + example: + aborId: + code: code + scope: scope + code: code + decimalPlaces: 2 + displayName: displayName + shareClassInstrumentScopes: + - shareClassInstrumentScopes + inceptionDate: 2000-01-23T04:56:07.000+00:00 + yearEndDate: + month: 2 + day: 19 + description: description + shareClassInstruments: + - instrumentScope: instrumentScope + instrumentIdentifiers: + key: instrumentIdentifiers + lusidInstrumentId: lusidInstrumentId + - instrumentScope: instrumentScope + instrumentIdentifiers: + key: instrumentIdentifiers + lusidInstrumentId: lusidInstrumentId + type: type + properties: + key: + effectiveUntil: 2000-01-23T04:56:07.000+00:00 + value: + metricValue: + unit: unit + value: 0.8008281904610115 + labelValue: labelValue + labelValueSet: + values: + - values + - values + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + key: key + properties: + code: + description: The code given for the Fund. + maxLength: 64 + minLength: 1 + pattern: "^[a-zA-Z0-9\\-_]+$" + type: string + displayName: + description: The name of the Fund. + maxLength: 256 + minLength: 1 + nullable: true + type: string + description: + description: A description for the Fund. + maxLength: 1024 + minLength: 0 + nullable: true + pattern: "^[\\s\\S]*$" + type: string + aborId: + $ref: '#/components/schemas/ResourceId' + shareClassInstrumentScopes: + description: The scopes in which the instruments lie. + items: + type: string + maxItems: 1 + nullable: true + type: array + shareClassInstruments: + description: Details the user-provided instrument identifiers and the instrument + resolved from them. + items: + $ref: '#/components/schemas/InstrumentResolutionDetail' + nullable: true + type: array + type: + description: "The type of fund; 'Standalone', 'Master' or 'Feeder'" + minLength: 1 + type: string + inceptionDate: + description: Inception date of the Fund + format: date-time + type: string + decimalPlaces: + description: Number of decimal places for reporting + format: int32 + maximum: 30 + minimum: 0 + nullable: true + type: integer + yearEndDate: + $ref: '#/components/schemas/DayMonth' + properties: + additionalProperties: + $ref: '#/components/schemas/Property' + description: A set of properties for the Fund. + nullable: true + type: object + required: + - aborId + - code + - inceptionDate + - type + - yearEndDate + type: object FundShareClass: allOf: - $ref: '#/components/schemas/LusidInstrument' @@ -112176,6 +113561,39 @@ components: nullable: true type: array type: object + InstrumentResolutionDetail: + additionalProperties: false + example: + instrumentScope: instrumentScope + instrumentIdentifiers: + key: instrumentIdentifiers + lusidInstrumentId: lusidInstrumentId + properties: + instrumentIdentifiers: + additionalProperties: + type: string + description: Unique instrument identifiers + type: object + lusidInstrumentId: + description: "LUSID's internal unique instrument identifier, resolved from\ + \ the instrument identifiers" + maxLength: 64 + minLength: 1 + nullable: true + pattern: "^[a-zA-Z0-9\\-_]+$" + readOnly: true + type: string + instrumentScope: + description: The scope in which the instrument lies. + maxLength: 64 + minLength: 1 + nullable: true + pattern: "^[a-zA-Z0-9\\-_]+$" + readOnly: true + type: string + required: + - instrumentIdentifiers + type: object InstrumentSearchProperty: additionalProperties: false example: @@ -120128,15 +121546,115 @@ components: - values - values key: key - - side: side - quantity: 0.8008281904610115 - placementId: + - side: side + quantity: 0.8008281904610115 + placementId: + code: code + scope: scope + settlementCurrencyFxRate: 6.027456183070403 + instrumentIdentifiers: + key: instrumentIdentifiers + settlementDate: 2000-01-23T04:56:07.000+00:00 + type: type + version: + asAtModified: 2000-01-23T04:56:07.000+00:00 + userIdModified: userIdModified + asAtVersionNumber: 6 + asAtCreated: 2000-01-23T04:56:07.000+00:00 + requestIdCreated: requestIdCreated + userIdCreated: userIdCreated + requestIdModified: requestIdModified + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + asAtDate: 2000-01-23T04:56:07.000+00:00 + createdDate: 2000-01-23T04:56:07.000+00:00 + settlementCurrency: settlementCurrency + price: + amount: 0.8008281904610115 + currency: currency + counterparty: counterparty + links: + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + id: + code: code + scope: scope + state: state + averagePrice: 1.4658129805029452 + lusidInstrumentId: lusidInstrumentId + properties: + key: + value: + metricValue: + unit: unit + value: 0.8008281904610115 + labelValue: labelValue + labelValueSet: + values: + - values + - values + key: key + links: + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + href: https://openapi-generator.tech + properties: + nextPage: + nullable: true + type: string + previousPage: + nullable: true + type: string + values: + items: + $ref: '#/components/schemas/Execution' + type: array + href: + format: uri + nullable: true + type: string + links: + items: + $ref: '#/components/schemas/Link' + nullable: true + type: array + required: + - values + type: object + PagedResourceListOfFund: + additionalProperties: false + example: + previousPage: previousPage + nextPage: nextPage + values: + - aborId: code: code scope: scope - settlementCurrencyFxRate: 6.027456183070403 - instrumentIdentifiers: - key: instrumentIdentifiers - settlementDate: 2000-01-23T04:56:07.000+00:00 + displayName: displayName + yearEndDate: + month: 2 + day: 19 + description: description + shareClassInstruments: + - instrumentScope: instrumentScope + instrumentIdentifiers: + key: instrumentIdentifiers + lusidInstrumentId: lusidInstrumentId + - instrumentScope: instrumentScope + instrumentIdentifiers: + key: instrumentIdentifiers + lusidInstrumentId: lusidInstrumentId type: type version: asAtModified: 2000-01-23T04:56:07.000+00:00 @@ -120148,12 +121666,8 @@ components: requestIdModified: requestIdModified effectiveFrom: 2000-01-23T04:56:07.000+00:00 asAtDate: 2000-01-23T04:56:07.000+00:00 - createdDate: 2000-01-23T04:56:07.000+00:00 - settlementCurrency: settlementCurrency - price: - amount: 0.8008281904610115 - currency: currency - counterparty: counterparty + decimalPlaces: 2 + inceptionDate: 2000-01-23T04:56:07.000+00:00 links: - method: method description: description @@ -120163,14 +121677,13 @@ components: description: description href: https://openapi-generator.tech relation: relation + href: https://openapi-generator.tech id: code: code scope: scope - state: state - averagePrice: 1.4658129805029452 - lusidInstrumentId: lusidInstrumentId properties: key: + effectiveUntil: 2000-01-23T04:56:07.000+00:00 value: metricValue: unit: unit @@ -120180,6 +121693,64 @@ components: values: - values - values + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + key: key + - aborId: + code: code + scope: scope + displayName: displayName + yearEndDate: + month: 2 + day: 19 + description: description + shareClassInstruments: + - instrumentScope: instrumentScope + instrumentIdentifiers: + key: instrumentIdentifiers + lusidInstrumentId: lusidInstrumentId + - instrumentScope: instrumentScope + instrumentIdentifiers: + key: instrumentIdentifiers + lusidInstrumentId: lusidInstrumentId + type: type + version: + asAtModified: 2000-01-23T04:56:07.000+00:00 + userIdModified: userIdModified + asAtVersionNumber: 6 + asAtCreated: 2000-01-23T04:56:07.000+00:00 + requestIdCreated: requestIdCreated + userIdCreated: userIdCreated + requestIdModified: requestIdModified + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + asAtDate: 2000-01-23T04:56:07.000+00:00 + decimalPlaces: 2 + inceptionDate: 2000-01-23T04:56:07.000+00:00 + links: + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + href: https://openapi-generator.tech + id: + code: code + scope: scope + properties: + key: + effectiveUntil: 2000-01-23T04:56:07.000+00:00 + value: + metricValue: + unit: unit + value: 0.8008281904610115 + labelValue: labelValue + labelValueSet: + values: + - values + - values + effectiveFrom: 2000-01-23T04:56:07.000+00:00 key: key links: - method: method @@ -120200,7 +121771,7 @@ components: type: string values: items: - $ref: '#/components/schemas/Execution' + $ref: '#/components/schemas/Fund' type: array href: format: uri @@ -123411,6 +124982,149 @@ components: required: - values type: object + PagedResourceListOfPropertyDefinition: + additionalProperties: false + example: + previousPage: previousPage + nextPage: nextPage + values: + - derivationFormula: derivationFormula + code: code + propertyDescription: propertyDescription + displayName: displayName + dataTypeId: + code: code + scope: scope + unitSchema: NoUnits + type: Label + version: + asAtModified: 2000-01-23T04:56:07.000+00:00 + userIdModified: userIdModified + asAtVersionNumber: 6 + asAtCreated: 2000-01-23T04:56:07.000+00:00 + requestIdCreated: requestIdCreated + userIdCreated: userIdCreated + requestIdModified: requestIdModified + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + asAtDate: 2000-01-23T04:56:07.000+00:00 + constraintStyle: constraintStyle + collectionType: collectionType + valueType: String + domain: NotDefined + scope: scope + links: + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + href: https://openapi-generator.tech + lifeTime: Perpetual + valueRequired: true + key: key + properties: + key: + effectiveUntil: 2000-01-23T04:56:07.000+00:00 + value: + metricValue: + unit: unit + value: 0.8008281904610115 + labelValue: labelValue + labelValueSet: + values: + - values + - values + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + key: key + propertyDefinitionType: ValueProperty + - derivationFormula: derivationFormula + code: code + propertyDescription: propertyDescription + displayName: displayName + dataTypeId: + code: code + scope: scope + unitSchema: NoUnits + type: Label + version: + asAtModified: 2000-01-23T04:56:07.000+00:00 + userIdModified: userIdModified + asAtVersionNumber: 6 + asAtCreated: 2000-01-23T04:56:07.000+00:00 + requestIdCreated: requestIdCreated + userIdCreated: userIdCreated + requestIdModified: requestIdModified + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + asAtDate: 2000-01-23T04:56:07.000+00:00 + constraintStyle: constraintStyle + collectionType: collectionType + valueType: String + domain: NotDefined + scope: scope + links: + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + href: https://openapi-generator.tech + lifeTime: Perpetual + valueRequired: true + key: key + properties: + key: + effectiveUntil: 2000-01-23T04:56:07.000+00:00 + value: + metricValue: + unit: unit + value: 0.8008281904610115 + labelValue: labelValue + labelValueSet: + values: + - values + - values + effectiveFrom: 2000-01-23T04:56:07.000+00:00 + key: key + propertyDefinitionType: ValueProperty + links: + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + - method: method + description: description + href: https://openapi-generator.tech + relation: relation + href: https://openapi-generator.tech + properties: + nextPage: + nullable: true + type: string + previousPage: + nullable: true + type: string + values: + items: + $ref: '#/components/schemas/PropertyDefinition' + type: array + href: + format: uri + nullable: true + type: string + links: + items: + $ref: '#/components/schemas/Link' + nullable: true + type: array + required: + - values + type: object PagedResourceListOfPropertyDefinitionSearchResult: additionalProperties: false example: @@ -128348,7 +130062,7 @@ components: \ ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution,\ \ Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity,\ \ InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration,\ - \ Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg" + \ Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg" enum: - NotDefined - Transaction @@ -128383,6 +130097,7 @@ components: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -128555,7 +130270,7 @@ components: \ ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution,\ \ Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity,\ \ InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration,\ - \ Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg" + \ Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg" enum: - NotDefined - Transaction @@ -128590,6 +130305,7 @@ components: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -128687,6 +130403,7 @@ components: - CustodianAccount - Abor - AborConfiguration + - Fund - Reconciliation - PropertyDefinition - Compliance @@ -155549,6 +157266,7 @@ x-tagGroups: - Derived Transaction Portfolios - Entities - Executions + - Funds - Instrument Event Types - Instrument Events - Instruments diff --git a/sdk/docs/AborApi.md b/sdk/docs/AborApi.md index ed06eec3f2a..31831709c2a 100644 --- a/sdk/docs/AborApi.md +++ b/sdk/docs/AborApi.md @@ -344,7 +344,7 @@ public class Example { String code = "code_example"; // String | The code of the Abor. Together with the scope this uniquely identifies the Abor. String effectiveAt = "effectiveAt_example"; // String | The effective datetime or cut label at which to retrieve the Abor properties. Defaults to the current LUSID system datetime if not specified. OffsetDateTime asAt = OffsetDateTime.now(); // OffsetDateTime | The asAt datetime at which to retrieve the Abor definition. Defaults to returning the latest version of the Abor definition if not specified. - List propertyKeys = Arrays.asList(); // List | A list of property keys from the 'Abor' domain to decorate onto the Abor. These must take the format {domain}/{scope}/{code}, for example 'Abor/Manager/Id'. If not provided will return all the entitled properties for that Abor. + List propertyKeys = Arrays.asList(); // List | A list of property keys from the 'Abor' domain to decorate onto the Abor. These must take the format {domain}/{scope}/{code}, for example 'Abor/Manager/Id'. If no properties are specified, then no properties will be returned. try { Abor result = apiInstance.getAbor(scope, code) .effectiveAt(effectiveAt) @@ -371,7 +371,7 @@ public class Example { | **code** | **String**| The code of the Abor. Together with the scope this uniquely identifies the Abor. | | | **effectiveAt** | **String**| The effective datetime or cut label at which to retrieve the Abor properties. Defaults to the current LUSID system datetime if not specified. | [optional] | | **asAt** | **OffsetDateTime**| The asAt datetime at which to retrieve the Abor definition. Defaults to returning the latest version of the Abor definition if not specified. | [optional] | -| **propertyKeys** | [**List<String>**](String.md)| A list of property keys from the 'Abor' domain to decorate onto the Abor. These must take the format {domain}/{scope}/{code}, for example 'Abor/Manager/Id'. If not provided will return all the entitled properties for that Abor. | [optional] | +| **propertyKeys** | [**List<String>**](String.md)| A list of property keys from the 'Abor' domain to decorate onto the Abor. These must take the format {domain}/{scope}/{code}, for example 'Abor/Manager/Id'. If no properties are specified, then no properties will be returned. | [optional] | ### Return type diff --git a/sdk/docs/AborConfigurationApi.md b/sdk/docs/AborConfigurationApi.md index 4f2c7fc6408..891bb7baeaa 100644 --- a/sdk/docs/AborConfigurationApi.md +++ b/sdk/docs/AborConfigurationApi.md @@ -187,7 +187,7 @@ public class Example { String code = "code_example"; // String | The code of the AborConfiguration. Together with the scope this uniquely identifies the AborConfiguration. String effectiveAt = "effectiveAt_example"; // String | The effective datetime or cut label at which to retrieve the AborConfiguration properties. Defaults to the current LUSID system datetime if not specified. OffsetDateTime asAt = OffsetDateTime.now(); // OffsetDateTime | The asAt datetime at which to retrieve the AborConfiguration definition. Defaults to returning the latest version of the AborConfiguration definition if not specified. - List propertyKeys = Arrays.asList(); // List | A list of property keys from the 'AborConfiguration' domain to decorate onto the AborConfiguration. These must take the format {domain}/{scope}/{code}, for example 'AborConfiguration/Manager/Id'. If not provided will return all the entitled properties for that AborConfiguration. + List propertyKeys = Arrays.asList(); // List | A list of property keys from the 'AborConfiguration' domain to decorate onto the AborConfiguration. These must take the format {domain}/{scope}/{code}, for example 'AborConfiguration/Manager/Id'. If no properties are specified, then no properties will be returned. try { AborConfiguration result = apiInstance.getAborConfiguration(scope, code) .effectiveAt(effectiveAt) @@ -214,7 +214,7 @@ public class Example { | **code** | **String**| The code of the AborConfiguration. Together with the scope this uniquely identifies the AborConfiguration. | | | **effectiveAt** | **String**| The effective datetime or cut label at which to retrieve the AborConfiguration properties. Defaults to the current LUSID system datetime if not specified. | [optional] | | **asAt** | **OffsetDateTime**| The asAt datetime at which to retrieve the AborConfiguration definition. Defaults to returning the latest version of the AborConfiguration definition if not specified. | [optional] | -| **propertyKeys** | [**List<String>**](String.md)| A list of property keys from the 'AborConfiguration' domain to decorate onto the AborConfiguration. These must take the format {domain}/{scope}/{code}, for example 'AborConfiguration/Manager/Id'. If not provided will return all the entitled properties for that AborConfiguration. | [optional] | +| **propertyKeys** | [**List<String>**](String.md)| A list of property keys from the 'AborConfiguration' domain to decorate onto the AborConfiguration. These must take the format {domain}/{scope}/{code}, for example 'AborConfiguration/Manager/Id'. If no properties are specified, then no properties will be returned. | [optional] | ### Return type diff --git a/sdk/docs/ChartOfAccountsApi.md b/sdk/docs/ChartOfAccountsApi.md index 7e5b7c28359..ba475b29de3 100644 --- a/sdk/docs/ChartOfAccountsApi.md +++ b/sdk/docs/ChartOfAccountsApi.md @@ -815,7 +815,7 @@ public class Example { String code = "code_example"; // String | The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts. String effectiveAt = "effectiveAt_example"; // String | The effective datetime or cut label at which to retrieve the Chart of Accounts properties. Defaults to the current LUSID system datetime if not specified. OffsetDateTime asAt = OffsetDateTime.now(); // OffsetDateTime | The asAt datetime at which to retrieve the Chart of Accounts definition. Defaults to returning the latest version of the Chart of Accounts definition if not specified. - List propertyKeys = Arrays.asList(); // List | A list of property keys from the 'ChartOfAccounts' domain to decorate onto the Chart of Accounts. These must take the format {domain}/{scope}/{code}, for example 'ChartOfAccounts/Manager/Id'. If not provided will return all the entitled properties for that Chart of Accounts. + List propertyKeys = Arrays.asList(); // List | A list of property keys from the 'ChartOfAccounts' domain to decorate onto the Chart of Accounts. These must take the format {domain}/{scope}/{code}, for example 'ChartOfAccounts/Manager/Id'. If no properties are specified, then no properties will be returned. try { ChartOfAccounts result = apiInstance.getChartOfAccounts(scope, code) .effectiveAt(effectiveAt) @@ -842,7 +842,7 @@ public class Example { | **code** | **String**| The code of the Chart of Accounts. Together with the scope this uniquely identifies the Chart of Accounts. | | | **effectiveAt** | **String**| The effective datetime or cut label at which to retrieve the Chart of Accounts properties. Defaults to the current LUSID system datetime if not specified. | [optional] | | **asAt** | **OffsetDateTime**| The asAt datetime at which to retrieve the Chart of Accounts definition. Defaults to returning the latest version of the Chart of Accounts definition if not specified. | [optional] | -| **propertyKeys** | [**List<String>**](String.md)| A list of property keys from the 'ChartOfAccounts' domain to decorate onto the Chart of Accounts. These must take the format {domain}/{scope}/{code}, for example 'ChartOfAccounts/Manager/Id'. If not provided will return all the entitled properties for that Chart of Accounts. | [optional] | +| **propertyKeys** | [**List<String>**](String.md)| A list of property keys from the 'ChartOfAccounts' domain to decorate onto the Chart of Accounts. These must take the format {domain}/{scope}/{code}, for example 'ChartOfAccounts/Manager/Id'. If no properties are specified, then no properties will be returned. | [optional] | ### Return type diff --git a/sdk/docs/CreateDerivedPropertyDefinitionRequest.md b/sdk/docs/CreateDerivedPropertyDefinitionRequest.md index b9e28d63ef2..718bd52e117 100644 --- a/sdk/docs/CreateDerivedPropertyDefinitionRequest.md +++ b/sdk/docs/CreateDerivedPropertyDefinitionRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**domain** | [**DomainEnum**](#DomainEnum) | The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg | | +|**domain** | [**DomainEnum**](#DomainEnum) | The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg | | |**scope** | **String** | The scope that the property exists in. | | |**code** | **String** | The code of the property. Together with the domain and scope this uniquely identifies the property. | | |**displayName** | **String** | The display name of the property. | | @@ -54,6 +54,7 @@ | CUSTODIANACCOUNT | "CustodianAccount" | | ABOR | "Abor" | | ABORCONFIGURATION | "AborConfiguration" | +| FUND | "Fund" | | RECONCILIATION | "Reconciliation" | | PROPERTYDEFINITION | "PropertyDefinition" | | COMPLIANCE | "Compliance" | diff --git a/sdk/docs/CreatePropertyDefinitionRequest.md b/sdk/docs/CreatePropertyDefinitionRequest.md index 27d6131c24a..d35b86e8f86 100644 --- a/sdk/docs/CreatePropertyDefinitionRequest.md +++ b/sdk/docs/CreatePropertyDefinitionRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**domain** | [**DomainEnum**](#DomainEnum) | The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg | | +|**domain** | [**DomainEnum**](#DomainEnum) | The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg | | |**scope** | **String** | The scope that the property exists in. | | |**code** | **String** | The code of the property. Together with the domain and scope this uniquely identifies the property. | | |**valueRequired** | **Boolean** | This field is not implemented and should be disregarded. | [optional] | @@ -57,6 +57,7 @@ | CUSTODIANACCOUNT | "CustodianAccount" | | ABOR | "Abor" | | ABORCONFIGURATION | "AborConfiguration" | +| FUND | "Fund" | | RECONCILIATION | "Reconciliation" | | PROPERTYDEFINITION | "PropertyDefinition" | | COMPLIANCE | "Compliance" | diff --git a/sdk/docs/DayMonth.md b/sdk/docs/DayMonth.md new file mode 100644 index 00000000000..466e1359977 --- /dev/null +++ b/sdk/docs/DayMonth.md @@ -0,0 +1,14 @@ + + +# DayMonth + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**day** | **Integer** | Day part of Day, Month for Year End date specification. | | +|**month** | **Integer** | Month part of Day, Month for Year End date specification. | | + + + diff --git a/sdk/docs/Fund.md b/sdk/docs/Fund.md new file mode 100644 index 00000000000..19164a153cd --- /dev/null +++ b/sdk/docs/Fund.md @@ -0,0 +1,26 @@ + + +# Fund + +A Fund entity. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime. | [optional] | +|**id** | [**ResourceId**](ResourceId.md) | | | +|**displayName** | **String** | The name of the Fund. | [optional] | +|**description** | **String** | A description for the Fund. | [optional] | +|**aborId** | [**ResourceId**](ResourceId.md) | | | +|**shareClassInstruments** | [**List<InstrumentResolutionDetail>**](InstrumentResolutionDetail.md) | Details the user-provided instrument identifiers and the instrument resolved from them. | [optional] | +|**type** | **String** | The type of fund; 'Standalone', 'Master' or 'Feeder' | | +|**inceptionDate** | **OffsetDateTime** | Inception date of the Fund | | +|**decimalPlaces** | **Integer** | Number of decimal places for reporting | [optional] | +|**yearEndDate** | [**DayMonth**](DayMonth.md) | | | +|**properties** | [**Map<String, Property>**](Property.md) | A set of properties for the Fund. | [optional] | +|**version** | [**Version**](Version.md) | | [optional] | +|**links** | [**List<Link>**](Link.md) | | [optional] | + + + diff --git a/sdk/docs/FundProperties.md b/sdk/docs/FundProperties.md new file mode 100644 index 00000000000..faf6a1ecece --- /dev/null +++ b/sdk/docs/FundProperties.md @@ -0,0 +1,16 @@ + + +# FundProperties + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **URI** | The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime. | [optional] | +|**properties** | [**Map<String, Property>**](Property.md) | The Fund properties. These will be from the 'Fund' domain. | [optional] | +|**version** | [**Version**](Version.md) | | [optional] | +|**links** | [**List<Link>**](Link.md) | | [optional] | + + + diff --git a/sdk/docs/FundRequest.md b/sdk/docs/FundRequest.md new file mode 100644 index 00000000000..117d471191d --- /dev/null +++ b/sdk/docs/FundRequest.md @@ -0,0 +1,24 @@ + + +# FundRequest + +The request used to create a Fund. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | The code given for the Fund. | | +|**displayName** | **String** | The name of the Fund. | [optional] | +|**description** | **String** | A description for the Fund. | [optional] | +|**aborId** | [**ResourceId**](ResourceId.md) | | | +|**shareClassInstrumentScopes** | **List<String>** | The scopes in which the instruments lie. | [optional] | +|**shareClassInstruments** | [**List<InstrumentResolutionDetail>**](InstrumentResolutionDetail.md) | Details the user-provided instrument identifiers and the instrument resolved from them. | [optional] | +|**type** | **String** | The type of fund; 'Standalone', 'Master' or 'Feeder' | | +|**inceptionDate** | **OffsetDateTime** | Inception date of the Fund | | +|**decimalPlaces** | **Integer** | Number of decimal places for reporting | [optional] | +|**yearEndDate** | [**DayMonth**](DayMonth.md) | | | +|**properties** | [**Map<String, Property>**](Property.md) | A set of properties for the Fund. | [optional] | + + + diff --git a/sdk/docs/FundsApi.md b/sdk/docs/FundsApi.md new file mode 100644 index 00000000000..3a4dd96787a --- /dev/null +++ b/sdk/docs/FundsApi.md @@ -0,0 +1,402 @@ +# FundsApi + +All URIs are relative to *https://www.lusid.com/api* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createFund**](FundsApi.md#createFund) | **POST** /api/funds/{scope} | [EXPERIMENTAL] CreateFund: Create a Fund. | +| [**deleteFund**](FundsApi.md#deleteFund) | **DELETE** /api/funds/{scope}/{code} | [EXPERIMENTAL] DeleteFund: Delete a Fund. | +| [**getFund**](FundsApi.md#getFund) | **GET** /api/funds/{scope}/{code} | [EXPERIMENTAL] GetFund: Get a Fund. | +| [**listFunds**](FundsApi.md#listFunds) | **GET** /api/funds | [EXPERIMENTAL] ListFunds: List Funds. | +| [**upsertFundProperties**](FundsApi.md#upsertFundProperties) | **POST** /api/funds/{scope}/{code}/properties/$upsert | [EXPERIMENTAL] UpsertFundProperties: Upsert Fund properties | + + + +# **createFund** +> Fund createFund(scope, fundRequest).execute(); + +[EXPERIMENTAL] CreateFund: Create a Fund. + +Create the given Fund. + +### Example +```java +// Import classes: +import com.finbourne.lusid.ApiClient; +import com.finbourne.lusid.ApiException; +import com.finbourne.lusid.Configuration; +import com.finbourne.lusid.auth.*; +import com.finbourne.lusid.models.*; +import com.finbourne.lusid.api.FundsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://www.lusid.com/api"); + + // Configure OAuth2 access token for authorization: oauth2 + OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); + oauth2.setAccessToken("YOUR ACCESS TOKEN"); + + FundsApi apiInstance = new FundsApi(defaultClient); + String scope = "scope_example"; // String | The scope of the Fund. + FundRequest fundRequest = new FundRequest(); // FundRequest | The definition of the Fund. + try { + Fund result = apiInstance.createFund(scope, fundRequest) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FundsApi#createFund"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scope** | **String**| The scope of the Fund. | | +| **fundRequest** | [**FundRequest**](FundRequest.md)| The definition of the Fund. | | + +### Return type + +[**Fund**](Fund.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json + - **Accept**: text/plain, application/json, text/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The newly created Fund. | - | +| **400** | The details of the input related failure | - | +| **0** | Error response | - | + + +# **deleteFund** +> DeletedEntityResponse deleteFund(scope, code).execute(); + +[EXPERIMENTAL] DeleteFund: Delete a Fund. + +Delete the given Fund. + +### Example +```java +// Import classes: +import com.finbourne.lusid.ApiClient; +import com.finbourne.lusid.ApiException; +import com.finbourne.lusid.Configuration; +import com.finbourne.lusid.auth.*; +import com.finbourne.lusid.models.*; +import com.finbourne.lusid.api.FundsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://www.lusid.com/api"); + + // Configure OAuth2 access token for authorization: oauth2 + OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); + oauth2.setAccessToken("YOUR ACCESS TOKEN"); + + FundsApi apiInstance = new FundsApi(defaultClient); + String scope = "scope_example"; // String | The scope of the Fund to be deleted. + String code = "code_example"; // String | The code of the Fund to be deleted. Together with the scope this uniquely identifies the Fund. + try { + DeletedEntityResponse result = apiInstance.deleteFund(scope, code) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FundsApi#deleteFund"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scope** | **String**| The scope of the Fund to be deleted. | | +| **code** | **String**| The code of the Fund to be deleted. Together with the scope this uniquely identifies the Fund. | | + +### Return type + +[**DeletedEntityResponse**](DeletedEntityResponse.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, application/json, text/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The datetime that the Fund was deleted | - | +| **400** | The details of the input related failure | - | +| **0** | Error response | - | + + +# **getFund** +> Fund getFund(scope, code).effectiveAt(effectiveAt).asAt(asAt).propertyKeys(propertyKeys).execute(); + +[EXPERIMENTAL] GetFund: Get a Fund. + +Retrieve the definition of a particular Fund. + +### Example +```java +// Import classes: +import com.finbourne.lusid.ApiClient; +import com.finbourne.lusid.ApiException; +import com.finbourne.lusid.Configuration; +import com.finbourne.lusid.auth.*; +import com.finbourne.lusid.models.*; +import com.finbourne.lusid.api.FundsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://www.lusid.com/api"); + + // Configure OAuth2 access token for authorization: oauth2 + OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); + oauth2.setAccessToken("YOUR ACCESS TOKEN"); + + FundsApi apiInstance = new FundsApi(defaultClient); + String scope = "scope_example"; // String | The scope of the Fund. + String code = "code_example"; // String | The code of the Fund. Together with the scope this uniquely identifies the Fund. + String effectiveAt = "effectiveAt_example"; // String | The effective datetime or cut label at which to retrieve the Fund properties. Defaults to the current LUSID system datetime if not specified. + OffsetDateTime asAt = OffsetDateTime.now(); // OffsetDateTime | The asAt datetime at which to retrieve the Fund definition. Defaults to returning the latest version of the Fund definition if not specified. + List propertyKeys = Arrays.asList(); // List | A list of property keys from the 'Fund' domain to decorate onto the Fund. These must take the format {domain}/{scope}/{code}, for example 'Fund/Manager/Id'. If no properties are specified, then no properties will be returned. + try { + Fund result = apiInstance.getFund(scope, code) + .effectiveAt(effectiveAt) + .asAt(asAt) + .propertyKeys(propertyKeys) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FundsApi#getFund"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scope** | **String**| The scope of the Fund. | | +| **code** | **String**| The code of the Fund. Together with the scope this uniquely identifies the Fund. | | +| **effectiveAt** | **String**| The effective datetime or cut label at which to retrieve the Fund properties. Defaults to the current LUSID system datetime if not specified. | [optional] | +| **asAt** | **OffsetDateTime**| The asAt datetime at which to retrieve the Fund definition. Defaults to returning the latest version of the Fund definition if not specified. | [optional] | +| **propertyKeys** | [**List<String>**](String.md)| A list of property keys from the 'Fund' domain to decorate onto the Fund. These must take the format {domain}/{scope}/{code}, for example 'Fund/Manager/Id'. If no properties are specified, then no properties will be returned. | [optional] | + +### Return type + +[**Fund**](Fund.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, application/json, text/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The requested Fund definition. | - | +| **400** | The details of the input related failure | - | +| **0** | Error response | - | + + +# **listFunds** +> PagedResourceListOfFund listFunds().effectiveAt(effectiveAt).asAt(asAt).page(page).limit(limit).filter(filter).sortBy(sortBy).propertyKeys(propertyKeys).execute(); + +[EXPERIMENTAL] ListFunds: List Funds. + +List all the Funds matching particular criteria. + +### Example +```java +// Import classes: +import com.finbourne.lusid.ApiClient; +import com.finbourne.lusid.ApiException; +import com.finbourne.lusid.Configuration; +import com.finbourne.lusid.auth.*; +import com.finbourne.lusid.models.*; +import com.finbourne.lusid.api.FundsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://www.lusid.com/api"); + + // Configure OAuth2 access token for authorization: oauth2 + OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); + oauth2.setAccessToken("YOUR ACCESS TOKEN"); + + FundsApi apiInstance = new FundsApi(defaultClient); + String effectiveAt = "effectiveAt_example"; // String | The effective datetime or cut label at which to list the TimeVariant properties for the Funds. Defaults to the current LUSID system datetime if not specified. + OffsetDateTime asAt = OffsetDateTime.now(); // OffsetDateTime | The asAt datetime at which to list the Funds. Defaults to returning the latest version of each Fund if not specified. + String page = "page_example"; // String | The pagination token to use to continue listing Funds; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request. + Integer limit = 56; // Integer | When paginating, limit the results to this number. Defaults to 100 if not specified. + String filter = "filter_example"; // String | Expression to filter the results. For example, to filter on the Fund type, specify \"id.Code eq 'Fund1'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. + List sortBy = Arrays.asList(); // List | A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\" + List propertyKeys = Arrays.asList(); // List | A list of property keys from the 'Fund' domain to decorate onto each Fund. These must take the format {domain}/{scope}/{code}, for example 'Fund/Manager/Id'. + try { + PagedResourceListOfFund result = apiInstance.listFunds() + .effectiveAt(effectiveAt) + .asAt(asAt) + .page(page) + .limit(limit) + .filter(filter) + .sortBy(sortBy) + .propertyKeys(propertyKeys) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FundsApi#listFunds"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **effectiveAt** | **String**| The effective datetime or cut label at which to list the TimeVariant properties for the Funds. Defaults to the current LUSID system datetime if not specified. | [optional] | +| **asAt** | **OffsetDateTime**| The asAt datetime at which to list the Funds. Defaults to returning the latest version of each Fund if not specified. | [optional] | +| **page** | **String**| The pagination token to use to continue listing Funds; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request. | [optional] | +| **limit** | **Integer**| When paginating, limit the results to this number. Defaults to 100 if not specified. | [optional] | +| **filter** | **String**| Expression to filter the results. For example, to filter on the Fund type, specify \"id.Code eq 'Fund1'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. | [optional] | +| **sortBy** | [**List<String>**](String.md)| A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\" | [optional] | +| **propertyKeys** | [**List<String>**](String.md)| A list of property keys from the 'Fund' domain to decorate onto each Fund. These must take the format {domain}/{scope}/{code}, for example 'Fund/Manager/Id'. | [optional] | + +### Return type + +[**PagedResourceListOfFund**](PagedResourceListOfFund.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, application/json, text/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The requested Funds. | - | +| **400** | The details of the input related failure | - | +| **0** | Error response | - | + + +# **upsertFundProperties** +> FundProperties upsertFundProperties(scope, code).requestBody(requestBody).execute(); + +[EXPERIMENTAL] UpsertFundProperties: Upsert Fund properties + +Update or insert one or more properties onto a single Fund. A property will be updated if it already exists and inserted if it does not. All properties must be of the domain 'Fund'. Upserting a property that exists for an Fund, with a null value, will delete the instance of the property for that group. Properties have an <i>effectiveFrom</i> datetime for which the property is valid, and an <i>effectiveUntil</i> datetime until which the property is valid. Not supplying an <i>effectiveUntil</i> datetime results in the property being valid indefinitely, or until the next <i>effectiveFrom</i> datetime of the property. + +### Example +```java +// Import classes: +import com.finbourne.lusid.ApiClient; +import com.finbourne.lusid.ApiException; +import com.finbourne.lusid.Configuration; +import com.finbourne.lusid.auth.*; +import com.finbourne.lusid.models.*; +import com.finbourne.lusid.api.FundsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://www.lusid.com/api"); + + // Configure OAuth2 access token for authorization: oauth2 + OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); + oauth2.setAccessToken("YOUR ACCESS TOKEN"); + + FundsApi apiInstance = new FundsApi(defaultClient); + String scope = "scope_example"; // String | The scope of the Fund to update or insert the properties onto. + String code = "code_example"; // String | The code of the Fund to update or insert the properties onto. Together with the scope this uniquely identifies the Fund. + Map requestBody = new HashMap(); // Map | The properties to be updated or inserted onto the Fund. Each property in the request must be keyed by its unique property key. This has the format {domain}/{scope}/{code} e.g. \"Fund/Manager/Id\". + try { + FundProperties result = apiInstance.upsertFundProperties(scope, code) + .requestBody(requestBody) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FundsApi#upsertFundProperties"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **scope** | **String**| The scope of the Fund to update or insert the properties onto. | | +| **code** | **String**| The code of the Fund to update or insert the properties onto. Together with the scope this uniquely identifies the Fund. | | +| **requestBody** | [**Map<String, Property>**](Property.md)| The properties to be updated or inserted onto the Fund. Each property in the request must be keyed by its unique property key. This has the format {domain}/{scope}/{code} e.g. \"Fund/Manager/Id\". | [optional] | + +### Return type + +[**FundProperties**](FundProperties.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json + - **Accept**: text/plain, application/json, text/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The updated or inserted properties | - | +| **400** | The details of the input related failure | - | +| **0** | Error response | - | + diff --git a/sdk/docs/InstrumentResolutionDetail.md b/sdk/docs/InstrumentResolutionDetail.md new file mode 100644 index 00000000000..155e54227bd --- /dev/null +++ b/sdk/docs/InstrumentResolutionDetail.md @@ -0,0 +1,15 @@ + + +# InstrumentResolutionDetail + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**instrumentIdentifiers** | **Map<String, String>** | Unique instrument identifiers | | +|**lusidInstrumentId** | **String** | LUSID's internal unique instrument identifier, resolved from the instrument identifiers | [optional] [readonly] | +|**instrumentScope** | **String** | The scope in which the instrument lies. | [optional] [readonly] | + + + diff --git a/sdk/docs/PagedResourceListOfFund.md b/sdk/docs/PagedResourceListOfFund.md new file mode 100644 index 00000000000..28d3d36ea95 --- /dev/null +++ b/sdk/docs/PagedResourceListOfFund.md @@ -0,0 +1,17 @@ + + +# PagedResourceListOfFund + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nextPage** | **String** | | [optional] | +|**previousPage** | **String** | | [optional] | +|**values** | [**List<Fund>**](Fund.md) | | | +|**href** | **URI** | | [optional] | +|**links** | [**List<Link>**](Link.md) | | [optional] | + + + diff --git a/sdk/docs/PagedResourceListOfPropertyDefinition.md b/sdk/docs/PagedResourceListOfPropertyDefinition.md new file mode 100644 index 00000000000..5dbe45466ff --- /dev/null +++ b/sdk/docs/PagedResourceListOfPropertyDefinition.md @@ -0,0 +1,17 @@ + + +# PagedResourceListOfPropertyDefinition + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nextPage** | **String** | | [optional] | +|**previousPage** | **String** | | [optional] | +|**values** | [**List<PropertyDefinition>**](PropertyDefinition.md) | | | +|**href** | **URI** | | [optional] | +|**links** | [**List<Link>**](Link.md) | | [optional] | + + + diff --git a/sdk/docs/PropertyDefinition.md b/sdk/docs/PropertyDefinition.md index 3ab85b78562..9c6fa68707e 100644 --- a/sdk/docs/PropertyDefinition.md +++ b/sdk/docs/PropertyDefinition.md @@ -15,7 +15,7 @@ A list of property definitions. |**dataTypeId** | [**ResourceId**](ResourceId.md) | | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The type of the property. The available values are: Label, Metric, Information | [optional] | |**unitSchema** | [**UnitSchemaEnum**](#UnitSchemaEnum) | The units that can be associated with the property's values. This is defined by the property's data type. The available values are: NoUnits, Basic, Iso4217Currency | [optional] | -|**domain** | [**DomainEnum**](#DomainEnum) | The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg | [optional] | +|**domain** | [**DomainEnum**](#DomainEnum) | The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg | [optional] | |**scope** | **String** | The scope that the property exists in. | [optional] [readonly] | |**code** | **String** | The code of the property. Together with the domain and scope this uniquely identifies the property. | [optional] [readonly] | |**valueRequired** | **Boolean** | This field is not implemented and should be disregarded. | [optional] | @@ -116,6 +116,7 @@ A list of property definitions. | CUSTODIANACCOUNT | "CustodianAccount" | | ABOR | "Abor" | | ABORCONFIGURATION | "AborConfiguration" | +| FUND | "Fund" | | RECONCILIATION | "Reconciliation" | | PROPERTYDEFINITION | "PropertyDefinition" | | COMPLIANCE | "Compliance" | diff --git a/sdk/docs/PropertyDefinitionSearchResult.md b/sdk/docs/PropertyDefinitionSearchResult.md index d17b56a8dd8..252ef54d3a6 100644 --- a/sdk/docs/PropertyDefinitionSearchResult.md +++ b/sdk/docs/PropertyDefinitionSearchResult.md @@ -15,7 +15,7 @@ A property definition search result |**dataTypeId** | [**ResourceId**](ResourceId.md) | | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The type of the property. The available values are: Label, Metric, Information | [optional] | |**unitSchema** | [**UnitSchemaEnum**](#UnitSchemaEnum) | The units that can be associated with the property's values. This is defined by the property's data type. The available values are: NoUnits, Basic, Iso4217Currency | [optional] | -|**domain** | [**DomainEnum**](#DomainEnum) | The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg | [optional] | +|**domain** | [**DomainEnum**](#DomainEnum) | The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg | [optional] | |**scope** | **String** | The scope that the property exists in. | [optional] [readonly] | |**code** | **String** | The code of the property. Together with the domain and scope this uniquely identifies the property. | [optional] [readonly] | |**valueRequired** | **Boolean** | This field is not implemented and should be disregarded. | [optional] | @@ -113,6 +113,7 @@ A property definition search result | CUSTODIANACCOUNT | "CustodianAccount" | | ABOR | "Abor" | | ABORCONFIGURATION | "AborConfiguration" | +| FUND | "Fund" | | RECONCILIATION | "Reconciliation" | | PROPERTYDEFINITION | "PropertyDefinition" | | COMPLIANCE | "Compliance" | diff --git a/sdk/docs/PropertyDefinitionsApi.md b/sdk/docs/PropertyDefinitionsApi.md index a38fb33ad90..9b7743b2da1 100644 --- a/sdk/docs/PropertyDefinitionsApi.md +++ b/sdk/docs/PropertyDefinitionsApi.md @@ -11,6 +11,7 @@ All URIs are relative to *https://www.lusid.com/api* | [**getMultiplePropertyDefinitions**](PropertyDefinitionsApi.md#getMultiplePropertyDefinitions) | **GET** /api/propertydefinitions | GetMultiplePropertyDefinitions: Get multiple property definitions | | [**getPropertyDefinition**](PropertyDefinitionsApi.md#getPropertyDefinition) | **GET** /api/propertydefinitions/{domain}/{scope}/{code} | GetPropertyDefinition: Get property definition | | [**getPropertyDefinitionPropertyTimeSeries**](PropertyDefinitionsApi.md#getPropertyDefinitionPropertyTimeSeries) | **GET** /api/propertydefinitions/{domain}/{scope}/{code}/properties/time-series | [EARLY ACCESS] GetPropertyDefinitionPropertyTimeSeries: Get Property Definition Property Time Series | +| [**listPropertyDefinitions**](PropertyDefinitionsApi.md#listPropertyDefinitions) | **GET** /api/propertydefinitions/$list | ListPropertyDefinitions: List property definitions | | [**updateDerivedPropertyDefinition**](PropertyDefinitionsApi.md#updateDerivedPropertyDefinition) | **PUT** /api/propertydefinitions/derived/{domain}/{scope}/{code} | [EARLY ACCESS] UpdateDerivedPropertyDefinition: Update a pre-existing derived property definition | | [**updatePropertyDefinition**](PropertyDefinitionsApi.md#updatePropertyDefinition) | **PUT** /api/propertydefinitions/{domain}/{scope}/{code} | UpdatePropertyDefinition: Update property definition | | [**upsertPropertyDefinitionProperties**](PropertyDefinitionsApi.md#upsertPropertyDefinitionProperties) | **POST** /api/propertydefinitions/{domain}/{scope}/{code}/properties | [EARLY ACCESS] UpsertPropertyDefinitionProperties: Upsert properties to a property definition | @@ -206,7 +207,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **domain** | **String**| The domain of the property to be deleted. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | +| **domain** | **String**| The domain of the property to be deleted. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | | **scope** | **String**| The scope of the property to be deleted. | | | **code** | **String**| The code of the property to be deleted. Together with the domain and scope this uniquely identifies the property. | | @@ -283,7 +284,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **domain** | **String**| The domain of the property definition to delete properties from. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | +| **domain** | **String**| The domain of the property definition to delete properties from. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | | **scope** | **String**| The scope of the property definition to delete properties from. | | | **code** | **String**| The code of the property definition to delete properties from. | | | **requestBody** | [**List<String>**](String.md)| The property keys of the properties to delete. These must take the format {domain}/{scope}/{code} e.g \"PropertyDefinition/myScope/someAttributeKey\". Each property must be from the \"PropertyDefinition\" domain. | | @@ -442,7 +443,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **domain** | **String**| The domain of the specified property. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | +| **domain** | **String**| The domain of the specified property. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | | **scope** | **String**| The scope of the specified property. | | | **code** | **String**| The code of the specified property. Together with the domain and scope this uniquely identifies the property. | | | **asAt** | **OffsetDateTime**| The asAt datetime at which to retrieve the property definition. Defaults to return the latest version of the definition if not specified. | [optional] | @@ -527,7 +528,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **domain** | **String**| The domain of the property definition to which the property is attached | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | +| **domain** | **String**| The domain of the property definition to which the property is attached | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | | **scope** | **String**| The scope of the property definition to which the property is attached | | | **code** | **String**| The code of the property definition to which the property is attached | | | **propertyKey** | **String**| The property key of the property whose history to show. This must be from the \"Property Definition\" domain and in the format {domain}/{scope}/{code}, for example \"PropertyDefinition/myScope/someAttributeKey\". | | @@ -556,6 +557,95 @@ public class Example { | **400** | The details of the input related failure | - | | **0** | Error response | - | + +# **listPropertyDefinitions** +> PagedResourceListOfPropertyDefinition listPropertyDefinitions().effectiveAt(effectiveAt).asAt(asAt).propertyKeys(propertyKeys).page(page).limit(limit).filter(filter).sortBy(sortBy).execute(); + +ListPropertyDefinitions: List property definitions + +List all the property definitions matching particular criteria. + +### Example +```java +// Import classes: +import com.finbourne.lusid.ApiClient; +import com.finbourne.lusid.ApiException; +import com.finbourne.lusid.Configuration; +import com.finbourne.lusid.auth.*; +import com.finbourne.lusid.models.*; +import com.finbourne.lusid.api.PropertyDefinitionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://www.lusid.com/api"); + + // Configure OAuth2 access token for authorization: oauth2 + OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); + oauth2.setAccessToken("YOUR ACCESS TOKEN"); + + PropertyDefinitionsApi apiInstance = new PropertyDefinitionsApi(defaultClient); + String effectiveAt = "effectiveAt_example"; // String | The effective datetime or cut label at which to list the property definitions. Defaults to the current LUSID system datetime if not specified. + OffsetDateTime asAt = OffsetDateTime.now(); // OffsetDateTime | The asAt datetime at which to list the property definitions. Defaults to returning the latest version of each property definition if not specified. + List propertyKeys = Arrays.asList(); // List | A list of property keys from the 'Property Definition' domain to decorate onto property definitions. These must take the format {domain}/{scope}/{code} e.g \"PropertyDefinition/myScope/someAttributeKey\". Each property must be from the \"PropertyDefinition\" domain. + String page = "page_example"; // String | The pagination token to use to continue listing property definitions; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request. + Integer limit = 56; // Integer | When paginating, limit the results to this number. Defaults to 100 if not specified. + String filter = "filter_example"; // String | Expression to filter the results. For example, to filter on the display name, specify \"DisplayName eq 'DisplayName'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. + List sortBy = Arrays.asList(); // List | A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\" + try { + PagedResourceListOfPropertyDefinition result = apiInstance.listPropertyDefinitions() + .effectiveAt(effectiveAt) + .asAt(asAt) + .propertyKeys(propertyKeys) + .page(page) + .limit(limit) + .filter(filter) + .sortBy(sortBy) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PropertyDefinitionsApi#listPropertyDefinitions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **effectiveAt** | **String**| The effective datetime or cut label at which to list the property definitions. Defaults to the current LUSID system datetime if not specified. | [optional] | +| **asAt** | **OffsetDateTime**| The asAt datetime at which to list the property definitions. Defaults to returning the latest version of each property definition if not specified. | [optional] | +| **propertyKeys** | [**List<String>**](String.md)| A list of property keys from the 'Property Definition' domain to decorate onto property definitions. These must take the format {domain}/{scope}/{code} e.g \"PropertyDefinition/myScope/someAttributeKey\". Each property must be from the \"PropertyDefinition\" domain. | [optional] | +| **page** | **String**| The pagination token to use to continue listing property definitions; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request. | [optional] | +| **limit** | **Integer**| When paginating, limit the results to this number. Defaults to 100 if not specified. | [optional] | +| **filter** | **String**| Expression to filter the results. For example, to filter on the display name, specify \"DisplayName eq 'DisplayName'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. | [optional] | +| **sortBy** | [**List<String>**](String.md)| A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\" | [optional] | + +### Return type + +[**PagedResourceListOfPropertyDefinition**](PagedResourceListOfPropertyDefinition.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, application/json, text/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The requested portfolios | - | +| **400** | The details of the input related failure | - | +| **0** | Error response | - | + # **updateDerivedPropertyDefinition** > PropertyDefinition updateDerivedPropertyDefinition(domain, scope, code, updateDerivedPropertyDefinitionRequest).execute(); @@ -607,7 +697,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **domain** | **String**| Domain of the property definition | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | +| **domain** | **String**| Domain of the property definition | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | | **scope** | **String**| Scope of the property definition | | | **code** | **String**| Code of the property definition | | | **updateDerivedPropertyDefinitionRequest** | [**UpdateDerivedPropertyDefinitionRequest**](UpdateDerivedPropertyDefinitionRequest.md)| Information about the derived property definition being updated | | @@ -683,7 +773,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **domain** | **String**| The domain of the property being updated. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | +| **domain** | **String**| The domain of the property being updated. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | | **scope** | **String**| The scope of the property being updated. | | | **code** | **String**| The code of the property being updated. Together with the domain and scope this uniquely identifies the property. | | | **updatePropertyDefinitionRequest** | [**UpdatePropertyDefinitionRequest**](UpdatePropertyDefinitionRequest.md)| The updated definition of the property. | | @@ -761,7 +851,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **domain** | **String**| The domain of the specified property. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | +| **domain** | **String**| The domain of the specified property. | [enum: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg] | | **scope** | **String**| The scope of the specified property. | | | **code** | **String**| The code of the specified property. Together with the domain and scope this uniquely | | | **requestBody** | [**Map<String, Property>**](Property.md)| The properties to be created or updated. Each property in the request must be keyed by its unique property key. This has the format {domain}/{scope}/{code}, for example 'PropertyDefinition/Manager/Id'. | | diff --git a/sdk/docs/PropertyDomain.md b/sdk/docs/PropertyDomain.md index 754ba8f3b18..f6ece3b19ff 100644 --- a/sdk/docs/PropertyDomain.md +++ b/sdk/docs/PropertyDomain.md @@ -71,6 +71,8 @@ * `ABORCONFIGURATION` (value: `"AborConfiguration"`) +* `FUND` (value: `"Fund"`) + * `RECONCILIATION` (value: `"Reconciliation"`) * `PROPERTYDEFINITION` (value: `"PropertyDefinition"`) diff --git a/sdk/pom.xml b/sdk/pom.xml index 57a946bdab3..a756fd5a5db 100644 --- a/sdk/pom.xml +++ b/sdk/pom.xml @@ -5,7 +5,7 @@ lusid-sdk jar lusid-sdk - 2.0.564 + 2.0.569 https://github.com/finbourne/lusid-sdk-java lusid diff --git a/sdk/src/main/java/com/finbourne/lusid/ApiClient.java b/sdk/src/main/java/com/finbourne/lusid/ApiClient.java index 6f1946ef02f..d68ccc6e553 100644 --- a/sdk/src/main/java/com/finbourne/lusid/ApiClient.java +++ b/sdk/src/main/java/com/finbourne/lusid/ApiClient.java @@ -208,7 +208,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2.0.564/java"); + setUserAgent("OpenAPI-Generator/2.0.569/java"); authentications = new HashMap(); } diff --git a/sdk/src/main/java/com/finbourne/lusid/Configuration.java b/sdk/src/main/java/com/finbourne/lusid/Configuration.java index 7efe7a2e8cc..597872bd84f 100644 --- a/sdk/src/main/java/com/finbourne/lusid/Configuration.java +++ b/sdk/src/main/java/com/finbourne/lusid/Configuration.java @@ -12,7 +12,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "2.0.564"; + public static final String VERSION = "2.0.569"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/sdk/src/main/java/com/finbourne/lusid/JSON.java b/sdk/src/main/java/com/finbourne/lusid/JSON.java index 1a3026c9eaf..47312523574 100644 --- a/sdk/src/main/java/com/finbourne/lusid/JSON.java +++ b/sdk/src/main/java/com/finbourne/lusid/JSON.java @@ -1929,6 +1929,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.DateRange.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.DateTimeComplianceParameter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.DateTimeListComplianceParameter.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.DayMonth.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.DecimalComplianceParameter.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.DecimalList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.DecimalListComplianceParameter.CustomTypeAdapterFactory()); @@ -1996,6 +1997,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.FlowConventions.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.ForwardRateAgreement.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.FromRecipe.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.Fund.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.FundProperties.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.FundRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.FundShareClass.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.FundingLeg.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.FundingLegOptions.CustomTypeAdapterFactory()); @@ -2082,6 +2086,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.InstrumentPaymentDiaryLeg.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.InstrumentPaymentDiaryRow.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.InstrumentProperties.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.InstrumentResolutionDetail.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.InstrumentSearchProperty.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.InterestRateSwap.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.InterestRateSwaption.CustomTypeAdapterFactory()); @@ -2188,6 +2193,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfDialectId.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfDiaryEntry.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfExecution.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfFund.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfGeneralLedgerProfileResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfInstrument.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfInstrumentEventHolder.CustomTypeAdapterFactory()); @@ -2205,6 +2211,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfPortfolioSearchResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfPostingModuleResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfPostingModuleRule.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfPropertyDefinition.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfPropertyDefinitionSearchResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfReconciliation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.PagedResourceListOfReferenceListResponse.CustomTypeAdapterFactory()); diff --git a/sdk/src/main/java/com/finbourne/lusid/api/AborApi.java b/sdk/src/main/java/com/finbourne/lusid/api/AborApi.java index 65b2cf8d4ad..6d117b413a6 100644 --- a/sdk/src/main/java/com/finbourne/lusid/api/AborApi.java +++ b/sdk/src/main/java/com/finbourne/lusid/api/AborApi.java @@ -941,7 +941,7 @@ public APIgetAborRequest asAt(OffsetDateTime asAt) { /** * Set propertyKeys - * @param propertyKeys A list of property keys from the 'Abor' domain to decorate onto the Abor. These must take the format {domain}/{scope}/{code}, for example 'Abor/Manager/Id'. If not provided will return all the entitled properties for that Abor. (optional) + * @param propertyKeys A list of property keys from the 'Abor' domain to decorate onto the Abor. These must take the format {domain}/{scope}/{code}, for example 'Abor/Manager/Id'. If no properties are specified, then no properties will be returned. (optional) * @return APIgetAborRequest */ public APIgetAborRequest propertyKeys(List propertyKeys) { diff --git a/sdk/src/main/java/com/finbourne/lusid/api/AborConfigurationApi.java b/sdk/src/main/java/com/finbourne/lusid/api/AborConfigurationApi.java index 1dc8bcf7aac..94259c6ba33 100644 --- a/sdk/src/main/java/com/finbourne/lusid/api/AborConfigurationApi.java +++ b/sdk/src/main/java/com/finbourne/lusid/api/AborConfigurationApi.java @@ -551,7 +551,7 @@ public APIgetAborConfigurationRequest asAt(OffsetDateTime asAt) { /** * Set propertyKeys - * @param propertyKeys A list of property keys from the 'AborConfiguration' domain to decorate onto the AborConfiguration. These must take the format {domain}/{scope}/{code}, for example 'AborConfiguration/Manager/Id'. If not provided will return all the entitled properties for that AborConfiguration. (optional) + * @param propertyKeys A list of property keys from the 'AborConfiguration' domain to decorate onto the AborConfiguration. These must take the format {domain}/{scope}/{code}, for example 'AborConfiguration/Manager/Id'. If no properties are specified, then no properties will be returned. (optional) * @return APIgetAborConfigurationRequest */ public APIgetAborConfigurationRequest propertyKeys(List propertyKeys) { diff --git a/sdk/src/main/java/com/finbourne/lusid/api/ChartOfAccountsApi.java b/sdk/src/main/java/com/finbourne/lusid/api/ChartOfAccountsApi.java index 5d317c1db71..07a7aca7e1c 100644 --- a/sdk/src/main/java/com/finbourne/lusid/api/ChartOfAccountsApi.java +++ b/sdk/src/main/java/com/finbourne/lusid/api/ChartOfAccountsApi.java @@ -2102,7 +2102,7 @@ public APIgetChartOfAccountsRequest asAt(OffsetDateTime asAt) { /** * Set propertyKeys - * @param propertyKeys A list of property keys from the 'ChartOfAccounts' domain to decorate onto the Chart of Accounts. These must take the format {domain}/{scope}/{code}, for example 'ChartOfAccounts/Manager/Id'. If not provided will return all the entitled properties for that Chart of Accounts. (optional) + * @param propertyKeys A list of property keys from the 'ChartOfAccounts' domain to decorate onto the Chart of Accounts. These must take the format {domain}/{scope}/{code}, for example 'ChartOfAccounts/Manager/Id'. If no properties are specified, then no properties will be returned. (optional) * @return APIgetChartOfAccountsRequest */ public APIgetChartOfAccountsRequest propertyKeys(List propertyKeys) { diff --git a/sdk/src/main/java/com/finbourne/lusid/api/FundsApi.java b/sdk/src/main/java/com/finbourne/lusid/api/FundsApi.java new file mode 100644 index 00000000000..ce365c5f6ea --- /dev/null +++ b/sdk/src/main/java/com/finbourne/lusid/api/FundsApi.java @@ -0,0 +1,1095 @@ +/* + * LUSID API + * + * Contact: info@finbourne.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.finbourne.lusid.api; + +import com.finbourne.lusid.ApiCallback; +import com.finbourne.lusid.ApiClient; +import com.finbourne.lusid.ApiException; +import com.finbourne.lusid.ApiResponse; +import com.finbourne.lusid.Configuration; +import com.finbourne.lusid.Pair; +import com.finbourne.lusid.ProgressRequestBody; +import com.finbourne.lusid.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.finbourne.lusid.model.DeletedEntityResponse; +import com.finbourne.lusid.model.Fund; +import com.finbourne.lusid.model.FundProperties; +import com.finbourne.lusid.model.FundRequest; +import com.finbourne.lusid.model.LusidProblemDetails; +import com.finbourne.lusid.model.LusidValidationProblemDetails; +import java.time.OffsetDateTime; +import com.finbourne.lusid.model.PagedResourceListOfFund; +import com.finbourne.lusid.model.Property; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class FundsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public FundsApi() { + this(Configuration.getDefaultApiClient()); + } + + public FundsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + private okhttp3.Call createFundCall(String scope, FundRequest fundRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = fundRequest; + + // create path and map variables + String localVarPath = "/api/funds/{scope}" + .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth2" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createFundValidateBeforeCall(String scope, FundRequest fundRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'scope' is set + if (scope == null) { + throw new ApiException("Missing the required parameter 'scope' when calling createFund(Async)"); + } + + // verify the required parameter 'fundRequest' is set + if (fundRequest == null) { + throw new ApiException("Missing the required parameter 'fundRequest' when calling createFund(Async)"); + } + + return createFundCall(scope, fundRequest, _callback); + + } + + + private ApiResponse createFundWithHttpInfo(String scope, FundRequest fundRequest) throws ApiException { + okhttp3.Call localVarCall = createFundValidateBeforeCall(scope, fundRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call createFundAsync(String scope, FundRequest fundRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createFundValidateBeforeCall(scope, fundRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIcreateFundRequest { + private final String scope; + private final FundRequest fundRequest; + + private APIcreateFundRequest(String scope, FundRequest fundRequest) { + this.scope = scope; + this.fundRequest = fundRequest; + } + + /** + * Build call for createFund + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The newly created Fund. -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return createFundCall(scope, fundRequest, _callback); + } + + /** + * Execute createFund request + * @return Fund + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The newly created Fund. -
400 The details of the input related failure -
0 Error response -
+ */ + public Fund execute() throws ApiException { + ApiResponse localVarResp = createFundWithHttpInfo(scope, fundRequest); + return localVarResp.getData(); + } + + /** + * Execute createFund request with HTTP info returned + * @return ApiResponse<Fund> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The newly created Fund. -
400 The details of the input related failure -
0 Error response -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return createFundWithHttpInfo(scope, fundRequest); + } + + /** + * Execute createFund request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The newly created Fund. -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return createFundAsync(scope, fundRequest, _callback); + } + } + + /** + * [EXPERIMENTAL] CreateFund: Create a Fund. + * Create the given Fund. + * @param scope The scope of the Fund. (required) + * @param fundRequest The definition of the Fund. (required) + * @return APIcreateFundRequest + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The newly created Fund. -
400 The details of the input related failure -
0 Error response -
+ */ + public APIcreateFundRequest createFund(String scope, FundRequest fundRequest) { + return new APIcreateFundRequest(scope, fundRequest); + } + private okhttp3.Call deleteFundCall(String scope, String code, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/funds/{scope}/{code}" + .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) + .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth2" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteFundValidateBeforeCall(String scope, String code, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'scope' is set + if (scope == null) { + throw new ApiException("Missing the required parameter 'scope' when calling deleteFund(Async)"); + } + + // verify the required parameter 'code' is set + if (code == null) { + throw new ApiException("Missing the required parameter 'code' when calling deleteFund(Async)"); + } + + return deleteFundCall(scope, code, _callback); + + } + + + private ApiResponse deleteFundWithHttpInfo(String scope, String code) throws ApiException { + okhttp3.Call localVarCall = deleteFundValidateBeforeCall(scope, code, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call deleteFundAsync(String scope, String code, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteFundValidateBeforeCall(scope, code, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIdeleteFundRequest { + private final String scope; + private final String code; + + private APIdeleteFundRequest(String scope, String code) { + this.scope = scope; + this.code = code; + } + + /** + * Build call for deleteFund + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The datetime that the Fund was deleted -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return deleteFundCall(scope, code, _callback); + } + + /** + * Execute deleteFund request + * @return DeletedEntityResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The datetime that the Fund was deleted -
400 The details of the input related failure -
0 Error response -
+ */ + public DeletedEntityResponse execute() throws ApiException { + ApiResponse localVarResp = deleteFundWithHttpInfo(scope, code); + return localVarResp.getData(); + } + + /** + * Execute deleteFund request with HTTP info returned + * @return ApiResponse<DeletedEntityResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The datetime that the Fund was deleted -
400 The details of the input related failure -
0 Error response -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return deleteFundWithHttpInfo(scope, code); + } + + /** + * Execute deleteFund request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The datetime that the Fund was deleted -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return deleteFundAsync(scope, code, _callback); + } + } + + /** + * [EXPERIMENTAL] DeleteFund: Delete a Fund. + * Delete the given Fund. + * @param scope The scope of the Fund to be deleted. (required) + * @param code The code of the Fund to be deleted. Together with the scope this uniquely identifies the Fund. (required) + * @return APIdeleteFundRequest + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The datetime that the Fund was deleted -
400 The details of the input related failure -
0 Error response -
+ */ + public APIdeleteFundRequest deleteFund(String scope, String code) { + return new APIdeleteFundRequest(scope, code); + } + private okhttp3.Call getFundCall(String scope, String code, String effectiveAt, OffsetDateTime asAt, List propertyKeys, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/funds/{scope}/{code}" + .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) + .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (effectiveAt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("effectiveAt", effectiveAt)); + } + + if (asAt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt)); + } + + if (propertyKeys != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "propertyKeys", propertyKeys)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth2" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getFundValidateBeforeCall(String scope, String code, String effectiveAt, OffsetDateTime asAt, List propertyKeys, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'scope' is set + if (scope == null) { + throw new ApiException("Missing the required parameter 'scope' when calling getFund(Async)"); + } + + // verify the required parameter 'code' is set + if (code == null) { + throw new ApiException("Missing the required parameter 'code' when calling getFund(Async)"); + } + + return getFundCall(scope, code, effectiveAt, asAt, propertyKeys, _callback); + + } + + + private ApiResponse getFundWithHttpInfo(String scope, String code, String effectiveAt, OffsetDateTime asAt, List propertyKeys) throws ApiException { + okhttp3.Call localVarCall = getFundValidateBeforeCall(scope, code, effectiveAt, asAt, propertyKeys, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call getFundAsync(String scope, String code, String effectiveAt, OffsetDateTime asAt, List propertyKeys, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getFundValidateBeforeCall(scope, code, effectiveAt, asAt, propertyKeys, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIgetFundRequest { + private final String scope; + private final String code; + private String effectiveAt; + private OffsetDateTime asAt; + private List propertyKeys; + + private APIgetFundRequest(String scope, String code) { + this.scope = scope; + this.code = code; + } + + /** + * Set effectiveAt + * @param effectiveAt The effective datetime or cut label at which to retrieve the Fund properties. Defaults to the current LUSID system datetime if not specified. (optional) + * @return APIgetFundRequest + */ + public APIgetFundRequest effectiveAt(String effectiveAt) { + this.effectiveAt = effectiveAt; + return this; + } + + /** + * Set asAt + * @param asAt The asAt datetime at which to retrieve the Fund definition. Defaults to returning the latest version of the Fund definition if not specified. (optional) + * @return APIgetFundRequest + */ + public APIgetFundRequest asAt(OffsetDateTime asAt) { + this.asAt = asAt; + return this; + } + + /** + * Set propertyKeys + * @param propertyKeys A list of property keys from the 'Fund' domain to decorate onto the Fund. These must take the format {domain}/{scope}/{code}, for example 'Fund/Manager/Id'. If no properties are specified, then no properties will be returned. (optional) + * @return APIgetFundRequest + */ + public APIgetFundRequest propertyKeys(List propertyKeys) { + this.propertyKeys = propertyKeys; + return this; + } + + /** + * Build call for getFund + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Fund definition. -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return getFundCall(scope, code, effectiveAt, asAt, propertyKeys, _callback); + } + + /** + * Execute getFund request + * @return Fund + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Fund definition. -
400 The details of the input related failure -
0 Error response -
+ */ + public Fund execute() throws ApiException { + ApiResponse localVarResp = getFundWithHttpInfo(scope, code, effectiveAt, asAt, propertyKeys); + return localVarResp.getData(); + } + + /** + * Execute getFund request with HTTP info returned + * @return ApiResponse<Fund> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Fund definition. -
400 The details of the input related failure -
0 Error response -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getFundWithHttpInfo(scope, code, effectiveAt, asAt, propertyKeys); + } + + /** + * Execute getFund request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Fund definition. -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return getFundAsync(scope, code, effectiveAt, asAt, propertyKeys, _callback); + } + } + + /** + * [EXPERIMENTAL] GetFund: Get a Fund. + * Retrieve the definition of a particular Fund. + * @param scope The scope of the Fund. (required) + * @param code The code of the Fund. Together with the scope this uniquely identifies the Fund. (required) + * @return APIgetFundRequest + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Fund definition. -
400 The details of the input related failure -
0 Error response -
+ */ + public APIgetFundRequest getFund(String scope, String code) { + return new APIgetFundRequest(scope, code); + } + private okhttp3.Call listFundsCall(String effectiveAt, OffsetDateTime asAt, String page, Integer limit, String filter, List sortBy, List propertyKeys, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/funds"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (effectiveAt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("effectiveAt", effectiveAt)); + } + + if (asAt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (filter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); + } + + if (sortBy != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy)); + } + + if (propertyKeys != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "propertyKeys", propertyKeys)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth2" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listFundsValidateBeforeCall(String effectiveAt, OffsetDateTime asAt, String page, Integer limit, String filter, List sortBy, List propertyKeys, final ApiCallback _callback) throws ApiException { + return listFundsCall(effectiveAt, asAt, page, limit, filter, sortBy, propertyKeys, _callback); + + } + + + private ApiResponse listFundsWithHttpInfo(String effectiveAt, OffsetDateTime asAt, String page, Integer limit, String filter, List sortBy, List propertyKeys) throws ApiException { + okhttp3.Call localVarCall = listFundsValidateBeforeCall(effectiveAt, asAt, page, limit, filter, sortBy, propertyKeys, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call listFundsAsync(String effectiveAt, OffsetDateTime asAt, String page, Integer limit, String filter, List sortBy, List propertyKeys, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listFundsValidateBeforeCall(effectiveAt, asAt, page, limit, filter, sortBy, propertyKeys, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIlistFundsRequest { + private String effectiveAt; + private OffsetDateTime asAt; + private String page; + private Integer limit; + private String filter; + private List sortBy; + private List propertyKeys; + + private APIlistFundsRequest() { + } + + /** + * Set effectiveAt + * @param effectiveAt The effective datetime or cut label at which to list the TimeVariant properties for the Funds. Defaults to the current LUSID system datetime if not specified. (optional) + * @return APIlistFundsRequest + */ + public APIlistFundsRequest effectiveAt(String effectiveAt) { + this.effectiveAt = effectiveAt; + return this; + } + + /** + * Set asAt + * @param asAt The asAt datetime at which to list the Funds. Defaults to returning the latest version of each Fund if not specified. (optional) + * @return APIlistFundsRequest + */ + public APIlistFundsRequest asAt(OffsetDateTime asAt) { + this.asAt = asAt; + return this; + } + + /** + * Set page + * @param page The pagination token to use to continue listing Funds; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request. (optional) + * @return APIlistFundsRequest + */ + public APIlistFundsRequest page(String page) { + this.page = page; + return this; + } + + /** + * Set limit + * @param limit When paginating, limit the results to this number. Defaults to 100 if not specified. (optional) + * @return APIlistFundsRequest + */ + public APIlistFundsRequest limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set filter + * @param filter Expression to filter the results. For example, to filter on the Fund type, specify \"id.Code eq 'Fund1'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. (optional) + * @return APIlistFundsRequest + */ + public APIlistFundsRequest filter(String filter) { + this.filter = filter; + return this; + } + + /** + * Set sortBy + * @param sortBy A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\" (optional) + * @return APIlistFundsRequest + */ + public APIlistFundsRequest sortBy(List sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set propertyKeys + * @param propertyKeys A list of property keys from the 'Fund' domain to decorate onto each Fund. These must take the format {domain}/{scope}/{code}, for example 'Fund/Manager/Id'. (optional) + * @return APIlistFundsRequest + */ + public APIlistFundsRequest propertyKeys(List propertyKeys) { + this.propertyKeys = propertyKeys; + return this; + } + + /** + * Build call for listFunds + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Funds. -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return listFundsCall(effectiveAt, asAt, page, limit, filter, sortBy, propertyKeys, _callback); + } + + /** + * Execute listFunds request + * @return PagedResourceListOfFund + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Funds. -
400 The details of the input related failure -
0 Error response -
+ */ + public PagedResourceListOfFund execute() throws ApiException { + ApiResponse localVarResp = listFundsWithHttpInfo(effectiveAt, asAt, page, limit, filter, sortBy, propertyKeys); + return localVarResp.getData(); + } + + /** + * Execute listFunds request with HTTP info returned + * @return ApiResponse<PagedResourceListOfFund> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Funds. -
400 The details of the input related failure -
0 Error response -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listFundsWithHttpInfo(effectiveAt, asAt, page, limit, filter, sortBy, propertyKeys); + } + + /** + * Execute listFunds request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Funds. -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return listFundsAsync(effectiveAt, asAt, page, limit, filter, sortBy, propertyKeys, _callback); + } + } + + /** + * [EXPERIMENTAL] ListFunds: List Funds. + * List all the Funds matching particular criteria. + * @return APIlistFundsRequest + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested Funds. -
400 The details of the input related failure -
0 Error response -
+ */ + public APIlistFundsRequest listFunds() { + return new APIlistFundsRequest(); + } + private okhttp3.Call upsertFundPropertiesCall(String scope, String code, Map requestBody, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = requestBody; + + // create path and map variables + String localVarPath = "/api/funds/{scope}/{code}/properties/$upsert" + .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) + .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth2" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call upsertFundPropertiesValidateBeforeCall(String scope, String code, Map requestBody, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'scope' is set + if (scope == null) { + throw new ApiException("Missing the required parameter 'scope' when calling upsertFundProperties(Async)"); + } + + // verify the required parameter 'code' is set + if (code == null) { + throw new ApiException("Missing the required parameter 'code' when calling upsertFundProperties(Async)"); + } + + return upsertFundPropertiesCall(scope, code, requestBody, _callback); + + } + + + private ApiResponse upsertFundPropertiesWithHttpInfo(String scope, String code, Map requestBody) throws ApiException { + okhttp3.Call localVarCall = upsertFundPropertiesValidateBeforeCall(scope, code, requestBody, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call upsertFundPropertiesAsync(String scope, String code, Map requestBody, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = upsertFundPropertiesValidateBeforeCall(scope, code, requestBody, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIupsertFundPropertiesRequest { + private final String scope; + private final String code; + private Map requestBody; + + private APIupsertFundPropertiesRequest(String scope, String code) { + this.scope = scope; + this.code = code; + } + + /** + * Set requestBody + * @param requestBody The properties to be updated or inserted onto the Fund. Each property in the request must be keyed by its unique property key. This has the format {domain}/{scope}/{code} e.g. \"Fund/Manager/Id\". (optional) + * @return APIupsertFundPropertiesRequest + */ + public APIupsertFundPropertiesRequest requestBody(Map requestBody) { + this.requestBody = requestBody; + return this; + } + + /** + * Build call for upsertFundProperties + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The updated or inserted properties -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return upsertFundPropertiesCall(scope, code, requestBody, _callback); + } + + /** + * Execute upsertFundProperties request + * @return FundProperties + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The updated or inserted properties -
400 The details of the input related failure -
0 Error response -
+ */ + public FundProperties execute() throws ApiException { + ApiResponse localVarResp = upsertFundPropertiesWithHttpInfo(scope, code, requestBody); + return localVarResp.getData(); + } + + /** + * Execute upsertFundProperties request with HTTP info returned + * @return ApiResponse<FundProperties> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The updated or inserted properties -
400 The details of the input related failure -
0 Error response -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return upsertFundPropertiesWithHttpInfo(scope, code, requestBody); + } + + /** + * Execute upsertFundProperties request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The updated or inserted properties -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return upsertFundPropertiesAsync(scope, code, requestBody, _callback); + } + } + + /** + * [EXPERIMENTAL] UpsertFundProperties: Upsert Fund properties + * Update or insert one or more properties onto a single Fund. A property will be updated if it already exists and inserted if it does not. All properties must be of the domain 'Fund'. Upserting a property that exists for an Fund, with a null value, will delete the instance of the property for that group. Properties have an <i>effectiveFrom</i> datetime for which the property is valid, and an <i>effectiveUntil</i> datetime until which the property is valid. Not supplying an <i>effectiveUntil</i> datetime results in the property being valid indefinitely, or until the next <i>effectiveFrom</i> datetime of the property. + * @param scope The scope of the Fund to update or insert the properties onto. (required) + * @param code The code of the Fund to update or insert the properties onto. Together with the scope this uniquely identifies the Fund. (required) + * @return APIupsertFundPropertiesRequest + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The updated or inserted properties -
400 The details of the input related failure -
0 Error response -
+ */ + public APIupsertFundPropertiesRequest upsertFundProperties(String scope, String code) { + return new APIupsertFundPropertiesRequest(scope, code); + } +} diff --git a/sdk/src/main/java/com/finbourne/lusid/api/PropertyDefinitionsApi.java b/sdk/src/main/java/com/finbourne/lusid/api/PropertyDefinitionsApi.java index dc6cc995625..d08235ace98 100644 --- a/sdk/src/main/java/com/finbourne/lusid/api/PropertyDefinitionsApi.java +++ b/sdk/src/main/java/com/finbourne/lusid/api/PropertyDefinitionsApi.java @@ -31,6 +31,7 @@ import com.finbourne.lusid.model.LusidProblemDetails; import com.finbourne.lusid.model.LusidValidationProblemDetails; import java.time.OffsetDateTime; +import com.finbourne.lusid.model.PagedResourceListOfPropertyDefinition; import com.finbourne.lusid.model.Property; import com.finbourne.lusid.model.PropertyDefinition; import com.finbourne.lusid.model.ResourceListOfPropertyDefinition; @@ -1484,6 +1485,266 @@ public okhttp3.Call executeAsync(final ApiCallback propertyKeys, String page, Integer limit, String filter, List sortBy, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/api/propertydefinitions/$list"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (effectiveAt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("effectiveAt", effectiveAt)); + } + + if (asAt != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("asAt", asAt)); + } + + if (propertyKeys != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "propertyKeys", propertyKeys)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (filter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); + } + + if (sortBy != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth2" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listPropertyDefinitionsValidateBeforeCall(String effectiveAt, OffsetDateTime asAt, List propertyKeys, String page, Integer limit, String filter, List sortBy, final ApiCallback _callback) throws ApiException { + return listPropertyDefinitionsCall(effectiveAt, asAt, propertyKeys, page, limit, filter, sortBy, _callback); + + } + + + private ApiResponse listPropertyDefinitionsWithHttpInfo(String effectiveAt, OffsetDateTime asAt, List propertyKeys, String page, Integer limit, String filter, List sortBy) throws ApiException { + okhttp3.Call localVarCall = listPropertyDefinitionsValidateBeforeCall(effectiveAt, asAt, propertyKeys, page, limit, filter, sortBy, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + private okhttp3.Call listPropertyDefinitionsAsync(String effectiveAt, OffsetDateTime asAt, List propertyKeys, String page, Integer limit, String filter, List sortBy, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listPropertyDefinitionsValidateBeforeCall(effectiveAt, asAt, propertyKeys, page, limit, filter, sortBy, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + public class APIlistPropertyDefinitionsRequest { + private String effectiveAt; + private OffsetDateTime asAt; + private List propertyKeys; + private String page; + private Integer limit; + private String filter; + private List sortBy; + + private APIlistPropertyDefinitionsRequest() { + } + + /** + * Set effectiveAt + * @param effectiveAt The effective datetime or cut label at which to list the property definitions. Defaults to the current LUSID system datetime if not specified. (optional) + * @return APIlistPropertyDefinitionsRequest + */ + public APIlistPropertyDefinitionsRequest effectiveAt(String effectiveAt) { + this.effectiveAt = effectiveAt; + return this; + } + + /** + * Set asAt + * @param asAt The asAt datetime at which to list the property definitions. Defaults to returning the latest version of each property definition if not specified. (optional) + * @return APIlistPropertyDefinitionsRequest + */ + public APIlistPropertyDefinitionsRequest asAt(OffsetDateTime asAt) { + this.asAt = asAt; + return this; + } + + /** + * Set propertyKeys + * @param propertyKeys A list of property keys from the 'Property Definition' domain to decorate onto property definitions. These must take the format {domain}/{scope}/{code} e.g \"PropertyDefinition/myScope/someAttributeKey\". Each property must be from the \"PropertyDefinition\" domain. (optional) + * @return APIlistPropertyDefinitionsRequest + */ + public APIlistPropertyDefinitionsRequest propertyKeys(List propertyKeys) { + this.propertyKeys = propertyKeys; + return this; + } + + /** + * Set page + * @param page The pagination token to use to continue listing property definitions; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request. (optional) + * @return APIlistPropertyDefinitionsRequest + */ + public APIlistPropertyDefinitionsRequest page(String page) { + this.page = page; + return this; + } + + /** + * Set limit + * @param limit When paginating, limit the results to this number. Defaults to 100 if not specified. (optional) + * @return APIlistPropertyDefinitionsRequest + */ + public APIlistPropertyDefinitionsRequest limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set filter + * @param filter Expression to filter the results. For example, to filter on the display name, specify \"DisplayName eq 'DisplayName'\". For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. (optional) + * @return APIlistPropertyDefinitionsRequest + */ + public APIlistPropertyDefinitionsRequest filter(String filter) { + this.filter = filter; + return this; + } + + /** + * Set sortBy + * @param sortBy A list of field names or properties to sort by, each suffixed by \" ASC\" or \" DESC\" (optional) + * @return APIlistPropertyDefinitionsRequest + */ + public APIlistPropertyDefinitionsRequest sortBy(List sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Build call for listPropertyDefinitions + * @param _callback ApiCallback API callback + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested portfolios -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { + return listPropertyDefinitionsCall(effectiveAt, asAt, propertyKeys, page, limit, filter, sortBy, _callback); + } + + /** + * Execute listPropertyDefinitions request + * @return PagedResourceListOfPropertyDefinition + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested portfolios -
400 The details of the input related failure -
0 Error response -
+ */ + public PagedResourceListOfPropertyDefinition execute() throws ApiException { + ApiResponse localVarResp = listPropertyDefinitionsWithHttpInfo(effectiveAt, asAt, propertyKeys, page, limit, filter, sortBy); + return localVarResp.getData(); + } + + /** + * Execute listPropertyDefinitions request with HTTP info returned + * @return ApiResponse<PagedResourceListOfPropertyDefinition> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested portfolios -
400 The details of the input related failure -
0 Error response -
+ */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return listPropertyDefinitionsWithHttpInfo(effectiveAt, asAt, propertyKeys, page, limit, filter, sortBy); + } + + /** + * Execute listPropertyDefinitions request (asynchronously) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested portfolios -
400 The details of the input related failure -
0 Error response -
+ */ + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return listPropertyDefinitionsAsync(effectiveAt, asAt, propertyKeys, page, limit, filter, sortBy, _callback); + } + } + + /** + * ListPropertyDefinitions: List property definitions + * List all the property definitions matching particular criteria. + * @return APIlistPropertyDefinitionsRequest + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The requested portfolios -
400 The details of the input related failure -
0 Error response -
+ */ + public APIlistPropertyDefinitionsRequest listPropertyDefinitions() { + return new APIlistPropertyDefinitionsRequest(); + } private okhttp3.Call updateDerivedPropertyDefinitionCall(String domain, String scope, String code, UpdateDerivedPropertyDefinitionRequest updateDerivedPropertyDefinitionRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers diff --git a/sdk/src/main/java/com/finbourne/lusid/model/CreateDerivedPropertyDefinitionRequest.java b/sdk/src/main/java/com/finbourne/lusid/model/CreateDerivedPropertyDefinitionRequest.java index 5cc20dedd7a..ed008da76fa 100644 --- a/sdk/src/main/java/com/finbourne/lusid/model/CreateDerivedPropertyDefinitionRequest.java +++ b/sdk/src/main/java/com/finbourne/lusid/model/CreateDerivedPropertyDefinitionRequest.java @@ -52,7 +52,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreateDerivedPropertyDefinitionRequest { /** - * The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg + * The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg */ @JsonAdapter(DomainEnum.Adapter.class) public enum DomainEnum { @@ -122,6 +122,8 @@ public enum DomainEnum { ABORCONFIGURATION("AborConfiguration"), + FUND("Fund"), + RECONCILIATION("Reconciliation"), PROPERTYDEFINITION("PropertyDefinition"), @@ -208,7 +210,7 @@ public CreateDerivedPropertyDefinitionRequest domain(DomainEnum domain) { } /** - * The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg + * The domain that the property exists in. Not all available values are currently supported, please check the documentation: https://support.lusid.com/knowledgebase/article/KA-01719/. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg * @return domain **/ @jakarta.annotation.Nonnull diff --git a/sdk/src/main/java/com/finbourne/lusid/model/CreatePropertyDefinitionRequest.java b/sdk/src/main/java/com/finbourne/lusid/model/CreatePropertyDefinitionRequest.java index e82b1b48db7..9aba2deab6d 100644 --- a/sdk/src/main/java/com/finbourne/lusid/model/CreatePropertyDefinitionRequest.java +++ b/sdk/src/main/java/com/finbourne/lusid/model/CreatePropertyDefinitionRequest.java @@ -52,7 +52,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CreatePropertyDefinitionRequest { /** - * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg + * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg */ @JsonAdapter(DomainEnum.Adapter.class) public enum DomainEnum { @@ -122,6 +122,8 @@ public enum DomainEnum { ABORCONFIGURATION("AborConfiguration"), + FUND("Fund"), + RECONCILIATION("Reconciliation"), PROPERTYDEFINITION("PropertyDefinition"), @@ -267,7 +269,7 @@ public CreatePropertyDefinitionRequest domain(DomainEnum domain) { } /** - * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg + * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg * @return domain **/ @jakarta.annotation.Nonnull diff --git a/sdk/src/main/java/com/finbourne/lusid/model/DayMonth.java b/sdk/src/main/java/com/finbourne/lusid/model/DayMonth.java new file mode 100644 index 00000000000..afbf942b93f --- /dev/null +++ b/sdk/src/main/java/com/finbourne/lusid/model/DayMonth.java @@ -0,0 +1,235 @@ +/* + * LUSID API + * + * Contact: info@finbourne.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.finbourne.lusid.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.finbourne.lusid.JSON; + +/** + * DayMonth + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DayMonth { + public static final String SERIALIZED_NAME_DAY = "day"; + @SerializedName(SERIALIZED_NAME_DAY) + private Integer day; + + public static final String SERIALIZED_NAME_MONTH = "month"; + @SerializedName(SERIALIZED_NAME_MONTH) + private Integer month; + + public DayMonth() { + } + + public DayMonth day(Integer day) { + + this.day = day; + return this; + } + + /** + * Day part of Day, Month for Year End date specification. + * minimum: 1 + * maximum: 31 + * @return day + **/ + @jakarta.annotation.Nonnull + public Integer getDay() { + return day; + } + + + public void setDay(Integer day) { + this.day = day; + } + + + public DayMonth month(Integer month) { + + this.month = month; + return this; + } + + /** + * Month part of Day, Month for Year End date specification. + * minimum: 1 + * maximum: 12 + * @return month + **/ + @jakarta.annotation.Nonnull + public Integer getMonth() { + return month; + } + + + public void setMonth(Integer month) { + this.month = month; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DayMonth dayMonth = (DayMonth) o; + return Objects.equals(this.day, dayMonth.day) && + Objects.equals(this.month, dayMonth.month); + } + + @Override + public int hashCode() { + return Objects.hash(day, month); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DayMonth {\n"); + sb.append(" day: ").append(toIndentedString(day)).append("\n"); + sb.append(" month: ").append(toIndentedString(month)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("day"); + openapiFields.add("month"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("day"); + openapiRequiredFields.add("month"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to DayMonth + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DayMonth.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DayMonth is not found in the empty JSON string", DayMonth.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DayMonth.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DayMonth.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DayMonth' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DayMonth.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DayMonth value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DayMonth read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DayMonth given an JSON string + * + * @param jsonString JSON string + * @return An instance of DayMonth + * @throws IOException if the JSON string is invalid with respect to DayMonth + */ + public static DayMonth fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DayMonth.class); + } + + /** + * Convert an instance of DayMonth to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdk/src/main/java/com/finbourne/lusid/model/Fund.java b/sdk/src/main/java/com/finbourne/lusid/model/Fund.java new file mode 100644 index 00000000000..cea777dd0bc --- /dev/null +++ b/sdk/src/main/java/com/finbourne/lusid/model/Fund.java @@ -0,0 +1,642 @@ +/* + * LUSID API + * + * Contact: info@finbourne.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.finbourne.lusid.model; + +import java.util.Objects; +import com.finbourne.lusid.model.DayMonth; +import com.finbourne.lusid.model.InstrumentResolutionDetail; +import com.finbourne.lusid.model.Link; +import com.finbourne.lusid.model.Property; +import com.finbourne.lusid.model.ResourceId; +import com.finbourne.lusid.model.Version; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.finbourne.lusid.JSON; + +/** + * A Fund entity. + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Fund { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private URI href; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private ResourceId id; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_ABOR_ID = "aborId"; + @SerializedName(SERIALIZED_NAME_ABOR_ID) + private ResourceId aborId; + + public static final String SERIALIZED_NAME_SHARE_CLASS_INSTRUMENTS = "shareClassInstruments"; + @SerializedName(SERIALIZED_NAME_SHARE_CLASS_INSTRUMENTS) + private List shareClassInstruments; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_INCEPTION_DATE = "inceptionDate"; + @SerializedName(SERIALIZED_NAME_INCEPTION_DATE) + private OffsetDateTime inceptionDate; + + public static final String SERIALIZED_NAME_DECIMAL_PLACES = "decimalPlaces"; + @SerializedName(SERIALIZED_NAME_DECIMAL_PLACES) + private Integer decimalPlaces; + + public static final String SERIALIZED_NAME_YEAR_END_DATE = "yearEndDate"; + @SerializedName(SERIALIZED_NAME_YEAR_END_DATE) + private DayMonth yearEndDate; + + public static final String SERIALIZED_NAME_PROPERTIES = "properties"; + @SerializedName(SERIALIZED_NAME_PROPERTIES) + private Map properties; + + public static final String SERIALIZED_NAME_VERSION = "version"; + @SerializedName(SERIALIZED_NAME_VERSION) + private Version version; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public Fund() { + } + + public Fund href(URI href) { + + this.href = href; + return this; + } + + /** + * The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime. + * @return href + **/ + @jakarta.annotation.Nullable + public URI getHref() { + return href; + } + + + public void setHref(URI href) { + this.href = href; + } + + + public Fund id(ResourceId id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @jakarta.annotation.Nonnull + public ResourceId getId() { + return id; + } + + + public void setId(ResourceId id) { + this.id = id; + } + + + public Fund displayName(String displayName) { + + this.displayName = displayName; + return this; + } + + /** + * The name of the Fund. + * @return displayName + **/ + @jakarta.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + + public Fund description(String description) { + + this.description = description; + return this; + } + + /** + * A description for the Fund. + * @return description + **/ + @jakarta.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public Fund aborId(ResourceId aborId) { + + this.aborId = aborId; + return this; + } + + /** + * Get aborId + * @return aborId + **/ + @jakarta.annotation.Nonnull + public ResourceId getAborId() { + return aborId; + } + + + public void setAborId(ResourceId aborId) { + this.aborId = aborId; + } + + + public Fund shareClassInstruments(List shareClassInstruments) { + + this.shareClassInstruments = shareClassInstruments; + return this; + } + + public Fund addShareClassInstrumentsItem(InstrumentResolutionDetail shareClassInstrumentsItem) { + if (this.shareClassInstruments == null) { + this.shareClassInstruments = new ArrayList<>(); + } + this.shareClassInstruments.add(shareClassInstrumentsItem); + return this; + } + + /** + * Details the user-provided instrument identifiers and the instrument resolved from them. + * @return shareClassInstruments + **/ + @jakarta.annotation.Nullable + public List getShareClassInstruments() { + return shareClassInstruments; + } + + + public void setShareClassInstruments(List shareClassInstruments) { + this.shareClassInstruments = shareClassInstruments; + } + + + public Fund type(String type) { + + this.type = type; + return this; + } + + /** + * The type of fund; 'Standalone', 'Master' or 'Feeder' + * @return type + **/ + @jakarta.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public Fund inceptionDate(OffsetDateTime inceptionDate) { + + this.inceptionDate = inceptionDate; + return this; + } + + /** + * Inception date of the Fund + * @return inceptionDate + **/ + @jakarta.annotation.Nonnull + public OffsetDateTime getInceptionDate() { + return inceptionDate; + } + + + public void setInceptionDate(OffsetDateTime inceptionDate) { + this.inceptionDate = inceptionDate; + } + + + public Fund decimalPlaces(Integer decimalPlaces) { + + this.decimalPlaces = decimalPlaces; + return this; + } + + /** + * Number of decimal places for reporting + * minimum: 0 + * maximum: 30 + * @return decimalPlaces + **/ + @jakarta.annotation.Nullable + public Integer getDecimalPlaces() { + return decimalPlaces; + } + + + public void setDecimalPlaces(Integer decimalPlaces) { + this.decimalPlaces = decimalPlaces; + } + + + public Fund yearEndDate(DayMonth yearEndDate) { + + this.yearEndDate = yearEndDate; + return this; + } + + /** + * Get yearEndDate + * @return yearEndDate + **/ + @jakarta.annotation.Nonnull + public DayMonth getYearEndDate() { + return yearEndDate; + } + + + public void setYearEndDate(DayMonth yearEndDate) { + this.yearEndDate = yearEndDate; + } + + + public Fund properties(Map properties) { + + this.properties = properties; + return this; + } + + public Fund putPropertiesItem(String key, Property propertiesItem) { + if (this.properties == null) { + this.properties = new HashMap<>(); + } + this.properties.put(key, propertiesItem); + return this; + } + + /** + * A set of properties for the Fund. + * @return properties + **/ + @jakarta.annotation.Nullable + public Map getProperties() { + return properties; + } + + + public void setProperties(Map properties) { + this.properties = properties; + } + + + public Fund version(Version version) { + + this.version = version; + return this; + } + + /** + * Get version + * @return version + **/ + @jakarta.annotation.Nullable + public Version getVersion() { + return version; + } + + + public void setVersion(Version version) { + this.version = version; + } + + + public Fund links(List links) { + + this.links = links; + return this; + } + + public Fund addLinksItem(Link linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @jakarta.annotation.Nullable + public List getLinks() { + return links; + } + + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Fund fund = (Fund) o; + return Objects.equals(this.href, fund.href) && + Objects.equals(this.id, fund.id) && + Objects.equals(this.displayName, fund.displayName) && + Objects.equals(this.description, fund.description) && + Objects.equals(this.aborId, fund.aborId) && + Objects.equals(this.shareClassInstruments, fund.shareClassInstruments) && + Objects.equals(this.type, fund.type) && + Objects.equals(this.inceptionDate, fund.inceptionDate) && + Objects.equals(this.decimalPlaces, fund.decimalPlaces) && + Objects.equals(this.yearEndDate, fund.yearEndDate) && + Objects.equals(this.properties, fund.properties) && + Objects.equals(this.version, fund.version) && + Objects.equals(this.links, fund.links); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(href, id, displayName, description, aborId, shareClassInstruments, type, inceptionDate, decimalPlaces, yearEndDate, properties, version, links); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Fund {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" aborId: ").append(toIndentedString(aborId)).append("\n"); + sb.append(" shareClassInstruments: ").append(toIndentedString(shareClassInstruments)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" inceptionDate: ").append(toIndentedString(inceptionDate)).append("\n"); + sb.append(" decimalPlaces: ").append(toIndentedString(decimalPlaces)).append("\n"); + sb.append(" yearEndDate: ").append(toIndentedString(yearEndDate)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("href"); + openapiFields.add("id"); + openapiFields.add("displayName"); + openapiFields.add("description"); + openapiFields.add("aborId"); + openapiFields.add("shareClassInstruments"); + openapiFields.add("type"); + openapiFields.add("inceptionDate"); + openapiFields.add("decimalPlaces"); + openapiFields.add("yearEndDate"); + openapiFields.add("properties"); + openapiFields.add("version"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("aborId"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("inceptionDate"); + openapiRequiredFields.add("yearEndDate"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Fund + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Fund.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Fund is not found in the empty JSON string", Fund.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Fund.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the required field `id` + ResourceId.validateJsonElement(jsonObj.get("id")); + if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the required field `aborId` + ResourceId.validateJsonElement(jsonObj.get("aborId")); + if (jsonObj.get("shareClassInstruments") != null && !jsonObj.get("shareClassInstruments").isJsonNull()) { + JsonArray jsonArrayshareClassInstruments = jsonObj.getAsJsonArray("shareClassInstruments"); + if (jsonArrayshareClassInstruments != null) { + // ensure the json data is an array + if (!jsonObj.get("shareClassInstruments").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shareClassInstruments` to be an array in the JSON string but got `%s`", jsonObj.get("shareClassInstruments").toString())); + } + + // validate the optional field `shareClassInstruments` (array) + for (int i = 0; i < jsonArrayshareClassInstruments.size(); i++) { + InstrumentResolutionDetail.validateJsonElement(jsonArrayshareClassInstruments.get(i)); + }; + } + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `yearEndDate` + DayMonth.validateJsonElement(jsonObj.get("yearEndDate")); + // validate the optional field `version` + if (jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) { + Version.validateJsonElement(jsonObj.get("version")); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + Link.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Fund.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Fund' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Fund.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Fund value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Fund read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Fund given an JSON string + * + * @param jsonString JSON string + * @return An instance of Fund + * @throws IOException if the JSON string is invalid with respect to Fund + */ + public static Fund fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Fund.class); + } + + /** + * Convert an instance of Fund to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdk/src/main/java/com/finbourne/lusid/model/FundProperties.java b/sdk/src/main/java/com/finbourne/lusid/model/FundProperties.java new file mode 100644 index 00000000000..8124fdb34cf --- /dev/null +++ b/sdk/src/main/java/com/finbourne/lusid/model/FundProperties.java @@ -0,0 +1,335 @@ +/* + * LUSID API + * + * Contact: info@finbourne.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.finbourne.lusid.model; + +import java.util.Objects; +import com.finbourne.lusid.model.Link; +import com.finbourne.lusid.model.Property; +import com.finbourne.lusid.model.Version; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.finbourne.lusid.JSON; + +/** + * FundProperties + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FundProperties { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private URI href; + + public static final String SERIALIZED_NAME_PROPERTIES = "properties"; + @SerializedName(SERIALIZED_NAME_PROPERTIES) + private Map properties; + + public static final String SERIALIZED_NAME_VERSION = "version"; + @SerializedName(SERIALIZED_NAME_VERSION) + private Version version; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public FundProperties() { + } + + public FundProperties href(URI href) { + + this.href = href; + return this; + } + + /** + * The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime. + * @return href + **/ + @jakarta.annotation.Nullable + public URI getHref() { + return href; + } + + + public void setHref(URI href) { + this.href = href; + } + + + public FundProperties properties(Map properties) { + + this.properties = properties; + return this; + } + + public FundProperties putPropertiesItem(String key, Property propertiesItem) { + if (this.properties == null) { + this.properties = new HashMap<>(); + } + this.properties.put(key, propertiesItem); + return this; + } + + /** + * The Fund properties. These will be from the 'Fund' domain. + * @return properties + **/ + @jakarta.annotation.Nullable + public Map getProperties() { + return properties; + } + + + public void setProperties(Map properties) { + this.properties = properties; + } + + + public FundProperties version(Version version) { + + this.version = version; + return this; + } + + /** + * Get version + * @return version + **/ + @jakarta.annotation.Nullable + public Version getVersion() { + return version; + } + + + public void setVersion(Version version) { + this.version = version; + } + + + public FundProperties links(List links) { + + this.links = links; + return this; + } + + public FundProperties addLinksItem(Link linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @jakarta.annotation.Nullable + public List getLinks() { + return links; + } + + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FundProperties fundProperties = (FundProperties) o; + return Objects.equals(this.href, fundProperties.href) && + Objects.equals(this.properties, fundProperties.properties) && + Objects.equals(this.version, fundProperties.version) && + Objects.equals(this.links, fundProperties.links); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(href, properties, version, links); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FundProperties {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("href"); + openapiFields.add("properties"); + openapiFields.add("version"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FundProperties + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FundProperties.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FundProperties is not found in the empty JSON string", FundProperties.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + // validate the optional field `version` + if (jsonObj.get("version") != null && !jsonObj.get("version").isJsonNull()) { + Version.validateJsonElement(jsonObj.get("version")); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + Link.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FundProperties.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FundProperties' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FundProperties.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FundProperties value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FundProperties read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FundProperties given an JSON string + * + * @param jsonString JSON string + * @return An instance of FundProperties + * @throws IOException if the JSON string is invalid with respect to FundProperties + */ + public static FundProperties fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FundProperties.class); + } + + /** + * Convert an instance of FundProperties to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdk/src/main/java/com/finbourne/lusid/model/FundRequest.java b/sdk/src/main/java/com/finbourne/lusid/model/FundRequest.java new file mode 100644 index 00000000000..84cbabd09ca --- /dev/null +++ b/sdk/src/main/java/com/finbourne/lusid/model/FundRequest.java @@ -0,0 +1,567 @@ +/* + * LUSID API + * + * Contact: info@finbourne.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.finbourne.lusid.model; + +import java.util.Objects; +import com.finbourne.lusid.model.DayMonth; +import com.finbourne.lusid.model.InstrumentResolutionDetail; +import com.finbourne.lusid.model.Property; +import com.finbourne.lusid.model.ResourceId; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.finbourne.lusid.JSON; + +/** + * The request used to create a Fund. + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FundRequest { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_ABOR_ID = "aborId"; + @SerializedName(SERIALIZED_NAME_ABOR_ID) + private ResourceId aborId; + + public static final String SERIALIZED_NAME_SHARE_CLASS_INSTRUMENT_SCOPES = "shareClassInstrumentScopes"; + @SerializedName(SERIALIZED_NAME_SHARE_CLASS_INSTRUMENT_SCOPES) + private List shareClassInstrumentScopes; + + public static final String SERIALIZED_NAME_SHARE_CLASS_INSTRUMENTS = "shareClassInstruments"; + @SerializedName(SERIALIZED_NAME_SHARE_CLASS_INSTRUMENTS) + private List shareClassInstruments; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_INCEPTION_DATE = "inceptionDate"; + @SerializedName(SERIALIZED_NAME_INCEPTION_DATE) + private OffsetDateTime inceptionDate; + + public static final String SERIALIZED_NAME_DECIMAL_PLACES = "decimalPlaces"; + @SerializedName(SERIALIZED_NAME_DECIMAL_PLACES) + private Integer decimalPlaces; + + public static final String SERIALIZED_NAME_YEAR_END_DATE = "yearEndDate"; + @SerializedName(SERIALIZED_NAME_YEAR_END_DATE) + private DayMonth yearEndDate; + + public static final String SERIALIZED_NAME_PROPERTIES = "properties"; + @SerializedName(SERIALIZED_NAME_PROPERTIES) + private Map properties; + + public FundRequest() { + } + + public FundRequest code(String code) { + + this.code = code; + return this; + } + + /** + * The code given for the Fund. + * @return code + **/ + @jakarta.annotation.Nonnull + public String getCode() { + return code; + } + + + public void setCode(String code) { + this.code = code; + } + + + public FundRequest displayName(String displayName) { + + this.displayName = displayName; + return this; + } + + /** + * The name of the Fund. + * @return displayName + **/ + @jakarta.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + + public FundRequest description(String description) { + + this.description = description; + return this; + } + + /** + * A description for the Fund. + * @return description + **/ + @jakarta.annotation.Nullable + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public FundRequest aborId(ResourceId aborId) { + + this.aborId = aborId; + return this; + } + + /** + * Get aborId + * @return aborId + **/ + @jakarta.annotation.Nonnull + public ResourceId getAborId() { + return aborId; + } + + + public void setAborId(ResourceId aborId) { + this.aborId = aborId; + } + + + public FundRequest shareClassInstrumentScopes(List shareClassInstrumentScopes) { + + this.shareClassInstrumentScopes = shareClassInstrumentScopes; + return this; + } + + public FundRequest addShareClassInstrumentScopesItem(String shareClassInstrumentScopesItem) { + if (this.shareClassInstrumentScopes == null) { + this.shareClassInstrumentScopes = new ArrayList<>(); + } + this.shareClassInstrumentScopes.add(shareClassInstrumentScopesItem); + return this; + } + + /** + * The scopes in which the instruments lie. + * @return shareClassInstrumentScopes + **/ + @jakarta.annotation.Nullable + public List getShareClassInstrumentScopes() { + return shareClassInstrumentScopes; + } + + + public void setShareClassInstrumentScopes(List shareClassInstrumentScopes) { + this.shareClassInstrumentScopes = shareClassInstrumentScopes; + } + + + public FundRequest shareClassInstruments(List shareClassInstruments) { + + this.shareClassInstruments = shareClassInstruments; + return this; + } + + public FundRequest addShareClassInstrumentsItem(InstrumentResolutionDetail shareClassInstrumentsItem) { + if (this.shareClassInstruments == null) { + this.shareClassInstruments = new ArrayList<>(); + } + this.shareClassInstruments.add(shareClassInstrumentsItem); + return this; + } + + /** + * Details the user-provided instrument identifiers and the instrument resolved from them. + * @return shareClassInstruments + **/ + @jakarta.annotation.Nullable + public List getShareClassInstruments() { + return shareClassInstruments; + } + + + public void setShareClassInstruments(List shareClassInstruments) { + this.shareClassInstruments = shareClassInstruments; + } + + + public FundRequest type(String type) { + + this.type = type; + return this; + } + + /** + * The type of fund; 'Standalone', 'Master' or 'Feeder' + * @return type + **/ + @jakarta.annotation.Nonnull + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public FundRequest inceptionDate(OffsetDateTime inceptionDate) { + + this.inceptionDate = inceptionDate; + return this; + } + + /** + * Inception date of the Fund + * @return inceptionDate + **/ + @jakarta.annotation.Nonnull + public OffsetDateTime getInceptionDate() { + return inceptionDate; + } + + + public void setInceptionDate(OffsetDateTime inceptionDate) { + this.inceptionDate = inceptionDate; + } + + + public FundRequest decimalPlaces(Integer decimalPlaces) { + + this.decimalPlaces = decimalPlaces; + return this; + } + + /** + * Number of decimal places for reporting + * minimum: 0 + * maximum: 30 + * @return decimalPlaces + **/ + @jakarta.annotation.Nullable + public Integer getDecimalPlaces() { + return decimalPlaces; + } + + + public void setDecimalPlaces(Integer decimalPlaces) { + this.decimalPlaces = decimalPlaces; + } + + + public FundRequest yearEndDate(DayMonth yearEndDate) { + + this.yearEndDate = yearEndDate; + return this; + } + + /** + * Get yearEndDate + * @return yearEndDate + **/ + @jakarta.annotation.Nonnull + public DayMonth getYearEndDate() { + return yearEndDate; + } + + + public void setYearEndDate(DayMonth yearEndDate) { + this.yearEndDate = yearEndDate; + } + + + public FundRequest properties(Map properties) { + + this.properties = properties; + return this; + } + + public FundRequest putPropertiesItem(String key, Property propertiesItem) { + if (this.properties == null) { + this.properties = new HashMap<>(); + } + this.properties.put(key, propertiesItem); + return this; + } + + /** + * A set of properties for the Fund. + * @return properties + **/ + @jakarta.annotation.Nullable + public Map getProperties() { + return properties; + } + + + public void setProperties(Map properties) { + this.properties = properties; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FundRequest fundRequest = (FundRequest) o; + return Objects.equals(this.code, fundRequest.code) && + Objects.equals(this.displayName, fundRequest.displayName) && + Objects.equals(this.description, fundRequest.description) && + Objects.equals(this.aborId, fundRequest.aborId) && + Objects.equals(this.shareClassInstrumentScopes, fundRequest.shareClassInstrumentScopes) && + Objects.equals(this.shareClassInstruments, fundRequest.shareClassInstruments) && + Objects.equals(this.type, fundRequest.type) && + Objects.equals(this.inceptionDate, fundRequest.inceptionDate) && + Objects.equals(this.decimalPlaces, fundRequest.decimalPlaces) && + Objects.equals(this.yearEndDate, fundRequest.yearEndDate) && + Objects.equals(this.properties, fundRequest.properties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(code, displayName, description, aborId, shareClassInstrumentScopes, shareClassInstruments, type, inceptionDate, decimalPlaces, yearEndDate, properties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FundRequest {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" aborId: ").append(toIndentedString(aborId)).append("\n"); + sb.append(" shareClassInstrumentScopes: ").append(toIndentedString(shareClassInstrumentScopes)).append("\n"); + sb.append(" shareClassInstruments: ").append(toIndentedString(shareClassInstruments)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" inceptionDate: ").append(toIndentedString(inceptionDate)).append("\n"); + sb.append(" decimalPlaces: ").append(toIndentedString(decimalPlaces)).append("\n"); + sb.append(" yearEndDate: ").append(toIndentedString(yearEndDate)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("displayName"); + openapiFields.add("description"); + openapiFields.add("aborId"); + openapiFields.add("shareClassInstrumentScopes"); + openapiFields.add("shareClassInstruments"); + openapiFields.add("type"); + openapiFields.add("inceptionDate"); + openapiFields.add("decimalPlaces"); + openapiFields.add("yearEndDate"); + openapiFields.add("properties"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("code"); + openapiRequiredFields.add("aborId"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("inceptionDate"); + openapiRequiredFields.add("yearEndDate"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FundRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FundRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FundRequest is not found in the empty JSON string", FundRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FundRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + // validate the required field `aborId` + ResourceId.validateJsonElement(jsonObj.get("aborId")); + // ensure the optional json data is an array if present + if (jsonObj.get("shareClassInstrumentScopes") != null && !jsonObj.get("shareClassInstrumentScopes").isJsonNull() && !jsonObj.get("shareClassInstrumentScopes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shareClassInstrumentScopes` to be an array in the JSON string but got `%s`", jsonObj.get("shareClassInstrumentScopes").toString())); + } + if (jsonObj.get("shareClassInstruments") != null && !jsonObj.get("shareClassInstruments").isJsonNull()) { + JsonArray jsonArrayshareClassInstruments = jsonObj.getAsJsonArray("shareClassInstruments"); + if (jsonArrayshareClassInstruments != null) { + // ensure the json data is an array + if (!jsonObj.get("shareClassInstruments").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `shareClassInstruments` to be an array in the JSON string but got `%s`", jsonObj.get("shareClassInstruments").toString())); + } + + // validate the optional field `shareClassInstruments` (array) + for (int i = 0; i < jsonArrayshareClassInstruments.size(); i++) { + InstrumentResolutionDetail.validateJsonElement(jsonArrayshareClassInstruments.get(i)); + }; + } + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `yearEndDate` + DayMonth.validateJsonElement(jsonObj.get("yearEndDate")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FundRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FundRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FundRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FundRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FundRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FundRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of FundRequest + * @throws IOException if the JSON string is invalid with respect to FundRequest + */ + public static FundRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FundRequest.class); + } + + /** + * Convert an instance of FundRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdk/src/main/java/com/finbourne/lusid/model/InstrumentResolutionDetail.java b/sdk/src/main/java/com/finbourne/lusid/model/InstrumentResolutionDetail.java new file mode 100644 index 00000000000..78e6fc2b1d6 --- /dev/null +++ b/sdk/src/main/java/com/finbourne/lusid/model/InstrumentResolutionDetail.java @@ -0,0 +1,278 @@ +/* + * LUSID API + * + * Contact: info@finbourne.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.finbourne.lusid.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.finbourne.lusid.JSON; + +/** + * InstrumentResolutionDetail + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InstrumentResolutionDetail { + public static final String SERIALIZED_NAME_INSTRUMENT_IDENTIFIERS = "instrumentIdentifiers"; + @SerializedName(SERIALIZED_NAME_INSTRUMENT_IDENTIFIERS) + private Map instrumentIdentifiers = new HashMap<>(); + + public static final String SERIALIZED_NAME_LUSID_INSTRUMENT_ID = "lusidInstrumentId"; + @SerializedName(SERIALIZED_NAME_LUSID_INSTRUMENT_ID) + private String lusidInstrumentId; + + public static final String SERIALIZED_NAME_INSTRUMENT_SCOPE = "instrumentScope"; + @SerializedName(SERIALIZED_NAME_INSTRUMENT_SCOPE) + private String instrumentScope; + + public InstrumentResolutionDetail() { + } + + + public InstrumentResolutionDetail( + String lusidInstrumentId, + String instrumentScope + ) { + this(); + this.lusidInstrumentId = lusidInstrumentId; + this.instrumentScope = instrumentScope; + } + + public InstrumentResolutionDetail instrumentIdentifiers(Map instrumentIdentifiers) { + + this.instrumentIdentifiers = instrumentIdentifiers; + return this; + } + + public InstrumentResolutionDetail putInstrumentIdentifiersItem(String key, String instrumentIdentifiersItem) { + if (this.instrumentIdentifiers == null) { + this.instrumentIdentifiers = new HashMap<>(); + } + this.instrumentIdentifiers.put(key, instrumentIdentifiersItem); + return this; + } + + /** + * Unique instrument identifiers + * @return instrumentIdentifiers + **/ + @jakarta.annotation.Nonnull + public Map getInstrumentIdentifiers() { + return instrumentIdentifiers; + } + + + public void setInstrumentIdentifiers(Map instrumentIdentifiers) { + this.instrumentIdentifiers = instrumentIdentifiers; + } + + + /** + * LUSID's internal unique instrument identifier, resolved from the instrument identifiers + * @return lusidInstrumentId + **/ + @jakarta.annotation.Nullable + public String getLusidInstrumentId() { + return lusidInstrumentId; + } + + + + + /** + * The scope in which the instrument lies. + * @return instrumentScope + **/ + @jakarta.annotation.Nullable + public String getInstrumentScope() { + return instrumentScope; + } + + + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InstrumentResolutionDetail instrumentResolutionDetail = (InstrumentResolutionDetail) o; + return Objects.equals(this.instrumentIdentifiers, instrumentResolutionDetail.instrumentIdentifiers) && + Objects.equals(this.lusidInstrumentId, instrumentResolutionDetail.lusidInstrumentId) && + Objects.equals(this.instrumentScope, instrumentResolutionDetail.instrumentScope); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(instrumentIdentifiers, lusidInstrumentId, instrumentScope); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InstrumentResolutionDetail {\n"); + sb.append(" instrumentIdentifiers: ").append(toIndentedString(instrumentIdentifiers)).append("\n"); + sb.append(" lusidInstrumentId: ").append(toIndentedString(lusidInstrumentId)).append("\n"); + sb.append(" instrumentScope: ").append(toIndentedString(instrumentScope)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("instrumentIdentifiers"); + openapiFields.add("lusidInstrumentId"); + openapiFields.add("instrumentScope"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("instrumentIdentifiers"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to InstrumentResolutionDetail + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!InstrumentResolutionDetail.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InstrumentResolutionDetail is not found in the empty JSON string", InstrumentResolutionDetail.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InstrumentResolutionDetail.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("lusidInstrumentId") != null && !jsonObj.get("lusidInstrumentId").isJsonNull()) && !jsonObj.get("lusidInstrumentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lusidInstrumentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lusidInstrumentId").toString())); + } + if ((jsonObj.get("instrumentScope") != null && !jsonObj.get("instrumentScope").isJsonNull()) && !jsonObj.get("instrumentScope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `instrumentScope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("instrumentScope").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InstrumentResolutionDetail.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InstrumentResolutionDetail' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InstrumentResolutionDetail.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InstrumentResolutionDetail value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public InstrumentResolutionDetail read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InstrumentResolutionDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of InstrumentResolutionDetail + * @throws IOException if the JSON string is invalid with respect to InstrumentResolutionDetail + */ + public static InstrumentResolutionDetail fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InstrumentResolutionDetail.class); + } + + /** + * Convert an instance of InstrumentResolutionDetail to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdk/src/main/java/com/finbourne/lusid/model/PagedResourceListOfFund.java b/sdk/src/main/java/com/finbourne/lusid/model/PagedResourceListOfFund.java new file mode 100644 index 00000000000..508754a0d44 --- /dev/null +++ b/sdk/src/main/java/com/finbourne/lusid/model/PagedResourceListOfFund.java @@ -0,0 +1,380 @@ +/* + * LUSID API + * + * Contact: info@finbourne.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.finbourne.lusid.model; + +import java.util.Objects; +import com.finbourne.lusid.model.Fund; +import com.finbourne.lusid.model.Link; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.finbourne.lusid.JSON; + +/** + * PagedResourceListOfFund + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PagedResourceListOfFund { + public static final String SERIALIZED_NAME_NEXT_PAGE = "nextPage"; + @SerializedName(SERIALIZED_NAME_NEXT_PAGE) + private String nextPage; + + public static final String SERIALIZED_NAME_PREVIOUS_PAGE = "previousPage"; + @SerializedName(SERIALIZED_NAME_PREVIOUS_PAGE) + private String previousPage; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + private List values = new ArrayList<>(); + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private URI href; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public PagedResourceListOfFund() { + } + + public PagedResourceListOfFund nextPage(String nextPage) { + + this.nextPage = nextPage; + return this; + } + + /** + * Get nextPage + * @return nextPage + **/ + @jakarta.annotation.Nullable + public String getNextPage() { + return nextPage; + } + + + public void setNextPage(String nextPage) { + this.nextPage = nextPage; + } + + + public PagedResourceListOfFund previousPage(String previousPage) { + + this.previousPage = previousPage; + return this; + } + + /** + * Get previousPage + * @return previousPage + **/ + @jakarta.annotation.Nullable + public String getPreviousPage() { + return previousPage; + } + + + public void setPreviousPage(String previousPage) { + this.previousPage = previousPage; + } + + + public PagedResourceListOfFund values(List values) { + + this.values = values; + return this; + } + + public PagedResourceListOfFund addValuesItem(Fund valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + **/ + @jakarta.annotation.Nonnull + public List getValues() { + return values; + } + + + public void setValues(List values) { + this.values = values; + } + + + public PagedResourceListOfFund href(URI href) { + + this.href = href; + return this; + } + + /** + * Get href + * @return href + **/ + @jakarta.annotation.Nullable + public URI getHref() { + return href; + } + + + public void setHref(URI href) { + this.href = href; + } + + + public PagedResourceListOfFund links(List links) { + + this.links = links; + return this; + } + + public PagedResourceListOfFund addLinksItem(Link linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @jakarta.annotation.Nullable + public List getLinks() { + return links; + } + + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PagedResourceListOfFund pagedResourceListOfFund = (PagedResourceListOfFund) o; + return Objects.equals(this.nextPage, pagedResourceListOfFund.nextPage) && + Objects.equals(this.previousPage, pagedResourceListOfFund.previousPage) && + Objects.equals(this.values, pagedResourceListOfFund.values) && + Objects.equals(this.href, pagedResourceListOfFund.href) && + Objects.equals(this.links, pagedResourceListOfFund.links); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(nextPage, previousPage, values, href, links); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PagedResourceListOfFund {\n"); + sb.append(" nextPage: ").append(toIndentedString(nextPage)).append("\n"); + sb.append(" previousPage: ").append(toIndentedString(previousPage)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("nextPage"); + openapiFields.add("previousPage"); + openapiFields.add("values"); + openapiFields.add("href"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PagedResourceListOfFund + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PagedResourceListOfFund.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PagedResourceListOfFund is not found in the empty JSON string", PagedResourceListOfFund.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PagedResourceListOfFund.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("nextPage") != null && !jsonObj.get("nextPage").isJsonNull()) && !jsonObj.get("nextPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); + } + if ((jsonObj.get("previousPage") != null && !jsonObj.get("previousPage").isJsonNull()) && !jsonObj.get("previousPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `previousPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previousPage").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + + JsonArray jsonArrayvalues = jsonObj.getAsJsonArray("values"); + // validate the required field `values` (array) + for (int i = 0; i < jsonArrayvalues.size(); i++) { + Fund.validateJsonElement(jsonArrayvalues.get(i)); + }; + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + Link.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PagedResourceListOfFund.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PagedResourceListOfFund' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PagedResourceListOfFund.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PagedResourceListOfFund value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PagedResourceListOfFund read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PagedResourceListOfFund given an JSON string + * + * @param jsonString JSON string + * @return An instance of PagedResourceListOfFund + * @throws IOException if the JSON string is invalid with respect to PagedResourceListOfFund + */ + public static PagedResourceListOfFund fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PagedResourceListOfFund.class); + } + + /** + * Convert an instance of PagedResourceListOfFund to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdk/src/main/java/com/finbourne/lusid/model/PagedResourceListOfPropertyDefinition.java b/sdk/src/main/java/com/finbourne/lusid/model/PagedResourceListOfPropertyDefinition.java new file mode 100644 index 00000000000..a34128d57d9 --- /dev/null +++ b/sdk/src/main/java/com/finbourne/lusid/model/PagedResourceListOfPropertyDefinition.java @@ -0,0 +1,380 @@ +/* + * LUSID API + * + * Contact: info@finbourne.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.finbourne.lusid.model; + +import java.util.Objects; +import com.finbourne.lusid.model.Link; +import com.finbourne.lusid.model.PropertyDefinition; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.finbourne.lusid.JSON; + +/** + * PagedResourceListOfPropertyDefinition + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PagedResourceListOfPropertyDefinition { + public static final String SERIALIZED_NAME_NEXT_PAGE = "nextPage"; + @SerializedName(SERIALIZED_NAME_NEXT_PAGE) + private String nextPage; + + public static final String SERIALIZED_NAME_PREVIOUS_PAGE = "previousPage"; + @SerializedName(SERIALIZED_NAME_PREVIOUS_PAGE) + private String previousPage; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + private List values = new ArrayList<>(); + + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + private URI href; + + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + private List links; + + public PagedResourceListOfPropertyDefinition() { + } + + public PagedResourceListOfPropertyDefinition nextPage(String nextPage) { + + this.nextPage = nextPage; + return this; + } + + /** + * Get nextPage + * @return nextPage + **/ + @jakarta.annotation.Nullable + public String getNextPage() { + return nextPage; + } + + + public void setNextPage(String nextPage) { + this.nextPage = nextPage; + } + + + public PagedResourceListOfPropertyDefinition previousPage(String previousPage) { + + this.previousPage = previousPage; + return this; + } + + /** + * Get previousPage + * @return previousPage + **/ + @jakarta.annotation.Nullable + public String getPreviousPage() { + return previousPage; + } + + + public void setPreviousPage(String previousPage) { + this.previousPage = previousPage; + } + + + public PagedResourceListOfPropertyDefinition values(List values) { + + this.values = values; + return this; + } + + public PagedResourceListOfPropertyDefinition addValuesItem(PropertyDefinition valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + **/ + @jakarta.annotation.Nonnull + public List getValues() { + return values; + } + + + public void setValues(List values) { + this.values = values; + } + + + public PagedResourceListOfPropertyDefinition href(URI href) { + + this.href = href; + return this; + } + + /** + * Get href + * @return href + **/ + @jakarta.annotation.Nullable + public URI getHref() { + return href; + } + + + public void setHref(URI href) { + this.href = href; + } + + + public PagedResourceListOfPropertyDefinition links(List links) { + + this.links = links; + return this; + } + + public PagedResourceListOfPropertyDefinition addLinksItem(Link linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + **/ + @jakarta.annotation.Nullable + public List getLinks() { + return links; + } + + + public void setLinks(List links) { + this.links = links; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PagedResourceListOfPropertyDefinition pagedResourceListOfPropertyDefinition = (PagedResourceListOfPropertyDefinition) o; + return Objects.equals(this.nextPage, pagedResourceListOfPropertyDefinition.nextPage) && + Objects.equals(this.previousPage, pagedResourceListOfPropertyDefinition.previousPage) && + Objects.equals(this.values, pagedResourceListOfPropertyDefinition.values) && + Objects.equals(this.href, pagedResourceListOfPropertyDefinition.href) && + Objects.equals(this.links, pagedResourceListOfPropertyDefinition.links); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(nextPage, previousPage, values, href, links); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PagedResourceListOfPropertyDefinition {\n"); + sb.append(" nextPage: ").append(toIndentedString(nextPage)).append("\n"); + sb.append(" previousPage: ").append(toIndentedString(previousPage)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("nextPage"); + openapiFields.add("previousPage"); + openapiFields.add("values"); + openapiFields.add("href"); + openapiFields.add("links"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("values"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PagedResourceListOfPropertyDefinition + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PagedResourceListOfPropertyDefinition.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PagedResourceListOfPropertyDefinition is not found in the empty JSON string", PagedResourceListOfPropertyDefinition.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PagedResourceListOfPropertyDefinition.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("nextPage") != null && !jsonObj.get("nextPage").isJsonNull()) && !jsonObj.get("nextPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); + } + if ((jsonObj.get("previousPage") != null && !jsonObj.get("previousPage").isJsonNull()) && !jsonObj.get("previousPage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `previousPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previousPage").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + + JsonArray jsonArrayvalues = jsonObj.getAsJsonArray("values"); + // validate the required field `values` (array) + for (int i = 0; i < jsonArrayvalues.size(); i++) { + PropertyDefinition.validateJsonElement(jsonArrayvalues.get(i)); + }; + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + if (jsonArraylinks != null) { + // ensure the json data is an array + if (!jsonObj.get("links").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + Link.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PagedResourceListOfPropertyDefinition.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PagedResourceListOfPropertyDefinition' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PagedResourceListOfPropertyDefinition.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PagedResourceListOfPropertyDefinition value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PagedResourceListOfPropertyDefinition read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PagedResourceListOfPropertyDefinition given an JSON string + * + * @param jsonString JSON string + * @return An instance of PagedResourceListOfPropertyDefinition + * @throws IOException if the JSON string is invalid with respect to PagedResourceListOfPropertyDefinition + */ + public static PagedResourceListOfPropertyDefinition fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PagedResourceListOfPropertyDefinition.class); + } + + /** + * Convert an instance of PagedResourceListOfPropertyDefinition to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/sdk/src/main/java/com/finbourne/lusid/model/PropertyDefinition.java b/sdk/src/main/java/com/finbourne/lusid/model/PropertyDefinition.java index 0df7bb5a2ae..ef6bc16a1f0 100644 --- a/sdk/src/main/java/com/finbourne/lusid/model/PropertyDefinition.java +++ b/sdk/src/main/java/com/finbourne/lusid/model/PropertyDefinition.java @@ -271,7 +271,7 @@ public UnitSchemaEnum read(final JsonReader jsonReader) throws IOException { private UnitSchemaEnum unitSchema; /** - * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg + * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg */ @JsonAdapter(DomainEnum.Adapter.class) public enum DomainEnum { @@ -341,6 +341,8 @@ public enum DomainEnum { ABORCONFIGURATION("AborConfiguration"), + FUND("Fund"), + RECONCILIATION("Reconciliation"), PROPERTYDEFINITION("PropertyDefinition"), @@ -702,7 +704,7 @@ public PropertyDefinition domain(DomainEnum domain) { } /** - * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg + * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg * @return domain **/ @jakarta.annotation.Nullable diff --git a/sdk/src/main/java/com/finbourne/lusid/model/PropertyDefinitionSearchResult.java b/sdk/src/main/java/com/finbourne/lusid/model/PropertyDefinitionSearchResult.java index b684d60523d..68f43a9a95b 100644 --- a/sdk/src/main/java/com/finbourne/lusid/model/PropertyDefinitionSearchResult.java +++ b/sdk/src/main/java/com/finbourne/lusid/model/PropertyDefinitionSearchResult.java @@ -267,7 +267,7 @@ public UnitSchemaEnum read(final JsonReader jsonReader) throws IOException { private UnitSchemaEnum unitSchema; /** - * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg + * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg */ @JsonAdapter(DomainEnum.Adapter.class) public enum DomainEnum { @@ -337,6 +337,8 @@ public enum DomainEnum { ABORCONFIGURATION("AborConfiguration"), + FUND("Fund"), + RECONCILIATION("Reconciliation"), PROPERTYDEFINITION("PropertyDefinition"), @@ -686,7 +688,7 @@ public PropertyDefinitionSearchResult domain(DomainEnum domain) { } /** - * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg + * The domain that the property exists in. The available values are: NotDefined, Transaction, Portfolio, Holding, ReferenceHolding, TransactionConfiguration, Instrument, CutLabelDefinition, Analytic, PortfolioGroup, Person, AccessMetadata, Order, UnitResult, MarketData, ConfigurationRecipe, Allocation, Calendar, LegalEntity, Placement, Execution, Block, Participation, Package, OrderInstruction, NextBestAction, CustomEntity, InstrumentEvent, Account, ChartOfAccounts, CustodianAccount, Abor, AborConfiguration, Fund, Reconciliation, PropertyDefinition, Compliance, DiaryEntry, Leg * @return domain **/ @jakarta.annotation.Nullable diff --git a/sdk/src/main/java/com/finbourne/lusid/model/PropertyDomain.java b/sdk/src/main/java/com/finbourne/lusid/model/PropertyDomain.java index 3759bcd60fd..4424473ab6f 100644 --- a/sdk/src/main/java/com/finbourne/lusid/model/PropertyDomain.java +++ b/sdk/src/main/java/com/finbourne/lusid/model/PropertyDomain.java @@ -91,6 +91,8 @@ public enum PropertyDomain { ABORCONFIGURATION("AborConfiguration"), + FUND("Fund"), + RECONCILIATION("Reconciliation"), PROPERTYDEFINITION("PropertyDefinition"),