diff --git a/README.md b/README.md index 25899b5c263..fc6e7e5cf7d 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ This code is automatically generated by the [OpenAPI Generator](https://openapi- ## Versions -- API version: 0.11.7433 -- SDK version: 2.0.1362 +- API version: 0.11.7438 +- SDK version: 2.0.1363 ## Requirements @@ -47,7 +47,7 @@ Add this dependency to your pom.xml com.finbourne lusid-sdk - 2.0.1362 + 2.0.1363 ``` @@ -61,7 +61,7 @@ Add this dependency to your build.gradle } dependencies { - implementation "com.finbourne:lusid-sdk:2.0.1362" + implementation "com.finbourne:lusid-sdk:2.0.1363" } ``` diff --git a/sdk/README.md b/sdk/README.md index 6facecb5b4b..6d2dcca0149 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -156,9 +156,9 @@ Class | Method | HTTP request | Description *CounterpartiesApi* | [**listCreditSupportAnnexes**](docs/CounterpartiesApi.md#listcreditsupportannexes) | **GET** /api/counterparties/creditsupportannexes | [EARLY ACCESS] ListCreditSupportAnnexes: List the set of Credit Support Annexes *CounterpartiesApi* | [**upsertCounterpartyAgreement**](docs/CounterpartiesApi.md#upsertcounterpartyagreement) | **POST** /api/counterparties/counterpartyagreements | [EARLY ACCESS] UpsertCounterpartyAgreement: Upsert Counterparty Agreement *CounterpartiesApi* | [**upsertCreditSupportAnnex**](docs/CounterpartiesApi.md#upsertcreditsupportannex) | **POST** /api/counterparties/creditsupportannexes | [EARLY ACCESS] UpsertCreditSupportAnnex: Upsert Credit Support Annex -*CustomDataModelsApi* | [**createCustomDataModel**](docs/CustomDataModelsApi.md#createcustomdatamodel) | **POST** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] CreateCustomDataModel: Create a Custom Data Model -*CustomDataModelsApi* | [**deleteCustomDataModel**](docs/CustomDataModelsApi.md#deletecustomdatamodel) | **DELETE** /api/datamodel/{scope}/{code} | [EXPERIMENTAL] DeleteCustomDataModel: Delete a Custom Data Model -*CustomDataModelsApi* | [**getCustomDataModel**](docs/CustomDataModelsApi.md#getcustomdatamodel) | **GET** /api/datamodel/{scope}/{code} | [EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model +*CustomDataModelsApi* | [**createCustomDataModel**](docs/CustomDataModelsApi.md#createcustomdatamodel) | **POST** /api/datamodel/{entityType} | [EXPERIMENTAL] CreateCustomDataModel: Create a Custom Data Model +*CustomDataModelsApi* | [**deleteCustomDataModel**](docs/CustomDataModelsApi.md#deletecustomdatamodel) | **DELETE** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] DeleteCustomDataModel: Delete a Custom Data Model +*CustomDataModelsApi* | [**getCustomDataModel**](docs/CustomDataModelsApi.md#getcustomdatamodel) | **GET** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model *CustomDataModelsApi* | [**listDataModelHierarchies**](docs/CustomDataModelsApi.md#listdatamodelhierarchies) | **GET** /api/datamodel/hierarchies | [EXPERIMENTAL] ListDataModelHierarchies: List Custom Data Model hierarchies. *CustomDataModelsApi* | [**listSupportedEntityTypes**](docs/CustomDataModelsApi.md#listsupportedentitytypes) | **GET** /api/datamodel/entitytype | [EXPERIMENTAL] ListSupportedEntityTypes: List the currently supported entity types for use in Custom Data Models. *CustomDataModelsApi* | [**updateCustomDataModel**](docs/CustomDataModelsApi.md#updatecustomdatamodel) | **PUT** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] UpdateCustomDataModel: Update a Custom Data Model @@ -850,6 +850,7 @@ Class | Method | HTTP request | Description - [CreateClosedPeriodRequest](docs/CreateClosedPeriodRequest.md) - [CreateComplianceTemplateRequest](docs/CreateComplianceTemplateRequest.md) - [CreateCorporateActionSourceRequest](docs/CreateCorporateActionSourceRequest.md) + - [CreateCustomDataModelRequest](docs/CreateCustomDataModelRequest.md) - [CreateCustomEntityTypeRequest](docs/CreateCustomEntityTypeRequest.md) - [CreateCutLabelDefinitionRequest](docs/CreateCutLabelDefinitionRequest.md) - [CreateDataMapRequest](docs/CreateDataMapRequest.md) @@ -1710,6 +1711,7 @@ Class | Method | HTTP request | Description - [UpdateAmortisationRuleSetDetailsRequest](docs/UpdateAmortisationRuleSetDetailsRequest.md) - [UpdateCalendarRequest](docs/UpdateCalendarRequest.md) - [UpdateComplianceTemplateRequest](docs/UpdateComplianceTemplateRequest.md) + - [UpdateCustomDataModelRequest](docs/UpdateCustomDataModelRequest.md) - [UpdateCustomEntityDefinitionRequest](docs/UpdateCustomEntityDefinitionRequest.md) - [UpdateCustomEntityTypeRequest](docs/UpdateCustomEntityTypeRequest.md) - [UpdateCutLabelDefinitionRequest](docs/UpdateCutLabelDefinitionRequest.md) @@ -1742,7 +1744,6 @@ Class | Method | HTTP request | Description - [UpsertCorporateActionsResponse](docs/UpsertCorporateActionsResponse.md) - [UpsertCounterpartyAgreementRequest](docs/UpsertCounterpartyAgreementRequest.md) - [UpsertCreditSupportAnnexRequest](docs/UpsertCreditSupportAnnexRequest.md) - - [UpsertCustomDataModelRequest](docs/UpsertCustomDataModelRequest.md) - [UpsertCustomEntitiesResponse](docs/UpsertCustomEntitiesResponse.md) - [UpsertCustomEntityAccessMetadataRequest](docs/UpsertCustomEntityAccessMetadataRequest.md) - [UpsertDialectRequest](docs/UpsertDialectRequest.md) diff --git a/sdk/api/openapi.yaml b/sdk/api/openapi.yaml index 4db602b333e..2bffe37ae8c 100644 --- a/sdk/api/openapi.yaml +++ b/sdk/api/openapi.yaml @@ -384,7 +384,7 @@ info: | 941|Order not compliant.| | termsOfService: https://www.finbourne.com/legal/terms-conditions title: LUSID API - version: 0.11.7433 + version: 0.11.7438 x-logo: url: https://www.lusid.com/app/assets/logo_white.png backgroundColor: '#415464' @@ -25021,33 +25021,11 @@ paths: - Custom Data Models x-fbn-apistatus: Experimental x-accepts: application/json - /api/datamodel/{entityType}/{scope}/{code}: + /api/datamodel/{entityType}: post: description: Creates a Custom Data Model. operationId: CreateCustomDataModel parameters: - - description: The scope of the specified Data Model. - 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 specified Data Model. - explode: false - in: path - name: code - required: true - schema: - maxLength: 64 - minLength: 1 - pattern: "^[a-zA-Z0-9\\-_]+$" - type: string - style: simple - description: The entity type of the Data Model. explode: false in: path @@ -25062,6 +25040,9 @@ paths: content: application/json-patch+json: example: + id: + scope: MyScope + code: MyCDMCode displayName: DisplayName description: description conditions: conditions @@ -25082,9 +25063,12 @@ paths: - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 sortOrder: ASC schema: - $ref: '#/components/schemas/UpsertCustomDataModelRequest' + $ref: '#/components/schemas/CreateCustomDataModelRequest' application/json: example: + id: + scope: MyScope + code: MyCDMCode displayName: DisplayName description: description conditions: conditions @@ -25105,9 +25089,12 @@ paths: - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 sortOrder: ASC schema: - $ref: '#/components/schemas/UpsertCustomDataModelRequest' + $ref: '#/components/schemas/CreateCustomDataModelRequest' text/json: example: + id: + scope: MyScope + code: MyCDMCode displayName: DisplayName description: description conditions: conditions @@ -25128,9 +25115,12 @@ paths: - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 sortOrder: ASC schema: - $ref: '#/components/schemas/UpsertCustomDataModelRequest' + $ref: '#/components/schemas/CreateCustomDataModelRequest' application/*+json: example: + id: + scope: MyScope + code: MyCDMCode displayName: DisplayName description: description conditions: conditions @@ -25151,7 +25141,7 @@ paths: - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 sortOrder: ASC schema: - $ref: '#/components/schemas/UpsertCustomDataModelRequest' + $ref: '#/components/schemas/CreateCustomDataModelRequest' description: The request containing the details of the Data Model. responses: "201": @@ -25414,10 +25404,22 @@ paths: x-fbn-apistatus: Experimental x-content-type: application/json-patch+json x-accepts: application/json - put: - description: Updates a Custom Data Model. - operationId: UpdateCustomDataModel + /api/datamodel/{entityType}/{scope}/{code}: + delete: + description: "Delete a Custom Data Model. The data model will remain viewable\ + \ at previous as at times, but will no longer\r\nbe part of any hierarchies." + operationId: DeleteCustomDataModel parameters: + - description: The entity type of the Data Model. + explode: false + in: path + name: entityType + required: true + schema: + maxLength: 64 + minLength: 1 + type: string + style: simple - description: The scope of the specified Data Model. explode: false in: path @@ -25440,6 +25442,54 @@ paths: 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 deleted entity metadata + "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] DeleteCustomDataModel: Delete a Custom Data Model" + tags: + - Custom Data Models + x-fbn-apistatus: Experimental + x-accepts: application/json + get: + description: Retrieves a Custom Data Model at a given as at time. + operationId: GetCustomDataModel + parameters: - description: The entity type of the Data Model. explode: false in: path @@ -25450,103 +25500,41 @@ paths: minLength: 1 type: string style: simple - requestBody: - content: - application/json-patch+json: - example: - displayName: DisplayName - description: description - conditions: conditions - properties: - - propertyKey: Calendar/TestScope/DummyCalendarKey - required: true - - propertyKey: Holding/TestScope/DummyHoldingKey1 - required: false - identifierTypes: - - identifierKey: CustomEntity/TestScope/DummyCustomEntityKey1 - required: true - - identifierKey: Person/TestScope/DummyPersonKey1 - required: false - attributeAliases: - - attributeName: Calendar/TestScope/DummyCalendarKey - attributeAlias: cp - recommendedSortBy: - - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 - sortOrder: ASC - schema: - $ref: '#/components/schemas/UpsertCustomDataModelRequest' - application/json: - example: - displayName: DisplayName - description: description - conditions: conditions - properties: - - propertyKey: Calendar/TestScope/DummyCalendarKey - required: true - - propertyKey: Holding/TestScope/DummyHoldingKey1 - required: false - identifierTypes: - - identifierKey: CustomEntity/TestScope/DummyCustomEntityKey1 - required: true - - identifierKey: Person/TestScope/DummyPersonKey1 - required: false - attributeAliases: - - attributeName: Calendar/TestScope/DummyCalendarKey - attributeAlias: cp - recommendedSortBy: - - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 - sortOrder: ASC - schema: - $ref: '#/components/schemas/UpsertCustomDataModelRequest' - text/json: - example: - displayName: DisplayName - description: description - conditions: conditions - properties: - - propertyKey: Calendar/TestScope/DummyCalendarKey - required: true - - propertyKey: Holding/TestScope/DummyHoldingKey1 - required: false - identifierTypes: - - identifierKey: CustomEntity/TestScope/DummyCustomEntityKey1 - required: true - - identifierKey: Person/TestScope/DummyPersonKey1 - required: false - attributeAliases: - - attributeName: Calendar/TestScope/DummyCalendarKey - attributeAlias: cp - recommendedSortBy: - - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 - sortOrder: ASC - schema: - $ref: '#/components/schemas/UpsertCustomDataModelRequest' - application/*+json: - example: - displayName: DisplayName - description: description - conditions: conditions - properties: - - propertyKey: Calendar/TestScope/DummyCalendarKey - required: true - - propertyKey: Holding/TestScope/DummyHoldingKey1 - required: false - identifierTypes: - - identifierKey: CustomEntity/TestScope/DummyCustomEntityKey1 - required: true - - identifierKey: Person/TestScope/DummyPersonKey1 - required: false - attributeAliases: - - attributeName: Calendar/TestScope/DummyCalendarKey - attributeAlias: cp - recommendedSortBy: - - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 - sortOrder: ASC - schema: - $ref: '#/components/schemas/UpsertCustomDataModelRequest' - description: The request containing the details of the Data Model. + - description: The scope of the specified Data Model. + 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 specified Data Model. + explode: false + in: path + name: code + required: true + schema: + maxLength: 64 + minLength: 1 + pattern: "^[a-zA-Z0-9\\-_]+$" + type: string + style: simple + - description: "The asAt datetime at which to retrieve the Data Model. Defaults\ + \ to return\r\n the latest version of the Data Model if not specified." + explode: true + in: query + name: asAt + required: false + schema: + format: date-time + type: string + style: form + x-nullable: true responses: - "200": + "201": content: text/plain: example: @@ -25779,7 +25767,7 @@ paths: sortOrder: ASC schema: $ref: '#/components/schemas/CustomDataModel' - description: The updated Data Model + description: The requested Data Model "400": content: text/plain: @@ -25800,88 +25788,25 @@ paths: description: Error response security: - oauth2: [] - summary: "[EXPERIMENTAL] UpdateCustomDataModel: Update a Custom Data Model" + summary: "[EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model" tags: - Custom Data Models x-fbn-apistatus: Experimental - x-content-type: application/json-patch+json x-accepts: application/json - /api/datamodel/{scope}/{code}: - delete: - description: "Delete a Custom Data Model. The data model will remain viewable\ - \ at previous as at times, but will no longer\r\nbe part of any hierarchies." - operationId: DeleteCustomDataModel + put: + description: Updates a Custom Data Model. + operationId: UpdateCustomDataModel parameters: - - description: The scope of the specified Data Model. - 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 specified Data Model. + - description: The entity type of the Data Model. explode: false in: path - name: code + name: entityType 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 deleted entity metadata - "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] DeleteCustomDataModel: Delete a Custom Data Model" - tags: - - Custom Data Models - x-fbn-apistatus: Experimental - x-accepts: application/json - get: - description: Retrieves a Custom Data Model at a given as at time. - operationId: GetCustomDataModel - parameters: - description: The scope of the specified Data Model. explode: false in: path @@ -25904,19 +25829,103 @@ paths: pattern: "^[a-zA-Z0-9\\-_]+$" type: string style: simple - - description: "The asAt datetime at which to retrieve the Data Model. Defaults\ - \ to return\r\n the latest version of the Data Model if not specified." - explode: true - in: query - name: asAt - required: false - schema: - format: date-time - type: string - style: form - x-nullable: true + requestBody: + content: + application/json-patch+json: + example: + displayName: DisplayName + description: description + conditions: conditions + properties: + - propertyKey: Calendar/TestScope/DummyCalendarKey + required: true + - propertyKey: Holding/TestScope/DummyHoldingKey1 + required: false + identifierTypes: + - identifierKey: CustomEntity/TestScope/DummyCustomEntityKey1 + required: true + - identifierKey: Person/TestScope/DummyPersonKey1 + required: false + attributeAliases: + - attributeName: Calendar/TestScope/DummyCalendarKey + attributeAlias: cp + recommendedSortBy: + - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 + sortOrder: ASC + schema: + $ref: '#/components/schemas/UpdateCustomDataModelRequest' + application/json: + example: + displayName: DisplayName + description: description + conditions: conditions + properties: + - propertyKey: Calendar/TestScope/DummyCalendarKey + required: true + - propertyKey: Holding/TestScope/DummyHoldingKey1 + required: false + identifierTypes: + - identifierKey: CustomEntity/TestScope/DummyCustomEntityKey1 + required: true + - identifierKey: Person/TestScope/DummyPersonKey1 + required: false + attributeAliases: + - attributeName: Calendar/TestScope/DummyCalendarKey + attributeAlias: cp + recommendedSortBy: + - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 + sortOrder: ASC + schema: + $ref: '#/components/schemas/UpdateCustomDataModelRequest' + text/json: + example: + displayName: DisplayName + description: description + conditions: conditions + properties: + - propertyKey: Calendar/TestScope/DummyCalendarKey + required: true + - propertyKey: Holding/TestScope/DummyHoldingKey1 + required: false + identifierTypes: + - identifierKey: CustomEntity/TestScope/DummyCustomEntityKey1 + required: true + - identifierKey: Person/TestScope/DummyPersonKey1 + required: false + attributeAliases: + - attributeName: Calendar/TestScope/DummyCalendarKey + attributeAlias: cp + recommendedSortBy: + - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 + sortOrder: ASC + schema: + $ref: '#/components/schemas/UpdateCustomDataModelRequest' + application/*+json: + example: + displayName: DisplayName + description: description + conditions: conditions + properties: + - propertyKey: Calendar/TestScope/DummyCalendarKey + required: true + - propertyKey: Holding/TestScope/DummyHoldingKey1 + required: false + identifierTypes: + - identifierKey: CustomEntity/TestScope/DummyCustomEntityKey1 + required: true + - identifierKey: Person/TestScope/DummyPersonKey1 + required: false + attributeAliases: + - attributeName: Calendar/TestScope/DummyCalendarKey + attributeAlias: cp + recommendedSortBy: + - attributeName: CustomEntity/TestScope/DummyCustomEntityKey1 + sortOrder: ASC + schema: + $ref: '#/components/schemas/UpdateCustomDataModelRequest' + description: The request containing the details of the Data Model. responses: - "201": + "200": content: text/plain: example: @@ -26149,7 +26158,7 @@ paths: sortOrder: ASC schema: $ref: '#/components/schemas/CustomDataModel' - description: The requested Data Model + description: The updated Data Model "400": content: text/plain: @@ -26170,10 +26179,11 @@ paths: description: Error response security: - oauth2: [] - summary: "[EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model" + summary: "[EXPERIMENTAL] UpdateCustomDataModel: Update a Custom Data Model" tags: - Custom Data Models x-fbn-apistatus: Experimental + x-content-type: application/json-patch+json x-accepts: application/json /api/datatypes: get: @@ -132877,6 +132887,93 @@ components: - displayName - scope type: object + CreateCustomDataModelRequest: + additionalProperties: false + example: + attributeAliases: + - attributeAlias: attributeAlias + attributeName: attributeName + - attributeAlias: attributeAlias + attributeName: attributeName + recommendedSortBy: + - sortOrder: sortOrder + attributeName: attributeName + - sortOrder: sortOrder + attributeName: attributeName + displayName: displayName + description: description + parentDataModel: + code: code + scope: scope + id: + code: code + scope: scope + conditions: conditions + properties: + - propertyKey: propertyKey + required: true + - propertyKey: propertyKey + required: true + identifierTypes: + - identifierKey: identifierKey + required: true + - identifierKey: identifierKey + required: true + properties: + id: + $ref: '#/components/schemas/ResourceId' + displayName: + description: The name of the Custom Data Model. + maxLength: 512 + minLength: 0 + pattern: "^[\\s\\S]*$" + type: string + description: + description: A description for the Custom Data Model. + maxLength: 512 + minLength: 0 + pattern: "^[\\s\\S]*$" + type: string + parentDataModel: + $ref: '#/components/schemas/ResourceId' + conditions: + description: The conditions that the bound entity must meet to be valid. + maxLength: 16384 + minLength: 0 + nullable: true + pattern: "^[\\s\\S]*$" + type: string + properties: + description: The properties that are required or allowed on the bound entity. + items: + $ref: '#/components/schemas/CustomDataModelPropertySpecification' + nullable: true + type: array + identifierTypes: + description: The identifier types that are required or allowed on the bound + entity. + items: + $ref: '#/components/schemas/CustomDataModelIdentifierTypeSpecification' + nullable: true + type: array + attributeAliases: + description: "The aliases for property keys, identifier types, and fields\ + \ on the bound entity." + items: + $ref: '#/components/schemas/Alias' + nullable: true + type: array + recommendedSortBy: + description: The preferred default sorting instructions. + items: + $ref: '#/components/schemas/RecommendedSortBy' + nullable: true + type: array + required: + - description + - displayName + - id + type: object CreateCustomEntityTypeRequest: additionalProperties: false example: @@ -206207,6 +206304,87 @@ components: - description - variations type: object + UpdateCustomDataModelRequest: + additionalProperties: false + example: + attributeAliases: + - attributeAlias: attributeAlias + attributeName: attributeName + - attributeAlias: attributeAlias + attributeName: attributeName + recommendedSortBy: + - sortOrder: sortOrder + attributeName: attributeName + - sortOrder: sortOrder + attributeName: attributeName + displayName: displayName + description: description + parentDataModel: + code: code + scope: scope + conditions: conditions + properties: + - propertyKey: propertyKey + required: true + - propertyKey: propertyKey + required: true + identifierTypes: + - identifierKey: identifierKey + required: true + - identifierKey: identifierKey + required: true + properties: + displayName: + description: The name of the Custom Data Model. + maxLength: 512 + minLength: 0 + pattern: "^[\\s\\S]*$" + type: string + description: + description: A description for the Custom Data Model. + maxLength: 512 + minLength: 0 + pattern: "^[\\s\\S]*$" + type: string + parentDataModel: + $ref: '#/components/schemas/ResourceId' + conditions: + description: The conditions that the bound entity must meet to be valid. + maxLength: 16384 + minLength: 0 + nullable: true + pattern: "^[\\s\\S]*$" + type: string + properties: + description: The properties that are required or allowed on the bound entity. + items: + $ref: '#/components/schemas/CustomDataModelPropertySpecification' + nullable: true + type: array + identifierTypes: + description: The identifier types that are required or allowed on the bound + entity. + items: + $ref: '#/components/schemas/CustomDataModelIdentifierTypeSpecification' + nullable: true + type: array + attributeAliases: + description: "The aliases for property keys, identifier types, and fields\ + \ on the bound entity." + items: + $ref: '#/components/schemas/Alias' + nullable: true + type: array + recommendedSortBy: + description: The preferred default sorting instructions. + items: + $ref: '#/components/schemas/RecommendedSortBy' + nullable: true + type: array + required: + - description + - displayName + type: object UpdateCustomEntityDefinitionRequest: additionalProperties: false example: @@ -208414,87 +208592,6 @@ components: creditSupportAnnex: $ref: '#/components/schemas/CreditSupportAnnex' type: object - UpsertCustomDataModelRequest: - additionalProperties: false - example: - attributeAliases: - - attributeAlias: attributeAlias - attributeName: attributeName - - attributeAlias: attributeAlias - attributeName: attributeName - recommendedSortBy: - - sortOrder: sortOrder - attributeName: attributeName - - sortOrder: sortOrder - attributeName: attributeName - displayName: displayName - description: description - parentDataModel: - code: code - scope: scope - conditions: conditions - properties: - - propertyKey: propertyKey - required: true - - propertyKey: propertyKey - required: true - identifierTypes: - - identifierKey: identifierKey - required: true - - identifierKey: identifierKey - required: true - properties: - displayName: - description: The name of the Custom Data Model. - maxLength: 512 - minLength: 0 - pattern: "^[\\s\\S]*$" - type: string - description: - description: A description for the Custom Data Model. - maxLength: 512 - minLength: 0 - pattern: "^[\\s\\S]*$" - type: string - parentDataModel: - $ref: '#/components/schemas/ResourceId' - conditions: - description: The conditions that the bound entity must meet to be valid. - maxLength: 16384 - minLength: 0 - nullable: true - pattern: "^[\\s\\S]*$" - type: string - properties: - description: The properties that are required or allowed on the bound entity. - items: - $ref: '#/components/schemas/CustomDataModelPropertySpecification' - nullable: true - type: array - identifierTypes: - description: The identifier types that are required or allowed on the bound - entity. - items: - $ref: '#/components/schemas/CustomDataModelIdentifierTypeSpecification' - nullable: true - type: array - attributeAliases: - description: "The aliases for property keys, identifier types, and fields\ - \ on the bound entity." - items: - $ref: '#/components/schemas/Alias' - nullable: true - type: array - recommendedSortBy: - description: The preferred default sorting instructions. - items: - $ref: '#/components/schemas/RecommendedSortBy' - nullable: true - type: array - required: - - description - - displayName - type: object UpsertCustomEntitiesResponse: additionalProperties: false example: diff --git a/sdk/docs/CreateCustomDataModelRequest.md b/sdk/docs/CreateCustomDataModelRequest.md new file mode 100644 index 00000000000..8c74b862a01 --- /dev/null +++ b/sdk/docs/CreateCustomDataModelRequest.md @@ -0,0 +1,24 @@ + + +# CreateCustomDataModelRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | [**ResourceId**](ResourceId.md) | | | +|**displayName** | **String** | The name of the Custom Data Model. | | +|**description** | **String** | A description for the Custom Data Model. | | +|**parentDataModel** | [**ResourceId**](ResourceId.md) | | [optional] | +|**conditions** | **String** | The conditions that the bound entity must meet to be valid. | [optional] | +|**properties** | [**List<CustomDataModelPropertySpecification>**](CustomDataModelPropertySpecification.md) | The properties that are required or allowed on the bound entity. | [optional] | +|**identifierTypes** | [**List<CustomDataModelIdentifierTypeSpecification>**](CustomDataModelIdentifierTypeSpecification.md) | The identifier types that are required or allowed on the bound entity. | [optional] | +|**attributeAliases** | [**List<Alias>**](Alias.md) | The aliases for property keys, identifier types, and fields on the bound entity. | [optional] | +|**recommendedSortBy** | [**List<RecommendedSortBy>**](RecommendedSortBy.md) | The preferred default sorting instructions. | [optional] | + + + +[Back to Model list](../README.md#documentation-for-models) • [Back to API list](../README.md#documentation-for-api-endpoints) • [Back to README](../README.md) + + diff --git a/sdk/docs/CustomDataModelsApi.md b/sdk/docs/CustomDataModelsApi.md index 4dfb6306fad..90bf6a27954 100644 --- a/sdk/docs/CustomDataModelsApi.md +++ b/sdk/docs/CustomDataModelsApi.md @@ -4,9 +4,9 @@ All URIs are relative to *https://www.lusid.com/api* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createCustomDataModel**](CustomDataModelsApi.md#createCustomDataModel) | **POST** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] CreateCustomDataModel: Create a Custom Data Model | -| [**deleteCustomDataModel**](CustomDataModelsApi.md#deleteCustomDataModel) | **DELETE** /api/datamodel/{scope}/{code} | [EXPERIMENTAL] DeleteCustomDataModel: Delete a Custom Data Model | -| [**getCustomDataModel**](CustomDataModelsApi.md#getCustomDataModel) | **GET** /api/datamodel/{scope}/{code} | [EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model | +| [**createCustomDataModel**](CustomDataModelsApi.md#createCustomDataModel) | **POST** /api/datamodel/{entityType} | [EXPERIMENTAL] CreateCustomDataModel: Create a Custom Data Model | +| [**deleteCustomDataModel**](CustomDataModelsApi.md#deleteCustomDataModel) | **DELETE** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] DeleteCustomDataModel: Delete a Custom Data Model | +| [**getCustomDataModel**](CustomDataModelsApi.md#getCustomDataModel) | **GET** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model | | [**listDataModelHierarchies**](CustomDataModelsApi.md#listDataModelHierarchies) | **GET** /api/datamodel/hierarchies | [EXPERIMENTAL] ListDataModelHierarchies: List Custom Data Model hierarchies. | | [**listSupportedEntityTypes**](CustomDataModelsApi.md#listSupportedEntityTypes) | **GET** /api/datamodel/entitytype | [EXPERIMENTAL] ListSupportedEntityTypes: List the currently supported entity types for use in Custom Data Models. | | [**updateCustomDataModel**](CustomDataModelsApi.md#updateCustomDataModel) | **PUT** /api/datamodel/{entityType}/{scope}/{code} | [EXPERIMENTAL] UpdateCustomDataModel: Update a Custom Data Model | @@ -15,7 +15,7 @@ All URIs are relative to *https://www.lusid.com/api* ## createCustomDataModel -> CustomDataModel createCustomDataModel(scope, code, entityType, upsertCustomDataModelRequest) +> CustomDataModel createCustomDataModel(entityType, createCustomDataModelRequest) [EXPERIMENTAL] CreateCustomDataModel: Create a Custom Data Model @@ -60,15 +60,13 @@ public class CustomDataModelsApiExample { // CustomDataModelsApi apiInstance = apiFactory.build(CustomDataModelsApi.class); CustomDataModelsApi apiInstance = ApiFactoryBuilder.build(fileName).build(CustomDataModelsApi.class); - String scope = "scope_example"; // String | The scope of the specified Data Model. - String code = "code_example"; // String | The code of the specified Data Model. String entityType = "entityType_example"; // String | The entity type of the Data Model. - UpsertCustomDataModelRequest upsertCustomDataModelRequest = new UpsertCustomDataModelRequest(); // UpsertCustomDataModelRequest | The request containing the details of the Data Model. + CreateCustomDataModelRequest createCustomDataModelRequest = new CreateCustomDataModelRequest(); // CreateCustomDataModelRequest | The request containing the details of the Data Model. try { // uncomment the below to set overrides at the request level - // CustomDataModel result = apiInstance.createCustomDataModel(scope, code, entityType, upsertCustomDataModelRequest).execute(opts); + // CustomDataModel result = apiInstance.createCustomDataModel(entityType, createCustomDataModelRequest).execute(opts); - CustomDataModel result = apiInstance.createCustomDataModel(scope, code, entityType, upsertCustomDataModelRequest).execute(); + CustomDataModel result = apiInstance.createCustomDataModel(entityType, createCustomDataModelRequest).execute(); System.out.println(result.toJson()); } catch (ApiException e) { System.err.println("Exception when calling CustomDataModelsApi#createCustomDataModel"); @@ -85,10 +83,8 @@ public class CustomDataModelsApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **scope** | **String**| The scope of the specified Data Model. | | -| **code** | **String**| The code of the specified Data Model. | | | **entityType** | **String**| The entity type of the Data Model. | | -| **upsertCustomDataModelRequest** | [**UpsertCustomDataModelRequest**](UpsertCustomDataModelRequest.md)| The request containing the details of the Data Model. | [optional] | +| **createCustomDataModelRequest** | [**CreateCustomDataModelRequest**](CreateCustomDataModelRequest.md)| The request containing the details of the Data Model. | [optional] | ### Return type @@ -112,7 +108,7 @@ public class CustomDataModelsApiExample { ## deleteCustomDataModel -> DeletedEntityResponse deleteCustomDataModel(scope, code) +> DeletedEntityResponse deleteCustomDataModel(entityType, scope, code) [EXPERIMENTAL] DeleteCustomDataModel: Delete a Custom Data Model @@ -157,13 +153,14 @@ public class CustomDataModelsApiExample { // CustomDataModelsApi apiInstance = apiFactory.build(CustomDataModelsApi.class); CustomDataModelsApi apiInstance = ApiFactoryBuilder.build(fileName).build(CustomDataModelsApi.class); + String entityType = "entityType_example"; // String | The entity type of the Data Model. String scope = "scope_example"; // String | The scope of the specified Data Model. String code = "code_example"; // String | The code of the specified Data Model. try { // uncomment the below to set overrides at the request level - // DeletedEntityResponse result = apiInstance.deleteCustomDataModel(scope, code).execute(opts); + // DeletedEntityResponse result = apiInstance.deleteCustomDataModel(entityType, scope, code).execute(opts); - DeletedEntityResponse result = apiInstance.deleteCustomDataModel(scope, code).execute(); + DeletedEntityResponse result = apiInstance.deleteCustomDataModel(entityType, scope, code).execute(); System.out.println(result.toJson()); } catch (ApiException e) { System.err.println("Exception when calling CustomDataModelsApi#deleteCustomDataModel"); @@ -180,6 +177,7 @@ public class CustomDataModelsApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **entityType** | **String**| The entity type of the Data Model. | | | **scope** | **String**| The scope of the specified Data Model. | | | **code** | **String**| The code of the specified Data Model. | | @@ -205,7 +203,7 @@ public class CustomDataModelsApiExample { ## getCustomDataModel -> CustomDataModel getCustomDataModel(scope, code, asAt) +> CustomDataModel getCustomDataModel(entityType, scope, code, asAt) [EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model @@ -250,14 +248,15 @@ public class CustomDataModelsApiExample { // CustomDataModelsApi apiInstance = apiFactory.build(CustomDataModelsApi.class); CustomDataModelsApi apiInstance = ApiFactoryBuilder.build(fileName).build(CustomDataModelsApi.class); + String entityType = "entityType_example"; // String | The entity type of the Data Model. String scope = "scope_example"; // String | The scope of the specified Data Model. String code = "code_example"; // String | The code of the specified Data Model. OffsetDateTime asAt = OffsetDateTime.now(); // OffsetDateTime | The asAt datetime at which to retrieve the Data Model. Defaults to return the latest version of the Data Model if not specified. try { // uncomment the below to set overrides at the request level - // CustomDataModel result = apiInstance.getCustomDataModel(scope, code, asAt).execute(opts); + // CustomDataModel result = apiInstance.getCustomDataModel(entityType, scope, code, asAt).execute(opts); - CustomDataModel result = apiInstance.getCustomDataModel(scope, code, asAt).execute(); + CustomDataModel result = apiInstance.getCustomDataModel(entityType, scope, code, asAt).execute(); System.out.println(result.toJson()); } catch (ApiException e) { System.err.println("Exception when calling CustomDataModelsApi#getCustomDataModel"); @@ -274,6 +273,7 @@ public class CustomDataModelsApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **entityType** | **String**| The entity type of the Data Model. | | | **scope** | **String**| The scope of the specified Data Model. | | | **code** | **String**| The code of the specified Data Model. | | | **asAt** | **OffsetDateTime**| The asAt datetime at which to retrieve the Data Model. Defaults to return the latest version of the Data Model if not specified. | [optional] | @@ -479,7 +479,7 @@ This endpoint does not need any parameter. ## updateCustomDataModel -> CustomDataModel updateCustomDataModel(scope, code, entityType, upsertCustomDataModelRequest) +> CustomDataModel updateCustomDataModel(entityType, scope, code, updateCustomDataModelRequest) [EXPERIMENTAL] UpdateCustomDataModel: Update a Custom Data Model @@ -524,15 +524,15 @@ public class CustomDataModelsApiExample { // CustomDataModelsApi apiInstance = apiFactory.build(CustomDataModelsApi.class); CustomDataModelsApi apiInstance = ApiFactoryBuilder.build(fileName).build(CustomDataModelsApi.class); + String entityType = "entityType_example"; // String | The entity type of the Data Model. String scope = "scope_example"; // String | The scope of the specified Data Model. String code = "code_example"; // String | The code of the specified Data Model. - String entityType = "entityType_example"; // String | The entity type of the Data Model. - UpsertCustomDataModelRequest upsertCustomDataModelRequest = new UpsertCustomDataModelRequest(); // UpsertCustomDataModelRequest | The request containing the details of the Data Model. + UpdateCustomDataModelRequest updateCustomDataModelRequest = new UpdateCustomDataModelRequest(); // UpdateCustomDataModelRequest | The request containing the details of the Data Model. try { // uncomment the below to set overrides at the request level - // CustomDataModel result = apiInstance.updateCustomDataModel(scope, code, entityType, upsertCustomDataModelRequest).execute(opts); + // CustomDataModel result = apiInstance.updateCustomDataModel(entityType, scope, code, updateCustomDataModelRequest).execute(opts); - CustomDataModel result = apiInstance.updateCustomDataModel(scope, code, entityType, upsertCustomDataModelRequest).execute(); + CustomDataModel result = apiInstance.updateCustomDataModel(entityType, scope, code, updateCustomDataModelRequest).execute(); System.out.println(result.toJson()); } catch (ApiException e) { System.err.println("Exception when calling CustomDataModelsApi#updateCustomDataModel"); @@ -549,10 +549,10 @@ public class CustomDataModelsApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **entityType** | **String**| The entity type of the Data Model. | | | **scope** | **String**| The scope of the specified Data Model. | | | **code** | **String**| The code of the specified Data Model. | | -| **entityType** | **String**| The entity type of the Data Model. | | -| **upsertCustomDataModelRequest** | [**UpsertCustomDataModelRequest**](UpsertCustomDataModelRequest.md)| The request containing the details of the Data Model. | [optional] | +| **updateCustomDataModelRequest** | [**UpdateCustomDataModelRequest**](UpdateCustomDataModelRequest.md)| The request containing the details of the Data Model. | [optional] | ### Return type diff --git a/sdk/docs/UpsertCustomDataModelRequest.md b/sdk/docs/UpdateCustomDataModelRequest.md similarity index 97% rename from sdk/docs/UpsertCustomDataModelRequest.md rename to sdk/docs/UpdateCustomDataModelRequest.md index 753687bb68e..eb76c887a80 100644 --- a/sdk/docs/UpsertCustomDataModelRequest.md +++ b/sdk/docs/UpdateCustomDataModelRequest.md @@ -1,6 +1,6 @@ -# UpsertCustomDataModelRequest +# UpdateCustomDataModelRequest ## Properties diff --git a/sdk/pom.xml b/sdk/pom.xml index 4e16699d3b3..364e63fc852 100644 --- a/sdk/pom.xml +++ b/sdk/pom.xml @@ -5,7 +5,7 @@ lusid-sdk jar lusid-sdk - 2.0.1362 + 2.0.1363 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 dd832b2759f..7c35f1f6ac6 100644 --- a/sdk/src/main/java/com/finbourne/lusid/ApiClient.java +++ b/sdk/src/main/java/com/finbourne/lusid/ApiClient.java @@ -212,7 +212,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2.0.1362/java"); + setUserAgent("OpenAPI-Generator/2.0.1363/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 143a5c6458f..765c0d6d8fc 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.1362"; + public static final String VERSION = "2.0.1363"; 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 3f6d873fe5e..9a4c6b180e8 100644 --- a/sdk/src/main/java/com/finbourne/lusid/JSON.java +++ b/sdk/src/main/java/com/finbourne/lusid/JSON.java @@ -2454,6 +2454,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.CreateClosedPeriodRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.CreateComplianceTemplateRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.CreateCorporateActionSourceRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.CreateCustomDataModelRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.CreateCustomEntityTypeRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.CreateCutLabelDefinitionRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.CreateDataMapRequest.CustomTypeAdapterFactory()); @@ -3257,6 +3258,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpdateAmortisationRuleSetDetailsRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpdateCalendarRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpdateComplianceTemplateRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpdateCustomDataModelRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpdateCustomEntityDefinitionRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpdateCustomEntityTypeRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpdateCutLabelDefinitionRequest.CustomTypeAdapterFactory()); @@ -3289,7 +3291,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpsertCorporateActionsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpsertCounterpartyAgreementRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpsertCreditSupportAnnexRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpsertCustomDataModelRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpsertCustomEntitiesResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpsertCustomEntityAccessMetadataRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.finbourne.lusid.model.UpsertDialectRequest.CustomTypeAdapterFactory()); diff --git a/sdk/src/main/java/com/finbourne/lusid/api/CustomDataModelsApi.java b/sdk/src/main/java/com/finbourne/lusid/api/CustomDataModelsApi.java index 254a8830610..f40a050acd9 100644 --- a/sdk/src/main/java/com/finbourne/lusid/api/CustomDataModelsApi.java +++ b/sdk/src/main/java/com/finbourne/lusid/api/CustomDataModelsApi.java @@ -25,6 +25,7 @@ import java.io.IOException; +import com.finbourne.lusid.model.CreateCustomDataModelRequest; import com.finbourne.lusid.model.CustomDataModel; import com.finbourne.lusid.model.DeletedEntityResponse; import com.finbourne.lusid.model.LusidProblemDetails; @@ -32,7 +33,7 @@ import java.time.OffsetDateTime; import com.finbourne.lusid.model.ResourceListOfDataModelSummary; import com.finbourne.lusid.model.ResourceListOfString; -import com.finbourne.lusid.model.UpsertCustomDataModelRequest; +import com.finbourne.lusid.model.UpdateCustomDataModelRequest; import java.lang.reflect.Type; import java.util.ArrayList; @@ -77,11 +78,11 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } - private okhttp3.Call createCustomDataModelCall(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback) throws ApiException { - return createCustomDataModelCall(scope, code, entityType, upsertCustomDataModelRequest, _callback, new ConfigurationOptions()); + private okhttp3.Call createCustomDataModelCall(String entityType, CreateCustomDataModelRequest createCustomDataModelRequest, final ApiCallback _callback) throws ApiException { + return createCustomDataModelCall(entityType, createCustomDataModelRequest, _callback, new ConfigurationOptions()); } - private okhttp3.Call createCustomDataModelCall(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call createCustomDataModelCall(String entityType, CreateCustomDataModelRequest createCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -95,12 +96,10 @@ private okhttp3.Call createCustomDataModelCall(String scope, String code, String basePath = null; } - Object localVarPostBody = upsertCustomDataModelRequest; + Object localVarPostBody = createCustomDataModelRequest; // create path and map variables - String localVarPath = "/api/datamodel/{entityType}/{scope}/{code}" - .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) - .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())) + String localVarPath = "/api/datamodel/{entityType}" .replace("{" + "entityType" + "}", localVarApiClient.escapeString(entityType.toString())); List localVarQueryParams = new ArrayList(); @@ -135,74 +134,60 @@ private okhttp3.Call createCustomDataModelCall(String scope, String code, String } @SuppressWarnings("rawtypes") - private okhttp3.Call createCustomDataModelValidateBeforeCall(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { - // verify the required parameter 'scope' is set - if (scope == null) { - throw new ApiException("Missing the required parameter 'scope' when calling createCustomDataModel(Async)"); - } - - // verify the required parameter 'code' is set - if (code == null) { - throw new ApiException("Missing the required parameter 'code' when calling createCustomDataModel(Async)"); - } - + private okhttp3.Call createCustomDataModelValidateBeforeCall(String entityType, CreateCustomDataModelRequest createCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { // verify the required parameter 'entityType' is set if (entityType == null) { throw new ApiException("Missing the required parameter 'entityType' when calling createCustomDataModel(Async)"); } - return createCustomDataModelCall(scope, code, entityType, upsertCustomDataModelRequest, _callback, opts); + return createCustomDataModelCall(entityType, createCustomDataModelRequest, _callback, opts); } - private ApiResponse createCustomDataModelWithHttpInfo(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest) throws ApiException { - okhttp3.Call localVarCall = createCustomDataModelValidateBeforeCall(scope, code, entityType, upsertCustomDataModelRequest, null, new ConfigurationOptions()); + private ApiResponse createCustomDataModelWithHttpInfo(String entityType, CreateCustomDataModelRequest createCustomDataModelRequest) throws ApiException { + okhttp3.Call localVarCall = createCustomDataModelValidateBeforeCall(entityType, createCustomDataModelRequest, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private ApiResponse createCustomDataModelWithHttpInfo(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, ConfigurationOptions opts) throws ApiException { - okhttp3.Call localVarCall = createCustomDataModelValidateBeforeCall(scope, code, entityType, upsertCustomDataModelRequest, null, opts); + private ApiResponse createCustomDataModelWithHttpInfo(String entityType, CreateCustomDataModelRequest createCustomDataModelRequest, ConfigurationOptions opts) throws ApiException { + okhttp3.Call localVarCall = createCustomDataModelValidateBeforeCall(entityType, createCustomDataModelRequest, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call createCustomDataModelAsync(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createCustomDataModelAsync(String entityType, CreateCustomDataModelRequest createCustomDataModelRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createCustomDataModelValidateBeforeCall(scope, code, entityType, upsertCustomDataModelRequest, _callback, new ConfigurationOptions()); + okhttp3.Call localVarCall = createCustomDataModelValidateBeforeCall(entityType, createCustomDataModelRequest, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - private okhttp3.Call createCustomDataModelAsync(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call createCustomDataModelAsync(String entityType, CreateCustomDataModelRequest createCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { - okhttp3.Call localVarCall = createCustomDataModelValidateBeforeCall(scope, code, entityType, upsertCustomDataModelRequest, _callback, opts); + okhttp3.Call localVarCall = createCustomDataModelValidateBeforeCall(entityType, createCustomDataModelRequest, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIcreateCustomDataModelRequest { - private final String scope; - private final String code; private final String entityType; - private UpsertCustomDataModelRequest upsertCustomDataModelRequest; + private CreateCustomDataModelRequest createCustomDataModelRequest; - private APIcreateCustomDataModelRequest(String scope, String code, String entityType) { - this.scope = scope; - this.code = code; + private APIcreateCustomDataModelRequest(String entityType) { this.entityType = entityType; } /** - * Set upsertCustomDataModelRequest - * @param upsertCustomDataModelRequest The request containing the details of the Data Model. (optional) + * Set createCustomDataModelRequest + * @param createCustomDataModelRequest The request containing the details of the Data Model. (optional) * @return APIcreateCustomDataModelRequest */ - public APIcreateCustomDataModelRequest upsertCustomDataModelRequest(UpsertCustomDataModelRequest upsertCustomDataModelRequest) { - this.upsertCustomDataModelRequest = upsertCustomDataModelRequest; + public APIcreateCustomDataModelRequest createCustomDataModelRequest(CreateCustomDataModelRequest createCustomDataModelRequest) { + this.createCustomDataModelRequest = createCustomDataModelRequest; return this; } @@ -220,7 +205,7 @@ public APIcreateCustomDataModelRequest upsertCustomDataModelRequest(UpsertCustom */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return createCustomDataModelCall(scope, code, entityType, upsertCustomDataModelRequest, _callback); + return createCustomDataModelCall(entityType, createCustomDataModelRequest, _callback); } /** @@ -236,7 +221,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public CustomDataModel execute() throws ApiException { - ApiResponse localVarResp = createCustomDataModelWithHttpInfo(scope, code, entityType, upsertCustomDataModelRequest); + ApiResponse localVarResp = createCustomDataModelWithHttpInfo(entityType, createCustomDataModelRequest); return localVarResp.getData(); } @@ -253,7 +238,7 @@ public CustomDataModel execute() throws ApiException { */ public CustomDataModel execute(ConfigurationOptions opts) throws ApiException { - ApiResponse localVarResp = createCustomDataModelWithHttpInfo(scope, code, entityType, upsertCustomDataModelRequest, opts); + ApiResponse localVarResp = createCustomDataModelWithHttpInfo(entityType, createCustomDataModelRequest, opts); return localVarResp.getData(); } @@ -270,7 +255,7 @@ public CustomDataModel execute(ConfigurationOptions opts) throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return createCustomDataModelWithHttpInfo(scope, code, entityType, upsertCustomDataModelRequest); + return createCustomDataModelWithHttpInfo(entityType, createCustomDataModelRequest); } /** @@ -286,7 +271,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException { */ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { - return createCustomDataModelWithHttpInfo(scope, code, entityType, upsertCustomDataModelRequest, opts); + return createCustomDataModelWithHttpInfo(entityType, createCustomDataModelRequest, opts); } /** @@ -303,7 +288,7 @@ public ApiResponse executeWithHttpInfo(ConfigurationOptions opt */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return createCustomDataModelAsync(scope, code, entityType, upsertCustomDataModelRequest, _callback); + return createCustomDataModelAsync(entityType, createCustomDataModelRequest, _callback); } /** @@ -320,15 +305,13 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t */ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { - return createCustomDataModelAsync(scope, code, entityType, upsertCustomDataModelRequest, _callback, opts); + return createCustomDataModelAsync(entityType, createCustomDataModelRequest, _callback, opts); } } /** * [EXPERIMENTAL] CreateCustomDataModel: Create a Custom Data Model * Creates a Custom Data Model. - * @param scope The scope of the specified Data Model. (required) - * @param code The code of the specified Data Model. (required) * @param entityType The entity type of the Data Model. (required) * @return APIcreateCustomDataModelRequest * @http.response.details @@ -339,14 +322,14 @@ public okhttp3.Call executeAsync(final ApiCallback _callback, C 0 Error response - */ - public APIcreateCustomDataModelRequest createCustomDataModel(String scope, String code, String entityType) { - return new APIcreateCustomDataModelRequest(scope, code, entityType); + public APIcreateCustomDataModelRequest createCustomDataModel(String entityType) { + return new APIcreateCustomDataModelRequest(entityType); } - private okhttp3.Call deleteCustomDataModelCall(String scope, String code, final ApiCallback _callback) throws ApiException { - return deleteCustomDataModelCall(scope, code, _callback, new ConfigurationOptions()); + private okhttp3.Call deleteCustomDataModelCall(String entityType, String scope, String code, final ApiCallback _callback) throws ApiException { + return deleteCustomDataModelCall(entityType, scope, code, _callback, new ConfigurationOptions()); } - private okhttp3.Call deleteCustomDataModelCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call deleteCustomDataModelCall(String entityType, String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -363,7 +346,8 @@ private okhttp3.Call deleteCustomDataModelCall(String scope, String code, final Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/datamodel/{scope}/{code}" + String localVarPath = "/api/datamodel/{entityType}/{scope}/{code}" + .replace("{" + "entityType" + "}", localVarApiClient.escapeString(entityType.toString())) .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); @@ -395,7 +379,12 @@ private okhttp3.Call deleteCustomDataModelCall(String scope, String code, final } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCustomDataModelValidateBeforeCall(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call deleteCustomDataModelValidateBeforeCall(String entityType, String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException("Missing the required parameter 'entityType' when calling deleteCustomDataModel(Async)"); + } + // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling deleteCustomDataModel(Async)"); @@ -406,44 +395,46 @@ private okhttp3.Call deleteCustomDataModelValidateBeforeCall(String scope, Strin throw new ApiException("Missing the required parameter 'code' when calling deleteCustomDataModel(Async)"); } - return deleteCustomDataModelCall(scope, code, _callback, opts); + return deleteCustomDataModelCall(entityType, scope, code, _callback, opts); } - private ApiResponse deleteCustomDataModelWithHttpInfo(String scope, String code) throws ApiException { - okhttp3.Call localVarCall = deleteCustomDataModelValidateBeforeCall(scope, code, null, new ConfigurationOptions()); + private ApiResponse deleteCustomDataModelWithHttpInfo(String entityType, String scope, String code) throws ApiException { + okhttp3.Call localVarCall = deleteCustomDataModelValidateBeforeCall(entityType, scope, code, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private ApiResponse deleteCustomDataModelWithHttpInfo(String scope, String code, ConfigurationOptions opts) throws ApiException { - okhttp3.Call localVarCall = deleteCustomDataModelValidateBeforeCall(scope, code, null, opts); + private ApiResponse deleteCustomDataModelWithHttpInfo(String entityType, String scope, String code, ConfigurationOptions opts) throws ApiException { + okhttp3.Call localVarCall = deleteCustomDataModelValidateBeforeCall(entityType, scope, code, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call deleteCustomDataModelAsync(String scope, String code, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteCustomDataModelAsync(String entityType, String scope, String code, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteCustomDataModelValidateBeforeCall(scope, code, _callback, new ConfigurationOptions()); + okhttp3.Call localVarCall = deleteCustomDataModelValidateBeforeCall(entityType, scope, code, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - private okhttp3.Call deleteCustomDataModelAsync(String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call deleteCustomDataModelAsync(String entityType, String scope, String code, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { - okhttp3.Call localVarCall = deleteCustomDataModelValidateBeforeCall(scope, code, _callback, opts); + okhttp3.Call localVarCall = deleteCustomDataModelValidateBeforeCall(entityType, scope, code, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteCustomDataModelRequest { + private final String entityType; private final String scope; private final String code; - private APIdeleteCustomDataModelRequest(String scope, String code) { + private APIdeleteCustomDataModelRequest(String entityType, String scope, String code) { + this.entityType = entityType; this.scope = scope; this.code = code; } @@ -462,7 +453,7 @@ private APIdeleteCustomDataModelRequest(String scope, String code) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return deleteCustomDataModelCall(scope, code, _callback); + return deleteCustomDataModelCall(entityType, scope, code, _callback); } /** @@ -478,7 +469,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public DeletedEntityResponse execute() throws ApiException { - ApiResponse localVarResp = deleteCustomDataModelWithHttpInfo(scope, code); + ApiResponse localVarResp = deleteCustomDataModelWithHttpInfo(entityType, scope, code); return localVarResp.getData(); } @@ -495,7 +486,7 @@ public DeletedEntityResponse execute() throws ApiException { */ public DeletedEntityResponse execute(ConfigurationOptions opts) throws ApiException { - ApiResponse localVarResp = deleteCustomDataModelWithHttpInfo(scope, code, opts); + ApiResponse localVarResp = deleteCustomDataModelWithHttpInfo(entityType, scope, code, opts); return localVarResp.getData(); } @@ -512,7 +503,7 @@ public DeletedEntityResponse execute(ConfigurationOptions opts) throws ApiExcept */ public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteCustomDataModelWithHttpInfo(scope, code); + return deleteCustomDataModelWithHttpInfo(entityType, scope, code); } /** @@ -528,7 +519,7 @@ public ApiResponse executeWithHttpInfo() throws ApiExcept */ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { - return deleteCustomDataModelWithHttpInfo(scope, code, opts); + return deleteCustomDataModelWithHttpInfo(entityType, scope, code, opts); } /** @@ -545,7 +536,7 @@ public ApiResponse executeWithHttpInfo(ConfigurationOptio */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return deleteCustomDataModelAsync(scope, code, _callback); + return deleteCustomDataModelAsync(entityType, scope, code, _callback); } /** @@ -562,13 +553,14 @@ public okhttp3.Call executeAsync(final ApiCallback _callb */ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { - return deleteCustomDataModelAsync(scope, code, _callback, opts); + return deleteCustomDataModelAsync(entityType, scope, code, _callback, opts); } } /** * [EXPERIMENTAL] DeleteCustomDataModel: Delete a Custom Data Model * Delete a Custom Data Model. The data model will remain viewable at previous as at times, but will no longer be part of any hierarchies. + * @param entityType The entity type of the Data Model. (required) * @param scope The scope of the specified Data Model. (required) * @param code The code of the specified Data Model. (required) * @return APIdeleteCustomDataModelRequest @@ -580,14 +572,14 @@ public okhttp3.Call executeAsync(final ApiCallback _callb 0 Error response - */ - public APIdeleteCustomDataModelRequest deleteCustomDataModel(String scope, String code) { - return new APIdeleteCustomDataModelRequest(scope, code); + public APIdeleteCustomDataModelRequest deleteCustomDataModel(String entityType, String scope, String code) { + return new APIdeleteCustomDataModelRequest(entityType, scope, code); } - private okhttp3.Call getCustomDataModelCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { - return getCustomDataModelCall(scope, code, asAt, _callback, new ConfigurationOptions()); + private okhttp3.Call getCustomDataModelCall(String entityType, String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { + return getCustomDataModelCall(entityType, scope, code, asAt, _callback, new ConfigurationOptions()); } - private okhttp3.Call getCustomDataModelCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call getCustomDataModelCall(String entityType, String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -604,7 +596,8 @@ private okhttp3.Call getCustomDataModelCall(String scope, String code, OffsetDat Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/datamodel/{scope}/{code}" + String localVarPath = "/api/datamodel/{entityType}/{scope}/{code}" + .replace("{" + "entityType" + "}", localVarApiClient.escapeString(entityType.toString())) .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); @@ -640,7 +633,12 @@ private okhttp3.Call getCustomDataModelCall(String scope, String code, OffsetDat } @SuppressWarnings("rawtypes") - private okhttp3.Call getCustomDataModelValidateBeforeCall(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call getCustomDataModelValidateBeforeCall(String entityType, String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException("Missing the required parameter 'entityType' when calling getCustomDataModel(Async)"); + } + // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling getCustomDataModel(Async)"); @@ -651,45 +649,47 @@ private okhttp3.Call getCustomDataModelValidateBeforeCall(String scope, String c throw new ApiException("Missing the required parameter 'code' when calling getCustomDataModel(Async)"); } - return getCustomDataModelCall(scope, code, asAt, _callback, opts); + return getCustomDataModelCall(entityType, scope, code, asAt, _callback, opts); } - private ApiResponse getCustomDataModelWithHttpInfo(String scope, String code, OffsetDateTime asAt) throws ApiException { - okhttp3.Call localVarCall = getCustomDataModelValidateBeforeCall(scope, code, asAt, null, new ConfigurationOptions()); + private ApiResponse getCustomDataModelWithHttpInfo(String entityType, String scope, String code, OffsetDateTime asAt) throws ApiException { + okhttp3.Call localVarCall = getCustomDataModelValidateBeforeCall(entityType, scope, code, asAt, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private ApiResponse getCustomDataModelWithHttpInfo(String scope, String code, OffsetDateTime asAt, ConfigurationOptions opts) throws ApiException { - okhttp3.Call localVarCall = getCustomDataModelValidateBeforeCall(scope, code, asAt, null, opts); + private ApiResponse getCustomDataModelWithHttpInfo(String entityType, String scope, String code, OffsetDateTime asAt, ConfigurationOptions opts) throws ApiException { + okhttp3.Call localVarCall = getCustomDataModelValidateBeforeCall(entityType, scope, code, asAt, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call getCustomDataModelAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCustomDataModelAsync(String entityType, String scope, String code, OffsetDateTime asAt, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCustomDataModelValidateBeforeCall(scope, code, asAt, _callback, new ConfigurationOptions()); + okhttp3.Call localVarCall = getCustomDataModelValidateBeforeCall(entityType, scope, code, asAt, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - private okhttp3.Call getCustomDataModelAsync(String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call getCustomDataModelAsync(String entityType, String scope, String code, OffsetDateTime asAt, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { - okhttp3.Call localVarCall = getCustomDataModelValidateBeforeCall(scope, code, asAt, _callback, opts); + okhttp3.Call localVarCall = getCustomDataModelValidateBeforeCall(entityType, scope, code, asAt, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetCustomDataModelRequest { + private final String entityType; private final String scope; private final String code; private OffsetDateTime asAt; - private APIgetCustomDataModelRequest(String scope, String code) { + private APIgetCustomDataModelRequest(String entityType, String scope, String code) { + this.entityType = entityType; this.scope = scope; this.code = code; } @@ -718,7 +718,7 @@ public APIgetCustomDataModelRequest asAt(OffsetDateTime asAt) { */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return getCustomDataModelCall(scope, code, asAt, _callback); + return getCustomDataModelCall(entityType, scope, code, asAt, _callback); } /** @@ -734,7 +734,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public CustomDataModel execute() throws ApiException { - ApiResponse localVarResp = getCustomDataModelWithHttpInfo(scope, code, asAt); + ApiResponse localVarResp = getCustomDataModelWithHttpInfo(entityType, scope, code, asAt); return localVarResp.getData(); } @@ -751,7 +751,7 @@ public CustomDataModel execute() throws ApiException { */ public CustomDataModel execute(ConfigurationOptions opts) throws ApiException { - ApiResponse localVarResp = getCustomDataModelWithHttpInfo(scope, code, asAt, opts); + ApiResponse localVarResp = getCustomDataModelWithHttpInfo(entityType, scope, code, asAt, opts); return localVarResp.getData(); } @@ -768,7 +768,7 @@ public CustomDataModel execute(ConfigurationOptions opts) throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return getCustomDataModelWithHttpInfo(scope, code, asAt); + return getCustomDataModelWithHttpInfo(entityType, scope, code, asAt); } /** @@ -784,7 +784,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException { */ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { - return getCustomDataModelWithHttpInfo(scope, code, asAt, opts); + return getCustomDataModelWithHttpInfo(entityType, scope, code, asAt, opts); } /** @@ -801,7 +801,7 @@ public ApiResponse executeWithHttpInfo(ConfigurationOptions opt */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return getCustomDataModelAsync(scope, code, asAt, _callback); + return getCustomDataModelAsync(entityType, scope, code, asAt, _callback); } /** @@ -818,13 +818,14 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t */ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { - return getCustomDataModelAsync(scope, code, asAt, _callback, opts); + return getCustomDataModelAsync(entityType, scope, code, asAt, _callback, opts); } } /** * [EXPERIMENTAL] GetCustomDataModel: Get a Custom Data Model * Retrieves a Custom Data Model at a given as at time. + * @param entityType The entity type of the Data Model. (required) * @param scope The scope of the specified Data Model. (required) * @param code The code of the specified Data Model. (required) * @return APIgetCustomDataModelRequest @@ -836,8 +837,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback, C 0 Error response - */ - public APIgetCustomDataModelRequest getCustomDataModel(String scope, String code) { - return new APIgetCustomDataModelRequest(scope, code); + public APIgetCustomDataModelRequest getCustomDataModel(String entityType, String scope, String code) { + return new APIgetCustomDataModelRequest(entityType, scope, code); } private okhttp3.Call listDataModelHierarchiesCall(OffsetDateTime asAt, String filter, final ApiCallback _callback) throws ApiException { return listDataModelHierarchiesCall(asAt, filter, _callback, new ConfigurationOptions()); @@ -1307,11 +1308,11 @@ public okhttp3.Call executeAsync(final ApiCallback _callba public APIlistSupportedEntityTypesRequest listSupportedEntityTypes() { return new APIlistSupportedEntityTypesRequest(); } - private okhttp3.Call updateCustomDataModelCall(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback) throws ApiException { - return updateCustomDataModelCall(scope, code, entityType, upsertCustomDataModelRequest, _callback, new ConfigurationOptions()); + private okhttp3.Call updateCustomDataModelCall(String entityType, String scope, String code, UpdateCustomDataModelRequest updateCustomDataModelRequest, final ApiCallback _callback) throws ApiException { + return updateCustomDataModelCall(entityType, scope, code, updateCustomDataModelRequest, _callback, new ConfigurationOptions()); } - private okhttp3.Call updateCustomDataModelCall(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call updateCustomDataModelCall(String entityType, String scope, String code, UpdateCustomDataModelRequest updateCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1325,13 +1326,13 @@ private okhttp3.Call updateCustomDataModelCall(String scope, String code, String basePath = null; } - Object localVarPostBody = upsertCustomDataModelRequest; + Object localVarPostBody = updateCustomDataModelRequest; // create path and map variables String localVarPath = "/api/datamodel/{entityType}/{scope}/{code}" + .replace("{" + "entityType" + "}", localVarApiClient.escapeString(entityType.toString())) .replace("{" + "scope" + "}", localVarApiClient.escapeString(scope.toString())) - .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())) - .replace("{" + "entityType" + "}", localVarApiClient.escapeString(entityType.toString())); + .replace("{" + "code" + "}", localVarApiClient.escapeString(code.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1365,7 +1366,12 @@ private okhttp3.Call updateCustomDataModelCall(String scope, String code, String } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCustomDataModelValidateBeforeCall(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call updateCustomDataModelValidateBeforeCall(String entityType, String scope, String code, UpdateCustomDataModelRequest updateCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + // verify the required parameter 'entityType' is set + if (entityType == null) { + throw new ApiException("Missing the required parameter 'entityType' when calling updateCustomDataModel(Async)"); + } + // verify the required parameter 'scope' is set if (scope == null) { throw new ApiException("Missing the required parameter 'scope' when calling updateCustomDataModel(Async)"); @@ -1376,63 +1382,58 @@ private okhttp3.Call updateCustomDataModelValidateBeforeCall(String scope, Strin throw new ApiException("Missing the required parameter 'code' when calling updateCustomDataModel(Async)"); } - // verify the required parameter 'entityType' is set - if (entityType == null) { - throw new ApiException("Missing the required parameter 'entityType' when calling updateCustomDataModel(Async)"); - } - - return updateCustomDataModelCall(scope, code, entityType, upsertCustomDataModelRequest, _callback, opts); + return updateCustomDataModelCall(entityType, scope, code, updateCustomDataModelRequest, _callback, opts); } - private ApiResponse updateCustomDataModelWithHttpInfo(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest) throws ApiException { - okhttp3.Call localVarCall = updateCustomDataModelValidateBeforeCall(scope, code, entityType, upsertCustomDataModelRequest, null, new ConfigurationOptions()); + private ApiResponse updateCustomDataModelWithHttpInfo(String entityType, String scope, String code, UpdateCustomDataModelRequest updateCustomDataModelRequest) throws ApiException { + okhttp3.Call localVarCall = updateCustomDataModelValidateBeforeCall(entityType, scope, code, updateCustomDataModelRequest, null, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private ApiResponse updateCustomDataModelWithHttpInfo(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, ConfigurationOptions opts) throws ApiException { - okhttp3.Call localVarCall = updateCustomDataModelValidateBeforeCall(scope, code, entityType, upsertCustomDataModelRequest, null, opts); + private ApiResponse updateCustomDataModelWithHttpInfo(String entityType, String scope, String code, UpdateCustomDataModelRequest updateCustomDataModelRequest, ConfigurationOptions opts) throws ApiException { + okhttp3.Call localVarCall = updateCustomDataModelValidateBeforeCall(entityType, scope, code, updateCustomDataModelRequest, null, opts); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } - private okhttp3.Call updateCustomDataModelAsync(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCustomDataModelAsync(String entityType, String scope, String code, UpdateCustomDataModelRequest updateCustomDataModelRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateCustomDataModelValidateBeforeCall(scope, code, entityType, upsertCustomDataModelRequest, _callback, new ConfigurationOptions()); + okhttp3.Call localVarCall = updateCustomDataModelValidateBeforeCall(entityType, scope, code, updateCustomDataModelRequest, _callback, new ConfigurationOptions()); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - private okhttp3.Call updateCustomDataModelAsync(String scope, String code, String entityType, UpsertCustomDataModelRequest upsertCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { + private okhttp3.Call updateCustomDataModelAsync(String entityType, String scope, String code, UpdateCustomDataModelRequest updateCustomDataModelRequest, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { - okhttp3.Call localVarCall = updateCustomDataModelValidateBeforeCall(scope, code, entityType, upsertCustomDataModelRequest, _callback, opts); + okhttp3.Call localVarCall = updateCustomDataModelValidateBeforeCall(entityType, scope, code, updateCustomDataModelRequest, _callback, opts); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIupdateCustomDataModelRequest { + private final String entityType; private final String scope; private final String code; - private final String entityType; - private UpsertCustomDataModelRequest upsertCustomDataModelRequest; + private UpdateCustomDataModelRequest updateCustomDataModelRequest; - private APIupdateCustomDataModelRequest(String scope, String code, String entityType) { + private APIupdateCustomDataModelRequest(String entityType, String scope, String code) { + this.entityType = entityType; this.scope = scope; this.code = code; - this.entityType = entityType; } /** - * Set upsertCustomDataModelRequest - * @param upsertCustomDataModelRequest The request containing the details of the Data Model. (optional) + * Set updateCustomDataModelRequest + * @param updateCustomDataModelRequest The request containing the details of the Data Model. (optional) * @return APIupdateCustomDataModelRequest */ - public APIupdateCustomDataModelRequest upsertCustomDataModelRequest(UpsertCustomDataModelRequest upsertCustomDataModelRequest) { - this.upsertCustomDataModelRequest = upsertCustomDataModelRequest; + public APIupdateCustomDataModelRequest updateCustomDataModelRequest(UpdateCustomDataModelRequest updateCustomDataModelRequest) { + this.updateCustomDataModelRequest = updateCustomDataModelRequest; return this; } @@ -1450,7 +1451,7 @@ public APIupdateCustomDataModelRequest upsertCustomDataModelRequest(UpsertCustom */ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { - return updateCustomDataModelCall(scope, code, entityType, upsertCustomDataModelRequest, _callback); + return updateCustomDataModelCall(entityType, scope, code, updateCustomDataModelRequest, _callback); } /** @@ -1466,7 +1467,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { */ public CustomDataModel execute() throws ApiException { - ApiResponse localVarResp = updateCustomDataModelWithHttpInfo(scope, code, entityType, upsertCustomDataModelRequest); + ApiResponse localVarResp = updateCustomDataModelWithHttpInfo(entityType, scope, code, updateCustomDataModelRequest); return localVarResp.getData(); } @@ -1483,7 +1484,7 @@ public CustomDataModel execute() throws ApiException { */ public CustomDataModel execute(ConfigurationOptions opts) throws ApiException { - ApiResponse localVarResp = updateCustomDataModelWithHttpInfo(scope, code, entityType, upsertCustomDataModelRequest, opts); + ApiResponse localVarResp = updateCustomDataModelWithHttpInfo(entityType, scope, code, updateCustomDataModelRequest, opts); return localVarResp.getData(); } @@ -1500,7 +1501,7 @@ public CustomDataModel execute(ConfigurationOptions opts) throws ApiException { */ public ApiResponse executeWithHttpInfo() throws ApiException { - return updateCustomDataModelWithHttpInfo(scope, code, entityType, upsertCustomDataModelRequest); + return updateCustomDataModelWithHttpInfo(entityType, scope, code, updateCustomDataModelRequest); } /** @@ -1516,7 +1517,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException { */ public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException { - return updateCustomDataModelWithHttpInfo(scope, code, entityType, upsertCustomDataModelRequest, opts); + return updateCustomDataModelWithHttpInfo(entityType, scope, code, updateCustomDataModelRequest, opts); } /** @@ -1533,7 +1534,7 @@ public ApiResponse executeWithHttpInfo(ConfigurationOptions opt */ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { - return updateCustomDataModelAsync(scope, code, entityType, upsertCustomDataModelRequest, _callback); + return updateCustomDataModelAsync(entityType, scope, code, updateCustomDataModelRequest, _callback); } /** @@ -1550,16 +1551,16 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) t */ public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException { - return updateCustomDataModelAsync(scope, code, entityType, upsertCustomDataModelRequest, _callback, opts); + return updateCustomDataModelAsync(entityType, scope, code, updateCustomDataModelRequest, _callback, opts); } } /** * [EXPERIMENTAL] UpdateCustomDataModel: Update a Custom Data Model * Updates a Custom Data Model. + * @param entityType The entity type of the Data Model. (required) * @param scope The scope of the specified Data Model. (required) * @param code The code of the specified Data Model. (required) - * @param entityType The entity type of the Data Model. (required) * @return APIupdateCustomDataModelRequest * @http.response.details @@ -1569,7 +1570,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback, C
0 Error response -
*/ - public APIupdateCustomDataModelRequest updateCustomDataModel(String scope, String code, String entityType) { - return new APIupdateCustomDataModelRequest(scope, code, entityType); + public APIupdateCustomDataModelRequest updateCustomDataModel(String entityType, String scope, String code) { + return new APIupdateCustomDataModelRequest(entityType, scope, code); } } diff --git a/sdk/src/main/java/com/finbourne/lusid/model/CreateCustomDataModelRequest.java b/sdk/src/main/java/com/finbourne/lusid/model/CreateCustomDataModelRequest.java new file mode 100644 index 00000000000..ac6b99e49a8 --- /dev/null +++ b/sdk/src/main/java/com/finbourne/lusid/model/CreateCustomDataModelRequest.java @@ -0,0 +1,550 @@ +/* + * 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.Alias; +import com.finbourne.lusid.model.CustomDataModelIdentifierTypeSpecification; +import com.finbourne.lusid.model.CustomDataModelPropertySpecification; +import com.finbourne.lusid.model.RecommendedSortBy; +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.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; + +/** + * CreateCustomDataModelRequest + */ +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCustomDataModelRequest { + 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_PARENT_DATA_MODEL = "parentDataModel"; + @SerializedName(SERIALIZED_NAME_PARENT_DATA_MODEL) + private ResourceId parentDataModel; + + public static final String SERIALIZED_NAME_CONDITIONS = "conditions"; + @SerializedName(SERIALIZED_NAME_CONDITIONS) + private String conditions; + + public static final String SERIALIZED_NAME_PROPERTIES = "properties"; + @SerializedName(SERIALIZED_NAME_PROPERTIES) + private List properties; + + public static final String SERIALIZED_NAME_IDENTIFIER_TYPES = "identifierTypes"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER_TYPES) + private List identifierTypes; + + public static final String SERIALIZED_NAME_ATTRIBUTE_ALIASES = "attributeAliases"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTE_ALIASES) + private List attributeAliases; + + public static final String SERIALIZED_NAME_RECOMMENDED_SORT_BY = "recommendedSortBy"; + @SerializedName(SERIALIZED_NAME_RECOMMENDED_SORT_BY) + private List recommendedSortBy; + + public CreateCustomDataModelRequest() { + } + + public CreateCustomDataModelRequest 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 CreateCustomDataModelRequest displayName(String displayName) { + + this.displayName = displayName; + return this; + } + + /** + * The name of the Custom Data Model. + * @return displayName + **/ + @jakarta.annotation.Nonnull + public String getDisplayName() { + return displayName; + } + + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + + public CreateCustomDataModelRequest description(String description) { + + this.description = description; + return this; + } + + /** + * A description for the Custom Data Model. + * @return description + **/ + @jakarta.annotation.Nonnull + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public CreateCustomDataModelRequest parentDataModel(ResourceId parentDataModel) { + + this.parentDataModel = parentDataModel; + return this; + } + + /** + * Get parentDataModel + * @return parentDataModel + **/ + @jakarta.annotation.Nullable + public ResourceId getParentDataModel() { + return parentDataModel; + } + + + public void setParentDataModel(ResourceId parentDataModel) { + this.parentDataModel = parentDataModel; + } + + + public CreateCustomDataModelRequest conditions(String conditions) { + + this.conditions = conditions; + return this; + } + + /** + * The conditions that the bound entity must meet to be valid. + * @return conditions + **/ + @jakarta.annotation.Nullable + public String getConditions() { + return conditions; + } + + + public void setConditions(String conditions) { + this.conditions = conditions; + } + + + public CreateCustomDataModelRequest properties(List properties) { + + this.properties = properties; + return this; + } + + public CreateCustomDataModelRequest addPropertiesItem(CustomDataModelPropertySpecification propertiesItem) { + if (this.properties == null) { + this.properties = new ArrayList<>(); + } + this.properties.add(propertiesItem); + return this; + } + + /** + * The properties that are required or allowed on the bound entity. + * @return properties + **/ + @jakarta.annotation.Nullable + public List getProperties() { + return properties; + } + + + public void setProperties(List properties) { + this.properties = properties; + } + + + public CreateCustomDataModelRequest identifierTypes(List identifierTypes) { + + this.identifierTypes = identifierTypes; + return this; + } + + public CreateCustomDataModelRequest addIdentifierTypesItem(CustomDataModelIdentifierTypeSpecification identifierTypesItem) { + if (this.identifierTypes == null) { + this.identifierTypes = new ArrayList<>(); + } + this.identifierTypes.add(identifierTypesItem); + return this; + } + + /** + * The identifier types that are required or allowed on the bound entity. + * @return identifierTypes + **/ + @jakarta.annotation.Nullable + public List getIdentifierTypes() { + return identifierTypes; + } + + + public void setIdentifierTypes(List identifierTypes) { + this.identifierTypes = identifierTypes; + } + + + public CreateCustomDataModelRequest attributeAliases(List attributeAliases) { + + this.attributeAliases = attributeAliases; + return this; + } + + public CreateCustomDataModelRequest addAttributeAliasesItem(Alias attributeAliasesItem) { + if (this.attributeAliases == null) { + this.attributeAliases = new ArrayList<>(); + } + this.attributeAliases.add(attributeAliasesItem); + return this; + } + + /** + * The aliases for property keys, identifier types, and fields on the bound entity. + * @return attributeAliases + **/ + @jakarta.annotation.Nullable + public List getAttributeAliases() { + return attributeAliases; + } + + + public void setAttributeAliases(List attributeAliases) { + this.attributeAliases = attributeAliases; + } + + + public CreateCustomDataModelRequest recommendedSortBy(List recommendedSortBy) { + + this.recommendedSortBy = recommendedSortBy; + return this; + } + + public CreateCustomDataModelRequest addRecommendedSortByItem(RecommendedSortBy recommendedSortByItem) { + if (this.recommendedSortBy == null) { + this.recommendedSortBy = new ArrayList<>(); + } + this.recommendedSortBy.add(recommendedSortByItem); + return this; + } + + /** + * The preferred default sorting instructions. + * @return recommendedSortBy + **/ + @jakarta.annotation.Nullable + public List getRecommendedSortBy() { + return recommendedSortBy; + } + + + public void setRecommendedSortBy(List recommendedSortBy) { + this.recommendedSortBy = recommendedSortBy; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCustomDataModelRequest createCustomDataModelRequest = (CreateCustomDataModelRequest) o; + return Objects.equals(this.id, createCustomDataModelRequest.id) && + Objects.equals(this.displayName, createCustomDataModelRequest.displayName) && + Objects.equals(this.description, createCustomDataModelRequest.description) && + Objects.equals(this.parentDataModel, createCustomDataModelRequest.parentDataModel) && + Objects.equals(this.conditions, createCustomDataModelRequest.conditions) && + Objects.equals(this.properties, createCustomDataModelRequest.properties) && + Objects.equals(this.identifierTypes, createCustomDataModelRequest.identifierTypes) && + Objects.equals(this.attributeAliases, createCustomDataModelRequest.attributeAliases) && + Objects.equals(this.recommendedSortBy, createCustomDataModelRequest.recommendedSortBy); + } + + 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(id, displayName, description, parentDataModel, conditions, properties, identifierTypes, attributeAliases, recommendedSortBy); + } + + 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 CreateCustomDataModelRequest {\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(" parentDataModel: ").append(toIndentedString(parentDataModel)).append("\n"); + sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append(" identifierTypes: ").append(toIndentedString(identifierTypes)).append("\n"); + sb.append(" attributeAliases: ").append(toIndentedString(attributeAliases)).append("\n"); + sb.append(" recommendedSortBy: ").append(toIndentedString(recommendedSortBy)).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("id"); + openapiFields.add("displayName"); + openapiFields.add("description"); + openapiFields.add("parentDataModel"); + openapiFields.add("conditions"); + openapiFields.add("properties"); + openapiFields.add("identifierTypes"); + openapiFields.add("attributeAliases"); + openapiFields.add("recommendedSortBy"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("displayName"); + openapiRequiredFields.add("description"); + } + + /** + * 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 CreateCustomDataModelRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateCustomDataModelRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCustomDataModelRequest is not found in the empty JSON string", CreateCustomDataModelRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCustomDataModelRequest.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(); + // validate the required field `id` + ResourceId.validateJsonElement(jsonObj.get("id")); + if (!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").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 optional field `parentDataModel` + if (jsonObj.get("parentDataModel") != null && !jsonObj.get("parentDataModel").isJsonNull()) { + ResourceId.validateJsonElement(jsonObj.get("parentDataModel")); + } + if ((jsonObj.get("conditions") != null && !jsonObj.get("conditions").isJsonNull()) && !jsonObj.get("conditions").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `conditions` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conditions").toString())); + } + if (jsonObj.get("properties") != null && !jsonObj.get("properties").isJsonNull()) { + JsonArray jsonArrayproperties = jsonObj.getAsJsonArray("properties"); + if (jsonArrayproperties != null) { + // ensure the json data is an array + if (!jsonObj.get("properties").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `properties` to be an array in the JSON string but got `%s`", jsonObj.get("properties").toString())); + } + + // validate the optional field `properties` (array) + for (int i = 0; i < jsonArrayproperties.size(); i++) { + CustomDataModelPropertySpecification.validateJsonElement(jsonArrayproperties.get(i)); + }; + } + } + if (jsonObj.get("identifierTypes") != null && !jsonObj.get("identifierTypes").isJsonNull()) { + JsonArray jsonArrayidentifierTypes = jsonObj.getAsJsonArray("identifierTypes"); + if (jsonArrayidentifierTypes != null) { + // ensure the json data is an array + if (!jsonObj.get("identifierTypes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `identifierTypes` to be an array in the JSON string but got `%s`", jsonObj.get("identifierTypes").toString())); + } + + // validate the optional field `identifierTypes` (array) + for (int i = 0; i < jsonArrayidentifierTypes.size(); i++) { + CustomDataModelIdentifierTypeSpecification.validateJsonElement(jsonArrayidentifierTypes.get(i)); + }; + } + } + if (jsonObj.get("attributeAliases") != null && !jsonObj.get("attributeAliases").isJsonNull()) { + JsonArray jsonArrayattributeAliases = jsonObj.getAsJsonArray("attributeAliases"); + if (jsonArrayattributeAliases != null) { + // ensure the json data is an array + if (!jsonObj.get("attributeAliases").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `attributeAliases` to be an array in the JSON string but got `%s`", jsonObj.get("attributeAliases").toString())); + } + + // validate the optional field `attributeAliases` (array) + for (int i = 0; i < jsonArrayattributeAliases.size(); i++) { + Alias.validateJsonElement(jsonArrayattributeAliases.get(i)); + }; + } + } + if (jsonObj.get("recommendedSortBy") != null && !jsonObj.get("recommendedSortBy").isJsonNull()) { + JsonArray jsonArrayrecommendedSortBy = jsonObj.getAsJsonArray("recommendedSortBy"); + if (jsonArrayrecommendedSortBy != null) { + // ensure the json data is an array + if (!jsonObj.get("recommendedSortBy").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `recommendedSortBy` to be an array in the JSON string but got `%s`", jsonObj.get("recommendedSortBy").toString())); + } + + // validate the optional field `recommendedSortBy` (array) + for (int i = 0; i < jsonArrayrecommendedSortBy.size(); i++) { + RecommendedSortBy.validateJsonElement(jsonArrayrecommendedSortBy.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCustomDataModelRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCustomDataModelRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCustomDataModelRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCustomDataModelRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateCustomDataModelRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCustomDataModelRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCustomDataModelRequest + * @throws IOException if the JSON string is invalid with respect to CreateCustomDataModelRequest + */ + public static CreateCustomDataModelRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCustomDataModelRequest.class); + } + + /** + * Convert an instance of CreateCustomDataModelRequest 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/UpsertCustomDataModelRequest.java b/sdk/src/main/java/com/finbourne/lusid/model/UpdateCustomDataModelRequest.java similarity index 86% rename from sdk/src/main/java/com/finbourne/lusid/model/UpsertCustomDataModelRequest.java rename to sdk/src/main/java/com/finbourne/lusid/model/UpdateCustomDataModelRequest.java index 309a00c2f9b..43faa4bdc55 100644 --- a/sdk/src/main/java/com/finbourne/lusid/model/UpsertCustomDataModelRequest.java +++ b/sdk/src/main/java/com/finbourne/lusid/model/UpdateCustomDataModelRequest.java @@ -53,10 +53,10 @@ import com.finbourne.lusid.JSON; /** - * UpsertCustomDataModelRequest + * UpdateCustomDataModelRequest */ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UpsertCustomDataModelRequest { +public class UpdateCustomDataModelRequest { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) private String displayName; @@ -89,10 +89,10 @@ public class UpsertCustomDataModelRequest { @SerializedName(SERIALIZED_NAME_RECOMMENDED_SORT_BY) private List recommendedSortBy; - public UpsertCustomDataModelRequest() { + public UpdateCustomDataModelRequest() { } - public UpsertCustomDataModelRequest displayName(String displayName) { + public UpdateCustomDataModelRequest displayName(String displayName) { this.displayName = displayName; return this; @@ -113,7 +113,7 @@ public void setDisplayName(String displayName) { } - public UpsertCustomDataModelRequest description(String description) { + public UpdateCustomDataModelRequest description(String description) { this.description = description; return this; @@ -134,7 +134,7 @@ public void setDescription(String description) { } - public UpsertCustomDataModelRequest parentDataModel(ResourceId parentDataModel) { + public UpdateCustomDataModelRequest parentDataModel(ResourceId parentDataModel) { this.parentDataModel = parentDataModel; return this; @@ -155,7 +155,7 @@ public void setParentDataModel(ResourceId parentDataModel) { } - public UpsertCustomDataModelRequest conditions(String conditions) { + public UpdateCustomDataModelRequest conditions(String conditions) { this.conditions = conditions; return this; @@ -176,13 +176,13 @@ public void setConditions(String conditions) { } - public UpsertCustomDataModelRequest properties(List properties) { + public UpdateCustomDataModelRequest properties(List properties) { this.properties = properties; return this; } - public UpsertCustomDataModelRequest addPropertiesItem(CustomDataModelPropertySpecification propertiesItem) { + public UpdateCustomDataModelRequest addPropertiesItem(CustomDataModelPropertySpecification propertiesItem) { if (this.properties == null) { this.properties = new ArrayList<>(); } @@ -205,13 +205,13 @@ public void setProperties(List properties) } - public UpsertCustomDataModelRequest identifierTypes(List identifierTypes) { + public UpdateCustomDataModelRequest identifierTypes(List identifierTypes) { this.identifierTypes = identifierTypes; return this; } - public UpsertCustomDataModelRequest addIdentifierTypesItem(CustomDataModelIdentifierTypeSpecification identifierTypesItem) { + public UpdateCustomDataModelRequest addIdentifierTypesItem(CustomDataModelIdentifierTypeSpecification identifierTypesItem) { if (this.identifierTypes == null) { this.identifierTypes = new ArrayList<>(); } @@ -234,13 +234,13 @@ public void setIdentifierTypes(List } - public UpsertCustomDataModelRequest attributeAliases(List attributeAliases) { + public UpdateCustomDataModelRequest attributeAliases(List attributeAliases) { this.attributeAliases = attributeAliases; return this; } - public UpsertCustomDataModelRequest addAttributeAliasesItem(Alias attributeAliasesItem) { + public UpdateCustomDataModelRequest addAttributeAliasesItem(Alias attributeAliasesItem) { if (this.attributeAliases == null) { this.attributeAliases = new ArrayList<>(); } @@ -263,13 +263,13 @@ public void setAttributeAliases(List attributeAliases) { } - public UpsertCustomDataModelRequest recommendedSortBy(List recommendedSortBy) { + public UpdateCustomDataModelRequest recommendedSortBy(List recommendedSortBy) { this.recommendedSortBy = recommendedSortBy; return this; } - public UpsertCustomDataModelRequest addRecommendedSortByItem(RecommendedSortBy recommendedSortByItem) { + public UpdateCustomDataModelRequest addRecommendedSortByItem(RecommendedSortBy recommendedSortByItem) { if (this.recommendedSortBy == null) { this.recommendedSortBy = new ArrayList<>(); } @@ -301,15 +301,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UpsertCustomDataModelRequest upsertCustomDataModelRequest = (UpsertCustomDataModelRequest) o; - return Objects.equals(this.displayName, upsertCustomDataModelRequest.displayName) && - Objects.equals(this.description, upsertCustomDataModelRequest.description) && - Objects.equals(this.parentDataModel, upsertCustomDataModelRequest.parentDataModel) && - Objects.equals(this.conditions, upsertCustomDataModelRequest.conditions) && - Objects.equals(this.properties, upsertCustomDataModelRequest.properties) && - Objects.equals(this.identifierTypes, upsertCustomDataModelRequest.identifierTypes) && - Objects.equals(this.attributeAliases, upsertCustomDataModelRequest.attributeAliases) && - Objects.equals(this.recommendedSortBy, upsertCustomDataModelRequest.recommendedSortBy); + UpdateCustomDataModelRequest updateCustomDataModelRequest = (UpdateCustomDataModelRequest) o; + return Objects.equals(this.displayName, updateCustomDataModelRequest.displayName) && + Objects.equals(this.description, updateCustomDataModelRequest.description) && + Objects.equals(this.parentDataModel, updateCustomDataModelRequest.parentDataModel) && + Objects.equals(this.conditions, updateCustomDataModelRequest.conditions) && + Objects.equals(this.properties, updateCustomDataModelRequest.properties) && + Objects.equals(this.identifierTypes, updateCustomDataModelRequest.identifierTypes) && + Objects.equals(this.attributeAliases, updateCustomDataModelRequest.attributeAliases) && + Objects.equals(this.recommendedSortBy, updateCustomDataModelRequest.recommendedSortBy); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -331,7 +331,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class UpsertCustomDataModelRequest {\n"); + sb.append("class UpdateCustomDataModelRequest {\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" parentDataModel: ").append(toIndentedString(parentDataModel)).append("\n"); @@ -381,17 +381,17 @@ private String toIndentedString(Object o) { * 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 UpsertCustomDataModelRequest + * @throws IOException if the JSON Element is invalid with respect to UpdateCustomDataModelRequest */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!UpsertCustomDataModelRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpsertCustomDataModelRequest is not found in the empty JSON string", UpsertCustomDataModelRequest.openapiRequiredFields.toString())); + if (!UpdateCustomDataModelRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCustomDataModelRequest is not found in the empty JSON string", UpdateCustomDataModelRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : UpsertCustomDataModelRequest.openapiRequiredFields) { + for (String requiredField : UpdateCustomDataModelRequest.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())); } @@ -472,22 +472,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!UpsertCustomDataModelRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'UpsertCustomDataModelRequest' and its subtypes + if (!UpdateCustomDataModelRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCustomDataModelRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(UpsertCustomDataModelRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateCustomDataModelRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, UpsertCustomDataModelRequest value) throws IOException { + public void write(JsonWriter out, UpdateCustomDataModelRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public UpsertCustomDataModelRequest read(JsonReader in) throws IOException { + public UpdateCustomDataModelRequest read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); return thisAdapter.fromJsonTree(jsonElement); @@ -498,18 +498,18 @@ public UpsertCustomDataModelRequest read(JsonReader in) throws IOException { } /** - * Create an instance of UpsertCustomDataModelRequest given an JSON string + * Create an instance of UpdateCustomDataModelRequest given an JSON string * * @param jsonString JSON string - * @return An instance of UpsertCustomDataModelRequest - * @throws IOException if the JSON string is invalid with respect to UpsertCustomDataModelRequest + * @return An instance of UpdateCustomDataModelRequest + * @throws IOException if the JSON string is invalid with respect to UpdateCustomDataModelRequest */ - public static UpsertCustomDataModelRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, UpsertCustomDataModelRequest.class); + public static UpdateCustomDataModelRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCustomDataModelRequest.class); } /** - * Convert an instance of UpsertCustomDataModelRequest to an JSON string + * Convert an instance of UpdateCustomDataModelRequest to an JSON string * * @return JSON string */