From 75fc6172dc3bfcb22b5ce9d986540474f5e5e39f Mon Sep 17 00:00:00 2001 From: Jessica Date: Mon, 14 Mar 2022 16:08:24 +1100 Subject: [PATCH] add support for TrackEvent, Experiment, Banners (#5) - new accountId param added to QueryCollection and SendEvent requests --- .openapi-generator/FILES | 43 +- .openapi-generator/VERSION | 2 +- Com.Sajari.Sdk.sln | 10 +- README.md | 14 +- docs/ActivePromotion.md | 2 +- docs/Banner.md | 20 + docs/Collection.md | 2 +- docs/CollectionsApi.md | 206 +++++- docs/Event.md | 16 + docs/EventsApi.md | 16 +- docs/ExperimentRequest.md | 14 + docs/ExperimentRequestPipeline.md | 12 + docs/ExperimentResponse.md | 10 + docs/GeneratePipelinesRequest.md | 4 +- docs/GetDefaultVersionRequestView.md | 2 +- docs/GetPipelineRequestView.md | 2 +- docs/ListPipelinesRequestView.md | 2 +- docs/ListPromotionsRequestPromotionView.md | 10 + docs/PipelinesApi.md | 48 +- docs/Promotion.md | 1 + docs/PromotionPin.md | 1 + docs/PromotionPinMode.md | 10 + docs/PromotionsApi.md | 28 +- docs/QueryCollectionRequestTracking.md | 8 +- docs/QueryCollectionRequestTrackingType.md | 2 +- docs/QueryCollectionResponse.md | 2 + docs/QueryResult.md | 2 + docs/RecordsApi.md | 18 +- docs/RedirectResult.md | 2 +- docs/RedirectsApi.md | 22 +- docs/SchemaApi.md | 12 +- docs/TextPosition.md | 10 + generate/generate.sh | 2 +- .../Com.Sajari.Sdk.Test.csproj | 2 +- src/Com.Sajari.Sdk.Test/Model/BannerTests.cs | 143 ++++ src/Com.Sajari.Sdk.Test/Model/EventTests.cs | 111 +++ .../Model/ExperimentRequestPipelineTests.cs | 79 +++ .../Model/ExperimentRequestTests.cs | 95 +++ .../Model/ExperimentResponseTests.cs | 71 ++ ...ListPromotionsRequestPromotionViewTests.cs | 63 ++ .../Model/PromotionPinModeTests.cs | 63 ++ .../Model/TextPositionTests.cs | 63 ++ src/Com.Sajari.Sdk/Api/CollectionsApi.cs | 636 +++++++++++++++--- src/Com.Sajari.Sdk/Api/EventsApi.cs | 82 ++- src/Com.Sajari.Sdk/Api/PipelinesApi.cs | 96 +-- src/Com.Sajari.Sdk/Api/PromotionsApi.cs | 72 +- src/Com.Sajari.Sdk/Api/RecordsApi.cs | 72 +- src/Com.Sajari.Sdk/Api/RedirectsApi.cs | 36 +- src/Com.Sajari.Sdk/Api/SchemaApi.cs | 44 +- src/Com.Sajari.Sdk/Client/ApiClient.cs | 15 +- src/Com.Sajari.Sdk/Client/Configuration.cs | 6 +- .../Client/GlobalConfiguration.cs | 2 +- src/Com.Sajari.Sdk/Client/RequestOptions.cs | 4 +- .../Client/RetryConfiguration.cs | 13 +- src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj | 4 +- src/Com.Sajari.Sdk/Model/ActivePromotion.cs | 2 +- src/Com.Sajari.Sdk/Model/Banner.cs | 284 ++++++++ src/Com.Sajari.Sdk/Model/Collection.cs | 6 +- src/Com.Sajari.Sdk/Model/Event.cs | 239 +++++++ src/Com.Sajari.Sdk/Model/ExperimentRequest.cs | 196 ++++++ .../Model/ExperimentRequestPipeline.cs | 158 +++++ .../Model/ExperimentResponse.cs | 129 ++++ .../Model/GeneratePipelinesRequest.cs | 12 +- .../Model/GetDefaultVersionRequestView.cs | 4 +- .../Model/GetPipelineRequestView.cs | 4 +- .../Model/ListPipelinesRequestView.cs | 4 +- .../ListPromotionsRequestPromotionView.cs | 56 ++ src/Com.Sajari.Sdk/Model/Promotion.cs | 22 +- src/Com.Sajari.Sdk/Model/PromotionPin.cs | 16 +- src/Com.Sajari.Sdk/Model/PromotionPinMode.cs | 50 ++ .../Model/QueryCollectionRequestTracking.cs | 24 +- .../QueryCollectionRequestTrackingType.cs | 12 +- .../Model/QueryCollectionResponse.cs | 41 +- src/Com.Sajari.Sdk/Model/QueryResult.cs | 35 +- src/Com.Sajari.Sdk/Model/RedirectResult.cs | 2 +- src/Com.Sajari.Sdk/Model/TextPosition.cs | 74 ++ 76 files changed, 3243 insertions(+), 454 deletions(-) create mode 100644 docs/Banner.md create mode 100644 docs/Event.md create mode 100644 docs/ExperimentRequest.md create mode 100644 docs/ExperimentRequestPipeline.md create mode 100644 docs/ExperimentResponse.md create mode 100644 docs/ListPromotionsRequestPromotionView.md create mode 100644 docs/PromotionPinMode.md create mode 100644 docs/TextPosition.md create mode 100644 src/Com.Sajari.Sdk.Test/Model/BannerTests.cs create mode 100644 src/Com.Sajari.Sdk.Test/Model/EventTests.cs create mode 100644 src/Com.Sajari.Sdk.Test/Model/ExperimentRequestPipelineTests.cs create mode 100644 src/Com.Sajari.Sdk.Test/Model/ExperimentRequestTests.cs create mode 100644 src/Com.Sajari.Sdk.Test/Model/ExperimentResponseTests.cs create mode 100644 src/Com.Sajari.Sdk.Test/Model/ListPromotionsRequestPromotionViewTests.cs create mode 100644 src/Com.Sajari.Sdk.Test/Model/PromotionPinModeTests.cs create mode 100644 src/Com.Sajari.Sdk.Test/Model/TextPositionTests.cs create mode 100644 src/Com.Sajari.Sdk/Model/Banner.cs create mode 100644 src/Com.Sajari.Sdk/Model/Event.cs create mode 100644 src/Com.Sajari.Sdk/Model/ExperimentRequest.cs create mode 100644 src/Com.Sajari.Sdk/Model/ExperimentRequestPipeline.cs create mode 100644 src/Com.Sajari.Sdk/Model/ExperimentResponse.cs create mode 100644 src/Com.Sajari.Sdk/Model/ListPromotionsRequestPromotionView.cs create mode 100644 src/Com.Sajari.Sdk/Model/PromotionPinMode.cs create mode 100644 src/Com.Sajari.Sdk/Model/TextPosition.cs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e306bdb..c7f5182 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,6 +3,7 @@ Com.Sajari.Sdk.sln README.md appveyor.yml docs/ActivePromotion.md +docs/Banner.md docs/BatchCreateSchemaFieldsRequest.md docs/BatchCreateSchemaFieldsResponse.md docs/BatchCreateSchemaFieldsResponseError.md @@ -20,7 +21,11 @@ docs/Collection.md docs/CollectionsApi.md docs/DeleteRecordRequest.md docs/Error.md +docs/Event.md docs/EventsApi.md +docs/ExperimentRequest.md +docs/ExperimentRequestPipeline.md +docs/ExperimentResponse.md docs/GeneratePipelinesRequest.md docs/GeneratePipelinesResponse.md docs/GetDefaultPipelineResponse.md @@ -30,6 +35,7 @@ docs/GetRecordRequest.md docs/ListCollectionsResponse.md docs/ListPipelinesRequestView.md docs/ListPipelinesResponse.md +docs/ListPromotionsRequestPromotionView.md docs/ListPromotionsResponse.md docs/ListRedirectsResponse.md docs/ListSchemaFieldsResponse.md @@ -45,6 +51,7 @@ docs/PromotionExclusion.md docs/PromotionFilterBoost.md docs/PromotionFilterCondition.md docs/PromotionPin.md +docs/PromotionPinMode.md docs/PromotionRangeBoost.md docs/PromotionsApi.md docs/ProtobufAny.md @@ -81,30 +88,20 @@ docs/SendEventRequest.md docs/SetDefaultPipelineRequest.md docs/SetDefaultVersionRequest.md docs/Status.md +docs/TextPosition.md docs/UpdateRecordRequest.md docs/UpsertRecordRequest.md docs/UpsertRecordRequestPipeline.md docs/UpsertRecordResponse.md -src/Com.Sajari.Sdk.Test/Api/PromotionsApiTests.cs -src/Com.Sajari.Sdk.Test/Api/RedirectsApiTests.cs src/Com.Sajari.Sdk.Test/Com.Sajari.Sdk.Test.csproj -src/Com.Sajari.Sdk.Test/Model/ActivePromotionTests.cs -src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsRequestTests.cs -src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseErrorTests.cs -src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseRecordTests.cs -src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseTests.cs -src/Com.Sajari.Sdk.Test/Model/ListPromotionsResponseTests.cs -src/Com.Sajari.Sdk.Test/Model/ListRedirectsResponseTests.cs -src/Com.Sajari.Sdk.Test/Model/PromotionCategoryTests.cs -src/Com.Sajari.Sdk.Test/Model/PromotionExclusionTests.cs -src/Com.Sajari.Sdk.Test/Model/PromotionFilterBoostTests.cs -src/Com.Sajari.Sdk.Test/Model/PromotionFilterConditionTests.cs -src/Com.Sajari.Sdk.Test/Model/PromotionPinTests.cs -src/Com.Sajari.Sdk.Test/Model/PromotionRangeBoostTests.cs -src/Com.Sajari.Sdk.Test/Model/PromotionTests.cs -src/Com.Sajari.Sdk.Test/Model/ProtobufFieldMaskTests.cs -src/Com.Sajari.Sdk.Test/Model/RedirectResultTests.cs -src/Com.Sajari.Sdk.Test/Model/RedirectTests.cs +src/Com.Sajari.Sdk.Test/Model/BannerTests.cs +src/Com.Sajari.Sdk.Test/Model/EventTests.cs +src/Com.Sajari.Sdk.Test/Model/ExperimentRequestPipelineTests.cs +src/Com.Sajari.Sdk.Test/Model/ExperimentRequestTests.cs +src/Com.Sajari.Sdk.Test/Model/ExperimentResponseTests.cs +src/Com.Sajari.Sdk.Test/Model/ListPromotionsRequestPromotionViewTests.cs +src/Com.Sajari.Sdk.Test/Model/PromotionPinModeTests.cs +src/Com.Sajari.Sdk.Test/Model/TextPositionTests.cs src/Com.Sajari.Sdk/Api/CollectionsApi.cs src/Com.Sajari.Sdk/Api/EventsApi.cs src/Com.Sajari.Sdk/Api/PipelinesApi.cs @@ -131,6 +128,7 @@ src/Com.Sajari.Sdk/Client/RetryConfiguration.cs src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj src/Com.Sajari.Sdk/Model/AbstractOpenAPISchema.cs src/Com.Sajari.Sdk/Model/ActivePromotion.cs +src/Com.Sajari.Sdk/Model/Banner.cs src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsRequest.cs src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponse.cs src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponseError.cs @@ -147,6 +145,10 @@ src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseVariables.cs src/Com.Sajari.Sdk/Model/Collection.cs src/Com.Sajari.Sdk/Model/DeleteRecordRequest.cs src/Com.Sajari.Sdk/Model/Error.cs +src/Com.Sajari.Sdk/Model/Event.cs +src/Com.Sajari.Sdk/Model/ExperimentRequest.cs +src/Com.Sajari.Sdk/Model/ExperimentRequestPipeline.cs +src/Com.Sajari.Sdk/Model/ExperimentResponse.cs src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs src/Com.Sajari.Sdk/Model/GeneratePipelinesResponse.cs src/Com.Sajari.Sdk/Model/GetDefaultPipelineResponse.cs @@ -156,6 +158,7 @@ src/Com.Sajari.Sdk/Model/GetRecordRequest.cs src/Com.Sajari.Sdk/Model/ListCollectionsResponse.cs src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs src/Com.Sajari.Sdk/Model/ListPipelinesResponse.cs +src/Com.Sajari.Sdk/Model/ListPromotionsRequestPromotionView.cs src/Com.Sajari.Sdk/Model/ListPromotionsResponse.cs src/Com.Sajari.Sdk/Model/ListRedirectsResponse.cs src/Com.Sajari.Sdk/Model/ListSchemaFieldsResponse.cs @@ -170,6 +173,7 @@ src/Com.Sajari.Sdk/Model/PromotionExclusion.cs src/Com.Sajari.Sdk/Model/PromotionFilterBoost.cs src/Com.Sajari.Sdk/Model/PromotionFilterCondition.cs src/Com.Sajari.Sdk/Model/PromotionPin.cs +src/Com.Sajari.Sdk/Model/PromotionPinMode.cs src/Com.Sajari.Sdk/Model/PromotionRangeBoost.cs src/Com.Sajari.Sdk/Model/ProtobufAny.cs src/Com.Sajari.Sdk/Model/ProtobufFieldMask.cs @@ -202,6 +206,7 @@ src/Com.Sajari.Sdk/Model/SendEventRequest.cs src/Com.Sajari.Sdk/Model/SetDefaultPipelineRequest.cs src/Com.Sajari.Sdk/Model/SetDefaultVersionRequest.cs src/Com.Sajari.Sdk/Model/Status.cs +src/Com.Sajari.Sdk/Model/TextPosition.cs src/Com.Sajari.Sdk/Model/UpdateRecordRequest.cs src/Com.Sajari.Sdk/Model/UpsertRecordRequest.cs src/Com.Sajari.Sdk/Model/UpsertRecordRequestPipeline.cs diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 7d3cdbf..1e20ec3 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.1 \ No newline at end of file +5.4.0 \ No newline at end of file diff --git a/Com.Sajari.Sdk.sln b/Com.Sajari.Sdk.sln index 5d54a86..801832a 100644 --- a/Com.Sajari.Sdk.sln +++ b/Com.Sajari.Sdk.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Com.Sajari.Sdk", "src\Com.Sajari.Sdk\Com.Sajari.Sdk.csproj", "{F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Com.Sajari.Sdk", "src\Com.Sajari.Sdk\Com.Sajari.Sdk.csproj", "{AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Com.Sajari.Sdk.Test", "src\Com.Sajari.Sdk.Test\Com.Sajari.Sdk.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}.Release|Any CPU.Build.0 = Release|Any CPU + {AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AB2FC7D6-7D1E-495D-B4ED-C2CC60E8488D}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/README.md b/README.md index 0bb1ab3..ae383d7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Search.io offers a search and discovery service with Neuralsearch®, the world's This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v4 -- SDK version: 4.3.0 +- SDK version: 5.0.0 - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit [https://www.search.io/company/contact](https://www.search.io/company/contact) @@ -79,7 +79,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new CollectionsApi(config); - var collectionId = collectionId_example; // string | The ID to use for the collection. This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\-]*$`. + var collectionId = "collectionId_example"; // string | The ID to use for the collection. This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\-]*$`. var collection = new Collection(); // Collection | Details of the collection to create. try @@ -109,10 +109,12 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *CollectionsApi* | [**CreateCollection**](docs/CollectionsApi.md#createcollection) | **POST** /v4/collections | Create collection *CollectionsApi* | [**DeleteCollection**](docs/CollectionsApi.md#deletecollection) | **DELETE** /v4/collections/{collection_id} | Delete collection +*CollectionsApi* | [**Experiment**](docs/CollectionsApi.md#experiment) | **POST** /v4/collections/{collection_id}:experiment | Experiment *CollectionsApi* | [**GetCollection**](docs/CollectionsApi.md#getcollection) | **GET** /v4/collections/{collection_id} | Get collection *CollectionsApi* | [**ListCollections**](docs/CollectionsApi.md#listcollections) | **GET** /v4/collections | List collections *CollectionsApi* | [**QueryCollection**](docs/CollectionsApi.md#querycollection) | **POST** /v4/collections/{collection_id}:query | Query collection *CollectionsApi* | [**QueryCollection2**](docs/CollectionsApi.md#querycollection2) | **POST** /v4/collections/{collection_id}:queryCollection | Query collection +*CollectionsApi* | [**TrackEvent**](docs/CollectionsApi.md#trackevent) | **POST** /v4/collections/{collection_id}:trackEvent | Track event *CollectionsApi* | [**UpdateCollection**](docs/CollectionsApi.md#updatecollection) | **PATCH** /v4/collections/{collection_id} | Update collection *EventsApi* | [**SendEvent**](docs/EventsApi.md#sendevent) | **POST** /v4/events:send | Send event *EventsApi* | [**SendEvent2**](docs/EventsApi.md#sendevent2) | **POST** /v4/events:sendEvent | Send event @@ -149,6 +151,7 @@ Class | Method | HTTP request | Description ## Documentation for Models - [Model.ActivePromotion](docs/ActivePromotion.md) + - [Model.Banner](docs/Banner.md) - [Model.BatchCreateSchemaFieldsRequest](docs/BatchCreateSchemaFieldsRequest.md) - [Model.BatchCreateSchemaFieldsResponse](docs/BatchCreateSchemaFieldsResponse.md) - [Model.BatchCreateSchemaFieldsResponseError](docs/BatchCreateSchemaFieldsResponseError.md) @@ -165,6 +168,10 @@ Class | Method | HTTP request | Description - [Model.Collection](docs/Collection.md) - [Model.DeleteRecordRequest](docs/DeleteRecordRequest.md) - [Model.Error](docs/Error.md) + - [Model.Event](docs/Event.md) + - [Model.ExperimentRequest](docs/ExperimentRequest.md) + - [Model.ExperimentRequestPipeline](docs/ExperimentRequestPipeline.md) + - [Model.ExperimentResponse](docs/ExperimentResponse.md) - [Model.GeneratePipelinesRequest](docs/GeneratePipelinesRequest.md) - [Model.GeneratePipelinesResponse](docs/GeneratePipelinesResponse.md) - [Model.GetDefaultPipelineResponse](docs/GetDefaultPipelineResponse.md) @@ -174,6 +181,7 @@ Class | Method | HTTP request | Description - [Model.ListCollectionsResponse](docs/ListCollectionsResponse.md) - [Model.ListPipelinesRequestView](docs/ListPipelinesRequestView.md) - [Model.ListPipelinesResponse](docs/ListPipelinesResponse.md) + - [Model.ListPromotionsRequestPromotionView](docs/ListPromotionsRequestPromotionView.md) - [Model.ListPromotionsResponse](docs/ListPromotionsResponse.md) - [Model.ListRedirectsResponse](docs/ListRedirectsResponse.md) - [Model.ListSchemaFieldsResponse](docs/ListSchemaFieldsResponse.md) @@ -188,6 +196,7 @@ Class | Method | HTTP request | Description - [Model.PromotionFilterBoost](docs/PromotionFilterBoost.md) - [Model.PromotionFilterCondition](docs/PromotionFilterCondition.md) - [Model.PromotionPin](docs/PromotionPin.md) + - [Model.PromotionPinMode](docs/PromotionPinMode.md) - [Model.PromotionRangeBoost](docs/PromotionRangeBoost.md) - [Model.ProtobufAny](docs/ProtobufAny.md) - [Model.ProtobufFieldMask](docs/ProtobufFieldMask.md) @@ -220,6 +229,7 @@ Class | Method | HTTP request | Description - [Model.SetDefaultPipelineRequest](docs/SetDefaultPipelineRequest.md) - [Model.SetDefaultVersionRequest](docs/SetDefaultVersionRequest.md) - [Model.Status](docs/Status.md) + - [Model.TextPosition](docs/TextPosition.md) - [Model.UpdateRecordRequest](docs/UpdateRecordRequest.md) - [Model.UpsertRecordRequest](docs/UpsertRecordRequest.md) - [Model.UpsertRecordRequestPipeline](docs/UpsertRecordRequestPipeline.md) diff --git a/docs/ActivePromotion.md b/docs/ActivePromotion.md index ad4f7cc..f0c2057 100644 --- a/docs/ActivePromotion.md +++ b/docs/ActivePromotion.md @@ -1,5 +1,5 @@ # Com.Sajari.Sdk.Model.ActivePromotion -ActivePromotion is a promotion that is active for a given search. +A promotion that is active for a given search. ## Properties diff --git a/docs/Banner.md b/docs/Banner.md new file mode 100644 index 0000000..8eefc02 --- /dev/null +++ b/docs/Banner.md @@ -0,0 +1,20 @@ +# Com.Sajari.Sdk.Model.Banner +A synthetic search result that renders as an image. It takes a user to a pre-determined location when clicked. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | The description of the banner, displayed in sub-head font. | [optional] +**Height** | **int** | The height the banner occupies in grid cells. | [optional] +**Id** | **string** | The ID of the banner, used to identify clicked banners. | [optional] +**ImageUrl** | **string** | The URL of the image used for the banner. | [optional] +**Position** | **int** | The 1-based index indicating where the banner appears in search results. | [optional] +**TargetUrl** | **string** | The URL to redirect the user to when the banner is clicked. | [optional] +**TextColor** | **string** | The color of the text as a hex code with a # prefix, e.g. #FFCC00 or #FC0. | [optional] +**TextPosition** | **TextPosition** | | [optional] +**Title** | **string** | The title of the banner, displayed in header font. | [optional] +**Width** | **int** | The width the banner occupies in grid cells. | [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/docs/Collection.md b/docs/Collection.md index fa2cf8f..01e6bc3 100644 --- a/docs/Collection.md +++ b/docs/Collection.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AccountId** | **string** | Output only. The ID of the account that owns this collection. | [optional] [readonly] -**AuthorizedQueryDomains** | **List<string>** | The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request. | [optional] +**AuthorizedQueryDomains** | **List<string>** | The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/docs/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request. | [optional] **CreateTime** | **DateTime** | Output only. Time the collection was created. | [optional] [readonly] **DisplayName** | **string** | The collection's display name. You can change this at any time. | **Id** | **string** | Output only. The collection's ID. | [optional] [readonly] diff --git a/docs/CollectionsApi.md b/docs/CollectionsApi.md index 237dc2a..342c846 100644 --- a/docs/CollectionsApi.md +++ b/docs/CollectionsApi.md @@ -6,10 +6,12 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**CreateCollection**](CollectionsApi.md#createcollection) | **POST** /v4/collections | Create collection [**DeleteCollection**](CollectionsApi.md#deletecollection) | **DELETE** /v4/collections/{collection_id} | Delete collection +[**Experiment**](CollectionsApi.md#experiment) | **POST** /v4/collections/{collection_id}:experiment | Experiment [**GetCollection**](CollectionsApi.md#getcollection) | **GET** /v4/collections/{collection_id} | Get collection [**ListCollections**](CollectionsApi.md#listcollections) | **GET** /v4/collections | List collections [**QueryCollection**](CollectionsApi.md#querycollection) | **POST** /v4/collections/{collection_id}:query | Query collection [**QueryCollection2**](CollectionsApi.md#querycollection2) | **POST** /v4/collections/{collection_id}:queryCollection | Query collection +[**TrackEvent**](CollectionsApi.md#trackevent) | **POST** /v4/collections/{collection_id}:trackEvent | Track event [**UpdateCollection**](CollectionsApi.md#updatecollection) | **PATCH** /v4/collections/{collection_id} | Update collection @@ -42,7 +44,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new CollectionsApi(config); - var collectionId = collectionId_example; // string | The ID to use for the collection. This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\-]*$`. + var collectionId = "collectionId_example"; // string | The ID to use for the collection. This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\-]*$`. var collection = new Collection(); // Collection | Details of the collection to create. try @@ -126,7 +128,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new CollectionsApi(config); - var collectionId = collectionId_example; // string | The collection to delete, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to delete, e.g. `my-collection`. try { @@ -177,6 +179,88 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **Experiment** +> ExperimentResponse Experiment (string collectionId, ExperimentRequest experimentRequest) + +Experiment + +Run a query on a collection with a hypothetical configuration to see what kinds of results it produces. Saved promotions with a start date in the future are enabled during the experiment, unless they are explicitly disabled. The following example demonstrates how to run a simple experiment for a string, against a pipeline and with a proposed promotion: ```json { \"pipeline\": { \"name\": \"my-pipeline\" }, \"variables\": { \"q\": \"search terms\" }, \"promotions\": [{ \"id\": \"1234\", \"condition\": \"q = 'search terms'\", \"pins\": [{ \"key\": { \"field\": \"id\", \"value\": \"54hdc7h2334h\" }, \"position\": 1 }] }] } ``` + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Client; +using Com.Sajari.Sdk.Model; + +namespace Example +{ + public class ExperimentExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.search.io"; + // Configure HTTP basic authorization: BasicAuth + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; + + var apiInstance = new CollectionsApi(config); + var collectionId = "collectionId_example"; // string | The collection to query, e.g. `my-collection`. + var experimentRequest = new ExperimentRequest(); // ExperimentRequest | + + try + { + // Experiment + ExperimentResponse result = apiInstance.Experiment(collectionId, experimentRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling CollectionsApi.Experiment: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection to query, e.g. `my-collection`. | + **experimentRequest** | [**ExperimentRequest**](ExperimentRequest.md)| | + +### Return type + +[**ExperimentResponse**](ExperimentResponse.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A successful response. | - | +| **401** | Returned when the request does not have valid authentication credentials. | - | +| **403** | Returned when the user does not have permission to access the resource. | - | +| **404** | Returned when the resource does not exist. | - | +| **500** | Returned when the API encounters an internal error. | - | +| **0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **GetCollection** > Collection GetCollection (string collectionId) @@ -206,7 +290,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new CollectionsApi(config); - var collectionId = collectionId_example; // string | The collection to retrieve, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to retrieve, e.g. `my-collection`. try { @@ -287,7 +371,7 @@ namespace Example var apiInstance = new CollectionsApi(config); var pageSize = 56; // int? | The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. (optional) - var pageToken = pageToken_example; // string | A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. (optional) + var pageToken = "pageToken_example"; // string | A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. (optional) try { @@ -311,7 +395,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **pageSize** | **int?**| The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. | [optional] - **pageToken** | **string**| A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. | [optional] + **pageToken** | **string**| A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. | [optional] ### Return type @@ -341,11 +425,11 @@ Name | Type | Description | Notes # **QueryCollection** -> QueryCollectionResponse QueryCollection (string collectionId, QueryCollectionRequest queryCollectionRequest) +> QueryCollectionResponse QueryCollection (string collectionId, QueryCollectionRequest queryCollectionRequest, string accountId = null) Query collection -Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) +Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. ### Example ```csharp @@ -368,13 +452,14 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new CollectionsApi(config); - var collectionId = collectionId_example; // string | The collection to query, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to query, e.g. `my-collection`. var queryCollectionRequest = new QueryCollectionRequest(); // QueryCollectionRequest | + var accountId = "accountId_example"; // string | The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. (optional) try { // Query collection - QueryCollectionResponse result = apiInstance.QueryCollection(collectionId, queryCollectionRequest); + QueryCollectionResponse result = apiInstance.QueryCollection(collectionId, queryCollectionRequest, accountId); Debug.WriteLine(result); } catch (ApiException e) @@ -394,6 +479,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collectionId** | **string**| The collection to query, e.g. `my-collection`. | **queryCollectionRequest** | [**QueryCollectionRequest**](QueryCollectionRequest.md)| | + **accountId** | **string**| The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. | [optional] ### Return type @@ -427,7 +513,7 @@ Name | Type | Description | Notes Query collection -Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) +Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. ### Example ```csharp @@ -450,7 +536,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new CollectionsApi(config); - var collectionId = collectionId_example; // string | The collection to query, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to query, e.g. `my-collection`. var queryCollectionRequest = new QueryCollectionRequest(); // QueryCollectionRequest | try @@ -491,6 +577,90 @@ Name | Type | Description | Notes - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A successful response. | - | +| **401** | Returned when the request does not have valid authentication credentials. | - | +| **403** | Returned when the user does not have permission to access the resource. | - | +| **404** | Returned when the resource does not exist. | - | +| **500** | Returned when the API encounters an internal error. | - | +| **0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TrackEvent** +> Object TrackEvent (string accountId, string collectionId, Event _event) + +Track event + +Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Client; +using Com.Sajari.Sdk.Model; + +namespace Example +{ + public class TrackEventExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.search.io"; + // Configure HTTP basic authorization: BasicAuth + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; + + var apiInstance = new CollectionsApi(config); + var accountId = "accountId_example"; // string | The account that owns the collection, e.g. `1618535966441231024`. + var collectionId = "collectionId_example"; // string | The collection to track the event against, e.g. `my-collection`. + var _event = new Event(); // Event | The details of the event to track. + + try + { + // Track event + Object result = apiInstance.TrackEvent(accountId, collectionId, _event); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling CollectionsApi.TrackEvent: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **string**| The account that owns the collection, e.g. `1618535966441231024`. | + **collectionId** | **string**| The collection to track the event against, e.g. `my-collection`. | + **_event** | [**Event**](Event.md)| The details of the event to track. | + +### Return type + +**Object** + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| @@ -505,7 +675,7 @@ Name | Type | Description | Notes # **UpdateCollection** -> Collection UpdateCollection (string collectionId, string updateMask, Collection collection) +> Collection UpdateCollection (string collectionId, Collection collection, string updateMask = null) Update collection @@ -532,14 +702,14 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new CollectionsApi(config); - var collectionId = collectionId_example; // string | The collection to update, e.g. `my-collection`. - var updateMask = updateMask_example; // string | The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. - var collection = new Collection(); // Collection | Details of the collection to update. + var collectionId = "collectionId_example"; // string | The collection to update, e.g. `my-collection`. + var collection = new Collection(); // Collection | The details of the collection to update. + var updateMask = "updateMask_example"; // string | The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. (optional) try { // Update collection - Collection result = apiInstance.UpdateCollection(collectionId, updateMask, collection); + Collection result = apiInstance.UpdateCollection(collectionId, collection, updateMask); Debug.WriteLine(result); } catch (ApiException e) @@ -558,8 +728,8 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collectionId** | **string**| The collection to update, e.g. `my-collection`. | - **updateMask** | **string**| The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. | - **collection** | [**Collection**](Collection.md)| Details of the collection to update. | + **collection** | [**Collection**](Collection.md)| The details of the collection to update. | + **updateMask** | **string**| The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. | [optional] ### Return type diff --git a/docs/Event.md b/docs/Event.md new file mode 100644 index 0000000..394638b --- /dev/null +++ b/docs/Event.md @@ -0,0 +1,16 @@ +# Com.Sajari.Sdk.Model.Event +An analytics event that relates to a query made on a collection. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BannerId** | **string** | The identifier of the promotion banner the event is about. | [optional] +**Metadata** | **Dictionary<string, Object>** | An object made up of field-value pairs that contains additional metadata to record with the event. | [optional] +**QueryId** | **string** | The query identifier. | +**RedirectId** | **string** | The identifier of the redirect the event is about. | [optional] +**ResultId** | **string** | The identifier of the result the event is about. | [optional] +**Type** | **string** | The type of event, e.g. `click`, `purchase`, `add_to_cart`. | + +[[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/docs/EventsApi.md b/docs/EventsApi.md index c1ab470..1e48bc4 100644 --- a/docs/EventsApi.md +++ b/docs/EventsApi.md @@ -10,11 +10,11 @@ Method | HTTP request | Description # **SendEvent** -> Object SendEvent (SendEventRequest sendEventRequest) +> Object SendEvent (string accountId, SendEventRequest sendEventRequest) Send event -Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` +Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. ### Example ```csharp @@ -36,16 +36,14 @@ namespace Example config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; - Dictionary accountIdHeader = new Dictionary {{"Account-Id", "YOUR_ACCOUNT_ID"}}; - config.DefaultHeaders = accountIdHeader; - var apiInstance = new EventsApi(config); + var accountId = "accountId_example"; // string | The account that owns the collection, e.g. `1618535966441231024`. var sendEventRequest = new SendEventRequest(); // SendEventRequest | try { // Send event - Object result = apiInstance.SendEvent(sendEventRequest); + Object result = apiInstance.SendEvent(accountId, sendEventRequest); Debug.WriteLine(result); } catch (ApiException e) @@ -63,6 +61,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **accountId** | **string**| The account that owns the collection, e.g. `1618535966441231024`. | **sendEventRequest** | [**SendEventRequest**](SendEventRequest.md)| | ### Return type @@ -98,7 +97,7 @@ Name | Type | Description | Notes Send event -Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` +Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. ### Example ```csharp @@ -119,9 +118,6 @@ namespace Example // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; - - Dictionary accountIdHeader = new Dictionary {{"Account-Id", "YOUR_ACCOUNT_ID"}}; - config.DefaultHeaders = accountIdHeader; var apiInstance = new EventsApi(config); var sendEventRequest = new SendEventRequest(); // SendEventRequest | diff --git a/docs/ExperimentRequest.md b/docs/ExperimentRequest.md new file mode 100644 index 0000000..55548f7 --- /dev/null +++ b/docs/ExperimentRequest.md @@ -0,0 +1,14 @@ +# Com.Sajari.Sdk.Model.ExperimentRequest +A request to perform a query experiment on a collection using a pipeline. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomPipeline** | [**Pipeline**](Pipeline.md) | | [optional] +**Pipeline** | [**ExperimentRequestPipeline**](ExperimentRequestPipeline.md) | | [optional] +**Promotions** | [**List<Promotion>**](Promotion.md) | The promotions to consider active when running the search. Provided promotions override existing promotions with the same ID. | [optional] +**Variables** | **Dictionary<string, Object>** | The initial values for the variables the pipeline operates on and transforms throughout its steps. The most important variable is `q` which is the query the user entered, for example: ```json { \"q\": \"search terms\" } ``` To paginate through results, set the variables `page` and `resultsPerPage`, for example: ```json { \"q\": \"search terms\", \"page\": 5, \"resultsPerPage\": 20 } ``` To sort results, set the variable `sort` to the name of one of your collection's schema fields, for example: ```json { \"q\": \"search terms\", \"sort\": \"name\" } ``` To sort in reverse, prefix the schema field with a minus sign `-`, for example: ```json { \"q\": \"search terms\", \"sort\": \"-name\" } ``` | + +[[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/docs/ExperimentRequestPipeline.md b/docs/ExperimentRequestPipeline.md new file mode 100644 index 0000000..84b6698 --- /dev/null +++ b/docs/ExperimentRequestPipeline.md @@ -0,0 +1,12 @@ +# Com.Sajari.Sdk.Model.ExperimentRequestPipeline +The pipeline to use when running the experiment. If not provided the default query pipeline is used. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The query pipeline's name, e.g. `my-pipeline`. | +**_Version** | **string** | The query pipeline's version, e.g. `42`. If not provided the default version is used. | [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/docs/ExperimentResponse.md b/docs/ExperimentResponse.md new file mode 100644 index 0000000..0ebac4b --- /dev/null +++ b/docs/ExperimentResponse.md @@ -0,0 +1,10 @@ +# Com.Sajari.Sdk.Model.ExperimentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**QueryResponse** | [**QueryCollectionResponse**](QueryCollectionResponse.md) | | [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/docs/GeneratePipelinesRequest.md b/docs/GeneratePipelinesRequest.md index c4f43c8..4d93cd1 100644 --- a/docs/GeneratePipelinesRequest.md +++ b/docs/GeneratePipelinesRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**QueryTrainingFields** | **List<string>** | List of fields to train query suggestions from. | [optional] -**SearchableFields** | **List<string>** | Prioritized list of fields to search. | +**QueryTrainingFields** | **List<string>** | A list of fields to train query suggestions from. | [optional] +**SearchableFields** | **List<string>** | A prioritized list of fields to search. | [[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/docs/GetDefaultVersionRequestView.md b/docs/GetDefaultVersionRequestView.md index aa70180..6206cda 100644 --- a/docs/GetDefaultVersionRequestView.md +++ b/docs/GetDefaultVersionRequestView.md @@ -1,5 +1,5 @@ # Com.Sajari.Sdk.Model.GetDefaultVersionRequestView - - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. + - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. ## Properties diff --git a/docs/GetPipelineRequestView.md b/docs/GetPipelineRequestView.md index d0c8bac..70d957f 100644 --- a/docs/GetPipelineRequestView.md +++ b/docs/GetPipelineRequestView.md @@ -1,5 +1,5 @@ # Com.Sajari.Sdk.Model.GetPipelineRequestView - - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. + - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. ## Properties diff --git a/docs/ListPipelinesRequestView.md b/docs/ListPipelinesRequestView.md index bd89aaf..985d376 100644 --- a/docs/ListPipelinesRequestView.md +++ b/docs/ListPipelinesRequestView.md @@ -1,5 +1,5 @@ # Com.Sajari.Sdk.Model.ListPipelinesRequestView - - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. + - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. ## Properties diff --git a/docs/ListPromotionsRequestPromotionView.md b/docs/ListPromotionsRequestPromotionView.md new file mode 100644 index 0000000..6678df4 --- /dev/null +++ b/docs/ListPromotionsRequestPromotionView.md @@ -0,0 +1,10 @@ +# Com.Sajari.Sdk.Model.ListPromotionsRequestPromotionView + - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/PipelinesApi.md b/docs/PipelinesApi.md index b0769ec..055402b 100644 --- a/docs/PipelinesApi.md +++ b/docs/PipelinesApi.md @@ -43,7 +43,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PipelinesApi(config); - var collectionId = collectionId_example; // string | The collection to create the pipeline in, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to create the pipeline in, e.g. `my-collection`. var pipeline = new Pipeline(); // Pipeline | The pipeline to create. try @@ -125,7 +125,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PipelinesApi(config); - var collectionId = collectionId_example; // string | The collection, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection, e.g. `my-collection`. var generatePipelinesRequest = new GeneratePipelinesRequest(); // GeneratePipelinesRequest | try @@ -207,8 +207,8 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PipelinesApi(config); - var collectionId = collectionId_example; // string | The collection to get the default query pipeline of, e.g. `my-collection`. - var type = type_example; // string | The type of the pipeline to get. - TYPE_UNSPECIFIED: Pipeline type not specified. - RECORD: Record pipeline. - QUERY: Query pipeline. (default to TYPE_UNSPECIFIED) + var collectionId = "collectionId_example"; // string | The collection to get the default query pipeline of, e.g. `my-collection`. + var type = "TYPE_UNSPECIFIED"; // string | The type of the pipeline to get. - TYPE_UNSPECIFIED: Pipeline type not specified. - RECORD: Record pipeline. - QUERY: Query pipeline. (default to TYPE_UNSPECIFIED) try { @@ -289,10 +289,10 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PipelinesApi(config); - var collectionId = collectionId_example; // string | The collection that owns the pipeline to get the default version of, e.g. `my-collection`. - var type = type_example; // string | The type of the pipeline to get the default version of. - var name = name_example; // string | The name of the pipeline to get the default version of, e.g. `my-pipeline`. - var view = view_example; // string | The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional) (default to VIEW_UNSPECIFIED) + var collectionId = "collectionId_example"; // string | The collection that owns the pipeline to get the default version of, e.g. `my-collection`. + var type = "TYPE_UNSPECIFIED"; // string | The type of the pipeline to get the default version of. + var name = "name_example"; // string | The name of the pipeline to get the default version of, e.g. `my-pipeline`. + var view = "VIEW_UNSPECIFIED"; // string | The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional) (default to VIEW_UNSPECIFIED) try { @@ -318,7 +318,7 @@ Name | Type | Description | Notes **collectionId** | **string**| The collection that owns the pipeline to get the default version of, e.g. `my-collection`. | **type** | **string**| The type of the pipeline to get the default version of. | **name** | **string**| The name of the pipeline to get the default version of, e.g. `my-pipeline`. | - **view** | **string**| The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. | [optional] [default to VIEW_UNSPECIFIED] + **view** | **string**| The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. | [optional] [default to VIEW_UNSPECIFIED] ### Return type @@ -375,11 +375,11 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PipelinesApi(config); - var collectionId = collectionId_example; // string | The collection that owns the pipeline, e.g. `my-collection`. - var type = type_example; // string | The type of the pipeline to retrieve. - var name = name_example; // string | The name of the pipeline to retrieve, e.g. `my-pipeline`. - var version = version_example; // string | The version of the pipeline to retrieve, e.g. `42`. - var view = view_example; // string | The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional) (default to VIEW_UNSPECIFIED) + var collectionId = "collectionId_example"; // string | The collection that owns the pipeline, e.g. `my-collection`. + var type = "TYPE_UNSPECIFIED"; // string | The type of the pipeline to retrieve. + var name = "name_example"; // string | The name of the pipeline to retrieve, e.g. `my-pipeline`. + var version = "version_example"; // string | The version of the pipeline to retrieve, e.g. `42`. + var view = "VIEW_UNSPECIFIED"; // string | The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional) (default to VIEW_UNSPECIFIED) try { @@ -406,7 +406,7 @@ Name | Type | Description | Notes **type** | **string**| The type of the pipeline to retrieve. | **name** | **string**| The name of the pipeline to retrieve, e.g. `my-pipeline`. | **version** | **string**| The version of the pipeline to retrieve, e.g. `42`. | - **view** | **string**| The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. | [optional] [default to VIEW_UNSPECIFIED] + **view** | **string**| The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. | [optional] [default to VIEW_UNSPECIFIED] ### Return type @@ -463,10 +463,10 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PipelinesApi(config); - var collectionId = collectionId_example; // string | The collection that owns this set of pipelines, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection that owns this set of pipelines, e.g. `my-collection`. var pageSize = 56; // int? | The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - var pageToken = pageToken_example; // string | A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. (optional) - var view = view_example; // string | The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional) (default to VIEW_UNSPECIFIED) + var pageToken = "pageToken_example"; // string | A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. (optional) + var view = "VIEW_UNSPECIFIED"; // string | The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional) (default to VIEW_UNSPECIFIED) try { @@ -491,8 +491,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collectionId** | **string**| The collection that owns this set of pipelines, e.g. `my-collection`. | **pageSize** | **int?**| The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. | [optional] - **pageToken** | **string**| A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. | [optional] - **view** | **string**| The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. | [optional] [default to VIEW_UNSPECIFIED] + **pageToken** | **string**| A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. | [optional] + **view** | **string**| The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. | [optional] [default to VIEW_UNSPECIFIED] ### Return type @@ -549,7 +549,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PipelinesApi(config); - var collectionId = collectionId_example; // string | The collection to set the default query pipeline of, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to set the default query pipeline of, e.g. `my-collection`. var setDefaultPipelineRequest = new SetDefaultPipelineRequest(); // SetDefaultPipelineRequest | try @@ -631,9 +631,9 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PipelinesApi(config); - var collectionId = collectionId_example; // string | The collection that owns the pipeline to set the default version of, e.g. `my-collection`. - var type = type_example; // string | The type of the pipeline to set the default version of. - var name = name_example; // string | The name of the pipeline to set the default version of, e.g. `my-pipeline`. + var collectionId = "collectionId_example"; // string | The collection that owns the pipeline to set the default version of, e.g. `my-collection`. + var type = "TYPE_UNSPECIFIED"; // string | The type of the pipeline to set the default version of. + var name = "name_example"; // string | The name of the pipeline to set the default version of, e.g. `my-pipeline`. var setDefaultVersionRequest = new SetDefaultVersionRequest(); // SetDefaultVersionRequest | try diff --git a/docs/Promotion.md b/docs/Promotion.md index 6e0800f..e3d6cb2 100644 --- a/docs/Promotion.md +++ b/docs/Promotion.md @@ -5,6 +5,7 @@ Promotion contains a trigger, determining which searches it should be active for Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Banners** | [**List<Banner>**](Banner.md) | The banners that are injected into the result set when the promotion is triggered. | [optional] **CollectionId** | **string** | Output only. The ID of the collection that owns this promotion. | [optional] [readonly] **Condition** | **string** | A condition expression applied to a search request that determines which searches the promotion is active for. For example, to apply the promotion's pins and boosts whenever a user searches for 'shoes' set condition to `q = 'shoes'`. | **CreateTime** | **DateTime** | Output only. Time the promotion was created. | [optional] [readonly] diff --git a/docs/PromotionPin.md b/docs/PromotionPin.md index 98860f1..3d8f2f3 100644 --- a/docs/PromotionPin.md +++ b/docs/PromotionPin.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Key** | [**RecordKey**](RecordKey.md) | | [optional] +**Mode** | **PromotionPinMode** | | [optional] **Position** | **int** | Position the record should occupy in search results. The top position is position 1. Doesn't need to be contiguous with other pins, i.e. there can be gaps in the pinned set that are filled with organic results. In the case where there are insufficient search results pinned items are collapsed. | [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/docs/PromotionPinMode.md b/docs/PromotionPinMode.md new file mode 100644 index 0000000..d37b012 --- /dev/null +++ b/docs/PromotionPinMode.md @@ -0,0 +1,10 @@ +# Com.Sajari.Sdk.Model.PromotionPinMode + - PIN: The pin applies regardless of whether the pinned item is in the underlying result set of the search. This has the net effect that a search result can be surfaced even if it was not originally a part of the search result set. - PROMOTE: The pin only applies if the pinned item is in the underlying result set of the search. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/PromotionsApi.md b/docs/PromotionsApi.md index b184eb6..205540d 100644 --- a/docs/PromotionsApi.md +++ b/docs/PromotionsApi.md @@ -40,7 +40,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PromotionsApi(config); - var collectionId = collectionId_example; // string | The collection to create a promotion in, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to create a promotion in, e.g. `my-collection`. var promotion = new Promotion(); // Promotion | The promotion to create. try @@ -122,8 +122,8 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PromotionsApi(config); - var collectionId = collectionId_example; // string | The collection the promotion belongs to, e.g. `my-collection`. - var promotionId = promotionId_example; // string | The promotion to delete, e.g. `1234`. + var collectionId = "collectionId_example"; // string | The collection the promotion belongs to, e.g. `my-collection`. + var promotionId = "promotionId_example"; // string | The promotion to delete, e.g. `1234`. try { @@ -204,8 +204,8 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PromotionsApi(config); - var collectionId = collectionId_example; // string | The collection that owns the promotion, e.g. `my-collection`. - var promotionId = promotionId_example; // string | The promotion to retrieve, e.g. `1234`. + var collectionId = "collectionId_example"; // string | The collection that owns the promotion, e.g. `my-collection`. + var promotionId = "promotionId_example"; // string | The promotion to retrieve, e.g. `1234`. try { @@ -259,7 +259,7 @@ Name | Type | Description | Notes # **ListPromotions** -> ListPromotionsResponse ListPromotions (string collectionId, int? pageSize = null, string pageToken = null) +> ListPromotionsResponse ListPromotions (string collectionId, int? pageSize = null, string pageToken = null, string view = null) List promotions @@ -286,14 +286,15 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PromotionsApi(config); - var collectionId = collectionId_example; // string | The collection that owns this set of promotions, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection that owns this set of promotions, e.g. `my-collection`. var pageSize = 56; // int? | The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - var pageToken = pageToken_example; // string | A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. (optional) + var pageToken = "pageToken_example"; // string | A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. (optional) + var view = "PROMOTION_VIEW_UNSPECIFIED"; // string | The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. (optional) (default to PROMOTION_VIEW_UNSPECIFIED) try { // List promotions - ListPromotionsResponse result = apiInstance.ListPromotions(collectionId, pageSize, pageToken); + ListPromotionsResponse result = apiInstance.ListPromotions(collectionId, pageSize, pageToken, view); Debug.WriteLine(result); } catch (ApiException e) @@ -313,7 +314,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collectionId** | **string**| The collection that owns this set of promotions, e.g. `my-collection`. | **pageSize** | **int?**| The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. | [optional] - **pageToken** | **string**| A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. | [optional] + **pageToken** | **string**| A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. | [optional] + **view** | **string**| The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. | [optional] [default to PROMOTION_VIEW_UNSPECIFIED] ### Return type @@ -370,9 +372,9 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new PromotionsApi(config); - var collectionId = collectionId_example; // string | The collection the promotion belongs to, e.g. `my-collection`. - var promotionId = promotionId_example; // string | The promotion to update, e.g. `1234`. - var updateMask = updateMask_example; // string | The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`, `filter_boosts`. For each field that you want to update, provide a corresponding value in the promotion object containing the new value. + var collectionId = "collectionId_example"; // string | The collection the promotion belongs to, e.g. `my-collection`. + var promotionId = "promotionId_example"; // string | The promotion to update, e.g. `1234`. + var updateMask = "updateMask_example"; // string | The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`, `filter_boosts`. For each field that you want to update, provide a corresponding value in the promotion object containing the new value. var promotion = new Promotion(); // Promotion | Details of the promotion to update. try diff --git a/docs/QueryCollectionRequestTracking.md b/docs/QueryCollectionRequestTracking.md index 8fb64be..7bc5e3a 100644 --- a/docs/QueryCollectionRequestTracking.md +++ b/docs/QueryCollectionRequestTracking.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | **Dictionary<string, string>** | Custom values to be included in tracking data. | [optional] -**Field** | **string** | Tracking field used to identify records in the collection. Must be unique schema field. | [optional] -**QueryId** | **string** | Query ID of the query. If this is empty, then one is generated. | [optional] -**Sequence** | **int** | Sequence number of query. | [optional] +**Data** | **Dictionary<string, string>** | A set of custom values to be included in tracking data. | [optional] +**Field** | **string** | The tracking field used to identify records in the collection. Must be unique schema field. | [optional] +**QueryId** | **string** | The query ID of the query. If this is empty, then one is generated. | [optional] +**Sequence** | **int** | The sequence number of query. | [optional] **Type** | **QueryCollectionRequestTrackingType** | | [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/docs/QueryCollectionRequestTrackingType.md b/docs/QueryCollectionRequestTrackingType.md index 7c99d1d..3d3f117 100644 --- a/docs/QueryCollectionRequestTrackingType.md +++ b/docs/QueryCollectionRequestTrackingType.md @@ -1,5 +1,5 @@ # Com.Sajari.Sdk.Model.QueryCollectionRequestTrackingType - - TYPE_UNSPECIFIED: The default / unset value. The API defaults to `NONE` tracking. - NONE: No tracking. - CLICK: Click tracking. A click token is be generated for each result. Results which do not receive clicks fall down the rankings, and similarly low-ranked records which receive clicks are moved up the rankings. - POS_NEG: Pos/neg tracking. Pos/neg tokens are generated for each result. Each record in the result set can be marked with pos/neg value for the search. This is then fed back into the ranking algorithm to improve future results. Unlike `CLICK`, if no tokens are reported for records then no action is taken. + - TYPE_UNSPECIFIED: The default / unset value. The API defaults to `NONE` tracking. - NONE: No tracking. - CLICK: Click tracking. A click token is be generated for each result. Results which do not receive clicks fall down the rankings, and similarly low-ranked records which receive clicks are moved up the rankings. - POS_NEG: Pos/neg tracking. Pos/neg tokens are generated for each result. Each record in the result set can be marked with pos/neg value for the search. This is then fed back into the ranking algorithm to improve future results. Unlike `CLICK`, if no tokens are reported for records then no action is taken. - EVENT: Event tracking. A query identifier is returned in the [QueryResponse][sajari.v4.QueryResponse] that can be used to link a user interaction to a specific query. ## Properties diff --git a/docs/QueryCollectionResponse.md b/docs/QueryCollectionResponse.md index b0d0a2a..97fa804 100644 --- a/docs/QueryCollectionResponse.md +++ b/docs/QueryCollectionResponse.md @@ -7,9 +7,11 @@ Name | Type | Description | Notes **ActivePromotions** | [**List<ActivePromotion>**](ActivePromotion.md) | A list of the promotions activated when running the query. | [optional] **AggregateFilters** | [**Dictionary<string, QueryAggregateResult>**](QueryAggregateResult.md) | The aggregates run with filters. | [optional] **Aggregates** | [**Dictionary<string, QueryAggregateResult>**](QueryAggregateResult.md) | The aggregates returned by the query. | [optional] +**Banners** | [**List<Banner>**](Banner.md) | Banners associated with this query. | [optional] **FeatureScoreWeight** | **double** | The weight applied to the features in the query, used for analyzing the index, neural and feature components for results. For each result: ``` score = max(index_score, neural_score) * (1 - feature_score_weight) + feature_score * feature_score_weight ``` | [optional] **Pipeline** | [**QueryCollectionResponsePipeline**](QueryCollectionResponsePipeline.md) | | [optional] **ProcessingDuration** | **string** | The total time taken to perform the query. | [optional] +**QueryId** | **string** | The query identifier. This uniqely identifies the specific query it was returned on. This is used to link user interactions with a query. | [optional] **Redirects** | [**Dictionary<string, RedirectResult>**](RedirectResult.md) | A mapping of redirects triggered for all possible variations of the query. | [optional] **Results** | [**List<QueryResult>**](QueryResult.md) | The results returned by the query. | [optional] **TotalSize** | **string** | The total number of results that match the query. | [optional] diff --git a/docs/QueryResult.md b/docs/QueryResult.md index ce144cf..81fa107 100644 --- a/docs/QueryResult.md +++ b/docs/QueryResult.md @@ -4,10 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Banner** | [**Banner**](Banner.md) | | [optional] **FeatureScore** | **double** | The feature score of the result. This is a value between 0 and 1 representing the business-specific ranking of the result as determined by the ranking adjustments. See [Ranking adjustments](https://docs.search.io/documentation/fundamentals/search-settings/ranking-adjustments) for more information. | [optional] **IndexScore** | **double** | The index score of the result. This is a value between 0 and 1 representing the relevance of the result using traditional keyword search. The higher the score the more relevant the result is. | [optional] **NeuralScore** | **double** | The neural score of the result. This is a value between 0 and 1 representing the relevance of the result using Neuralsearch®, using AI-based search. | [optional] **Record** | **Object** | An object made up of field-value pairs that contains the record data. | [optional] +**RelevanceScore** | **double** | The relevance score of the result. This is the best of `index_score` and `neural_score` with any index boosts applied on top. | [optional] **Score** | **double** | The overall relevance of the result. This is a value between 0 and 1 that combines the index, neural and feature scores. The higher the score the more relevant the result is. | [optional] **Token** | [**QueryResultToken**](QueryResultToken.md) | | [optional] diff --git a/docs/RecordsApi.md b/docs/RecordsApi.md index 3411c2e..9315eac 100644 --- a/docs/RecordsApi.md +++ b/docs/RecordsApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description Batch update records -The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. +The batch version of the [UpdateRecord](/docs/api#operation/UpdateRecord) call. ### Example ```csharp @@ -41,7 +41,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RecordsApi(config); - var collectionId = collectionId_example; // string | The collection that contains the records to update, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection that contains the records to update, e.g. `my-collection`. var batchUpdateRecordsRequest = new BatchUpdateRecordsRequest(); // BatchUpdateRecordsRequest | try @@ -100,7 +100,7 @@ Name | Type | Description | Notes Batch upsert records -The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. +The batch version of the [UpsertRecord](/docs/api#operation/UpsertRecord) call. ### Example ```csharp @@ -123,7 +123,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RecordsApi(config); - var collectionId = collectionId_example; // string | The collection to upsert the records in, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to upsert the records in, e.g. `my-collection`. var batchUpsertRecordsRequest = new BatchUpsertRecordsRequest(); // BatchUpsertRecordsRequest | try @@ -205,7 +205,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RecordsApi(config); - var collectionId = collectionId_example; // string | The collection that contains the record to delete, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection that contains the record to delete, e.g. `my-collection`. var deleteRecordRequest = new DeleteRecordRequest(); // DeleteRecordRequest | try @@ -287,7 +287,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RecordsApi(config); - var collectionId = collectionId_example; // string | The collection that contains the record to retrieve, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection that contains the record to retrieve, e.g. `my-collection`. var getRecordRequest = new GetRecordRequest(); // GetRecordRequest | try @@ -346,7 +346,7 @@ Name | Type | Description | Notes Update record -Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/api#operation/UpsertRecord) call. +Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. ### Example ```csharp @@ -369,7 +369,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RecordsApi(config); - var collectionId = collectionId_example; // string | The collection that contains the record to update, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection that contains the record to update, e.g. `my-collection`. var updateRecordRequest = new UpdateRecordRequest(); // UpdateRecordRequest | try @@ -451,7 +451,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RecordsApi(config); - var collectionId = collectionId_example; // string | The collection to upsert the record in, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to upsert the record in, e.g. `my-collection`. var upsertRecordRequest = new UpsertRecordRequest(); // UpsertRecordRequest | try diff --git a/docs/RedirectResult.md b/docs/RedirectResult.md index 0b8e171..ef62276 100644 --- a/docs/RedirectResult.md +++ b/docs/RedirectResult.md @@ -1,5 +1,5 @@ # Com.Sajari.Sdk.Model.RedirectResult -RedirectResult indicates that a redirect has been triggered for a given query. +Indicates that a redirect has been triggered for a given query. ## Properties diff --git a/docs/RedirectsApi.md b/docs/RedirectsApi.md index d2a8efb..949684c 100644 --- a/docs/RedirectsApi.md +++ b/docs/RedirectsApi.md @@ -40,7 +40,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RedirectsApi(config); - var collectionId = collectionId_example; // string | The collection to create a redirect in, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to create a redirect in, e.g. `my-collection`. var redirect = new Redirect(); // Redirect | The redirect to create. try @@ -122,8 +122,8 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RedirectsApi(config); - var collectionId = collectionId_example; // string | The collection the redirect belongs to, e.g. `my-collection`. - var redirectId = redirectId_example; // string | The redirect to delete, e.g. `1234`. + var collectionId = "collectionId_example"; // string | The collection the redirect belongs to, e.g. `my-collection`. + var redirectId = "redirectId_example"; // string | The redirect to delete, e.g. `1234`. try { @@ -204,8 +204,8 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RedirectsApi(config); - var collectionId = collectionId_example; // string | The collection that owns the redirect, e.g. `my-collection`. - var redirectId = redirectId_example; // string | The redirect to retrieve, e.g. `1234`. + var collectionId = "collectionId_example"; // string | The collection that owns the redirect, e.g. `my-collection`. + var redirectId = "redirectId_example"; // string | The redirect to retrieve, e.g. `1234`. try { @@ -286,9 +286,9 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RedirectsApi(config); - var collectionId = collectionId_example; // string | The collection that owns this set of redirects, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection that owns this set of redirects, e.g. `my-collection`. var pageSize = 56; // int? | The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - var pageToken = pageToken_example; // string | A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. (optional) + var pageToken = "pageToken_example"; // string | A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. (optional) try { @@ -313,7 +313,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collectionId** | **string**| The collection that owns this set of redirects, e.g. `my-collection`. | **pageSize** | **int?**| The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. | [optional] - **pageToken** | **string**| A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. | [optional] + **pageToken** | **string**| A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. | [optional] ### Return type @@ -370,9 +370,9 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new RedirectsApi(config); - var collectionId = collectionId_example; // string | The collection the redirect belongs to, e.g. `my-collection`. - var redirectId = redirectId_example; // string | The redirect to update, e.g. `1234`. - var updateMask = updateMask_example; // string | The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `condition`, `target`. For each field that you want to update, provide a corresponding value in the redirect object containing the new value. + var collectionId = "collectionId_example"; // string | The collection the redirect belongs to, e.g. `my-collection`. + var redirectId = "redirectId_example"; // string | The redirect to update, e.g. `1234`. + var updateMask = "updateMask_example"; // string | The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `condition`, `target`. For each field that you want to update, provide a corresponding value in the redirect object containing the new value. var redirect = new Redirect(); // Redirect | Details of the redirect to update. try diff --git a/docs/SchemaApi.md b/docs/SchemaApi.md index 113bfb6..99daf9c 100644 --- a/docs/SchemaApi.md +++ b/docs/SchemaApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description Batch create schema fields -The batch version of the [CreateSchemaField](/api#operation/CreateSchemaField) call. +The batch version of the [CreateSchemaField](/docs/api#operation/CreateSchemaField) call. ### Example ```csharp @@ -38,7 +38,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new SchemaApi(config); - var collectionId = collectionId_example; // string | The collection to create the schema fields in, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to create the schema fields in, e.g. `my-collection`. var batchCreateSchemaFieldsRequest = new BatchCreateSchemaFieldsRequest(); // BatchCreateSchemaFieldsRequest | try @@ -120,7 +120,7 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new SchemaApi(config); - var collectionId = collectionId_example; // string | The collection to create a schema field in, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection to create a schema field in, e.g. `my-collection`. var schemaField = new SchemaField(); // SchemaField | The schema field to create. try @@ -202,9 +202,9 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new SchemaApi(config); - var collectionId = collectionId_example; // string | The collection that owns this set of schema fields, e.g. `my-collection`. + var collectionId = "collectionId_example"; // string | The collection that owns this set of schema fields, e.g. `my-collection`. var pageSize = 56; // int? | The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - var pageToken = pageToken_example; // string | A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) + var pageToken = "pageToken_example"; // string | A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) try { @@ -229,7 +229,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **collectionId** | **string**| The collection that owns this set of schema fields, e.g. `my-collection`. | **pageSize** | **int?**| The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. | [optional] - **pageToken** | **string**| A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. | [optional] + **pageToken** | **string**| A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. | [optional] ### Return type diff --git a/docs/TextPosition.md b/docs/TextPosition.md new file mode 100644 index 0000000..93baa82 --- /dev/null +++ b/docs/TextPosition.md @@ -0,0 +1,10 @@ +# Com.Sajari.Sdk.Model.TextPosition +TextPosition describes the position of text in a box. - TEXT_POSITION_UNSPECIFIED: No position specified. - TEXT_POSITION_CENTER: The text is positioned in the horizontal and vertical center. - TEXT_POSITION_TOP_LEFT: The text is positioned in the top left corner. - TEXT_POSITION_TOP_RIGHT: The text is positioned in the top right corner. - TEXT_POSITION_BOTTOM_LEFT: The text is positioned in the bottom left corner. - TEXT_POSITION_BOTTOM_RIGHT: The text is positioned in the bottom right corner. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/generate/generate.sh b/generate/generate.sh index ef34040..6b2889c 100755 --- a/generate/generate.sh +++ b/generate/generate.sh @@ -13,7 +13,7 @@ if [ -z "$GEN_PATH" ]; then die "GEN_PATH must be set, e.g. /path/to/sajari/sdk-dotnet" fi -VERSION=4.3.0 +VERSION=5.0.0 docker-entrypoint.sh generate \ -i /openapi.json \ diff --git a/src/Com.Sajari.Sdk.Test/Com.Sajari.Sdk.Test.csproj b/src/Com.Sajari.Sdk.Test/Com.Sajari.Sdk.Test.csproj index 3dbaacf..574caf5 100644 --- a/src/Com.Sajari.Sdk.Test/Com.Sajari.Sdk.Test.csproj +++ b/src/Com.Sajari.Sdk.Test/Com.Sajari.Sdk.Test.csproj @@ -3,7 +3,7 @@ Com.Sajari.Sdk.Test Com.Sajari.Sdk.Test - netcoreapp2.0 + netcoreapp3.1 false diff --git a/src/Com.Sajari.Sdk.Test/Model/BannerTests.cs b/src/Com.Sajari.Sdk.Test/Model/BannerTests.cs new file mode 100644 index 0000000..0d63d65 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/BannerTests.cs @@ -0,0 +1,143 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Model; +using Com.Sajari.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Com.Sajari.Sdk.Test.Model +{ + /// + /// Class for testing Banner + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BannerTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Banner + //private Banner instance; + + public BannerTests() + { + // TODO uncomment below to create an instance of Banner + //instance = new Banner(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Banner + /// + [Fact] + public void BannerInstanceTest() + { + // TODO uncomment below to test "IsType" Banner + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'Height' + /// + [Fact] + public void HeightTest() + { + // TODO unit test for the property 'Height' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'ImageUrl' + /// + [Fact] + public void ImageUrlTest() + { + // TODO unit test for the property 'ImageUrl' + } + /// + /// Test the property 'Position' + /// + [Fact] + public void PositionTest() + { + // TODO unit test for the property 'Position' + } + /// + /// Test the property 'TargetUrl' + /// + [Fact] + public void TargetUrlTest() + { + // TODO unit test for the property 'TargetUrl' + } + /// + /// Test the property 'TextColor' + /// + [Fact] + public void TextColorTest() + { + // TODO unit test for the property 'TextColor' + } + /// + /// Test the property 'TextPosition' + /// + [Fact] + public void TextPositionTest() + { + // TODO unit test for the property 'TextPosition' + } + /// + /// Test the property 'Title' + /// + [Fact] + public void TitleTest() + { + // TODO unit test for the property 'Title' + } + /// + /// Test the property 'Width' + /// + [Fact] + public void WidthTest() + { + // TODO unit test for the property 'Width' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/EventTests.cs b/src/Com.Sajari.Sdk.Test/Model/EventTests.cs new file mode 100644 index 0000000..ad67c4d --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/EventTests.cs @@ -0,0 +1,111 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Model; +using Com.Sajari.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Com.Sajari.Sdk.Test.Model +{ + /// + /// Class for testing Event + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class EventTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Event + //private Event instance; + + public EventTests() + { + // TODO uncomment below to create an instance of Event + //instance = new Event(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Event + /// + [Fact] + public void EventInstanceTest() + { + // TODO uncomment below to test "IsType" Event + //Assert.IsType(instance); + } + + + /// + /// Test the property 'BannerId' + /// + [Fact] + public void BannerIdTest() + { + // TODO unit test for the property 'BannerId' + } + /// + /// Test the property 'Metadata' + /// + [Fact] + public void MetadataTest() + { + // TODO unit test for the property 'Metadata' + } + /// + /// Test the property 'QueryId' + /// + [Fact] + public void QueryIdTest() + { + // TODO unit test for the property 'QueryId' + } + /// + /// Test the property 'RedirectId' + /// + [Fact] + public void RedirectIdTest() + { + // TODO unit test for the property 'RedirectId' + } + /// + /// Test the property 'ResultId' + /// + [Fact] + public void ResultIdTest() + { + // TODO unit test for the property 'ResultId' + } + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/ExperimentRequestPipelineTests.cs b/src/Com.Sajari.Sdk.Test/Model/ExperimentRequestPipelineTests.cs new file mode 100644 index 0000000..1110d3a --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/ExperimentRequestPipelineTests.cs @@ -0,0 +1,79 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Model; +using Com.Sajari.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Com.Sajari.Sdk.Test.Model +{ + /// + /// Class for testing ExperimentRequestPipeline + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ExperimentRequestPipelineTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ExperimentRequestPipeline + //private ExperimentRequestPipeline instance; + + public ExperimentRequestPipelineTests() + { + // TODO uncomment below to create an instance of ExperimentRequestPipeline + //instance = new ExperimentRequestPipeline(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExperimentRequestPipeline + /// + [Fact] + public void ExperimentRequestPipelineInstanceTest() + { + // TODO uncomment below to test "IsType" ExperimentRequestPipeline + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property '_Version' + /// + [Fact] + public void _VersionTest() + { + // TODO unit test for the property '_Version' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/ExperimentRequestTests.cs b/src/Com.Sajari.Sdk.Test/Model/ExperimentRequestTests.cs new file mode 100644 index 0000000..83d7ffe --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/ExperimentRequestTests.cs @@ -0,0 +1,95 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Model; +using Com.Sajari.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Com.Sajari.Sdk.Test.Model +{ + /// + /// Class for testing ExperimentRequest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ExperimentRequestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ExperimentRequest + //private ExperimentRequest instance; + + public ExperimentRequestTests() + { + // TODO uncomment below to create an instance of ExperimentRequest + //instance = new ExperimentRequest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExperimentRequest + /// + [Fact] + public void ExperimentRequestInstanceTest() + { + // TODO uncomment below to test "IsType" ExperimentRequest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'CustomPipeline' + /// + [Fact] + public void CustomPipelineTest() + { + // TODO unit test for the property 'CustomPipeline' + } + /// + /// Test the property 'Pipeline' + /// + [Fact] + public void PipelineTest() + { + // TODO unit test for the property 'Pipeline' + } + /// + /// Test the property 'Promotions' + /// + [Fact] + public void PromotionsTest() + { + // TODO unit test for the property 'Promotions' + } + /// + /// Test the property 'Variables' + /// + [Fact] + public void VariablesTest() + { + // TODO unit test for the property 'Variables' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/ExperimentResponseTests.cs b/src/Com.Sajari.Sdk.Test/Model/ExperimentResponseTests.cs new file mode 100644 index 0000000..649d95b --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/ExperimentResponseTests.cs @@ -0,0 +1,71 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Model; +using Com.Sajari.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Com.Sajari.Sdk.Test.Model +{ + /// + /// Class for testing ExperimentResponse + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ExperimentResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ExperimentResponse + //private ExperimentResponse instance; + + public ExperimentResponseTests() + { + // TODO uncomment below to create an instance of ExperimentResponse + //instance = new ExperimentResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ExperimentResponse + /// + [Fact] + public void ExperimentResponseInstanceTest() + { + // TODO uncomment below to test "IsType" ExperimentResponse + //Assert.IsType(instance); + } + + + /// + /// Test the property 'QueryResponse' + /// + [Fact] + public void QueryResponseTest() + { + // TODO unit test for the property 'QueryResponse' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/ListPromotionsRequestPromotionViewTests.cs b/src/Com.Sajari.Sdk.Test/Model/ListPromotionsRequestPromotionViewTests.cs new file mode 100644 index 0000000..0ff5014 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/ListPromotionsRequestPromotionViewTests.cs @@ -0,0 +1,63 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Model; +using Com.Sajari.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Com.Sajari.Sdk.Test.Model +{ + /// + /// Class for testing ListPromotionsRequestPromotionView + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ListPromotionsRequestPromotionViewTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ListPromotionsRequestPromotionView + //private ListPromotionsRequestPromotionView instance; + + public ListPromotionsRequestPromotionViewTests() + { + // TODO uncomment below to create an instance of ListPromotionsRequestPromotionView + //instance = new ListPromotionsRequestPromotionView(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ListPromotionsRequestPromotionView + /// + [Fact] + public void ListPromotionsRequestPromotionViewInstanceTest() + { + // TODO uncomment below to test "IsType" ListPromotionsRequestPromotionView + //Assert.IsType(instance); + } + + + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/PromotionPinModeTests.cs b/src/Com.Sajari.Sdk.Test/Model/PromotionPinModeTests.cs new file mode 100644 index 0000000..5289d89 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/PromotionPinModeTests.cs @@ -0,0 +1,63 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Model; +using Com.Sajari.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Com.Sajari.Sdk.Test.Model +{ + /// + /// Class for testing PromotionPinMode + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PromotionPinModeTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PromotionPinMode + //private PromotionPinMode instance; + + public PromotionPinModeTests() + { + // TODO uncomment below to create an instance of PromotionPinMode + //instance = new PromotionPinMode(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PromotionPinMode + /// + [Fact] + public void PromotionPinModeInstanceTest() + { + // TODO uncomment below to test "IsType" PromotionPinMode + //Assert.IsType(instance); + } + + + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/TextPositionTests.cs b/src/Com.Sajari.Sdk.Test/Model/TextPositionTests.cs new file mode 100644 index 0000000..c281524 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/TextPositionTests.cs @@ -0,0 +1,63 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Com.Sajari.Sdk.Api; +using Com.Sajari.Sdk.Model; +using Com.Sajari.Sdk.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Com.Sajari.Sdk.Test.Model +{ + /// + /// Class for testing TextPosition + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class TextPositionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for TextPosition + //private TextPosition instance; + + public TextPositionTests() + { + // TODO uncomment below to create an instance of TextPosition + //instance = new TextPosition(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TextPosition + /// + [Fact] + public void TextPositionInstanceTest() + { + // TODO uncomment below to test "IsType" TextPosition + //Assert.IsType(instance); + } + + + + } + +} diff --git a/src/Com.Sajari.Sdk/Api/CollectionsApi.cs b/src/Com.Sajari.Sdk/Api/CollectionsApi.cs index c238d23..87c2ca5 100644 --- a/src/Com.Sajari.Sdk/Api/CollectionsApi.cs +++ b/src/Com.Sajari.Sdk/Api/CollectionsApi.cs @@ -72,6 +72,29 @@ public interface ICollectionsApiSync : IApiAccessor /// ApiResponse of Object ApiResponse DeleteCollectionWithHttpInfo(string collectionId); /// + /// Experiment + /// + /// + /// Run a query on a collection with a hypothetical configuration to see what kinds of results it produces. Saved promotions with a start date in the future are enabled during the experiment, unless they are explicitly disabled. The following example demonstrates how to run a simple experiment for a string, against a pipeline and with a proposed promotion: ```json { \"pipeline\": { \"name\": \"my-pipeline\" }, \"variables\": { \"q\": \"search terms\" }, \"promotions\": [{ \"id\": \"1234\", \"condition\": \"q = 'search terms'\", \"pins\": [{ \"key\": { \"field\": \"id\", \"value\": \"54hdc7h2334h\" }, \"position\": 1 }] }] } ``` + /// + /// Thrown when fails to make API call + /// The collection to query, e.g. `my-collection`. + /// + /// ExperimentResponse + ExperimentResponse Experiment(string collectionId, ExperimentRequest experimentRequest); + + /// + /// Experiment + /// + /// + /// Run a query on a collection with a hypothetical configuration to see what kinds of results it produces. Saved promotions with a start date in the future are enabled during the experiment, unless they are explicitly disabled. The following example demonstrates how to run a simple experiment for a string, against a pipeline and with a proposed promotion: ```json { \"pipeline\": { \"name\": \"my-pipeline\" }, \"variables\": { \"q\": \"search terms\" }, \"promotions\": [{ \"id\": \"1234\", \"condition\": \"q = 'search terms'\", \"pins\": [{ \"key\": { \"field\": \"id\", \"value\": \"54hdc7h2334h\" }, \"position\": 1 }] }] } ``` + /// + /// Thrown when fails to make API call + /// The collection to query, e.g. `my-collection`. + /// + /// ApiResponse of ExperimentResponse + ApiResponse ExperimentWithHttpInfo(string collectionId, ExperimentRequest experimentRequest); + /// /// Get collection /// /// @@ -100,7 +123,7 @@ public interface ICollectionsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. (optional) - /// A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. (optional) /// ListCollectionsResponse ListCollectionsResponse ListCollections(int? pageSize = default(int?), string pageToken = default(string)); @@ -112,37 +135,39 @@ public interface ICollectionsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. (optional) - /// A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. (optional) /// ApiResponse of ListCollectionsResponse ApiResponse ListCollectionsWithHttpInfo(int? pageSize = default(int?), string pageToken = default(string)); /// /// Query collection /// /// - /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. /// + /// The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. (optional) /// QueryCollectionResponse - QueryCollectionResponse QueryCollection(string collectionId, QueryCollectionRequest queryCollectionRequest); + QueryCollectionResponse QueryCollection(string collectionId, QueryCollectionRequest queryCollectionRequest, string accountId = default(string)); /// /// Query collection /// /// - /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. /// + /// The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. (optional) /// ApiResponse of QueryCollectionResponse - ApiResponse QueryCollectionWithHttpInfo(string collectionId, QueryCollectionRequest queryCollectionRequest); + ApiResponse QueryCollectionWithHttpInfo(string collectionId, QueryCollectionRequest queryCollectionRequest, string accountId = default(string)); /// /// Query collection /// /// - /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -155,7 +180,7 @@ public interface ICollectionsApiSync : IApiAccessor /// Query collection /// /// - /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -164,6 +189,31 @@ public interface ICollectionsApiSync : IApiAccessor [Obsolete] ApiResponse QueryCollection2WithHttpInfo(string collectionId, QueryCollectionRequest queryCollectionRequest); /// + /// Track event + /// + /// + /// Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. + /// + /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. + /// The collection to track the event against, e.g. `my-collection`. + /// The details of the event to track. + /// Object + Object TrackEvent(string accountId, string collectionId, Event _event); + + /// + /// Track event + /// + /// + /// Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. + /// + /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. + /// The collection to track the event against, e.g. `my-collection`. + /// The details of the event to track. + /// ApiResponse of Object + ApiResponse TrackEventWithHttpInfo(string accountId, string collectionId, Event _event); + /// /// Update collection /// /// @@ -171,10 +221,10 @@ public interface ICollectionsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The collection to update, e.g. `my-collection`. - /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. - /// Details of the collection to update. + /// The details of the collection to update. + /// The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. (optional) /// Collection - Collection UpdateCollection(string collectionId, string updateMask, Collection collection); + Collection UpdateCollection(string collectionId, Collection collection, string updateMask = default(string)); /// /// Update collection @@ -184,10 +234,10 @@ public interface ICollectionsApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The collection to update, e.g. `my-collection`. - /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. - /// Details of the collection to update. + /// The details of the collection to update. + /// The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. (optional) /// ApiResponse of Collection - ApiResponse UpdateCollectionWithHttpInfo(string collectionId, string updateMask, Collection collection); + ApiResponse UpdateCollectionWithHttpInfo(string collectionId, Collection collection, string updateMask = default(string)); #endregion Synchronous Operations } @@ -246,6 +296,31 @@ public interface ICollectionsApiAsync : IApiAccessor /// Task of ApiResponse (Object) System.Threading.Tasks.Task> DeleteCollectionWithHttpInfoAsync(string collectionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// + /// Experiment + /// + /// + /// Run a query on a collection with a hypothetical configuration to see what kinds of results it produces. Saved promotions with a start date in the future are enabled during the experiment, unless they are explicitly disabled. The following example demonstrates how to run a simple experiment for a string, against a pipeline and with a proposed promotion: ```json { \"pipeline\": { \"name\": \"my-pipeline\" }, \"variables\": { \"q\": \"search terms\" }, \"promotions\": [{ \"id\": \"1234\", \"condition\": \"q = 'search terms'\", \"pins\": [{ \"key\": { \"field\": \"id\", \"value\": \"54hdc7h2334h\" }, \"position\": 1 }] }] } ``` + /// + /// Thrown when fails to make API call + /// The collection to query, e.g. `my-collection`. + /// + /// Cancellation Token to cancel the request. + /// Task of ExperimentResponse + System.Threading.Tasks.Task ExperimentAsync(string collectionId, ExperimentRequest experimentRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Experiment + /// + /// + /// Run a query on a collection with a hypothetical configuration to see what kinds of results it produces. Saved promotions with a start date in the future are enabled during the experiment, unless they are explicitly disabled. The following example demonstrates how to run a simple experiment for a string, against a pipeline and with a proposed promotion: ```json { \"pipeline\": { \"name\": \"my-pipeline\" }, \"variables\": { \"q\": \"search terms\" }, \"promotions\": [{ \"id\": \"1234\", \"condition\": \"q = 'search terms'\", \"pins\": [{ \"key\": { \"field\": \"id\", \"value\": \"54hdc7h2334h\" }, \"position\": 1 }] }] } ``` + /// + /// Thrown when fails to make API call + /// The collection to query, e.g. `my-collection`. + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExperimentResponse) + System.Threading.Tasks.Task> ExperimentWithHttpInfoAsync(string collectionId, ExperimentRequest experimentRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Get collection /// /// @@ -276,7 +351,7 @@ public interface ICollectionsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. (optional) - /// A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ListCollectionsResponse System.Threading.Tasks.Task ListCollectionsAsync(int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -289,7 +364,7 @@ public interface ICollectionsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. (optional) - /// A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListCollectionsResponse) System.Threading.Tasks.Task> ListCollectionsWithHttpInfoAsync(int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -297,32 +372,34 @@ public interface ICollectionsApiAsync : IApiAccessor /// Query collection /// /// - /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. /// + /// The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. (optional) /// Cancellation Token to cancel the request. /// Task of QueryCollectionResponse - System.Threading.Tasks.Task QueryCollectionAsync(string collectionId, QueryCollectionRequest queryCollectionRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task QueryCollectionAsync(string collectionId, QueryCollectionRequest queryCollectionRequest, string accountId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Query collection /// /// - /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. /// + /// The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (QueryCollectionResponse) - System.Threading.Tasks.Task> QueryCollectionWithHttpInfoAsync(string collectionId, QueryCollectionRequest queryCollectionRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> QueryCollectionWithHttpInfoAsync(string collectionId, QueryCollectionRequest queryCollectionRequest, string accountId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Query collection /// /// - /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -336,7 +413,7 @@ public interface ICollectionsApiAsync : IApiAccessor /// Query collection /// /// - /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -346,6 +423,33 @@ public interface ICollectionsApiAsync : IApiAccessor [Obsolete] System.Threading.Tasks.Task> QueryCollection2WithHttpInfoAsync(string collectionId, QueryCollectionRequest queryCollectionRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// + /// Track event + /// + /// + /// Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. + /// + /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. + /// The collection to track the event against, e.g. `my-collection`. + /// The details of the event to track. + /// Cancellation Token to cancel the request. + /// Task of Object + System.Threading.Tasks.Task TrackEventAsync(string accountId, string collectionId, Event _event, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Track event + /// + /// + /// Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. + /// + /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. + /// The collection to track the event against, e.g. `my-collection`. + /// The details of the event to track. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Object) + System.Threading.Tasks.Task> TrackEventWithHttpInfoAsync(string accountId, string collectionId, Event _event, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Update collection /// /// @@ -353,11 +457,11 @@ public interface ICollectionsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The collection to update, e.g. `my-collection`. - /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. - /// Details of the collection to update. + /// The details of the collection to update. + /// The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. (optional) /// Cancellation Token to cancel the request. /// Task of Collection - System.Threading.Tasks.Task UpdateCollectionAsync(string collectionId, string updateMask, Collection collection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateCollectionAsync(string collectionId, Collection collection, string updateMask = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update collection @@ -367,11 +471,11 @@ public interface ICollectionsApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The collection to update, e.g. `my-collection`. - /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. - /// Details of the collection to update. + /// The details of the collection to update. + /// The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (Collection) - System.Threading.Tasks.Task> UpdateCollectionWithHttpInfoAsync(string collectionId, string updateMask, Collection collection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateCollectionWithHttpInfoAsync(string collectionId, Collection collection, string updateMask = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -554,7 +658,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateCollectionWithHttpInf // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -638,7 +742,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateCollectionWithHttpInf // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -710,7 +814,7 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteCollectionWithHttpInfo(st // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -784,7 +888,7 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteCollectionWithHttpInfo(st // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -804,6 +908,172 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteCollectionWithHttpInfo(st return localVarResponse; } + /// + /// Experiment Run a query on a collection with a hypothetical configuration to see what kinds of results it produces. Saved promotions with a start date in the future are enabled during the experiment, unless they are explicitly disabled. The following example demonstrates how to run a simple experiment for a string, against a pipeline and with a proposed promotion: ```json { \"pipeline\": { \"name\": \"my-pipeline\" }, \"variables\": { \"q\": \"search terms\" }, \"promotions\": [{ \"id\": \"1234\", \"condition\": \"q = 'search terms'\", \"pins\": [{ \"key\": { \"field\": \"id\", \"value\": \"54hdc7h2334h\" }, \"position\": 1 }] }] } ``` + /// + /// Thrown when fails to make API call + /// The collection to query, e.g. `my-collection`. + /// + /// ExperimentResponse + public ExperimentResponse Experiment(string collectionId, ExperimentRequest experimentRequest) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = ExperimentWithHttpInfo(collectionId, experimentRequest); + return localVarResponse.Data; + } + + /// + /// Experiment Run a query on a collection with a hypothetical configuration to see what kinds of results it produces. Saved promotions with a start date in the future are enabled during the experiment, unless they are explicitly disabled. The following example demonstrates how to run a simple experiment for a string, against a pipeline and with a proposed promotion: ```json { \"pipeline\": { \"name\": \"my-pipeline\" }, \"variables\": { \"q\": \"search terms\" }, \"promotions\": [{ \"id\": \"1234\", \"condition\": \"q = 'search terms'\", \"pins\": [{ \"key\": { \"field\": \"id\", \"value\": \"54hdc7h2334h\" }, \"position\": 1 }] }] } ``` + /// + /// Thrown when fails to make API call + /// The collection to query, e.g. `my-collection`. + /// + /// ApiResponse of ExperimentResponse + public Com.Sajari.Sdk.Client.ApiResponse ExperimentWithHttpInfo(string collectionId, ExperimentRequest experimentRequest) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling CollectionsApi->Experiment"); + } + + // verify the required parameter 'experimentRequest' is set + if (experimentRequest == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'experimentRequest' when calling CollectionsApi->Experiment"); + } + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter + localVarRequestOptions.Data = experimentRequest; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/v4/collections/{collection_id}:experiment", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Experiment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Experiment Run a query on a collection with a hypothetical configuration to see what kinds of results it produces. Saved promotions with a start date in the future are enabled during the experiment, unless they are explicitly disabled. The following example demonstrates how to run a simple experiment for a string, against a pipeline and with a proposed promotion: ```json { \"pipeline\": { \"name\": \"my-pipeline\" }, \"variables\": { \"q\": \"search terms\" }, \"promotions\": [{ \"id\": \"1234\", \"condition\": \"q = 'search terms'\", \"pins\": [{ \"key\": { \"field\": \"id\", \"value\": \"54hdc7h2334h\" }, \"position\": 1 }] }] } ``` + /// + /// Thrown when fails to make API call + /// The collection to query, e.g. `my-collection`. + /// + /// Cancellation Token to cancel the request. + /// Task of ExperimentResponse + public async System.Threading.Tasks.Task ExperimentAsync(string collectionId, ExperimentRequest experimentRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await ExperimentWithHttpInfoAsync(collectionId, experimentRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Experiment Run a query on a collection with a hypothetical configuration to see what kinds of results it produces. Saved promotions with a start date in the future are enabled during the experiment, unless they are explicitly disabled. The following example demonstrates how to run a simple experiment for a string, against a pipeline and with a proposed promotion: ```json { \"pipeline\": { \"name\": \"my-pipeline\" }, \"variables\": { \"q\": \"search terms\" }, \"promotions\": [{ \"id\": \"1234\", \"condition\": \"q = 'search terms'\", \"pins\": [{ \"key\": { \"field\": \"id\", \"value\": \"54hdc7h2334h\" }, \"position\": 1 }] }] } ``` + /// + /// Thrown when fails to make API call + /// The collection to query, e.g. `my-collection`. + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ExperimentResponse) + public async System.Threading.Tasks.Task> ExperimentWithHttpInfoAsync(string collectionId, ExperimentRequest experimentRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling CollectionsApi->Experiment"); + } + + // verify the required parameter 'experimentRequest' is set + if (experimentRequest == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'experimentRequest' when calling CollectionsApi->Experiment"); + } + + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter + localVarRequestOptions.Data = experimentRequest; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}:experiment", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Experiment", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// /// Get collection Retrieve the details of a collection. /// @@ -856,7 +1126,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -930,7 +1200,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -955,7 +1225,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s /// /// Thrown when fails to make API call /// The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. (optional) - /// A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. (optional) /// ListCollectionsResponse public ListCollectionsResponse ListCollections(int? pageSize = default(int?), string pageToken = default(string)) { @@ -968,7 +1238,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s /// /// Thrown when fails to make API call /// The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. (optional) - /// A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. (optional) /// ApiResponse of ListCollectionsResponse public Com.Sajari.Sdk.Client.ApiResponse ListCollectionsWithHttpInfo(int? pageSize = default(int?), string pageToken = default(string)) { @@ -1005,7 +1275,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1029,7 +1299,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s /// /// Thrown when fails to make API call /// The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. (optional) - /// A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ListCollectionsResponse public async System.Threading.Tasks.Task ListCollectionsAsync(int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1043,7 +1313,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s /// /// Thrown when fails to make API call /// The maximum number of collections to return. The service may return fewer than this value. If unspecified, at most 50 collections are returned. The maximum value is 100; values above 100 are coerced to 100. (optional) - /// A page token, received from a previous [ListCollections](/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/api#operation/ListCollections) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListCollections](/docs/api#operation/ListCollections) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListCollections](/docs/api#operation/ListCollections) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListCollectionsResponse) public async System.Threading.Tasks.Task> ListCollectionsWithHttpInfoAsync(int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1082,7 +1352,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1103,26 +1373,28 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s } /// - /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. /// + /// The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. (optional) /// QueryCollectionResponse - public QueryCollectionResponse QueryCollection(string collectionId, QueryCollectionRequest queryCollectionRequest) + public QueryCollectionResponse QueryCollection(string collectionId, QueryCollectionRequest queryCollectionRequest, string accountId = default(string)) { - Com.Sajari.Sdk.Client.ApiResponse localVarResponse = QueryCollectionWithHttpInfo(collectionId, queryCollectionRequest); + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = QueryCollectionWithHttpInfo(collectionId, queryCollectionRequest, accountId); return localVarResponse.Data; } /// - /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. /// + /// The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. (optional) /// ApiResponse of QueryCollectionResponse - public Com.Sajari.Sdk.Client.ApiResponse QueryCollectionWithHttpInfo(string collectionId, QueryCollectionRequest queryCollectionRequest) + public Com.Sajari.Sdk.Client.ApiResponse QueryCollectionWithHttpInfo(string collectionId, QueryCollectionRequest queryCollectionRequest, string accountId = default(string)) { // verify the required parameter 'collectionId' is set if (collectionId == null) @@ -1160,11 +1432,15 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter + if (accountId != null) + { + localVarRequestOptions.HeaderParameters.Add("Account-Id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(accountId)); // header parameter + } localVarRequestOptions.Data = queryCollectionRequest; // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1184,28 +1460,30 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio } /// - /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. /// + /// The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. (optional) /// Cancellation Token to cancel the request. /// Task of QueryCollectionResponse - public async System.Threading.Tasks.Task QueryCollectionAsync(string collectionId, QueryCollectionRequest queryCollectionRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task QueryCollectionAsync(string collectionId, QueryCollectionRequest queryCollectionRequest, string accountId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await QueryCollectionWithHttpInfoAsync(collectionId, queryCollectionRequest, cancellationToken).ConfigureAwait(false); + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await QueryCollectionWithHttpInfoAsync(collectionId, queryCollectionRequest, accountId, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. /// + /// The account that owns the collection, e.g. `1618535966441231024`. Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (QueryCollectionResponse) - public async System.Threading.Tasks.Task> QueryCollectionWithHttpInfoAsync(string collectionId, QueryCollectionRequest queryCollectionRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> QueryCollectionWithHttpInfoAsync(string collectionId, QueryCollectionRequest queryCollectionRequest, string accountId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'collectionId' is set if (collectionId == null) @@ -1244,11 +1522,15 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter + if (accountId != null) + { + localVarRequestOptions.HeaderParameters.Add("Account-Id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(accountId)); // header parameter + } localVarRequestOptions.Data = queryCollectionRequest; // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1269,7 +1551,7 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio } /// - /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1283,7 +1565,7 @@ public QueryCollectionResponse QueryCollection2(string collectionId, QueryCollec } /// - /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1332,7 +1614,7 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1352,7 +1634,7 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio } /// - /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1367,7 +1649,7 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio } /// - /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sajari-sdk-js/blob/master/src/session.ts) + /// Query collection Query the collection to search for records. The following example demonstrates how to run a simple search for a particular string: ```json { \"variables\": { \"q\": \"search terms\" } } ``` For more information: - See [filtering content](https://docs.search.io/documentation/fundamentals/integrating-search/filters-and-sort-options) - See [tracking in the Go SDK](https://github.com/sajari/sdk-go/blob/v2/session.go) - See [tracking in the JS SDK](https://github.com/sajari/sdk-js/blob/554e182e77d3ba99a9c100b208ebf3be414d2067/src/index.ts#L881) Note: Unlike other API calls, the `QueryCollection` call can be called from a browser. When called from a browser, the `Account-Id` header must be set to your account ID. /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1418,7 +1700,7 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1438,17 +1720,201 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio return localVarResponse; } + /// + /// Track event Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. + /// + /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. + /// The collection to track the event against, e.g. `my-collection`. + /// The details of the event to track. + /// Object + public Object TrackEvent(string accountId, string collectionId, Event _event) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = TrackEventWithHttpInfo(accountId, collectionId, _event); + return localVarResponse.Data; + } + + /// + /// Track event Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. + /// + /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. + /// The collection to track the event against, e.g. `my-collection`. + /// The details of the event to track. + /// ApiResponse of Object + public Com.Sajari.Sdk.Client.ApiResponse TrackEventWithHttpInfo(string accountId, string collectionId, Event _event) + { + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'accountId' when calling CollectionsApi->TrackEvent"); + } + + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling CollectionsApi->TrackEvent"); + } + + // verify the required parameter '_event' is set + if (_event == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter '_event' when calling CollectionsApi->TrackEvent"); + } + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter + localVarRequestOptions.HeaderParameters.Add("Account-Id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(accountId)); // header parameter + localVarRequestOptions.Data = _event; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/v4/collections/{collection_id}:trackEvent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TrackEvent", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Track event Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. + /// + /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. + /// The collection to track the event against, e.g. `my-collection`. + /// The details of the event to track. + /// Cancellation Token to cancel the request. + /// Task of Object + public async System.Threading.Tasks.Task TrackEventAsync(string accountId, string collectionId, Event _event, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await TrackEventWithHttpInfoAsync(accountId, collectionId, _event, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Track event Track an analytics event when a user interacts with an object returned by a [QueryCollection](/docs/api/#operation/QueryCollection) request. An analytics event can be tracked for the following objects: - Results - Promotion banners - Redirects Note: You must pass an `Account-Id` header. + /// + /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. + /// The collection to track the event against, e.g. `my-collection`. + /// The details of the event to track. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Object) + public async System.Threading.Tasks.Task> TrackEventWithHttpInfoAsync(string accountId, string collectionId, Event _event, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'accountId' when calling CollectionsApi->TrackEvent"); + } + + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling CollectionsApi->TrackEvent"); + } + + // verify the required parameter '_event' is set + if (_event == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter '_event' when calling CollectionsApi->TrackEvent"); + } + + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter + localVarRequestOptions.HeaderParameters.Add("Account-Id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(accountId)); // header parameter + localVarRequestOptions.Data = _event; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}:trackEvent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TrackEvent", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// /// Update collection Update the details of a collection. /// /// Thrown when fails to make API call /// The collection to update, e.g. `my-collection`. - /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. - /// Details of the collection to update. + /// The details of the collection to update. + /// The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. (optional) /// Collection - public Collection UpdateCollection(string collectionId, string updateMask, Collection collection) + public Collection UpdateCollection(string collectionId, Collection collection, string updateMask = default(string)) { - Com.Sajari.Sdk.Client.ApiResponse localVarResponse = UpdateCollectionWithHttpInfo(collectionId, updateMask, collection); + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = UpdateCollectionWithHttpInfo(collectionId, collection, updateMask); return localVarResponse.Data; } @@ -1457,10 +1923,10 @@ public Collection UpdateCollection(string collectionId, string updateMask, Colle /// /// Thrown when fails to make API call /// The collection to update, e.g. `my-collection`. - /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. - /// Details of the collection to update. + /// The details of the collection to update. + /// The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. (optional) /// ApiResponse of Collection - public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInfo(string collectionId, string updateMask, Collection collection) + public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInfo(string collectionId, Collection collection, string updateMask = default(string)) { // verify the required parameter 'collectionId' is set if (collectionId == null) @@ -1468,12 +1934,6 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling CollectionsApi->UpdateCollection"); } - // verify the required parameter 'updateMask' is set - if (updateMask == null) - { - throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'updateMask' when calling CollectionsApi->UpdateCollection"); - } - // verify the required parameter 'collection' is set if (collection == null) { @@ -1504,12 +1964,15 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter - localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "update_mask", updateMask)); + if (updateMask != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "update_mask", updateMask)); + } localVarRequestOptions.Data = collection; // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1533,13 +1996,13 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf /// /// Thrown when fails to make API call /// The collection to update, e.g. `my-collection`. - /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. - /// Details of the collection to update. + /// The details of the collection to update. + /// The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. (optional) /// Cancellation Token to cancel the request. /// Task of Collection - public async System.Threading.Tasks.Task UpdateCollectionAsync(string collectionId, string updateMask, Collection collection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateCollectionAsync(string collectionId, Collection collection, string updateMask = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await UpdateCollectionWithHttpInfoAsync(collectionId, updateMask, collection, cancellationToken).ConfigureAwait(false); + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await UpdateCollectionWithHttpInfoAsync(collectionId, collection, updateMask, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1548,11 +2011,11 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf /// /// Thrown when fails to make API call /// The collection to update, e.g. `my-collection`. - /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. Each field should be in snake case, e.g. `display_name`. For each field that you want to update, provide a corresponding value in the collection object containing the new value. - /// Details of the collection to update. + /// The details of the collection to update. + /// The list of fields to update, separated by a comma, e.g. `authorized_query_domains,display_name`. Each field should be in snake case. For each field that you want to update, provide a corresponding value in the collection object containing the new value. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (Collection) - public async System.Threading.Tasks.Task> UpdateCollectionWithHttpInfoAsync(string collectionId, string updateMask, Collection collection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateCollectionWithHttpInfoAsync(string collectionId, Collection collection, string updateMask = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'collectionId' is set if (collectionId == null) @@ -1560,12 +2023,6 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling CollectionsApi->UpdateCollection"); } - // verify the required parameter 'updateMask' is set - if (updateMask == null) - { - throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'updateMask' when calling CollectionsApi->UpdateCollection"); - } - // verify the required parameter 'collection' is set if (collection == null) { @@ -1597,12 +2054,15 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter - localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "update_mask", updateMask)); + if (updateMask != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "update_mask", updateMask)); + } localVarRequestOptions.Data = collection; // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } diff --git a/src/Com.Sajari.Sdk/Api/EventsApi.cs b/src/Com.Sajari.Sdk/Api/EventsApi.cs index b02843b..0f8bdf8 100644 --- a/src/Com.Sajari.Sdk/Api/EventsApi.cs +++ b/src/Com.Sajari.Sdk/Api/EventsApi.cs @@ -31,28 +31,30 @@ public interface IEventsApiSync : IApiAccessor /// Send event /// /// - /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. /// /// Object - Object SendEvent(SendEventRequest sendEventRequest); + Object SendEvent(string accountId, SendEventRequest sendEventRequest); /// /// Send event /// /// - /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. /// /// ApiResponse of Object - ApiResponse SendEventWithHttpInfo(SendEventRequest sendEventRequest); + ApiResponse SendEventWithHttpInfo(string accountId, SendEventRequest sendEventRequest); /// /// Send event /// /// - /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call /// @@ -64,7 +66,7 @@ public interface IEventsApiSync : IApiAccessor /// Send event /// /// - /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call /// @@ -84,30 +86,32 @@ public interface IEventsApiAsync : IApiAccessor /// Send event /// /// - /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. /// /// Cancellation Token to cancel the request. /// Task of Object - System.Threading.Tasks.Task SendEventAsync(SendEventRequest sendEventRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task SendEventAsync(string accountId, SendEventRequest sendEventRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Send event /// /// - /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Object) - System.Threading.Tasks.Task> SendEventWithHttpInfoAsync(SendEventRequest sendEventRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> SendEventWithHttpInfoAsync(string accountId, SendEventRequest sendEventRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Send event /// /// - /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call /// @@ -120,7 +124,7 @@ public interface IEventsApiAsync : IApiAccessor /// Send event /// /// - /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call /// @@ -249,25 +253,33 @@ public Com.Sajari.Sdk.Client.ExceptionFactory ExceptionFactory } /// - /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. /// /// Object - public Object SendEvent(SendEventRequest sendEventRequest) + public Object SendEvent(string accountId, SendEventRequest sendEventRequest) { - Com.Sajari.Sdk.Client.ApiResponse localVarResponse = SendEventWithHttpInfo(sendEventRequest); + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = SendEventWithHttpInfo(accountId, sendEventRequest); return localVarResponse.Data; } /// - /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. /// /// ApiResponse of Object - public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEventRequest sendEventRequest) + public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(string accountId, SendEventRequest sendEventRequest) { + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'accountId' when calling EventsApi->SendEvent"); + } + // verify the required parameter 'sendEventRequest' is set if (sendEventRequest == null) { @@ -297,11 +309,12 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.HeaderParameters.Add("Account-Id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(accountId)); // header parameter localVarRequestOptions.Data = sendEventRequest; // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -321,27 +334,35 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent } /// - /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. /// /// Cancellation Token to cancel the request. /// Task of Object - public async System.Threading.Tasks.Task SendEventAsync(SendEventRequest sendEventRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task SendEventAsync(string accountId, SendEventRequest sendEventRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await SendEventWithHttpInfoAsync(sendEventRequest, cancellationToken).ConfigureAwait(false); + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await SendEventWithHttpInfoAsync(accountId, sendEventRequest, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call + /// The account that owns the collection, e.g. `1618535966441231024`. /// /// Cancellation Token to cancel the request. /// Task of ApiResponse (Object) - public async System.Threading.Tasks.Task> SendEventWithHttpInfoAsync(SendEventRequest sendEventRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> SendEventWithHttpInfoAsync(string accountId, SendEventRequest sendEventRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'accountId' when calling EventsApi->SendEvent"); + } + // verify the required parameter 'sendEventRequest' is set if (sendEventRequest == null) { @@ -372,11 +393,12 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } + localVarRequestOptions.HeaderParameters.Add("Account-Id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(accountId)); // header parameter localVarRequestOptions.Data = sendEventRequest; // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -397,7 +419,7 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent } /// - /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call /// @@ -410,7 +432,7 @@ public Object SendEvent2(SendEventRequest sendEventRequest) } /// - /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call /// @@ -451,7 +473,7 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -471,7 +493,7 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven } /// - /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call /// @@ -485,7 +507,7 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven } /// - /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` + /// Send event Send an event to the ranking system after a user interacts with a search result. When querying a collection, you can set the tracking type of the query request. When it is `CLICK` or `POS_NEG`, a token is generated for each result in the query response. You can use this token to provide feedback to the ranking system. Each time you want to record an event on a particular search result, use the send event call and provide: - The `name` of the event, e.g. `click`, `purchase`. - The `token` from the search result. - The `weight` to assign to the event, e.g. `1`. - An object containing any additional `metadata`. For example, to send an event where a customer purchased a product, use the following call: ```json { \"name\": \"purchase\", \"token\": \"eyJ...\", \"weight\": 1, \"metadata\": { \"discount\": 0.2, \"margin\": 30.0, \"customer_id\": \"12345\", \"ui_test_segment\": \"A\" } } ``` Note: You must pass an `Account-Id` header. /// /// Thrown when fails to make API call /// @@ -528,7 +550,7 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } diff --git a/src/Com.Sajari.Sdk/Api/PipelinesApi.cs b/src/Com.Sajari.Sdk/Api/PipelinesApi.cs index 6ca7d23..224220b 100644 --- a/src/Com.Sajari.Sdk/Api/PipelinesApi.cs +++ b/src/Com.Sajari.Sdk/Api/PipelinesApi.cs @@ -106,7 +106,7 @@ public interface IPipelinesApiSync : IApiAccessor /// The collection that owns the pipeline to get the default version of, e.g. `my-collection`. /// The type of the pipeline to get the default version of. /// The name of the pipeline to get the default version of, e.g. `my-pipeline`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Pipeline Pipeline GetDefaultVersion(string collectionId, string type, string name, string view = default(string)); @@ -120,7 +120,7 @@ public interface IPipelinesApiSync : IApiAccessor /// The collection that owns the pipeline to get the default version of, e.g. `my-collection`. /// The type of the pipeline to get the default version of. /// The name of the pipeline to get the default version of, e.g. `my-pipeline`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// ApiResponse of Pipeline ApiResponse GetDefaultVersionWithHttpInfo(string collectionId, string type, string name, string view = default(string)); /// @@ -134,7 +134,7 @@ public interface IPipelinesApiSync : IApiAccessor /// The type of the pipeline to retrieve. /// The name of the pipeline to retrieve, e.g. `my-pipeline`. /// The version of the pipeline to retrieve, e.g. `42`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Pipeline Pipeline GetPipeline(string collectionId, string type, string name, string version, string view = default(string)); @@ -149,7 +149,7 @@ public interface IPipelinesApiSync : IApiAccessor /// The type of the pipeline to retrieve. /// The name of the pipeline to retrieve, e.g. `my-pipeline`. /// The version of the pipeline to retrieve, e.g. `42`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// ApiResponse of Pipeline ApiResponse GetPipelineWithHttpInfo(string collectionId, string type, string name, string version, string view = default(string)); /// @@ -161,8 +161,8 @@ public interface IPipelinesApiSync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of pipelines, e.g. `my-collection`. /// The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. (optional) - /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// ListPipelinesResponse ListPipelinesResponse ListPipelines(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string)); @@ -175,8 +175,8 @@ public interface IPipelinesApiSync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of pipelines, e.g. `my-collection`. /// The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. (optional) - /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// ApiResponse of ListPipelinesResponse ApiResponse ListPipelinesWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string)); /// @@ -323,7 +323,7 @@ public interface IPipelinesApiAsync : IApiAccessor /// The collection that owns the pipeline to get the default version of, e.g. `my-collection`. /// The type of the pipeline to get the default version of. /// The name of the pipeline to get the default version of, e.g. `my-pipeline`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of Pipeline System.Threading.Tasks.Task GetDefaultVersionAsync(string collectionId, string type, string name, string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -338,7 +338,7 @@ public interface IPipelinesApiAsync : IApiAccessor /// The collection that owns the pipeline to get the default version of, e.g. `my-collection`. /// The type of the pipeline to get the default version of. /// The name of the pipeline to get the default version of, e.g. `my-pipeline`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pipeline) System.Threading.Tasks.Task> GetDefaultVersionWithHttpInfoAsync(string collectionId, string type, string name, string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -353,7 +353,7 @@ public interface IPipelinesApiAsync : IApiAccessor /// The type of the pipeline to retrieve. /// The name of the pipeline to retrieve, e.g. `my-pipeline`. /// The version of the pipeline to retrieve, e.g. `42`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of Pipeline System.Threading.Tasks.Task GetPipelineAsync(string collectionId, string type, string name, string version, string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -369,7 +369,7 @@ public interface IPipelinesApiAsync : IApiAccessor /// The type of the pipeline to retrieve. /// The name of the pipeline to retrieve, e.g. `my-pipeline`. /// The version of the pipeline to retrieve, e.g. `42`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pipeline) System.Threading.Tasks.Task> GetPipelineWithHttpInfoAsync(string collectionId, string type, string name, string version, string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -382,8 +382,8 @@ public interface IPipelinesApiAsync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of pipelines, e.g. `my-collection`. /// The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. (optional) - /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ListPipelinesResponse System.Threading.Tasks.Task ListPipelinesAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -397,8 +397,8 @@ public interface IPipelinesApiAsync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of pipelines, e.g. `my-collection`. /// The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. (optional) - /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListPipelinesResponse) System.Threading.Tasks.Task> ListPipelinesWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -640,7 +640,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePipelineWithHttpInfo(st // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -726,7 +726,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePipelineWithHttpInfo(st // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -809,7 +809,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GeneratePipe // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -894,7 +894,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GeneratePipe // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -975,7 +975,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1058,7 +1058,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1085,7 +1085,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// The collection that owns the pipeline to get the default version of, e.g. `my-collection`. /// The type of the pipeline to get the default version of. /// The name of the pipeline to get the default version of, e.g. `my-pipeline`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Pipeline public Pipeline GetDefaultVersion(string collectionId, string type, string name, string view = default(string)) { @@ -1100,7 +1100,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// The collection that owns the pipeline to get the default version of, e.g. `my-collection`. /// The type of the pipeline to get the default version of. /// The name of the pipeline to get the default version of, e.g. `my-pipeline`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// ApiResponse of Pipeline public Com.Sajari.Sdk.Client.ApiResponse GetDefaultVersionWithHttpInfo(string collectionId, string type, string name, string view = default(string)) { @@ -1155,7 +1155,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1181,7 +1181,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// The collection that owns the pipeline to get the default version of, e.g. `my-collection`. /// The type of the pipeline to get the default version of. /// The name of the pipeline to get the default version of, e.g. `my-pipeline`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of Pipeline public async System.Threading.Tasks.Task GetDefaultVersionAsync(string collectionId, string type, string name, string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1197,7 +1197,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// The collection that owns the pipeline to get the default version of, e.g. `my-collection`. /// The type of the pipeline to get the default version of. /// The name of the pipeline to get the default version of, e.g. `my-pipeline`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pipeline) public async System.Threading.Tasks.Task> GetDefaultVersionWithHttpInfoAsync(string collectionId, string type, string name, string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1254,7 +1254,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1282,7 +1282,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// The type of the pipeline to retrieve. /// The name of the pipeline to retrieve, e.g. `my-pipeline`. /// The version of the pipeline to retrieve, e.g. `42`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Pipeline public Pipeline GetPipeline(string collectionId, string type, string name, string version, string view = default(string)) { @@ -1298,7 +1298,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// The type of the pipeline to retrieve. /// The name of the pipeline to retrieve, e.g. `my-pipeline`. /// The version of the pipeline to retrieve, e.g. `42`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// ApiResponse of Pipeline public Com.Sajari.Sdk.Client.ApiResponse GetPipelineWithHttpInfo(string collectionId, string type, string name, string version, string view = default(string)) { @@ -1360,7 +1360,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1387,7 +1387,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// The type of the pipeline to retrieve. /// The name of the pipeline to retrieve, e.g. `my-pipeline`. /// The version of the pipeline to retrieve, e.g. `42`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of Pipeline public async System.Threading.Tasks.Task GetPipelineAsync(string collectionId, string type, string name, string version, string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1404,7 +1404,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// The type of the pipeline to retrieve. /// The name of the pipeline to retrieve, e.g. `my-pipeline`. /// The version of the pipeline to retrieve, e.g. `42`. - /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// The amount of information to include in the retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ApiResponse (Pipeline) public async System.Threading.Tasks.Task> GetPipelineWithHttpInfoAsync(string collectionId, string type, string name, string version, string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1468,7 +1468,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1494,8 +1494,8 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// Thrown when fails to make API call /// The collection that owns this set of pipelines, e.g. `my-collection`. /// The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. (optional) - /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// ListPipelinesResponse public ListPipelinesResponse ListPipelines(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string)) { @@ -1509,8 +1509,8 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// Thrown when fails to make API call /// The collection that owns this set of pipelines, e.g. `my-collection`. /// The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. (optional) - /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// ApiResponse of ListPipelinesResponse public Com.Sajari.Sdk.Client.ApiResponse ListPipelinesWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string)) { @@ -1558,7 +1558,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1583,8 +1583,8 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// Thrown when fails to make API call /// The collection that owns this set of pipelines, e.g. `my-collection`. /// The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. (optional) - /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ListPipelinesResponse public async System.Threading.Tasks.Task ListPipelinesAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1599,8 +1599,8 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP /// Thrown when fails to make API call /// The collection that owns this set of pipelines, e.g. `my-collection`. /// The maximum number of pipelines to return. The service may return fewer than this value. If unspecified, at most 50 pipelines are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPipelines](/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/api#operation/ListPipelines) must match the call that provided the page token. (optional) - /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) + /// A page token, received from a previous [ListPipelines](/docs/api#operation/ListPipelines) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPipelines](/docs/api#operation/ListPipelines) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved pipeline. - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. (optional, default to VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListPipelinesResponse) public async System.Threading.Tasks.Task> ListPipelinesWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1650,7 +1650,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1732,7 +1732,7 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultPipelineWithHttpInfo( // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1816,7 +1816,7 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultPipelineWithHttpInfo( // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1916,7 +1916,7 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultVersionWithHttpInfo(s // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -2018,7 +2018,7 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultVersionWithHttpInfo(s // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } diff --git a/src/Com.Sajari.Sdk/Api/PromotionsApi.cs b/src/Com.Sajari.Sdk/Api/PromotionsApi.cs index b1a25ec..e222e50 100644 --- a/src/Com.Sajari.Sdk/Api/PromotionsApi.cs +++ b/src/Com.Sajari.Sdk/Api/PromotionsApi.cs @@ -105,9 +105,10 @@ public interface IPromotionsApiSync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of promotions, e.g. `my-collection`. /// The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. (optional, default to PROMOTION_VIEW_UNSPECIFIED) /// ListPromotionsResponse - ListPromotionsResponse ListPromotions(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); + ListPromotionsResponse ListPromotions(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string)); /// /// List promotions @@ -118,9 +119,10 @@ public interface IPromotionsApiSync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of promotions, e.g. `my-collection`. /// The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. (optional, default to PROMOTION_VIEW_UNSPECIFIED) /// ApiResponse of ListPromotionsResponse - ApiResponse ListPromotionsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); + ApiResponse ListPromotionsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string)); /// /// Update promotion /// @@ -241,10 +243,11 @@ public interface IPromotionsApiAsync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of promotions, e.g. `my-collection`. /// The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. (optional, default to PROMOTION_VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ListPromotionsResponse - System.Threading.Tasks.Task ListPromotionsAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ListPromotionsAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// List promotions @@ -255,10 +258,11 @@ public interface IPromotionsApiAsync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of promotions, e.g. `my-collection`. /// The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. (optional, default to PROMOTION_VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListPromotionsResponse) - System.Threading.Tasks.Task> ListPromotionsWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> ListPromotionsWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update promotion /// @@ -470,7 +474,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePromotionWithHttpInfo( // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -554,7 +558,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePromotionWithHttpInfo( // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -635,7 +639,7 @@ public Com.Sajari.Sdk.Client.ApiResponse DeletePromotionWithHttpInfo(str // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -718,7 +722,7 @@ public Com.Sajari.Sdk.Client.ApiResponse DeletePromotionWithHttpInfo(str // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -799,7 +803,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetPromotionWithHttpInfo(str // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -882,7 +886,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetPromotionWithHttpInfo(str // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -908,11 +912,12 @@ public Com.Sajari.Sdk.Client.ApiResponse GetPromotionWithHttpInfo(str /// Thrown when fails to make API call /// The collection that owns this set of promotions, e.g. `my-collection`. /// The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. (optional, default to PROMOTION_VIEW_UNSPECIFIED) /// ListPromotionsResponse - public ListPromotionsResponse ListPromotions(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) + public ListPromotionsResponse ListPromotions(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string)) { - Com.Sajari.Sdk.Client.ApiResponse localVarResponse = ListPromotionsWithHttpInfo(collectionId, pageSize, pageToken); + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = ListPromotionsWithHttpInfo(collectionId, pageSize, pageToken, view); return localVarResponse.Data; } @@ -922,9 +927,10 @@ public Com.Sajari.Sdk.Client.ApiResponse GetPromotionWithHttpInfo(str /// Thrown when fails to make API call /// The collection that owns this set of promotions, e.g. `my-collection`. /// The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. (optional, default to PROMOTION_VIEW_UNSPECIFIED) /// ApiResponse of ListPromotionsResponse - public Com.Sajari.Sdk.Client.ApiResponse ListPromotionsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) + public Com.Sajari.Sdk.Client.ApiResponse ListPromotionsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string)) { // verify the required parameter 'collectionId' is set if (collectionId == null) @@ -963,10 +969,14 @@ public Com.Sajari.Sdk.Client.ApiResponse GetPromotionWithHttpInfo(str { localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); } + if (view != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "view", view)); + } // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -991,12 +1001,13 @@ public Com.Sajari.Sdk.Client.ApiResponse GetPromotionWithHttpInfo(str /// Thrown when fails to make API call /// The collection that owns this set of promotions, e.g. `my-collection`. /// The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. (optional, default to PROMOTION_VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ListPromotionsResponse - public async System.Threading.Tasks.Task ListPromotionsAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task ListPromotionsAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await ListPromotionsWithHttpInfoAsync(collectionId, pageSize, pageToken, cancellationToken).ConfigureAwait(false); + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await ListPromotionsWithHttpInfoAsync(collectionId, pageSize, pageToken, view, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1006,10 +1017,11 @@ public Com.Sajari.Sdk.Client.ApiResponse GetPromotionWithHttpInfo(str /// Thrown when fails to make API call /// The collection that owns this set of promotions, e.g. `my-collection`. /// The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 promotions are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListPromotions](/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListPromotions](/docs/api#operation/ListPromotions) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListPromotions](/docs/api#operation/ListPromotions) must match the call that provided the page token. (optional) + /// The amount of information to include in each retrieved promotion. - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. (optional, default to PROMOTION_VIEW_UNSPECIFIED) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListPromotionsResponse) - public async System.Threading.Tasks.Task> ListPromotionsWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> ListPromotionsWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), string view = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'collectionId' is set if (collectionId == null) @@ -1049,10 +1061,14 @@ public Com.Sajari.Sdk.Client.ApiResponse GetPromotionWithHttpInfo(str { localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); } + if (view != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "view", view)); + } // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1152,7 +1168,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdatePromotionWithHttpInfo( // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1254,7 +1270,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdatePromotionWithHttpInfo( // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } diff --git a/src/Com.Sajari.Sdk/Api/RecordsApi.cs b/src/Com.Sajari.Sdk/Api/RecordsApi.cs index b6127aa..5f32c14 100644 --- a/src/Com.Sajari.Sdk/Api/RecordsApi.cs +++ b/src/Com.Sajari.Sdk/Api/RecordsApi.cs @@ -31,7 +31,7 @@ public interface IRecordsApiSync : IApiAccessor /// Batch update records /// /// - /// The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// The batch version of the [UpdateRecord](/docs/api#operation/UpdateRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the records to update, e.g. `my-collection`. @@ -43,7 +43,7 @@ public interface IRecordsApiSync : IApiAccessor /// Batch update records /// /// - /// The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// The batch version of the [UpdateRecord](/docs/api#operation/UpdateRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the records to update, e.g. `my-collection`. @@ -54,7 +54,7 @@ public interface IRecordsApiSync : IApiAccessor /// Batch upsert records /// /// - /// The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. + /// The batch version of the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection to upsert the records in, e.g. `my-collection`. @@ -66,7 +66,7 @@ public interface IRecordsApiSync : IApiAccessor /// Batch upsert records /// /// - /// The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. + /// The batch version of the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection to upsert the records in, e.g. `my-collection`. @@ -123,7 +123,7 @@ public interface IRecordsApiSync : IApiAccessor /// Update record /// /// - /// Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the record to update, e.g. `my-collection`. @@ -135,7 +135,7 @@ public interface IRecordsApiSync : IApiAccessor /// Update record /// /// - /// Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the record to update, e.g. `my-collection`. @@ -178,7 +178,7 @@ public interface IRecordsApiAsync : IApiAccessor /// Batch update records /// /// - /// The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// The batch version of the [UpdateRecord](/docs/api#operation/UpdateRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the records to update, e.g. `my-collection`. @@ -191,7 +191,7 @@ public interface IRecordsApiAsync : IApiAccessor /// Batch update records /// /// - /// The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// The batch version of the [UpdateRecord](/docs/api#operation/UpdateRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the records to update, e.g. `my-collection`. @@ -203,7 +203,7 @@ public interface IRecordsApiAsync : IApiAccessor /// Batch upsert records /// /// - /// The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. + /// The batch version of the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection to upsert the records in, e.g. `my-collection`. @@ -216,7 +216,7 @@ public interface IRecordsApiAsync : IApiAccessor /// Batch upsert records /// /// - /// The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. + /// The batch version of the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection to upsert the records in, e.g. `my-collection`. @@ -278,7 +278,7 @@ public interface IRecordsApiAsync : IApiAccessor /// Update record /// /// - /// Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the record to update, e.g. `my-collection`. @@ -291,7 +291,7 @@ public interface IRecordsApiAsync : IApiAccessor /// Update record /// /// - /// Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the record to update, e.g. `my-collection`. @@ -445,7 +445,7 @@ public Com.Sajari.Sdk.Client.ExceptionFactory ExceptionFactory } /// - /// Batch update records The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// Batch update records The batch version of the [UpdateRecord](/docs/api#operation/UpdateRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the records to update, e.g. `my-collection`. @@ -458,7 +458,7 @@ public BatchUpdateRecordsResponse BatchUpdateRecords(string collectionId, BatchU } /// - /// Batch update records The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// Batch update records The batch version of the [UpdateRecord](/docs/api#operation/UpdateRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the records to update, e.g. `my-collection`. @@ -506,7 +506,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpdate // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -526,7 +526,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpdate } /// - /// Batch update records The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// Batch update records The batch version of the [UpdateRecord](/docs/api#operation/UpdateRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the records to update, e.g. `my-collection`. @@ -540,7 +540,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpdate } /// - /// Batch update records The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// Batch update records The batch version of the [UpdateRecord](/docs/api#operation/UpdateRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the records to update, e.g. `my-collection`. @@ -590,7 +590,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpdate // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -611,7 +611,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpdate } /// - /// Batch upsert records The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Batch upsert records The batch version of the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection to upsert the records in, e.g. `my-collection`. @@ -624,7 +624,7 @@ public BatchUpsertRecordsResponse BatchUpsertRecords(string collectionId, BatchU } /// - /// Batch upsert records The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Batch upsert records The batch version of the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection to upsert the records in, e.g. `my-collection`. @@ -672,7 +672,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -692,7 +692,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert } /// - /// Batch upsert records The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Batch upsert records The batch version of the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection to upsert the records in, e.g. `my-collection`. @@ -706,7 +706,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert } /// - /// Batch upsert records The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Batch upsert records The batch version of the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection to upsert the records in, e.g. `my-collection`. @@ -756,7 +756,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -838,7 +838,7 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRecordWithHttpInfo(string // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -922,7 +922,7 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRecordWithHttpInfo(string // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1004,7 +1004,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRecordWithHttpInfo(string co // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1088,7 +1088,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRecordWithHttpInfo(string co // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1109,7 +1109,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRecordWithHttpInfo(string co } /// - /// Update record Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Update record Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the record to update, e.g. `my-collection`. @@ -1122,7 +1122,7 @@ public Object UpdateRecord(string collectionId, UpdateRecordRequest updateRecord } /// - /// Update record Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Update record Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the record to update, e.g. `my-collection`. @@ -1170,7 +1170,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1190,7 +1190,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string } /// - /// Update record Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Update record Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the record to update, e.g. `my-collection`. @@ -1204,7 +1204,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string } /// - /// Update record Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/api#operation/UpsertRecord) call. + /// Update record Add or update specific fields within a record with the given values. The updated record is returned in the response. To replace all fields in a record, you should use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. Note that the update record call cannot be used to add or update indexed or unique fields. For this case use the [UpsertRecord](/docs/api#operation/UpsertRecord) call. /// /// Thrown when fails to make API call /// The collection that contains the record to update, e.g. `my-collection`. @@ -1254,7 +1254,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1336,7 +1336,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpsertRecordWithH // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1420,7 +1420,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpsertRecordWithH // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } diff --git a/src/Com.Sajari.Sdk/Api/RedirectsApi.cs b/src/Com.Sajari.Sdk/Api/RedirectsApi.cs index 4d3c12d..c4cb7b8 100644 --- a/src/Com.Sajari.Sdk/Api/RedirectsApi.cs +++ b/src/Com.Sajari.Sdk/Api/RedirectsApi.cs @@ -105,7 +105,7 @@ public interface IRedirectsApiSync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of redirects, e.g. `my-collection`. /// The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. (optional) /// ListRedirectsResponse ListRedirectsResponse ListRedirects(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); @@ -118,7 +118,7 @@ public interface IRedirectsApiSync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of redirects, e.g. `my-collection`. /// The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. (optional) /// ApiResponse of ListRedirectsResponse ApiResponse ListRedirectsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); /// @@ -241,7 +241,7 @@ public interface IRedirectsApiAsync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of redirects, e.g. `my-collection`. /// The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ListRedirectsResponse System.Threading.Tasks.Task ListRedirectsAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -255,7 +255,7 @@ public interface IRedirectsApiAsync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of redirects, e.g. `my-collection`. /// The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListRedirectsResponse) System.Threading.Tasks.Task> ListRedirectsWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -470,7 +470,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateRedirectWithHttpInfo(st // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -554,7 +554,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateRedirectWithHttpInfo(st // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -635,7 +635,7 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRedirectWithHttpInfo(stri // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -718,7 +718,7 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRedirectWithHttpInfo(stri // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -799,7 +799,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRedirectWithHttpInfo(strin // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -882,7 +882,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRedirectWithHttpInfo(strin // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -908,7 +908,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRedirectWithHttpInfo(strin /// Thrown when fails to make API call /// The collection that owns this set of redirects, e.g. `my-collection`. /// The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. (optional) /// ListRedirectsResponse public ListRedirectsResponse ListRedirects(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) { @@ -922,7 +922,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRedirectWithHttpInfo(strin /// Thrown when fails to make API call /// The collection that owns this set of redirects, e.g. `my-collection`. /// The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. (optional) /// ApiResponse of ListRedirectsResponse public Com.Sajari.Sdk.Client.ApiResponse ListRedirectsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) { @@ -966,7 +966,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRedirectWithHttpInfo(strin // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -991,7 +991,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRedirectWithHttpInfo(strin /// Thrown when fails to make API call /// The collection that owns this set of redirects, e.g. `my-collection`. /// The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ListRedirectsResponse public async System.Threading.Tasks.Task ListRedirectsAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1006,7 +1006,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRedirectWithHttpInfo(strin /// Thrown when fails to make API call /// The collection that owns this set of redirects, e.g. `my-collection`. /// The maximum number of redirects to return. The service may return fewer than this value. If unspecified, at most 50 redirects are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListRedirects](/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/api#operation/ListRedirects) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListRedirects](/docs/api#operation/ListRedirects) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListRedirects](/docs/api#operation/ListRedirects) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListRedirectsResponse) public async System.Threading.Tasks.Task> ListRedirectsWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -1052,7 +1052,7 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRedirectWithHttpInfo(strin // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1152,7 +1152,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRedirectWithHttpInfo(st // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -1254,7 +1254,7 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRedirectWithHttpInfo(st // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } diff --git a/src/Com.Sajari.Sdk/Api/SchemaApi.cs b/src/Com.Sajari.Sdk/Api/SchemaApi.cs index 275e4b4..d0b5084 100644 --- a/src/Com.Sajari.Sdk/Api/SchemaApi.cs +++ b/src/Com.Sajari.Sdk/Api/SchemaApi.cs @@ -31,7 +31,7 @@ public interface ISchemaApiSync : IApiAccessor /// Batch create schema fields /// /// - /// The batch version of the [CreateSchemaField](/api#operation/CreateSchemaField) call. + /// The batch version of the [CreateSchemaField](/docs/api#operation/CreateSchemaField) call. /// /// Thrown when fails to make API call /// The collection to create the schema fields in, e.g. `my-collection`. @@ -43,7 +43,7 @@ public interface ISchemaApiSync : IApiAccessor /// Batch create schema fields /// /// - /// The batch version of the [CreateSchemaField](/api#operation/CreateSchemaField) call. + /// The batch version of the [CreateSchemaField](/docs/api#operation/CreateSchemaField) call. /// /// Thrown when fails to make API call /// The collection to create the schema fields in, e.g. `my-collection`. @@ -82,7 +82,7 @@ public interface ISchemaApiSync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of schema fields, e.g. `my-collection`. /// The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) /// ListSchemaFieldsResponse ListSchemaFieldsResponse ListSchemaFields(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); @@ -95,7 +95,7 @@ public interface ISchemaApiSync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of schema fields, e.g. `my-collection`. /// The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) /// ApiResponse of ListSchemaFieldsResponse ApiResponse ListSchemaFieldsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); #endregion Synchronous Operations @@ -111,7 +111,7 @@ public interface ISchemaApiAsync : IApiAccessor /// Batch create schema fields /// /// - /// The batch version of the [CreateSchemaField](/api#operation/CreateSchemaField) call. + /// The batch version of the [CreateSchemaField](/docs/api#operation/CreateSchemaField) call. /// /// Thrown when fails to make API call /// The collection to create the schema fields in, e.g. `my-collection`. @@ -124,7 +124,7 @@ public interface ISchemaApiAsync : IApiAccessor /// Batch create schema fields /// /// - /// The batch version of the [CreateSchemaField](/api#operation/CreateSchemaField) call. + /// The batch version of the [CreateSchemaField](/docs/api#operation/CreateSchemaField) call. /// /// Thrown when fails to make API call /// The collection to create the schema fields in, e.g. `my-collection`. @@ -166,7 +166,7 @@ public interface ISchemaApiAsync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of schema fields, e.g. `my-collection`. /// The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ListSchemaFieldsResponse System.Threading.Tasks.Task ListSchemaFieldsAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -180,7 +180,7 @@ public interface ISchemaApiAsync : IApiAccessor /// Thrown when fails to make API call /// The collection that owns this set of schema fields, e.g. `my-collection`. /// The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListSchemaFieldsResponse) System.Threading.Tasks.Task> ListSchemaFieldsWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -305,7 +305,7 @@ public Com.Sajari.Sdk.Client.ExceptionFactory ExceptionFactory } /// - /// Batch create schema fields The batch version of the [CreateSchemaField](/api#operation/CreateSchemaField) call. + /// Batch create schema fields The batch version of the [CreateSchemaField](/docs/api#operation/CreateSchemaField) call. /// /// Thrown when fails to make API call /// The collection to create the schema fields in, e.g. `my-collection`. @@ -318,7 +318,7 @@ public BatchCreateSchemaFieldsResponse BatchCreateSchemaFields(string collection } /// - /// Batch create schema fields The batch version of the [CreateSchemaField](/api#operation/CreateSchemaField) call. + /// Batch create schema fields The batch version of the [CreateSchemaField](/docs/api#operation/CreateSchemaField) call. /// /// Thrown when fails to make API call /// The collection to create the schema fields in, e.g. `my-collection`. @@ -366,7 +366,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -386,7 +386,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC } /// - /// Batch create schema fields The batch version of the [CreateSchemaField](/api#operation/CreateSchemaField) call. + /// Batch create schema fields The batch version of the [CreateSchemaField](/docs/api#operation/CreateSchemaField) call. /// /// Thrown when fails to make API call /// The collection to create the schema fields in, e.g. `my-collection`. @@ -400,7 +400,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC } /// - /// Batch create schema fields The batch version of the [CreateSchemaField](/api#operation/CreateSchemaField) call. + /// Batch create schema fields The batch version of the [CreateSchemaField](/docs/api#operation/CreateSchemaField) call. /// /// Thrown when fails to make API call /// The collection to create the schema fields in, e.g. `my-collection`. @@ -450,7 +450,7 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -532,7 +532,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -616,7 +616,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -642,7 +642,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI /// Thrown when fails to make API call /// The collection that owns this set of schema fields, e.g. `my-collection`. /// The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) /// ListSchemaFieldsResponse public ListSchemaFieldsResponse ListSchemaFields(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) { @@ -656,7 +656,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI /// Thrown when fails to make API call /// The collection that owns this set of schema fields, e.g. `my-collection`. /// The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) /// ApiResponse of ListSchemaFieldsResponse public Com.Sajari.Sdk.Client.ApiResponse ListSchemaFieldsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) { @@ -700,7 +700,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } @@ -725,7 +725,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI /// Thrown when fails to make API call /// The collection that owns this set of schema fields, e.g. `my-collection`. /// The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ListSchemaFieldsResponse public async System.Threading.Tasks.Task ListSchemaFieldsAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -740,7 +740,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI /// Thrown when fails to make API call /// The collection that owns this set of schema fields, e.g. `my-collection`. /// The maximum number of schema fields to return. The service may return fewer than this value. If unspecified, at most 50 schema fields are returned. The maximum value is 1000; values above 1000 are coerced to 1000. (optional) - /// A page token, received from a previous [ListSchemaFields](/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) + /// A page token, received from a previous [ListSchemaFields](/docs/api#operation/ListSchemaFields) call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to [ListSchemaFields](/docs/api#operation/ListSchemaFields) must match the call that provided the page token. (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse (ListSchemaFieldsResponse) public async System.Threading.Tasks.Task> ListSchemaFieldsWithHttpInfoAsync(string collectionId, int? pageSize = default(int?), string pageToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) @@ -786,7 +786,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI // authentication (BasicAuth) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Com.Sajari.Sdk.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); } diff --git a/src/Com.Sajari.Sdk/Client/ApiClient.cs b/src/Com.Sajari.Sdk/Client/ApiClient.cs index de7da7e..d601086 100644 --- a/src/Com.Sajari.Sdk/Client/ApiClient.cs +++ b/src/Com.Sajari.Sdk/Client/ApiClient.cs @@ -371,12 +371,15 @@ private RestRequest NewRequest( { foreach (var fileParam in options.FileParameters) { - var bytes = ClientUtils.ReadAsBytes(fileParam.Value); - var fileStream = fileParam.Value as FileStream; - if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); - else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + foreach (var file in fileParam.Value) + { + var bytes = ClientUtils.ReadAsBytes(file); + var fileStream = file as FileStream; + if (fileStream != null) + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + else + request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + } } } diff --git a/src/Com.Sajari.Sdk/Client/Configuration.cs b/src/Com.Sajari.Sdk/Client/Configuration.cs index 485f6df..30f5ac2 100644 --- a/src/Com.Sajari.Sdk/Client/Configuration.cs +++ b/src/Com.Sajari.Sdk/Client/Configuration.cs @@ -32,7 +32,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "4.3.0"; + public const string Version = "5.0.0"; /// /// Identifier for ISO 8601 DateTime Format @@ -102,7 +102,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = "sajari-sdk-csharp-4.3.0"; + UserAgent = "sajari-sdk-csharp-5.0.0"; BasePath = "https://api.search.io"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -447,7 +447,7 @@ public static string ToDebugReport() report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; report += " Version of the API: v4\n"; - report += " SDK Package Version: 4.3.0\n"; + report += " SDK Package Version: 5.0.0\n"; return report; } diff --git a/src/Com.Sajari.Sdk/Client/GlobalConfiguration.cs b/src/Com.Sajari.Sdk/Client/GlobalConfiguration.cs index 67ad32f..2480118 100644 --- a/src/Com.Sajari.Sdk/Client/GlobalConfiguration.cs +++ b/src/Com.Sajari.Sdk/Client/GlobalConfiguration.cs @@ -65,4 +65,4 @@ public static IReadableConfiguration Instance } } } -} \ No newline at end of file +} diff --git a/src/Com.Sajari.Sdk/Client/RequestOptions.cs b/src/Com.Sajari.Sdk/Client/RequestOptions.cs index f7af61b..a4a311f 100644 --- a/src/Com.Sajari.Sdk/Client/RequestOptions.cs +++ b/src/Com.Sajari.Sdk/Client/RequestOptions.cs @@ -47,7 +47,7 @@ public class RequestOptions /// /// File parameters to be sent along with the request. /// - public Dictionary FileParameters { get; set; } + public Multimap FileParameters { get; set; } /// /// Cookies to be sent along with the request. @@ -68,7 +68,7 @@ public RequestOptions() QueryParameters = new Multimap(); HeaderParameters = new Multimap(); FormParameters = new Dictionary(); - FileParameters = new Dictionary(); + FileParameters = new Multimap(); Cookies = new List(); } } diff --git a/src/Com.Sajari.Sdk/Client/RetryConfiguration.cs b/src/Com.Sajari.Sdk/Client/RetryConfiguration.cs index c63e182..5fea561 100644 --- a/src/Com.Sajari.Sdk/Client/RetryConfiguration.cs +++ b/src/Com.Sajari.Sdk/Client/RetryConfiguration.cs @@ -1,3 +1,14 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + using Polly; using RestSharp; @@ -6,7 +17,7 @@ namespace Com.Sajari.Sdk.Client /// /// Configuration class to set the polly retry policies to be applied to the requests. /// - public class RetryConfiguration + public static class RetryConfiguration { /// /// Retry policy diff --git a/src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj b/src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj index 18229b4..f03d771 100644 --- a/src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj +++ b/src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj @@ -1,7 +1,7 @@ - false + false netstandard2.0 Com.Sajari.Sdk Com.Sajari.Sdk @@ -12,7 +12,7 @@ A library generated from a OpenAPI doc No Copyright Com.Sajari.Sdk - 4.3.0 + 5.0.0 bin\$(Configuration)\$(TargetFramework)\Com.Sajari.Sdk.xml https://github.com/sajari/GIT_USER_ID/sdk-dotnet.git git diff --git a/src/Com.Sajari.Sdk/Model/ActivePromotion.cs b/src/Com.Sajari.Sdk/Model/ActivePromotion.cs index d1e7041..68c79e4 100644 --- a/src/Com.Sajari.Sdk/Model/ActivePromotion.cs +++ b/src/Com.Sajari.Sdk/Model/ActivePromotion.cs @@ -27,7 +27,7 @@ namespace Com.Sajari.Sdk.Model { /// - /// ActivePromotion is a promotion that is active for a given search. + /// A promotion that is active for a given search. /// [DataContract(Name = "ActivePromotion")] public partial class ActivePromotion : IEquatable, IValidatableObject diff --git a/src/Com.Sajari.Sdk/Model/Banner.cs b/src/Com.Sajari.Sdk/Model/Banner.cs new file mode 100644 index 0000000..1dc53ce --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/Banner.cs @@ -0,0 +1,284 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Com.Sajari.Sdk.Client.OpenAPIDateConverter; + +namespace Com.Sajari.Sdk.Model +{ + /// + /// A synthetic search result that renders as an image. It takes a user to a pre-determined location when clicked. + /// + [DataContract(Name = "Banner")] + public partial class Banner : IEquatable, IValidatableObject + { + + /// + /// Gets or Sets TextPosition + /// + [DataMember(Name = "text_position", EmitDefaultValue = false)] + public TextPosition? TextPosition { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The description of the banner, displayed in sub-head font.. + /// The height the banner occupies in grid cells.. + /// The ID of the banner, used to identify clicked banners.. + /// The URL of the image used for the banner.. + /// The 1-based index indicating where the banner appears in search results.. + /// The URL to redirect the user to when the banner is clicked.. + /// The color of the text as a hex code with a # prefix, e.g. #FFCC00 or #FC0.. + /// textPosition. + /// The title of the banner, displayed in header font.. + /// The width the banner occupies in grid cells.. + public Banner(string description = default(string), int height = default(int), string id = default(string), string imageUrl = default(string), int position = default(int), string targetUrl = default(string), string textColor = default(string), TextPosition? textPosition = default(TextPosition?), string title = default(string), int width = default(int)) + { + this.Description = description; + this.Height = height; + this.Id = id; + this.ImageUrl = imageUrl; + this.Position = position; + this.TargetUrl = targetUrl; + this.TextColor = textColor; + this.TextPosition = textPosition; + this.Title = title; + this.Width = width; + } + + /// + /// The description of the banner, displayed in sub-head font. + /// + /// The description of the banner, displayed in sub-head font. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// The height the banner occupies in grid cells. + /// + /// The height the banner occupies in grid cells. + [DataMember(Name = "height", EmitDefaultValue = false)] + public int Height { get; set; } + + /// + /// The ID of the banner, used to identify clicked banners. + /// + /// The ID of the banner, used to identify clicked banners. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// The URL of the image used for the banner. + /// + /// The URL of the image used for the banner. + [DataMember(Name = "image_url", EmitDefaultValue = false)] + public string ImageUrl { get; set; } + + /// + /// The 1-based index indicating where the banner appears in search results. + /// + /// The 1-based index indicating where the banner appears in search results. + [DataMember(Name = "position", EmitDefaultValue = false)] + public int Position { get; set; } + + /// + /// The URL to redirect the user to when the banner is clicked. + /// + /// The URL to redirect the user to when the banner is clicked. + [DataMember(Name = "target_url", EmitDefaultValue = false)] + public string TargetUrl { get; set; } + + /// + /// The color of the text as a hex code with a # prefix, e.g. #FFCC00 or #FC0. + /// + /// The color of the text as a hex code with a # prefix, e.g. #FFCC00 or #FC0. + [DataMember(Name = "text_color", EmitDefaultValue = false)] + public string TextColor { get; set; } + + /// + /// The title of the banner, displayed in header font. + /// + /// The title of the banner, displayed in header font. + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + + /// + /// The width the banner occupies in grid cells. + /// + /// The width the banner occupies in grid cells. + [DataMember(Name = "width", EmitDefaultValue = false)] + public int Width { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Banner {\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Height: ").Append(Height).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); + sb.Append(" Position: ").Append(Position).Append("\n"); + sb.Append(" TargetUrl: ").Append(TargetUrl).Append("\n"); + sb.Append(" TextColor: ").Append(TextColor).Append("\n"); + sb.Append(" TextPosition: ").Append(TextPosition).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Width: ").Append(Width).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Banner); + } + + /// + /// Returns true if Banner instances are equal + /// + /// Instance of Banner to be compared + /// Boolean + public bool Equals(Banner input) + { + if (input == null) + { + return false; + } + return + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.Height == input.Height || + this.Height.Equals(input.Height) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.ImageUrl == input.ImageUrl || + (this.ImageUrl != null && + this.ImageUrl.Equals(input.ImageUrl)) + ) && + ( + this.Position == input.Position || + this.Position.Equals(input.Position) + ) && + ( + this.TargetUrl == input.TargetUrl || + (this.TargetUrl != null && + this.TargetUrl.Equals(input.TargetUrl)) + ) && + ( + this.TextColor == input.TextColor || + (this.TextColor != null && + this.TextColor.Equals(input.TextColor)) + ) && + ( + this.TextPosition == input.TextPosition || + this.TextPosition.Equals(input.TextPosition) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Width == input.Width || + this.Width.Equals(input.Width) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Description != null) + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Height.GetHashCode(); + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.ImageUrl != null) + { + hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Position.GetHashCode(); + if (this.TargetUrl != null) + { + hashCode = (hashCode * 59) + this.TargetUrl.GetHashCode(); + } + if (this.TextColor != null) + { + hashCode = (hashCode * 59) + this.TextColor.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TextPosition.GetHashCode(); + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Width.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Com.Sajari.Sdk/Model/Collection.cs b/src/Com.Sajari.Sdk/Model/Collection.cs index 520403d..dccb12b 100644 --- a/src/Com.Sajari.Sdk/Model/Collection.cs +++ b/src/Com.Sajari.Sdk/Model/Collection.cs @@ -40,7 +40,7 @@ protected Collection() { } /// /// Initializes a new instance of the class. /// - /// The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request.. + /// The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/docs/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request.. /// The collection's display name. You can change this at any time. (required). public Collection(List authorizedQueryDomains = default(List), string displayName = default(string)) { @@ -68,9 +68,9 @@ public bool ShouldSerializeAccountId() return false; } /// - /// The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request. + /// The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/docs/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request. /// - /// The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request. + /// The list of authorized query domains for the collection. Client-side / browser requests to the [QueryCollection](/docs/api#operation/QueryCollection) call can be made by any authorized query domain or any of its subdomains. This allows your interface to make search requests without having to provide an API key in the client-side request. [DataMember(Name = "authorized_query_domains", EmitDefaultValue = false)] public List AuthorizedQueryDomains { get; set; } diff --git a/src/Com.Sajari.Sdk/Model/Event.cs b/src/Com.Sajari.Sdk/Model/Event.cs new file mode 100644 index 0000000..88bc230 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/Event.cs @@ -0,0 +1,239 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Com.Sajari.Sdk.Client.OpenAPIDateConverter; + +namespace Com.Sajari.Sdk.Model +{ + /// + /// An analytics event that relates to a query made on a collection. + /// + [DataContract(Name = "Event")] + public partial class Event : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Event() { } + /// + /// Initializes a new instance of the class. + /// + /// The identifier of the promotion banner the event is about.. + /// An object made up of field-value pairs that contains additional metadata to record with the event.. + /// The query identifier. (required). + /// The identifier of the redirect the event is about.. + /// The identifier of the result the event is about.. + /// The type of event, e.g. `click`, `purchase`, `add_to_cart`. (required). + public Event(string bannerId = default(string), Dictionary metadata = default(Dictionary), string queryId = default(string), string redirectId = default(string), string resultId = default(string), string type = default(string)) + { + // to ensure "queryId" is required (not null) + if (queryId == null) { + throw new ArgumentNullException("queryId is a required property for Event and cannot be null"); + } + this.QueryId = queryId; + // to ensure "type" is required (not null) + if (type == null) { + throw new ArgumentNullException("type is a required property for Event and cannot be null"); + } + this.Type = type; + this.BannerId = bannerId; + this.Metadata = metadata; + this.RedirectId = redirectId; + this.ResultId = resultId; + } + + /// + /// The identifier of the promotion banner the event is about. + /// + /// The identifier of the promotion banner the event is about. + [DataMember(Name = "banner_id", EmitDefaultValue = false)] + public string BannerId { get; set; } + + /// + /// An object made up of field-value pairs that contains additional metadata to record with the event. + /// + /// An object made up of field-value pairs that contains additional metadata to record with the event. + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public Dictionary Metadata { get; set; } + + /// + /// The query identifier. + /// + /// The query identifier. + [DataMember(Name = "query_id", IsRequired = true, EmitDefaultValue = false)] + public string QueryId { get; set; } + + /// + /// The identifier of the redirect the event is about. + /// + /// The identifier of the redirect the event is about. + [DataMember(Name = "redirect_id", EmitDefaultValue = false)] + public string RedirectId { get; set; } + + /// + /// The identifier of the result the event is about. + /// + /// The identifier of the result the event is about. + [DataMember(Name = "result_id", EmitDefaultValue = false)] + public string ResultId { get; set; } + + /// + /// The type of event, e.g. `click`, `purchase`, `add_to_cart`. + /// + /// The type of event, e.g. `click`, `purchase`, `add_to_cart`. + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = false)] + public string Type { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Event {\n"); + sb.Append(" BannerId: ").Append(BannerId).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" QueryId: ").Append(QueryId).Append("\n"); + sb.Append(" RedirectId: ").Append(RedirectId).Append("\n"); + sb.Append(" ResultId: ").Append(ResultId).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as Event); + } + + /// + /// Returns true if Event instances are equal + /// + /// Instance of Event to be compared + /// Boolean + public bool Equals(Event input) + { + if (input == null) + { + return false; + } + return + ( + this.BannerId == input.BannerId || + (this.BannerId != null && + this.BannerId.Equals(input.BannerId)) + ) && + ( + this.Metadata == input.Metadata || + this.Metadata != null && + input.Metadata != null && + this.Metadata.SequenceEqual(input.Metadata) + ) && + ( + this.QueryId == input.QueryId || + (this.QueryId != null && + this.QueryId.Equals(input.QueryId)) + ) && + ( + this.RedirectId == input.RedirectId || + (this.RedirectId != null && + this.RedirectId.Equals(input.RedirectId)) + ) && + ( + this.ResultId == input.ResultId || + (this.ResultId != null && + this.ResultId.Equals(input.ResultId)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.BannerId != null) + { + hashCode = (hashCode * 59) + this.BannerId.GetHashCode(); + } + if (this.Metadata != null) + { + hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); + } + if (this.QueryId != null) + { + hashCode = (hashCode * 59) + this.QueryId.GetHashCode(); + } + if (this.RedirectId != null) + { + hashCode = (hashCode * 59) + this.RedirectId.GetHashCode(); + } + if (this.ResultId != null) + { + hashCode = (hashCode * 59) + this.ResultId.GetHashCode(); + } + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Com.Sajari.Sdk/Model/ExperimentRequest.cs b/src/Com.Sajari.Sdk/Model/ExperimentRequest.cs new file mode 100644 index 0000000..4669912 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/ExperimentRequest.cs @@ -0,0 +1,196 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Com.Sajari.Sdk.Client.OpenAPIDateConverter; + +namespace Com.Sajari.Sdk.Model +{ + /// + /// A request to perform a query experiment on a collection using a pipeline. + /// + [DataContract(Name = "ExperimentRequest")] + public partial class ExperimentRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ExperimentRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// customPipeline. + /// pipeline. + /// The promotions to consider active when running the search. Provided promotions override existing promotions with the same ID.. + /// The initial values for the variables the pipeline operates on and transforms throughout its steps. The most important variable is `q` which is the query the user entered, for example: ```json { \"q\": \"search terms\" } ``` To paginate through results, set the variables `page` and `resultsPerPage`, for example: ```json { \"q\": \"search terms\", \"page\": 5, \"resultsPerPage\": 20 } ``` To sort results, set the variable `sort` to the name of one of your collection's schema fields, for example: ```json { \"q\": \"search terms\", \"sort\": \"name\" } ``` To sort in reverse, prefix the schema field with a minus sign `-`, for example: ```json { \"q\": \"search terms\", \"sort\": \"-name\" } ``` (required). + public ExperimentRequest(Pipeline customPipeline = default(Pipeline), ExperimentRequestPipeline pipeline = default(ExperimentRequestPipeline), List promotions = default(List), Dictionary variables = default(Dictionary)) + { + // to ensure "variables" is required (not null) + if (variables == null) { + throw new ArgumentNullException("variables is a required property for ExperimentRequest and cannot be null"); + } + this.Variables = variables; + this.CustomPipeline = customPipeline; + this.Pipeline = pipeline; + this.Promotions = promotions; + } + + /// + /// Gets or Sets CustomPipeline + /// + [DataMember(Name = "custom_pipeline", EmitDefaultValue = false)] + public Pipeline CustomPipeline { get; set; } + + /// + /// Gets or Sets Pipeline + /// + [DataMember(Name = "pipeline", EmitDefaultValue = false)] + public ExperimentRequestPipeline Pipeline { get; set; } + + /// + /// The promotions to consider active when running the search. Provided promotions override existing promotions with the same ID. + /// + /// The promotions to consider active when running the search. Provided promotions override existing promotions with the same ID. + [DataMember(Name = "promotions", EmitDefaultValue = false)] + public List Promotions { get; set; } + + /// + /// The initial values for the variables the pipeline operates on and transforms throughout its steps. The most important variable is `q` which is the query the user entered, for example: ```json { \"q\": \"search terms\" } ``` To paginate through results, set the variables `page` and `resultsPerPage`, for example: ```json { \"q\": \"search terms\", \"page\": 5, \"resultsPerPage\": 20 } ``` To sort results, set the variable `sort` to the name of one of your collection's schema fields, for example: ```json { \"q\": \"search terms\", \"sort\": \"name\" } ``` To sort in reverse, prefix the schema field with a minus sign `-`, for example: ```json { \"q\": \"search terms\", \"sort\": \"-name\" } ``` + /// + /// The initial values for the variables the pipeline operates on and transforms throughout its steps. The most important variable is `q` which is the query the user entered, for example: ```json { \"q\": \"search terms\" } ``` To paginate through results, set the variables `page` and `resultsPerPage`, for example: ```json { \"q\": \"search terms\", \"page\": 5, \"resultsPerPage\": 20 } ``` To sort results, set the variable `sort` to the name of one of your collection's schema fields, for example: ```json { \"q\": \"search terms\", \"sort\": \"name\" } ``` To sort in reverse, prefix the schema field with a minus sign `-`, for example: ```json { \"q\": \"search terms\", \"sort\": \"-name\" } ``` + [DataMember(Name = "variables", IsRequired = true, EmitDefaultValue = false)] + public Dictionary Variables { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ExperimentRequest {\n"); + sb.Append(" CustomPipeline: ").Append(CustomPipeline).Append("\n"); + sb.Append(" Pipeline: ").Append(Pipeline).Append("\n"); + sb.Append(" Promotions: ").Append(Promotions).Append("\n"); + sb.Append(" Variables: ").Append(Variables).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ExperimentRequest); + } + + /// + /// Returns true if ExperimentRequest instances are equal + /// + /// Instance of ExperimentRequest to be compared + /// Boolean + public bool Equals(ExperimentRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.CustomPipeline == input.CustomPipeline || + (this.CustomPipeline != null && + this.CustomPipeline.Equals(input.CustomPipeline)) + ) && + ( + this.Pipeline == input.Pipeline || + (this.Pipeline != null && + this.Pipeline.Equals(input.Pipeline)) + ) && + ( + this.Promotions == input.Promotions || + this.Promotions != null && + input.Promotions != null && + this.Promotions.SequenceEqual(input.Promotions) + ) && + ( + this.Variables == input.Variables || + this.Variables != null && + input.Variables != null && + this.Variables.SequenceEqual(input.Variables) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CustomPipeline != null) + { + hashCode = (hashCode * 59) + this.CustomPipeline.GetHashCode(); + } + if (this.Pipeline != null) + { + hashCode = (hashCode * 59) + this.Pipeline.GetHashCode(); + } + if (this.Promotions != null) + { + hashCode = (hashCode * 59) + this.Promotions.GetHashCode(); + } + if (this.Variables != null) + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Com.Sajari.Sdk/Model/ExperimentRequestPipeline.cs b/src/Com.Sajari.Sdk/Model/ExperimentRequestPipeline.cs new file mode 100644 index 0000000..9ea5366 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/ExperimentRequestPipeline.cs @@ -0,0 +1,158 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Com.Sajari.Sdk.Client.OpenAPIDateConverter; + +namespace Com.Sajari.Sdk.Model +{ + /// + /// The pipeline to use when running the experiment. If not provided the default query pipeline is used. + /// + [DataContract(Name = "ExperimentRequestPipeline")] + public partial class ExperimentRequestPipeline : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ExperimentRequestPipeline() { } + /// + /// Initializes a new instance of the class. + /// + /// The query pipeline's name, e.g. `my-pipeline`. (required). + /// The query pipeline's version, e.g. `42`. If not provided the default version is used.. + public ExperimentRequestPipeline(string name = default(string), string version = default(string)) + { + // to ensure "name" is required (not null) + if (name == null) { + throw new ArgumentNullException("name is a required property for ExperimentRequestPipeline and cannot be null"); + } + this.Name = name; + this._Version = version; + } + + /// + /// The query pipeline's name, e.g. `my-pipeline`. + /// + /// The query pipeline's name, e.g. `my-pipeline`. + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// The query pipeline's version, e.g. `42`. If not provided the default version is used. + /// + /// The query pipeline's version, e.g. `42`. If not provided the default version is used. + [DataMember(Name = "version", EmitDefaultValue = false)] + public string _Version { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ExperimentRequestPipeline {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" _Version: ").Append(_Version).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ExperimentRequestPipeline); + } + + /// + /// Returns true if ExperimentRequestPipeline instances are equal + /// + /// Instance of ExperimentRequestPipeline to be compared + /// Boolean + public bool Equals(ExperimentRequestPipeline input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this._Version == input._Version || + (this._Version != null && + this._Version.Equals(input._Version)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this._Version != null) + { + hashCode = (hashCode * 59) + this._Version.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Com.Sajari.Sdk/Model/ExperimentResponse.cs b/src/Com.Sajari.Sdk/Model/ExperimentResponse.cs new file mode 100644 index 0000000..dd43d63 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/ExperimentResponse.cs @@ -0,0 +1,129 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Com.Sajari.Sdk.Client.OpenAPIDateConverter; + +namespace Com.Sajari.Sdk.Model +{ + /// + /// ExperimentResponse + /// + [DataContract(Name = "ExperimentResponse")] + public partial class ExperimentResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// queryResponse. + public ExperimentResponse(QueryCollectionResponse queryResponse = default(QueryCollectionResponse)) + { + this.QueryResponse = queryResponse; + } + + /// + /// Gets or Sets QueryResponse + /// + [DataMember(Name = "query_response", EmitDefaultValue = false)] + public QueryCollectionResponse QueryResponse { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ExperimentResponse {\n"); + sb.Append(" QueryResponse: ").Append(QueryResponse).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ExperimentResponse); + } + + /// + /// Returns true if ExperimentResponse instances are equal + /// + /// Instance of ExperimentResponse to be compared + /// Boolean + public bool Equals(ExperimentResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.QueryResponse == input.QueryResponse || + (this.QueryResponse != null && + this.QueryResponse.Equals(input.QueryResponse)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.QueryResponse != null) + { + hashCode = (hashCode * 59) + this.QueryResponse.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs b/src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs index c67bae3..390c349 100644 --- a/src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs +++ b/src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs @@ -40,8 +40,8 @@ protected GeneratePipelinesRequest() { } /// /// Initializes a new instance of the class. /// - /// List of fields to train query suggestions from.. - /// Prioritized list of fields to search. (required). + /// A list of fields to train query suggestions from.. + /// A prioritized list of fields to search. (required). public GeneratePipelinesRequest(List queryTrainingFields = default(List), List searchableFields = default(List)) { // to ensure "searchableFields" is required (not null) @@ -53,16 +53,16 @@ protected GeneratePipelinesRequest() { } } /// - /// List of fields to train query suggestions from. + /// A list of fields to train query suggestions from. /// - /// List of fields to train query suggestions from. + /// A list of fields to train query suggestions from. [DataMember(Name = "query_training_fields", EmitDefaultValue = false)] public List QueryTrainingFields { get; set; } /// - /// Prioritized list of fields to search. + /// A prioritized list of fields to search. /// - /// Prioritized list of fields to search. + /// A prioritized list of fields to search. [DataMember(Name = "searchable_fields", IsRequired = true, EmitDefaultValue = false)] public List SearchableFields { get; set; } diff --git a/src/Com.Sajari.Sdk/Model/GetDefaultVersionRequestView.cs b/src/Com.Sajari.Sdk/Model/GetDefaultVersionRequestView.cs index 75c5987..85c53db 100644 --- a/src/Com.Sajari.Sdk/Model/GetDefaultVersionRequestView.cs +++ b/src/Com.Sajari.Sdk/Model/GetDefaultVersionRequestView.cs @@ -27,9 +27,9 @@ namespace Com.Sajari.Sdk.Model { /// - /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. + /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. /// - /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. + /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. [JsonConverter(typeof(StringEnumConverter))] public enum GetDefaultVersionRequestView { diff --git a/src/Com.Sajari.Sdk/Model/GetPipelineRequestView.cs b/src/Com.Sajari.Sdk/Model/GetPipelineRequestView.cs index 25892ee..cea96c5 100644 --- a/src/Com.Sajari.Sdk/Model/GetPipelineRequestView.cs +++ b/src/Com.Sajari.Sdk/Model/GetPipelineRequestView.cs @@ -27,9 +27,9 @@ namespace Com.Sajari.Sdk.Model { /// - /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. + /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. /// - /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. + /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. [JsonConverter(typeof(StringEnumConverter))] public enum GetPipelineRequestView { diff --git a/src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs b/src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs index 3784f2d..7bfff37 100644 --- a/src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs +++ b/src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs @@ -27,9 +27,9 @@ namespace Com.Sajari.Sdk.Model { /// - /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. + /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. /// - /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/api#operation/ListPipelines) and [GetPipeline](/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. + /// - VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `BASIC` view. - BASIC: Include basic information including type, name, version and description but not the full step configuration. This is the default value (for both [ListPipelines](/docs/api#operation/ListPipelines) and [GetPipeline](/docs/api#operation/GetPipeline)). - FULL: Include the information from `BASIC`, plus full step configuration. [JsonConverter(typeof(StringEnumConverter))] public enum ListPipelinesRequestView { diff --git a/src/Com.Sajari.Sdk/Model/ListPromotionsRequestPromotionView.cs b/src/Com.Sajari.Sdk/Model/ListPromotionsRequestPromotionView.cs new file mode 100644 index 0000000..c1404c7 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/ListPromotionsRequestPromotionView.cs @@ -0,0 +1,56 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Com.Sajari.Sdk.Client.OpenAPIDateConverter; + +namespace Com.Sajari.Sdk.Model +{ + /// + /// - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. + /// + /// - PROMOTION_VIEW_UNSPECIFIED: The default / unset value. The API defaults to the `FULL` view. - BASIC: Include basic information including name, start time and end time, but not detailed information about the promotion effects. - FULL: Returns all information about a promotion. This is the default value. + [JsonConverter(typeof(StringEnumConverter))] + public enum ListPromotionsRequestPromotionView + { + /// + /// Enum PROMOTIONVIEWUNSPECIFIED for value: PROMOTION_VIEW_UNSPECIFIED + /// + [EnumMember(Value = "PROMOTION_VIEW_UNSPECIFIED")] + PROMOTIONVIEWUNSPECIFIED = 1, + + /// + /// Enum BASIC for value: BASIC + /// + [EnumMember(Value = "BASIC")] + BASIC = 2, + + /// + /// Enum FULL for value: FULL + /// + [EnumMember(Value = "FULL")] + FULL = 3 + + } + +} diff --git a/src/Com.Sajari.Sdk/Model/Promotion.cs b/src/Com.Sajari.Sdk/Model/Promotion.cs index 609608d..57c8a39 100644 --- a/src/Com.Sajari.Sdk/Model/Promotion.cs +++ b/src/Com.Sajari.Sdk/Model/Promotion.cs @@ -40,6 +40,7 @@ protected Promotion() { } /// /// Initializes a new instance of the class. /// + /// The banners that are injected into the result set when the promotion is triggered.. /// A condition expression applied to a search request that determines which searches the promotion is active for. For example, to apply the promotion's pins and boosts whenever a user searches for 'shoes' set condition to `q = 'shoes'`. (required). /// If disabled, the promotion is never triggered.. /// The promotion's display name. (required). @@ -51,7 +52,7 @@ protected Promotion() { } /// The items to fix to specific positions in the search results.. /// The range boosts to apply to searches, if the promotion is enabled.. /// If specified, the promotion is considered disabled before this time.. - public Promotion(string condition = default(string), bool disabled = default(bool), string displayName = default(string), DateTime endTime = default(DateTime), List exclusions = default(List), List filterBoosts = default(List), List filterConditions = default(List), string id = default(string), List pins = default(List), List rangeBoosts = default(List), DateTime startTime = default(DateTime)) + public Promotion(List banners = default(List), string condition = default(string), bool disabled = default(bool), string displayName = default(string), DateTime endTime = default(DateTime), List exclusions = default(List), List filterBoosts = default(List), List filterConditions = default(List), string id = default(string), List pins = default(List), List rangeBoosts = default(List), DateTime startTime = default(DateTime)) { // to ensure "condition" is required (not null) if (condition == null) { @@ -63,6 +64,7 @@ protected Promotion() { } throw new ArgumentNullException("displayName is a required property for Promotion and cannot be null"); } this.DisplayName = displayName; + this.Banners = banners; this.Disabled = disabled; this.EndTime = endTime; this.Exclusions = exclusions; @@ -74,6 +76,13 @@ protected Promotion() { } this.StartTime = startTime; } + /// + /// The banners that are injected into the result set when the promotion is triggered. + /// + /// The banners that are injected into the result set when the promotion is triggered. + [DataMember(Name = "banners", EmitDefaultValue = false)] + public List Banners { get; set; } + /// /// Output only. The ID of the collection that owns this promotion. /// @@ -204,6 +213,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Promotion {\n"); + sb.Append(" Banners: ").Append(Banners).Append("\n"); sb.Append(" CollectionId: ").Append(CollectionId).Append("\n"); sb.Append(" Condition: ").Append(Condition).Append("\n"); sb.Append(" CreateTime: ").Append(CreateTime).Append("\n"); @@ -253,6 +263,12 @@ public bool Equals(Promotion input) return false; } return + ( + this.Banners == input.Banners || + this.Banners != null && + input.Banners != null && + this.Banners.SequenceEqual(input.Banners) + ) && ( this.CollectionId == input.CollectionId || (this.CollectionId != null && @@ -338,6 +354,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.Banners != null) + { + hashCode = (hashCode * 59) + this.Banners.GetHashCode(); + } if (this.CollectionId != null) { hashCode = (hashCode * 59) + this.CollectionId.GetHashCode(); diff --git a/src/Com.Sajari.Sdk/Model/PromotionPin.cs b/src/Com.Sajari.Sdk/Model/PromotionPin.cs index 28fa192..4e6e623 100644 --- a/src/Com.Sajari.Sdk/Model/PromotionPin.cs +++ b/src/Com.Sajari.Sdk/Model/PromotionPin.cs @@ -32,14 +32,22 @@ namespace Com.Sajari.Sdk.Model [DataContract(Name = "PromotionPin")] public partial class PromotionPin : IEquatable, IValidatableObject { + + /// + /// Gets or Sets Mode + /// + [DataMember(Name = "mode", EmitDefaultValue = false)] + public PromotionPinMode? Mode { get; set; } /// /// Initializes a new instance of the class. /// /// key. + /// mode. /// Position the record should occupy in search results. The top position is position 1. Doesn't need to be contiguous with other pins, i.e. there can be gaps in the pinned set that are filled with organic results. In the case where there are insufficient search results pinned items are collapsed.. - public PromotionPin(RecordKey key = default(RecordKey), int position = default(int)) + public PromotionPin(RecordKey key = default(RecordKey), PromotionPinMode? mode = default(PromotionPinMode?), int position = default(int)) { this.Key = key; + this.Mode = mode; this.Position = position; } @@ -65,6 +73,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class PromotionPin {\n"); sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Mode: ").Append(Mode).Append("\n"); sb.Append(" Position: ").Append(Position).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -106,6 +115,10 @@ public bool Equals(PromotionPin input) (this.Key != null && this.Key.Equals(input.Key)) ) && + ( + this.Mode == input.Mode || + this.Mode.Equals(input.Mode) + ) && ( this.Position == input.Position || this.Position.Equals(input.Position) @@ -125,6 +138,7 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Key.GetHashCode(); } + hashCode = (hashCode * 59) + this.Mode.GetHashCode(); hashCode = (hashCode * 59) + this.Position.GetHashCode(); return hashCode; } diff --git a/src/Com.Sajari.Sdk/Model/PromotionPinMode.cs b/src/Com.Sajari.Sdk/Model/PromotionPinMode.cs new file mode 100644 index 0000000..a3bb5ff --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/PromotionPinMode.cs @@ -0,0 +1,50 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Com.Sajari.Sdk.Client.OpenAPIDateConverter; + +namespace Com.Sajari.Sdk.Model +{ + /// + /// - PIN: The pin applies regardless of whether the pinned item is in the underlying result set of the search. This has the net effect that a search result can be surfaced even if it was not originally a part of the search result set. - PROMOTE: The pin only applies if the pinned item is in the underlying result set of the search. + /// + /// - PIN: The pin applies regardless of whether the pinned item is in the underlying result set of the search. This has the net effect that a search result can be surfaced even if it was not originally a part of the search result set. - PROMOTE: The pin only applies if the pinned item is in the underlying result set of the search. + [JsonConverter(typeof(StringEnumConverter))] + public enum PromotionPinMode + { + /// + /// Enum PIN for value: PIN + /// + [EnumMember(Value = "PIN")] + PIN = 1, + + /// + /// Enum PROMOTE for value: PROMOTE + /// + [EnumMember(Value = "PROMOTE")] + PROMOTE = 2 + + } + +} diff --git a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTracking.cs b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTracking.cs index 97b4ad7..ee9a26d 100644 --- a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTracking.cs +++ b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTracking.cs @@ -41,10 +41,10 @@ public partial class QueryCollectionRequestTracking : IEquatable /// Initializes a new instance of the class. /// - /// Custom values to be included in tracking data.. - /// Tracking field used to identify records in the collection. Must be unique schema field.. - /// Query ID of the query. If this is empty, then one is generated.. - /// Sequence number of query.. + /// A set of custom values to be included in tracking data.. + /// The tracking field used to identify records in the collection. Must be unique schema field.. + /// The query ID of the query. If this is empty, then one is generated.. + /// The sequence number of query.. /// type. public QueryCollectionRequestTracking(Dictionary data = default(Dictionary), string field = default(string), string queryId = default(string), int sequence = default(int), QueryCollectionRequestTrackingType? type = default(QueryCollectionRequestTrackingType?)) { @@ -56,30 +56,30 @@ public partial class QueryCollectionRequestTracking : IEquatable - /// Custom values to be included in tracking data. + /// A set of custom values to be included in tracking data. /// - /// Custom values to be included in tracking data. + /// A set of custom values to be included in tracking data. [DataMember(Name = "data", EmitDefaultValue = false)] public Dictionary Data { get; set; } /// - /// Tracking field used to identify records in the collection. Must be unique schema field. + /// The tracking field used to identify records in the collection. Must be unique schema field. /// - /// Tracking field used to identify records in the collection. Must be unique schema field. + /// The tracking field used to identify records in the collection. Must be unique schema field. [DataMember(Name = "field", EmitDefaultValue = false)] public string Field { get; set; } /// - /// Query ID of the query. If this is empty, then one is generated. + /// The query ID of the query. If this is empty, then one is generated. /// - /// Query ID of the query. If this is empty, then one is generated. + /// The query ID of the query. If this is empty, then one is generated. [DataMember(Name = "query_id", EmitDefaultValue = false)] public string QueryId { get; set; } /// - /// Sequence number of query. + /// The sequence number of query. /// - /// Sequence number of query. + /// The sequence number of query. [DataMember(Name = "sequence", EmitDefaultValue = false)] public int Sequence { get; set; } diff --git a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTrackingType.cs b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTrackingType.cs index e806eb6..d1fec73 100644 --- a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTrackingType.cs +++ b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTrackingType.cs @@ -27,9 +27,9 @@ namespace Com.Sajari.Sdk.Model { /// - /// - TYPE_UNSPECIFIED: The default / unset value. The API defaults to `NONE` tracking. - NONE: No tracking. - CLICK: Click tracking. A click token is be generated for each result. Results which do not receive clicks fall down the rankings, and similarly low-ranked records which receive clicks are moved up the rankings. - POS_NEG: Pos/neg tracking. Pos/neg tokens are generated for each result. Each record in the result set can be marked with pos/neg value for the search. This is then fed back into the ranking algorithm to improve future results. Unlike `CLICK`, if no tokens are reported for records then no action is taken. + /// - TYPE_UNSPECIFIED: The default / unset value. The API defaults to `NONE` tracking. - NONE: No tracking. - CLICK: Click tracking. A click token is be generated for each result. Results which do not receive clicks fall down the rankings, and similarly low-ranked records which receive clicks are moved up the rankings. - POS_NEG: Pos/neg tracking. Pos/neg tokens are generated for each result. Each record in the result set can be marked with pos/neg value for the search. This is then fed back into the ranking algorithm to improve future results. Unlike `CLICK`, if no tokens are reported for records then no action is taken. - EVENT: Event tracking. A query identifier is returned in the [QueryResponse][sajari.v4.QueryResponse] that can be used to link a user interaction to a specific query. /// - /// - TYPE_UNSPECIFIED: The default / unset value. The API defaults to `NONE` tracking. - NONE: No tracking. - CLICK: Click tracking. A click token is be generated for each result. Results which do not receive clicks fall down the rankings, and similarly low-ranked records which receive clicks are moved up the rankings. - POS_NEG: Pos/neg tracking. Pos/neg tokens are generated for each result. Each record in the result set can be marked with pos/neg value for the search. This is then fed back into the ranking algorithm to improve future results. Unlike `CLICK`, if no tokens are reported for records then no action is taken. + /// - TYPE_UNSPECIFIED: The default / unset value. The API defaults to `NONE` tracking. - NONE: No tracking. - CLICK: Click tracking. A click token is be generated for each result. Results which do not receive clicks fall down the rankings, and similarly low-ranked records which receive clicks are moved up the rankings. - POS_NEG: Pos/neg tracking. Pos/neg tokens are generated for each result. Each record in the result set can be marked with pos/neg value for the search. This is then fed back into the ranking algorithm to improve future results. Unlike `CLICK`, if no tokens are reported for records then no action is taken. - EVENT: Event tracking. A query identifier is returned in the [QueryResponse][sajari.v4.QueryResponse] that can be used to link a user interaction to a specific query. [JsonConverter(typeof(StringEnumConverter))] public enum QueryCollectionRequestTrackingType { @@ -55,7 +55,13 @@ public enum QueryCollectionRequestTrackingType /// Enum POSNEG for value: POS_NEG /// [EnumMember(Value = "POS_NEG")] - POSNEG = 4 + POSNEG = 4, + + /// + /// Enum EVENT for value: EVENT + /// + [EnumMember(Value = "EVENT")] + EVENT = 5 } diff --git a/src/Com.Sajari.Sdk/Model/QueryCollectionResponse.cs b/src/Com.Sajari.Sdk/Model/QueryCollectionResponse.cs index 217192a..6695565 100644 --- a/src/Com.Sajari.Sdk/Model/QueryCollectionResponse.cs +++ b/src/Com.Sajari.Sdk/Model/QueryCollectionResponse.cs @@ -38,21 +38,25 @@ public partial class QueryCollectionResponse : IEquatableA list of the promotions activated when running the query.. /// The aggregates run with filters.. /// The aggregates returned by the query.. + /// Banners associated with this query.. /// The weight applied to the features in the query, used for analyzing the index, neural and feature components for results. For each result: ``` score = max(index_score, neural_score) * (1 - feature_score_weight) + feature_score * feature_score_weight ```. /// pipeline. /// The total time taken to perform the query.. + /// The query identifier. This uniqely identifies the specific query it was returned on. This is used to link user interactions with a query.. /// A mapping of redirects triggered for all possible variations of the query.. /// The results returned by the query.. /// The total number of results that match the query.. /// The modified variables returned by the pipeline after it has finished processing.. - public QueryCollectionResponse(List activePromotions = default(List), Dictionary aggregateFilters = default(Dictionary), Dictionary aggregates = default(Dictionary), double featureScoreWeight = default(double), QueryCollectionResponsePipeline pipeline = default(QueryCollectionResponsePipeline), string processingDuration = default(string), Dictionary redirects = default(Dictionary), List results = default(List), string totalSize = default(string), Dictionary variables = default(Dictionary)) + public QueryCollectionResponse(List activePromotions = default(List), Dictionary aggregateFilters = default(Dictionary), Dictionary aggregates = default(Dictionary), List banners = default(List), double featureScoreWeight = default(double), QueryCollectionResponsePipeline pipeline = default(QueryCollectionResponsePipeline), string processingDuration = default(string), string queryId = default(string), Dictionary redirects = default(Dictionary), List results = default(List), string totalSize = default(string), Dictionary variables = default(Dictionary)) { this.ActivePromotions = activePromotions; this.AggregateFilters = aggregateFilters; this.Aggregates = aggregates; + this.Banners = banners; this.FeatureScoreWeight = featureScoreWeight; this.Pipeline = pipeline; this.ProcessingDuration = processingDuration; + this.QueryId = queryId; this.Redirects = redirects; this.Results = results; this.TotalSize = totalSize; @@ -80,6 +84,13 @@ public partial class QueryCollectionResponse : IEquatable Aggregates { get; set; } + /// + /// Banners associated with this query. + /// + /// Banners associated with this query. + [DataMember(Name = "banners", EmitDefaultValue = false)] + public List Banners { get; set; } + /// /// The weight applied to the features in the query, used for analyzing the index, neural and feature components for results. For each result: ``` score = max(index_score, neural_score) * (1 - feature_score_weight) + feature_score * feature_score_weight ``` /// @@ -100,6 +111,13 @@ public partial class QueryCollectionResponse : IEquatable + /// The query identifier. This uniqely identifies the specific query it was returned on. This is used to link user interactions with a query. + /// + /// The query identifier. This uniqely identifies the specific query it was returned on. This is used to link user interactions with a query. + [DataMember(Name = "query_id", EmitDefaultValue = false)] + public string QueryId { get; set; } + /// /// A mapping of redirects triggered for all possible variations of the query. /// @@ -139,9 +157,11 @@ public override string ToString() sb.Append(" ActivePromotions: ").Append(ActivePromotions).Append("\n"); sb.Append(" AggregateFilters: ").Append(AggregateFilters).Append("\n"); sb.Append(" Aggregates: ").Append(Aggregates).Append("\n"); + sb.Append(" Banners: ").Append(Banners).Append("\n"); sb.Append(" FeatureScoreWeight: ").Append(FeatureScoreWeight).Append("\n"); sb.Append(" Pipeline: ").Append(Pipeline).Append("\n"); sb.Append(" ProcessingDuration: ").Append(ProcessingDuration).Append("\n"); + sb.Append(" QueryId: ").Append(QueryId).Append("\n"); sb.Append(" Redirects: ").Append(Redirects).Append("\n"); sb.Append(" Results: ").Append(Results).Append("\n"); sb.Append(" TotalSize: ").Append(TotalSize).Append("\n"); @@ -199,6 +219,12 @@ public bool Equals(QueryCollectionResponse input) input.Aggregates != null && this.Aggregates.SequenceEqual(input.Aggregates) ) && + ( + this.Banners == input.Banners || + this.Banners != null && + input.Banners != null && + this.Banners.SequenceEqual(input.Banners) + ) && ( this.FeatureScoreWeight == input.FeatureScoreWeight || this.FeatureScoreWeight.Equals(input.FeatureScoreWeight) @@ -213,6 +239,11 @@ public bool Equals(QueryCollectionResponse input) (this.ProcessingDuration != null && this.ProcessingDuration.Equals(input.ProcessingDuration)) ) && + ( + this.QueryId == input.QueryId || + (this.QueryId != null && + this.QueryId.Equals(input.QueryId)) + ) && ( this.Redirects == input.Redirects || this.Redirects != null && @@ -259,6 +290,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Aggregates.GetHashCode(); } + if (this.Banners != null) + { + hashCode = (hashCode * 59) + this.Banners.GetHashCode(); + } hashCode = (hashCode * 59) + this.FeatureScoreWeight.GetHashCode(); if (this.Pipeline != null) { @@ -268,6 +303,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ProcessingDuration.GetHashCode(); } + if (this.QueryId != null) + { + hashCode = (hashCode * 59) + this.QueryId.GetHashCode(); + } if (this.Redirects != null) { hashCode = (hashCode * 59) + this.Redirects.GetHashCode(); diff --git a/src/Com.Sajari.Sdk/Model/QueryResult.cs b/src/Com.Sajari.Sdk/Model/QueryResult.cs index 19dff15..bd2411f 100644 --- a/src/Com.Sajari.Sdk/Model/QueryResult.cs +++ b/src/Com.Sajari.Sdk/Model/QueryResult.cs @@ -35,22 +35,32 @@ public partial class QueryResult : IEquatable, IValidatableObject /// /// Initializes a new instance of the class. /// + /// banner. /// The feature score of the result. This is a value between 0 and 1 representing the business-specific ranking of the result as determined by the ranking adjustments. See [Ranking adjustments](https://docs.search.io/documentation/fundamentals/search-settings/ranking-adjustments) for more information.. /// The index score of the result. This is a value between 0 and 1 representing the relevance of the result using traditional keyword search. The higher the score the more relevant the result is.. /// The neural score of the result. This is a value between 0 and 1 representing the relevance of the result using Neuralsearch®, using AI-based search.. /// An object made up of field-value pairs that contains the record data.. + /// The relevance score of the result. This is the best of `index_score` and `neural_score` with any index boosts applied on top.. /// The overall relevance of the result. This is a value between 0 and 1 that combines the index, neural and feature scores. The higher the score the more relevant the result is.. /// token. - public QueryResult(double featureScore = default(double), double indexScore = default(double), double neuralScore = default(double), Object record = default(Object), double score = default(double), QueryResultToken token = default(QueryResultToken)) + public QueryResult(Banner banner = default(Banner), double featureScore = default(double), double indexScore = default(double), double neuralScore = default(double), Object record = default(Object), double relevanceScore = default(double), double score = default(double), QueryResultToken token = default(QueryResultToken)) { + this.Banner = banner; this.FeatureScore = featureScore; this.IndexScore = indexScore; this.NeuralScore = neuralScore; this.Record = record; + this.RelevanceScore = relevanceScore; this.Score = score; this.Token = token; } + /// + /// Gets or Sets Banner + /// + [DataMember(Name = "banner", EmitDefaultValue = false)] + public Banner Banner { get; set; } + /// /// The feature score of the result. This is a value between 0 and 1 representing the business-specific ranking of the result as determined by the ranking adjustments. See [Ranking adjustments](https://docs.search.io/documentation/fundamentals/search-settings/ranking-adjustments) for more information. /// @@ -79,6 +89,13 @@ public partial class QueryResult : IEquatable, IValidatableObject [DataMember(Name = "record", EmitDefaultValue = false)] public Object Record { get; set; } + /// + /// The relevance score of the result. This is the best of `index_score` and `neural_score` with any index boosts applied on top. + /// + /// The relevance score of the result. This is the best of `index_score` and `neural_score` with any index boosts applied on top. + [DataMember(Name = "relevance_score", EmitDefaultValue = false)] + public double RelevanceScore { get; set; } + /// /// The overall relevance of the result. This is a value between 0 and 1 that combines the index, neural and feature scores. The higher the score the more relevant the result is. /// @@ -100,10 +117,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class QueryResult {\n"); + sb.Append(" Banner: ").Append(Banner).Append("\n"); sb.Append(" FeatureScore: ").Append(FeatureScore).Append("\n"); sb.Append(" IndexScore: ").Append(IndexScore).Append("\n"); sb.Append(" NeuralScore: ").Append(NeuralScore).Append("\n"); sb.Append(" Record: ").Append(Record).Append("\n"); + sb.Append(" RelevanceScore: ").Append(RelevanceScore).Append("\n"); sb.Append(" Score: ").Append(Score).Append("\n"); sb.Append(" Token: ").Append(Token).Append("\n"); sb.Append("}\n"); @@ -141,6 +160,11 @@ public bool Equals(QueryResult input) return false; } return + ( + this.Banner == input.Banner || + (this.Banner != null && + this.Banner.Equals(input.Banner)) + ) && ( this.FeatureScore == input.FeatureScore || this.FeatureScore.Equals(input.FeatureScore) @@ -158,6 +182,10 @@ public bool Equals(QueryResult input) (this.Record != null && this.Record.Equals(input.Record)) ) && + ( + this.RelevanceScore == input.RelevanceScore || + this.RelevanceScore.Equals(input.RelevanceScore) + ) && ( this.Score == input.Score || this.Score.Equals(input.Score) @@ -178,6 +206,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.Banner != null) + { + hashCode = (hashCode * 59) + this.Banner.GetHashCode(); + } hashCode = (hashCode * 59) + this.FeatureScore.GetHashCode(); hashCode = (hashCode * 59) + this.IndexScore.GetHashCode(); hashCode = (hashCode * 59) + this.NeuralScore.GetHashCode(); @@ -185,6 +217,7 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Record.GetHashCode(); } + hashCode = (hashCode * 59) + this.RelevanceScore.GetHashCode(); hashCode = (hashCode * 59) + this.Score.GetHashCode(); if (this.Token != null) { diff --git a/src/Com.Sajari.Sdk/Model/RedirectResult.cs b/src/Com.Sajari.Sdk/Model/RedirectResult.cs index 406acf4..e3baccd 100644 --- a/src/Com.Sajari.Sdk/Model/RedirectResult.cs +++ b/src/Com.Sajari.Sdk/Model/RedirectResult.cs @@ -27,7 +27,7 @@ namespace Com.Sajari.Sdk.Model { /// - /// RedirectResult indicates that a redirect has been triggered for a given query. + /// Indicates that a redirect has been triggered for a given query. /// [DataContract(Name = "RedirectResult")] public partial class RedirectResult : IEquatable, IValidatableObject diff --git a/src/Com.Sajari.Sdk/Model/TextPosition.cs b/src/Com.Sajari.Sdk/Model/TextPosition.cs new file mode 100644 index 0000000..a3ebd26 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/TextPosition.cs @@ -0,0 +1,74 @@ +/* + * Search.io API + * + * Search.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence. + * + * The version of the OpenAPI document: v4 + * Contact: support@search.io + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Com.Sajari.Sdk.Client.OpenAPIDateConverter; + +namespace Com.Sajari.Sdk.Model +{ + /// + /// TextPosition describes the position of text in a box. - TEXT_POSITION_UNSPECIFIED: No position specified. - TEXT_POSITION_CENTER: The text is positioned in the horizontal and vertical center. - TEXT_POSITION_TOP_LEFT: The text is positioned in the top left corner. - TEXT_POSITION_TOP_RIGHT: The text is positioned in the top right corner. - TEXT_POSITION_BOTTOM_LEFT: The text is positioned in the bottom left corner. - TEXT_POSITION_BOTTOM_RIGHT: The text is positioned in the bottom right corner. + /// + /// TextPosition describes the position of text in a box. - TEXT_POSITION_UNSPECIFIED: No position specified. - TEXT_POSITION_CENTER: The text is positioned in the horizontal and vertical center. - TEXT_POSITION_TOP_LEFT: The text is positioned in the top left corner. - TEXT_POSITION_TOP_RIGHT: The text is positioned in the top right corner. - TEXT_POSITION_BOTTOM_LEFT: The text is positioned in the bottom left corner. - TEXT_POSITION_BOTTOM_RIGHT: The text is positioned in the bottom right corner. + [JsonConverter(typeof(StringEnumConverter))] + public enum TextPosition + { + /// + /// Enum UNSPECIFIED for value: TEXT_POSITION_UNSPECIFIED + /// + [EnumMember(Value = "TEXT_POSITION_UNSPECIFIED")] + UNSPECIFIED = 1, + + /// + /// Enum CENTER for value: TEXT_POSITION_CENTER + /// + [EnumMember(Value = "TEXT_POSITION_CENTER")] + CENTER = 2, + + /// + /// Enum TOPLEFT for value: TEXT_POSITION_TOP_LEFT + /// + [EnumMember(Value = "TEXT_POSITION_TOP_LEFT")] + TOPLEFT = 3, + + /// + /// Enum TOPRIGHT for value: TEXT_POSITION_TOP_RIGHT + /// + [EnumMember(Value = "TEXT_POSITION_TOP_RIGHT")] + TOPRIGHT = 4, + + /// + /// Enum BOTTOMLEFT for value: TEXT_POSITION_BOTTOM_LEFT + /// + [EnumMember(Value = "TEXT_POSITION_BOTTOM_LEFT")] + BOTTOMLEFT = 5, + + /// + /// Enum BOTTOMRIGHT for value: TEXT_POSITION_BOTTOM_RIGHT + /// + [EnumMember(Value = "TEXT_POSITION_BOTTOM_RIGHT")] + BOTTOMRIGHT = 6 + + } + +}