diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 84c83cc..e306bdb 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -2,9 +2,14 @@ Com.Sajari.Sdk.sln README.md appveyor.yml +docs/ActivePromotion.md docs/BatchCreateSchemaFieldsRequest.md docs/BatchCreateSchemaFieldsResponse.md docs/BatchCreateSchemaFieldsResponseError.md +docs/BatchUpdateRecordsRequest.md +docs/BatchUpdateRecordsResponse.md +docs/BatchUpdateRecordsResponseError.md +docs/BatchUpdateRecordsResponseRecord.md docs/BatchUpsertRecordsRequest.md docs/BatchUpsertRecordsRequestPipeline.md docs/BatchUpsertRecordsResponse.md @@ -25,6 +30,8 @@ docs/GetRecordRequest.md docs/ListCollectionsResponse.md docs/ListPipelinesRequestView.md docs/ListPipelinesResponse.md +docs/ListPromotionsResponse.md +docs/ListRedirectsResponse.md docs/ListSchemaFieldsResponse.md docs/PercentileDataPoint.md docs/Pipeline.md @@ -32,7 +39,16 @@ docs/PipelineStep.md docs/PipelineStepParamBinding.md docs/PipelineType.md docs/PipelinesApi.md +docs/Promotion.md +docs/PromotionCategory.md +docs/PromotionExclusion.md +docs/PromotionFilterBoost.md +docs/PromotionFilterCondition.md +docs/PromotionPin.md +docs/PromotionRangeBoost.md +docs/PromotionsApi.md docs/ProtobufAny.md +docs/ProtobufFieldMask.md docs/ProtobufNullValue.md docs/QueryAggregateResult.md docs/QueryAggregateResultAnalysis.md @@ -54,6 +70,9 @@ docs/QueryResultTokenClick.md docs/QueryResultTokenPosNeg.md docs/RecordKey.md docs/RecordsApi.md +docs/Redirect.md +docs/RedirectResult.md +docs/RedirectsApi.md docs/SchemaApi.md docs/SchemaField.md docs/SchemaFieldMode.md @@ -66,11 +85,32 @@ 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/Api/CollectionsApi.cs src/Com.Sajari.Sdk/Api/EventsApi.cs src/Com.Sajari.Sdk/Api/PipelinesApi.cs +src/Com.Sajari.Sdk/Api/PromotionsApi.cs src/Com.Sajari.Sdk/Api/RecordsApi.cs +src/Com.Sajari.Sdk/Api/RedirectsApi.cs src/Com.Sajari.Sdk/Api/SchemaApi.cs src/Com.Sajari.Sdk/Client/ApiClient.cs src/Com.Sajari.Sdk/Client/ApiException.cs @@ -90,9 +130,14 @@ src/Com.Sajari.Sdk/Client/RequestOptions.cs 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/BatchCreateSchemaFieldsRequest.cs src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponse.cs src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponseError.cs +src/Com.Sajari.Sdk/Model/BatchUpdateRecordsRequest.cs +src/Com.Sajari.Sdk/Model/BatchUpdateRecordsResponse.cs +src/Com.Sajari.Sdk/Model/BatchUpdateRecordsResponseError.cs +src/Com.Sajari.Sdk/Model/BatchUpdateRecordsResponseRecord.cs src/Com.Sajari.Sdk/Model/BatchUpsertRecordsRequest.cs src/Com.Sajari.Sdk/Model/BatchUpsertRecordsRequestPipeline.cs src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponse.cs @@ -111,13 +156,23 @@ 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/ListPromotionsResponse.cs +src/Com.Sajari.Sdk/Model/ListRedirectsResponse.cs src/Com.Sajari.Sdk/Model/ListSchemaFieldsResponse.cs src/Com.Sajari.Sdk/Model/PercentileDataPoint.cs src/Com.Sajari.Sdk/Model/Pipeline.cs src/Com.Sajari.Sdk/Model/PipelineStep.cs src/Com.Sajari.Sdk/Model/PipelineStepParamBinding.cs src/Com.Sajari.Sdk/Model/PipelineType.cs +src/Com.Sajari.Sdk/Model/Promotion.cs +src/Com.Sajari.Sdk/Model/PromotionCategory.cs +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/PromotionRangeBoost.cs src/Com.Sajari.Sdk/Model/ProtobufAny.cs +src/Com.Sajari.Sdk/Model/ProtobufFieldMask.cs src/Com.Sajari.Sdk/Model/ProtobufNullValue.cs src/Com.Sajari.Sdk/Model/QueryAggregateResult.cs src/Com.Sajari.Sdk/Model/QueryAggregateResultAnalysis.cs @@ -138,6 +193,8 @@ src/Com.Sajari.Sdk/Model/QueryResultToken.cs src/Com.Sajari.Sdk/Model/QueryResultTokenClick.cs src/Com.Sajari.Sdk/Model/QueryResultTokenPosNeg.cs src/Com.Sajari.Sdk/Model/RecordKey.cs +src/Com.Sajari.Sdk/Model/Redirect.cs +src/Com.Sajari.Sdk/Model/RedirectResult.cs src/Com.Sajari.Sdk/Model/SchemaField.cs src/Com.Sajari.Sdk/Model/SchemaFieldMode.cs src/Com.Sajari.Sdk/Model/SchemaFieldType.cs diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index e230c83..7d3cdbf 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -5.3.0 \ No newline at end of file +5.3.1 \ No newline at end of file diff --git a/Com.Sajari.Sdk.sln b/Com.Sajari.Sdk.sln index d931c5a..5d54a86 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", "{028A2A5B-F258-4825-8462-DF48027A4BD0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Com.Sajari.Sdk", "src\Com.Sajari.Sdk\Com.Sajari.Sdk.csproj", "{F43DF556-4B80-4335-95A6-C0E8DE8BBDCA}" 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 - {028A2A5B-F258-4825-8462-DF48027A4BD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {028A2A5B-F258-4825-8462-DF48027A4BD0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {028A2A5B-F258-4825-8462-DF48027A4BD0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {028A2A5B-F258-4825-8462-DF48027A4BD0}.Release|Any CPU.Build.0 = Release|Any CPU + {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 {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 f2d98b3..0bb1ab3 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# Com.Sajari.Sdk - the C# library for the Sajari API +# Com.Sajari.Sdk - the C# library for the Search.io API -Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. +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. This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v4 -- SDK version: 4.2.0 +- SDK version: 4.3.0 - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen - For more information, please visit [https://www.sajari.com/company/contact](https://www.sajari.com/company/contact) + For more information, please visit [https://www.search.io/company/contact](https://www.search.io/company/contact) ## Frameworks supported @@ -18,7 +18,7 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap ## Dependencies -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.11.7 or later +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later - [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.3 or later - [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later - [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later @@ -73,7 +73,7 @@ namespace Example { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -103,7 +103,7 @@ namespace Example ## Documentation for API Endpoints -All URIs are relative to *https://api-gateway.sajari.com* +All URIs are relative to *https://api.search.io* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -124,11 +124,22 @@ Class | Method | HTTP request | Description *PipelinesApi* | [**ListPipelines**](docs/PipelinesApi.md#listpipelines) | **GET** /v4/collections/{collection_id}/pipelines | List pipelines *PipelinesApi* | [**SetDefaultPipeline**](docs/PipelinesApi.md#setdefaultpipeline) | **POST** /v4/collections/{collection_id}:setDefaultPipeline | Set default pipeline *PipelinesApi* | [**SetDefaultVersion**](docs/PipelinesApi.md#setdefaultversion) | **POST** /v4/collections/{collection_id}/pipelines/{type}/{name}:setDefaultVersion | Set default pipeline version +*PromotionsApi* | [**CreatePromotion**](docs/PromotionsApi.md#createpromotion) | **POST** /v4/collections/{collection_id}/promotions | Create promotion +*PromotionsApi* | [**DeletePromotion**](docs/PromotionsApi.md#deletepromotion) | **DELETE** /v4/collections/{collection_id}/promotions/{promotion_id} | Delete promotion +*PromotionsApi* | [**GetPromotion**](docs/PromotionsApi.md#getpromotion) | **GET** /v4/collections/{collection_id}/promotions/{promotion_id} | Get promotion +*PromotionsApi* | [**ListPromotions**](docs/PromotionsApi.md#listpromotions) | **GET** /v4/collections/{collection_id}/promotions | List promotions +*PromotionsApi* | [**UpdatePromotion**](docs/PromotionsApi.md#updatepromotion) | **PATCH** /v4/collections/{collection_id}/promotions/{promotion_id} | Update promotion +*RecordsApi* | [**BatchUpdateRecords**](docs/RecordsApi.md#batchupdaterecords) | **POST** /v4/collections/{collection_id}/records:batchUpdate | Batch update records *RecordsApi* | [**BatchUpsertRecords**](docs/RecordsApi.md#batchupsertrecords) | **POST** /v4/collections/{collection_id}/records:batchUpsert | Batch upsert records *RecordsApi* | [**DeleteRecord**](docs/RecordsApi.md#deleterecord) | **POST** /v4/collections/{collection_id}/records:delete | Delete record *RecordsApi* | [**GetRecord**](docs/RecordsApi.md#getrecord) | **POST** /v4/collections/{collection_id}/records:get | Get record *RecordsApi* | [**UpdateRecord**](docs/RecordsApi.md#updaterecord) | **POST** /v4/collections/{collection_id}/records:update | Update record *RecordsApi* | [**UpsertRecord**](docs/RecordsApi.md#upsertrecord) | **POST** /v4/collections/{collection_id}/records:upsert | Upsert record +*RedirectsApi* | [**CreateRedirect**](docs/RedirectsApi.md#createredirect) | **POST** /v4/collections/{collection_id}/redirects | Create redirect +*RedirectsApi* | [**DeleteRedirect**](docs/RedirectsApi.md#deleteredirect) | **DELETE** /v4/collections/{collection_id}/redirects/{redirect_id} | Delete redirect +*RedirectsApi* | [**GetRedirect**](docs/RedirectsApi.md#getredirect) | **GET** /v4/collections/{collection_id}/redirects/{redirect_id} | Get redirect +*RedirectsApi* | [**ListRedirects**](docs/RedirectsApi.md#listredirects) | **GET** /v4/collections/{collection_id}/redirects | List redirects +*RedirectsApi* | [**UpdateRedirect**](docs/RedirectsApi.md#updateredirect) | **PATCH** /v4/collections/{collection_id}/redirects/{redirect_id} | Update redirect *SchemaApi* | [**BatchCreateSchemaFields**](docs/SchemaApi.md#batchcreateschemafields) | **POST** /v4/collections/{collection_id}/schemaFields:batchCreate | Batch create schema fields *SchemaApi* | [**CreateSchemaField**](docs/SchemaApi.md#createschemafield) | **POST** /v4/collections/{collection_id}/schemaFields | Create schema field *SchemaApi* | [**ListSchemaFields**](docs/SchemaApi.md#listschemafields) | **GET** /v4/collections/{collection_id}/schemaFields | List schema fields @@ -137,9 +148,14 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.ActivePromotion](docs/ActivePromotion.md) - [Model.BatchCreateSchemaFieldsRequest](docs/BatchCreateSchemaFieldsRequest.md) - [Model.BatchCreateSchemaFieldsResponse](docs/BatchCreateSchemaFieldsResponse.md) - [Model.BatchCreateSchemaFieldsResponseError](docs/BatchCreateSchemaFieldsResponseError.md) + - [Model.BatchUpdateRecordsRequest](docs/BatchUpdateRecordsRequest.md) + - [Model.BatchUpdateRecordsResponse](docs/BatchUpdateRecordsResponse.md) + - [Model.BatchUpdateRecordsResponseError](docs/BatchUpdateRecordsResponseError.md) + - [Model.BatchUpdateRecordsResponseRecord](docs/BatchUpdateRecordsResponseRecord.md) - [Model.BatchUpsertRecordsRequest](docs/BatchUpsertRecordsRequest.md) - [Model.BatchUpsertRecordsRequestPipeline](docs/BatchUpsertRecordsRequestPipeline.md) - [Model.BatchUpsertRecordsResponse](docs/BatchUpsertRecordsResponse.md) @@ -158,13 +174,23 @@ Class | Method | HTTP request | Description - [Model.ListCollectionsResponse](docs/ListCollectionsResponse.md) - [Model.ListPipelinesRequestView](docs/ListPipelinesRequestView.md) - [Model.ListPipelinesResponse](docs/ListPipelinesResponse.md) + - [Model.ListPromotionsResponse](docs/ListPromotionsResponse.md) + - [Model.ListRedirectsResponse](docs/ListRedirectsResponse.md) - [Model.ListSchemaFieldsResponse](docs/ListSchemaFieldsResponse.md) - [Model.PercentileDataPoint](docs/PercentileDataPoint.md) - [Model.Pipeline](docs/Pipeline.md) - [Model.PipelineStep](docs/PipelineStep.md) - [Model.PipelineStepParamBinding](docs/PipelineStepParamBinding.md) - [Model.PipelineType](docs/PipelineType.md) + - [Model.Promotion](docs/Promotion.md) + - [Model.PromotionCategory](docs/PromotionCategory.md) + - [Model.PromotionExclusion](docs/PromotionExclusion.md) + - [Model.PromotionFilterBoost](docs/PromotionFilterBoost.md) + - [Model.PromotionFilterCondition](docs/PromotionFilterCondition.md) + - [Model.PromotionPin](docs/PromotionPin.md) + - [Model.PromotionRangeBoost](docs/PromotionRangeBoost.md) - [Model.ProtobufAny](docs/ProtobufAny.md) + - [Model.ProtobufFieldMask](docs/ProtobufFieldMask.md) - [Model.ProtobufNullValue](docs/ProtobufNullValue.md) - [Model.QueryAggregateResult](docs/QueryAggregateResult.md) - [Model.QueryAggregateResultAnalysis](docs/QueryAggregateResultAnalysis.md) @@ -185,6 +211,8 @@ Class | Method | HTTP request | Description - [Model.QueryResultTokenClick](docs/QueryResultTokenClick.md) - [Model.QueryResultTokenPosNeg](docs/QueryResultTokenPosNeg.md) - [Model.RecordKey](docs/RecordKey.md) + - [Model.Redirect](docs/Redirect.md) + - [Model.RedirectResult](docs/RedirectResult.md) - [Model.SchemaField](docs/SchemaField.md) - [Model.SchemaFieldMode](docs/SchemaFieldMode.md) - [Model.SchemaFieldType](docs/SchemaFieldType.md) diff --git a/docs/ActivePromotion.md b/docs/ActivePromotion.md new file mode 100644 index 0000000..ad4f7cc --- /dev/null +++ b/docs/ActivePromotion.md @@ -0,0 +1,13 @@ +# Com.Sajari.Sdk.Model.ActivePromotion +ActivePromotion is a promotion that is active for a given search. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActiveExclusions** | [**List<PromotionExclusion>**](PromotionExclusion.md) | The records that are excluded from the result set by the active promotion. | [optional] +**ActivePins** | [**List<PromotionPin>**](PromotionPin.md) | The pins that belong to the active promotion. Note that the positions in these pins are the positions specified at pin creation time, which is not necessarily the position that a pin ends up in. For example, if a pin is created at position 2, but the query that the pin is active in has zero results, the pinned result actually appears in position 1. | [optional] +**PromotionId** | **string** | The ID of the active promotion. | [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/BatchUpdateRecordsRequest.md b/docs/BatchUpdateRecordsRequest.md new file mode 100644 index 0000000..a58a447 --- /dev/null +++ b/docs/BatchUpdateRecordsRequest.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.BatchUpdateRecordsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Requests** | [**List<UpdateRecordRequest>**](UpdateRecordRequest.md) | The list of requests containing the records to be updated. A maximum of 200 records can be updated in a batch. | +**UpdateMask** | **string** | The list of fields to be updated, separated by a comma, e.g. `field1,field2`. For each field that you want to update, provide a corresponding value in each record object, within the requests list, containing the new value. If provided, and you also provide an update mask in any child request, the values must match. | [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/BatchUpdateRecordsResponse.md b/docs/BatchUpdateRecordsResponse.md new file mode 100644 index 0000000..bd0f6c5 --- /dev/null +++ b/docs/BatchUpdateRecordsResponse.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.BatchUpdateRecordsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<BatchUpdateRecordsResponseError>**](BatchUpdateRecordsResponseError.md) | The errors that occurred. | [optional] +**Records** | [**List<BatchUpdateRecordsResponseRecord>**](BatchUpdateRecordsResponseRecord.md) | A list of updated records. | [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/BatchUpdateRecordsResponseError.md b/docs/BatchUpdateRecordsResponseError.md new file mode 100644 index 0000000..664e26d --- /dev/null +++ b/docs/BatchUpdateRecordsResponseError.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.BatchUpdateRecordsResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Index** | **int** | The index of the record in `requests` that this error corresponds to. | [optional] +**Status** | [**Status**](Status.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/BatchUpdateRecordsResponseRecord.md b/docs/BatchUpdateRecordsResponseRecord.md new file mode 100644 index 0000000..cb35d55 --- /dev/null +++ b/docs/BatchUpdateRecordsResponseRecord.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.BatchUpdateRecordsResponseRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Index** | **int** | The index of the record in `requests`. | [optional] +**Record** | **Object** | The updated record. | [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/CollectionsApi.md b/docs/CollectionsApi.md index 0a2f345..237dc2a 100644 --- a/docs/CollectionsApi.md +++ b/docs/CollectionsApi.md @@ -1,6 +1,6 @@ # Com.Sajari.Sdk.Api.CollectionsApi -All URIs are relative to *https://api-gateway.sajari.com* +All URIs are relative to *https://api.search.io* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -19,7 +19,7 @@ Method | HTTP request | Description Create collection -Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Sajari Console, which handles the creation of the schema and pipelines for you. +Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Search.io Console, which handles the creation of the schema and pipelines for you. ### Example ```csharp @@ -36,7 +36,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -120,7 +120,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -200,7 +200,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -280,7 +280,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -345,7 +345,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) ### Example ```csharp @@ -362,7 +362,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -427,7 +427,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) ### Example ```csharp @@ -444,7 +444,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -526,7 +526,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; diff --git a/docs/EventsApi.md b/docs/EventsApi.md index dc281f2..e9c15c1 100644 --- a/docs/EventsApi.md +++ b/docs/EventsApi.md @@ -1,6 +1,6 @@ # Com.Sajari.Sdk.Api.EventsApi -All URIs are relative to *https://api-gateway.sajari.com* +All URIs are relative to *https://api.search.io* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -31,7 +31,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -112,7 +112,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; diff --git a/docs/ListPromotionsResponse.md b/docs/ListPromotionsResponse.md new file mode 100644 index 0000000..71fd839 --- /dev/null +++ b/docs/ListPromotionsResponse.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.ListPromotionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextPageToken** | **string** | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. | [optional] +**Promotions** | [**List<Promotion>**](Promotion.md) | The promotions. | [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/ListRedirectsResponse.md b/docs/ListRedirectsResponse.md new file mode 100644 index 0000000..ff10770 --- /dev/null +++ b/docs/ListRedirectsResponse.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.ListRedirectsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextPageToken** | **string** | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. | [optional] +**Redirects** | [**List<Redirect>**](Redirect.md) | The redirects. | [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/Pipeline.md b/docs/Pipeline.md index ab7bf4f..50d261a 100644 --- a/docs/Pipeline.md +++ b/docs/Pipeline.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **DefaultVersion** | **bool** | Output only. Indicates if the pipeline is the default version. | [optional] [readonly] **Description** | **string** | Description of the pipeline. | [optional] **Name** | **string** | The pipeline's name. Must start with an alphanumeric character followed by one or more alphanumeric, `_`, `-` or `.` characters. Strictly speaking, it must match the regular expression: `^[a-zA-Z0-9][a-zA-Z0-9_\\-\\.]+$`. | -**PostSteps** | [**List<PipelineStep>**](PipelineStep.md) | Post-steps are run after an indexing operation or query request has been sent to the search index. For indexing operations, the post-steps only run when creating new records. They do not run when updating records. For querying, the post-steps have access to the result-set. This makes it possible to act on the results before sending them back to the caller. | [optional] -**PreSteps** | [**List<PipelineStep>**](PipelineStep.md) | Pre-steps are run before an indexing operation or query request is sent to the search index. | [optional] +**PostSteps** | [**List<PipelineStep>**](PipelineStep.md) | The post-steps that are run after an indexing operation or query request has been sent to the search index. For indexing operations, the post-steps only run when creating new records. They do not run when updating records. For querying, the post-steps have access to the result-set. This makes it possible to act on the results before sending them back to the caller. | [optional] +**PreSteps** | [**List<PipelineStep>**](PipelineStep.md) | The pre-steps that are run before an indexing operation or query request is sent to the search index. | [optional] **Type** | **PipelineType** | | **_Version** | **string** | The pipeline's version. Must start with an alphanumeric character followed by one or more alphanumeric, `_`, `-` or `.` characters. Strictly speaking, it must match the regular expression: `^[a-zA-Z0-9][a-zA-Z0-9_\\-\\.]+$`. | diff --git a/docs/PipelineStep.md b/docs/PipelineStep.md index c6dd6ce..b289edd 100644 --- a/docs/PipelineStep.md +++ b/docs/PipelineStep.md @@ -6,7 +6,7 @@ Step creates a pipeline step. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Annotations** | **List<string>** | Annotations added to the request when the step is run. | [optional] -**Condition** | **string** | Condition expression to determine if the step should be run. This is a filter expression much like the query filter expression, but it acts upon the pipeline variables. For example, to only run the step if the pipeline `q` variable is not empty, set this to `q != ''`. | [optional] +**Condition** | **string** | A condition expression to determine if the step should be run. This is a filter expression much like the query filter expression, but it acts upon the pipeline variables. For example, to only run the step if the pipeline `q` variable is not empty, set this to `q != ''`. | [optional] **Description** | **string** | Description for the step. Overrides the default description. | [optional] **Id** | **string** | ID of the step template. | **Params** | [**Dictionary<string, PipelineStepParamBinding>**](PipelineStepParamBinding.md) | Bindings for the step parameters. | [optional] diff --git a/docs/PipelinesApi.md b/docs/PipelinesApi.md index bc0e9fc..b0769ec 100644 --- a/docs/PipelinesApi.md +++ b/docs/PipelinesApi.md @@ -1,6 +1,6 @@ # Com.Sajari.Sdk.Api.PipelinesApi -All URIs are relative to *https://api-gateway.sajari.com* +All URIs are relative to *https://api.search.io* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -37,7 +37,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -119,7 +119,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -201,7 +201,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -283,7 +283,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -369,7 +369,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -457,7 +457,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -543,7 +543,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -625,7 +625,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; diff --git a/docs/Promotion.md b/docs/Promotion.md new file mode 100644 index 0000000..6e0800f --- /dev/null +++ b/docs/Promotion.md @@ -0,0 +1,24 @@ +# Com.Sajari.Sdk.Model.Promotion +Promotion contains a trigger, determining which searches it should be active for, and a list of alterations that should be made to search results when it is active. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**Disabled** | **bool** | If disabled, the promotion is never triggered. | [optional] +**DisplayName** | **string** | The promotion's display name. | +**EndTime** | **DateTime** | If specified, the promotion is considered disabled after this time. | [optional] +**Exclusions** | [**List<PromotionExclusion>**](PromotionExclusion.md) | The records to exclude from search results, if the promotion is enabled. | [optional] +**FilterBoosts** | [**List<PromotionFilterBoost>**](PromotionFilterBoost.md) | The filter boosts to apply to searches, if the promotion is enabled. | [optional] +**FilterConditions** | [**List<PromotionFilterCondition>**](PromotionFilterCondition.md) | The conditions applied to the filters passed from the user. A query must match at least one of these in order to trigger the promotion. | [optional] +**Id** | **string** | The promotion's ID. | [optional] +**Pins** | [**List<PromotionPin>**](PromotionPin.md) | The items to fix to specific positions in the search results. | [optional] +**RangeBoosts** | [**List<PromotionRangeBoost>**](PromotionRangeBoost.md) | The range boosts to apply to searches, if the promotion is enabled. | [optional] +**StartTime** | **DateTime** | If specified, the promotion is considered disabled before this time. | [optional] +**UpdateTime** | **DateTime** | Output only. Time the promotion was last updated. | [optional] [readonly] + +[[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/PromotionCategory.md b/docs/PromotionCategory.md new file mode 100644 index 0000000..dc2ede5 --- /dev/null +++ b/docs/PromotionCategory.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.PromotionCategory + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IdField** | **string** | The logical field that specifies a record's category, e.g. \"product_type\". | [optional] +**MappingField** | **string** | The field that contains a human-readable rendering of a record's category, e.g. \"product_type_name\". When creating promotions, this field's text value is displayed instead of the `id_field`. If `mapping_field` is not provided, the text value of the record's `id_field` is displayed. | [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/PromotionExclusion.md b/docs/PromotionExclusion.md new file mode 100644 index 0000000..edb1c16 --- /dev/null +++ b/docs/PromotionExclusion.md @@ -0,0 +1,10 @@ +# Com.Sajari.Sdk.Model.PromotionExclusion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | [**RecordKey**](RecordKey.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/PromotionFilterBoost.md b/docs/PromotionFilterBoost.md new file mode 100644 index 0000000..c8cfbf9 --- /dev/null +++ b/docs/PromotionFilterBoost.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.PromotionFilterBoost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Boost** | **float** | Number that determines the size of the boost that is applied to matching records. Must be greater than or equal to 0 and less than or equal to 1. | [optional] +**Filter** | **string** | Filter expression that applies a relevance boost to records matching this filter. This is a filter expression much like the query filter expression. | [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/PromotionFilterCondition.md b/docs/PromotionFilterCondition.md new file mode 100644 index 0000000..4463162 --- /dev/null +++ b/docs/PromotionFilterCondition.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.PromotionFilterCondition +A set of filters of the form `field = 'value'`. Matches a query if the set of filters in the condition matches exactly the set of filters associated with it. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Filter** | **List<string>** | A filter of the form `field = 'value'`. | [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/PromotionPin.md b/docs/PromotionPin.md new file mode 100644 index 0000000..98860f1 --- /dev/null +++ b/docs/PromotionPin.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.PromotionPin + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | [**RecordKey**](RecordKey.md) | | [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/PromotionRangeBoost.md b/docs/PromotionRangeBoost.md new file mode 100644 index 0000000..21263b2 --- /dev/null +++ b/docs/PromotionRangeBoost.md @@ -0,0 +1,14 @@ +# Com.Sajari.Sdk.Model.PromotionRangeBoost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Boost** | **float** | Number that determines the size of the boost that is applied to matching records. Must be greater than or equal to 0 and less than or equal to 1. | [optional] +**End** | **float** | The end value to apply 1 boost to. | [optional] +**Field** | **string** | The field to apply the boost to. | [optional] +**NullBoost** | **float** | The boost given to null/empty values. Must be greater than or equal to 0 and less than or equal to 1. The default value is 0. | [optional] +**Start** | **float** | The start value to apply 0 boost to. | [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/PromotionsApi.md b/docs/PromotionsApi.md new file mode 100644 index 0000000..b184eb6 --- /dev/null +++ b/docs/PromotionsApi.md @@ -0,0 +1,429 @@ +# Com.Sajari.Sdk.Api.PromotionsApi + +All URIs are relative to *https://api.search.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreatePromotion**](PromotionsApi.md#createpromotion) | **POST** /v4/collections/{collection_id}/promotions | Create promotion +[**DeletePromotion**](PromotionsApi.md#deletepromotion) | **DELETE** /v4/collections/{collection_id}/promotions/{promotion_id} | Delete promotion +[**GetPromotion**](PromotionsApi.md#getpromotion) | **GET** /v4/collections/{collection_id}/promotions/{promotion_id} | Get promotion +[**ListPromotions**](PromotionsApi.md#listpromotions) | **GET** /v4/collections/{collection_id}/promotions | List promotions +[**UpdatePromotion**](PromotionsApi.md#updatepromotion) | **PATCH** /v4/collections/{collection_id}/promotions/{promotion_id} | Update promotion + + + +# **CreatePromotion** +> Promotion CreatePromotion (string collectionId, Promotion promotion) + +Create promotion + +Create a new promotion in a collection. + +### 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 CreatePromotionExample + { + 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 PromotionsApi(config); + 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 + { + // Create promotion + Promotion result = apiInstance.CreatePromotion(collectionId, promotion); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PromotionsApi.CreatePromotion: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection to create a promotion in, e.g. `my-collection`. | + **promotion** | [**Promotion**](Promotion.md)| The promotion to create. | + +### Return type + +[**Promotion**](Promotion.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) + + +# **DeletePromotion** +> Object DeletePromotion (string collectionId, string promotionId) + +Delete promotion + +Delete a promotion and all of its associated data. > Note: This operation cannot be reversed. + +### 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 DeletePromotionExample + { + 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 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`. + + try + { + // Delete promotion + Object result = apiInstance.DeletePromotion(collectionId, promotionId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PromotionsApi.DeletePromotion: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection the promotion belongs to, e.g. `my-collection`. | + **promotionId** | **string**| The promotion to delete, e.g. `1234`. | + +### Return type + +**Object** + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 promotion was not found. | - | +| **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) + + +# **GetPromotion** +> Promotion GetPromotion (string collectionId, string promotionId) + +Get promotion + +Retrieve the details of a promotion. + +### 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 GetPromotionExample + { + 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 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`. + + try + { + // Get promotion + Promotion result = apiInstance.GetPromotion(collectionId, promotionId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PromotionsApi.GetPromotion: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection that owns the promotion, e.g. `my-collection`. | + **promotionId** | **string**| The promotion to retrieve, e.g. `1234`. | + +### Return type + +[**Promotion**](Promotion.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **ListPromotions** +> ListPromotionsResponse ListPromotions (string collectionId, int? pageSize = null, string pageToken = null) + +List promotions + +Retrieve a list of promotions in a collection. Promotion pins, exclusions and filter boosts are not returned in this call. + +### 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 ListPromotionsExample + { + 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 PromotionsApi(config); + 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) + + try + { + // List promotions + ListPromotionsResponse result = apiInstance.ListPromotions(collectionId, pageSize, pageToken); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PromotionsApi.ListPromotions: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +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] + +### Return type + +[**ListPromotionsResponse**](ListPromotionsResponse.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **UpdatePromotion** +> Promotion UpdatePromotion (string collectionId, string promotionId, string updateMask, Promotion promotion) + +Update promotion + +Update the details of a promotion. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `display_name` and `start_time` fields, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/promotions/{promotion_id}?update_mask=display_name,start_time ``` With the JSON body: ``` { \"display_name\": \"new value\", \"start_time\": \"2006-01-02T15:04:05Z07:00\", \"end_time\": \"2006-01-02T15:04:05Z07:00\" } ``` > Note: In this example `end_time` is not updated because it is not specified in the `update_mask`. + +### 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 UpdatePromotionExample + { + 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 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 promotion = new Promotion(); // Promotion | Details of the promotion to update. + + try + { + // Update promotion + Promotion result = apiInstance.UpdatePromotion(collectionId, promotionId, updateMask, promotion); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PromotionsApi.UpdatePromotion: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection the promotion belongs to, e.g. `my-collection`. | + **promotionId** | **string**| The promotion to update, e.g. `1234`. | + **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`, `filter_boosts`. For each field that you want to update, provide a corresponding value in the promotion object containing the new value. | + **promotion** | [**Promotion**](Promotion.md)| Details of the promotion to update. | + +### Return type + +[**Promotion**](Promotion.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 promotion was not found. | - | +| **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) + diff --git a/docs/ProtobufFieldMask.md b/docs/ProtobufFieldMask.md new file mode 100644 index 0000000..b08237d --- /dev/null +++ b/docs/ProtobufFieldMask.md @@ -0,0 +1,11 @@ +# Com.Sajari.Sdk.Model.ProtobufFieldMask +paths: \"f.a\" paths: \"f.b.d\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, new values will be appended to the existing repeated field in the target resource. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then new value will be merged into the existing sub-message in the target resource. For example, given the target message: f { b { d: 1 x: 2 } c: [1] } And an update message: f { b { d: 10 } c: [2] } then if the field mask is: paths: [\"f.b\", \"f.c\"] then the result will be: f { b { d: 10 x: 2 } c: [1, 2] } An implementation may provide options to override this default behavior for repeated and message fields. In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \"user.display_name\" paths: \"photo\" } In JSON, the same mask is represented as below: { mask: \"user.displayName,photo\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \"name\" } Or: mask { paths: \"sub_message\" } Note that oneof type names (\"test_oneof\" in this case) cannot be used in paths. ## Field Mask Verification The implementation of any API method which has a FieldMask type field in the request should verify the included field paths, and return an `INVALID_ARGUMENT` error if any path is unmappable. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Paths** | **List<string>** | The set of field mask paths. | [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 221d37f..7c99d1d 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 will be generated for each result. Results which do not receive clicks will fall down rankings, and similarly low-ranked records which receive clicks will be moved up the rankings. - POS_NEG: Pos/neg tracking. Pos/neg tokens will be 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. ## Properties diff --git a/docs/QueryCollectionResponse.md b/docs/QueryCollectionResponse.md index ed51fb9..b0d0a2a 100644 --- a/docs/QueryCollectionResponse.md +++ b/docs/QueryCollectionResponse.md @@ -4,10 +4,13 @@ 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] +**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] +**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] **Variables** | **Dictionary<string, Object>** | The modified variables returned by the pipeline after it has finished processing. | [optional] diff --git a/docs/QueryResult.md b/docs/QueryResult.md index 5a7ee5a..ce144cf 100644 --- a/docs/QueryResult.md +++ b/docs/QueryResult.md @@ -4,9 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**IndexScore** | **double** | Index score. | [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] -**Score** | **double** | The normalized score attributed to this record. Combines the index score and feature score. | [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] [[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/RecordsApi.md b/docs/RecordsApi.md index f749e70..3411c2e 100644 --- a/docs/RecordsApi.md +++ b/docs/RecordsApi.md @@ -1,9 +1,10 @@ # Com.Sajari.Sdk.Api.RecordsApi -All URIs are relative to *https://api-gateway.sajari.com* +All URIs are relative to *https://api.search.io* Method | HTTP request | Description ------------- | ------------- | ------------- +[**BatchUpdateRecords**](RecordsApi.md#batchupdaterecords) | **POST** /v4/collections/{collection_id}/records:batchUpdate | Batch update records [**BatchUpsertRecords**](RecordsApi.md#batchupsertrecords) | **POST** /v4/collections/{collection_id}/records:batchUpsert | Batch upsert records [**DeleteRecord**](RecordsApi.md#deleterecord) | **POST** /v4/collections/{collection_id}/records:delete | Delete record [**GetRecord**](RecordsApi.md#getrecord) | **POST** /v4/collections/{collection_id}/records:get | Get record @@ -11,6 +12,88 @@ Method | HTTP request | Description [**UpsertRecord**](RecordsApi.md#upsertrecord) | **POST** /v4/collections/{collection_id}/records:upsert | Upsert record + +# **BatchUpdateRecords** +> BatchUpdateRecordsResponse BatchUpdateRecords (string collectionId, BatchUpdateRecordsRequest batchUpdateRecordsRequest) + +Batch update records + +The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + +### 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 BatchUpdateRecordsExample + { + 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 RecordsApi(config); + var collectionId = collectionId_example; // string | The collection that contains the records to update, e.g. `my-collection`. + var batchUpdateRecordsRequest = new BatchUpdateRecordsRequest(); // BatchUpdateRecordsRequest | + + try + { + // Batch update records + BatchUpdateRecordsResponse result = apiInstance.BatchUpdateRecords(collectionId, batchUpdateRecordsRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RecordsApi.BatchUpdateRecords: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection that contains the records to update, e.g. `my-collection`. | + **batchUpdateRecordsRequest** | [**BatchUpdateRecordsRequest**](BatchUpdateRecordsRequest.md)| | + +### Return type + +[**BatchUpdateRecordsResponse**](BatchUpdateRecordsResponse.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) + # **BatchUpsertRecords** > BatchUpsertRecordsResponse BatchUpsertRecords (string collectionId, BatchUpsertRecordsRequest batchUpsertRecordsRequest) @@ -34,7 +117,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -116,7 +199,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -198,7 +281,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -280,7 +363,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -362,7 +445,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; diff --git a/docs/Redirect.md b/docs/Redirect.md new file mode 100644 index 0000000..6c828ce --- /dev/null +++ b/docs/Redirect.md @@ -0,0 +1,17 @@ +# Com.Sajari.Sdk.Model.Redirect +Redirect contains a target that you can redirect users to if their search query matches a certain condition. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CollectionId** | **string** | Output only. The ID of the collection that owns this redirect. | [optional] [readonly] +**Condition** | **string** | A condition expression applied to a search request that determines whether a search is redirected. For example, to redirect if the user's query is `apples`, set condition to `q = 'apples'`. | +**CreateTime** | **DateTime** | Output only. Time the redirect was created. | [optional] [readonly] +**Disabled** | **bool** | If disabled, the redirect is never triggered. | [optional] +**Id** | **string** | Output only. The redirect's ID. | [optional] [readonly] +**Target** | **string** | The target to redirect the user to if their query matches `condition`. For searches performed in a browser, target is usually a URL but it can be any value that your integration can interpret as a redirect. For example, for URLs that you need to resolve at runtime, target might be a URL template string. For apps, target might be a unique identifier used to send the user to the correct view. | +**UpdateTime** | **DateTime** | Output only. Time the redirect was last updated. | [optional] [readonly] + +[[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/RedirectResult.md b/docs/RedirectResult.md new file mode 100644 index 0000000..0b8e171 --- /dev/null +++ b/docs/RedirectResult.md @@ -0,0 +1,13 @@ +# Com.Sajari.Sdk.Model.RedirectResult +RedirectResult indicates that a redirect has been triggered for a given query. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The redirect's ID. | [optional] +**Target** | **string** | The target to redirect the user to. | [optional] +**Token** | **string** | A redirect token. Call SendEvent with this token to indicate that a redirect has been performed. | [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/RedirectsApi.md b/docs/RedirectsApi.md new file mode 100644 index 0000000..d2a8efb --- /dev/null +++ b/docs/RedirectsApi.md @@ -0,0 +1,429 @@ +# Com.Sajari.Sdk.Api.RedirectsApi + +All URIs are relative to *https://api.search.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateRedirect**](RedirectsApi.md#createredirect) | **POST** /v4/collections/{collection_id}/redirects | Create redirect +[**DeleteRedirect**](RedirectsApi.md#deleteredirect) | **DELETE** /v4/collections/{collection_id}/redirects/{redirect_id} | Delete redirect +[**GetRedirect**](RedirectsApi.md#getredirect) | **GET** /v4/collections/{collection_id}/redirects/{redirect_id} | Get redirect +[**ListRedirects**](RedirectsApi.md#listredirects) | **GET** /v4/collections/{collection_id}/redirects | List redirects +[**UpdateRedirect**](RedirectsApi.md#updateredirect) | **PATCH** /v4/collections/{collection_id}/redirects/{redirect_id} | Update redirect + + + +# **CreateRedirect** +> Redirect CreateRedirect (string collectionId, Redirect redirect) + +Create redirect + +Create a new redirect in a collection. + +### 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 CreateRedirectExample + { + 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 RedirectsApi(config); + 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 + { + // Create redirect + Redirect result = apiInstance.CreateRedirect(collectionId, redirect); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RedirectsApi.CreateRedirect: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection to create a redirect in, e.g. `my-collection`. | + **redirect** | [**Redirect**](Redirect.md)| The redirect to create. | + +### Return type + +[**Redirect**](Redirect.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) + + +# **DeleteRedirect** +> Object DeleteRedirect (string collectionId, string redirectId) + +Delete redirect + +Delete a redirect and all of its associated data. > Note: This operation cannot be reversed. + +### 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 DeleteRedirectExample + { + 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 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`. + + try + { + // Delete redirect + Object result = apiInstance.DeleteRedirect(collectionId, redirectId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RedirectsApi.DeleteRedirect: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection the redirect belongs to, e.g. `my-collection`. | + **redirectId** | **string**| The redirect to delete, e.g. `1234`. | + +### Return type + +**Object** + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 redirect was not found. | - | +| **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) + + +# **GetRedirect** +> Redirect GetRedirect (string collectionId, string redirectId) + +Get redirect + +Retrieve the details of a redirect. + +### 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 GetRedirectExample + { + 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 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`. + + try + { + // Get redirect + Redirect result = apiInstance.GetRedirect(collectionId, redirectId); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RedirectsApi.GetRedirect: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection that owns the redirect, e.g. `my-collection`. | + **redirectId** | **string**| The redirect to retrieve, e.g. `1234`. | + +### Return type + +[**Redirect**](Redirect.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **ListRedirects** +> ListRedirectsResponse ListRedirects (string collectionId, int? pageSize = null, string pageToken = null) + +List redirects + +Retrieve a list of redirects in a collection. + +### 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 ListRedirectsExample + { + 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 RedirectsApi(config); + 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) + + try + { + // List redirects + ListRedirectsResponse result = apiInstance.ListRedirects(collectionId, pageSize, pageToken); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RedirectsApi.ListRedirects: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +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] + +### Return type + +[**ListRedirectsResponse**](ListRedirectsResponse.md) + +### Authorization + +[BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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) + + +# **UpdateRedirect** +> Redirect UpdateRedirect (string collectionId, string redirectId, string updateMask, Redirect redirect) + +Update redirect + +Update the details of a redirect. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `condition` field, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/redirects/{redirect_id}?update_mask=condition ``` With the JSON body: ``` { \"condition\": \"new value\", \"target\": \"...\" } ``` > Note: In this example `target` is not updated because it is not specified in the `update_mask`. + +### 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 UpdateRedirectExample + { + 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 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 redirect = new Redirect(); // Redirect | Details of the redirect to update. + + try + { + // Update redirect + Redirect result = apiInstance.UpdateRedirect(collectionId, redirectId, updateMask, redirect); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling RedirectsApi.UpdateRedirect: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **string**| The collection the redirect belongs to, e.g. `my-collection`. | + **redirectId** | **string**| The redirect to update, e.g. `1234`. | + **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. `condition`, `target`. For each field that you want to update, provide a corresponding value in the redirect object containing the new value. | + **redirect** | [**Redirect**](Redirect.md)| Details of the redirect to update. | + +### Return type + +[**Redirect**](Redirect.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 redirect was not found. | - | +| **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) + diff --git a/docs/SchemaApi.md b/docs/SchemaApi.md index 1f161cc..113bfb6 100644 --- a/docs/SchemaApi.md +++ b/docs/SchemaApi.md @@ -1,6 +1,6 @@ # Com.Sajari.Sdk.Api.SchemaApi -All URIs are relative to *https://api-gateway.sajari.com* +All URIs are relative to *https://api.search.io* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -32,7 +32,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -114,7 +114,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; @@ -196,7 +196,7 @@ namespace Example public static void Main() { Configuration config = new Configuration(); - config.BasePath = "https://api-gateway.sajari.com"; + config.BasePath = "https://api.search.io"; // Configure HTTP basic authorization: BasicAuth config.Username = "YOUR_USERNAME"; config.Password = "YOUR_PASSWORD"; diff --git a/docs/SchemaFieldType.md b/docs/SchemaFieldType.md index 7eb1e64..3bb4be4 100644 --- a/docs/SchemaFieldType.md +++ b/docs/SchemaFieldType.md @@ -1,5 +1,5 @@ # Com.Sajari.Sdk.Model.SchemaFieldType -Type represents the underlying data type of the field. - TYPE_UNSPECIFIED: Type not specified. - STRING: String values. - INTEGER: Integer values (64-bit). - FLOAT: Floating point values (32-bit). - DOUBLE: Double floating point values (64-bit). - BOOLEAN: Boolean values. - TIMESTAMP: Timestamp values. +Type represents the underlying data type of the field. - TYPE_UNSPECIFIED: Type not specified. - STRING: String values. - INTEGER: Integer values (64-bit). - FLOAT: Floating point values (32-bit). - DOUBLE: Double floating point values (64-bit). - BOOLEAN: Boolean values. - TIMESTAMP: Timestamp values. - BYTES: Raw byte values. ## Properties diff --git a/generate/generate.sh b/generate/generate.sh index e0ea203..ef34040 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.2.0 +VERSION=4.3.0 docker-entrypoint.sh generate \ -i /openapi.json \ diff --git a/src/Com.Sajari.Sdk.Test/Api/PromotionsApiTests.cs b/src/Com.Sajari.Sdk.Test/Api/PromotionsApiTests.cs new file mode 100644 index 0000000..0867711 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Api/PromotionsApiTests.cs @@ -0,0 +1,126 @@ +/* + * 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.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Com.Sajari.Sdk.Client; +using Com.Sajari.Sdk.Api; +// uncomment below to import models +//using Com.Sajari.Sdk.Model; + +namespace Com.Sajari.Sdk.Test.Api +{ + /// + /// Class for testing PromotionsApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class PromotionsApiTests : IDisposable + { + private PromotionsApi instance; + + public PromotionsApiTests() + { + instance = new PromotionsApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PromotionsApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' PromotionsApi + //Assert.IsType(instance); + } + + /// + /// Test CreatePromotion + /// + [Fact] + public void CreatePromotionTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //Promotion promotion = null; + //var response = instance.CreatePromotion(collectionId, promotion); + //Assert.IsType(response); + } + + /// + /// Test DeletePromotion + /// + [Fact] + public void DeletePromotionTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //string promotionId = null; + //var response = instance.DeletePromotion(collectionId, promotionId); + //Assert.IsType(response); + } + + /// + /// Test GetPromotion + /// + [Fact] + public void GetPromotionTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //string promotionId = null; + //var response = instance.GetPromotion(collectionId, promotionId); + //Assert.IsType(response); + } + + /// + /// Test ListPromotions + /// + [Fact] + public void ListPromotionsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //int? pageSize = null; + //string pageToken = null; + //var response = instance.ListPromotions(collectionId, pageSize, pageToken); + //Assert.IsType(response); + } + + /// + /// Test UpdatePromotion + /// + [Fact] + public void UpdatePromotionTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //string promotionId = null; + //string updateMask = null; + //Promotion promotion = null; + //var response = instance.UpdatePromotion(collectionId, promotionId, updateMask, promotion); + //Assert.IsType(response); + } + } +} diff --git a/src/Com.Sajari.Sdk.Test/Api/RedirectsApiTests.cs b/src/Com.Sajari.Sdk.Test/Api/RedirectsApiTests.cs new file mode 100644 index 0000000..f463e3a --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Api/RedirectsApiTests.cs @@ -0,0 +1,126 @@ +/* + * 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.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Com.Sajari.Sdk.Client; +using Com.Sajari.Sdk.Api; +// uncomment below to import models +//using Com.Sajari.Sdk.Model; + +namespace Com.Sajari.Sdk.Test.Api +{ + /// + /// Class for testing RedirectsApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class RedirectsApiTests : IDisposable + { + private RedirectsApi instance; + + public RedirectsApiTests() + { + instance = new RedirectsApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RedirectsApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' RedirectsApi + //Assert.IsType(instance); + } + + /// + /// Test CreateRedirect + /// + [Fact] + public void CreateRedirectTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //Redirect redirect = null; + //var response = instance.CreateRedirect(collectionId, redirect); + //Assert.IsType(response); + } + + /// + /// Test DeleteRedirect + /// + [Fact] + public void DeleteRedirectTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //string redirectId = null; + //var response = instance.DeleteRedirect(collectionId, redirectId); + //Assert.IsType(response); + } + + /// + /// Test GetRedirect + /// + [Fact] + public void GetRedirectTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //string redirectId = null; + //var response = instance.GetRedirect(collectionId, redirectId); + //Assert.IsType(response); + } + + /// + /// Test ListRedirects + /// + [Fact] + public void ListRedirectsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //int? pageSize = null; + //string pageToken = null; + //var response = instance.ListRedirects(collectionId, pageSize, pageToken); + //Assert.IsType(response); + } + + /// + /// Test UpdateRedirect + /// + [Fact] + public void UpdateRedirectTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string collectionId = null; + //string redirectId = null; + //string updateMask = null; + //Redirect redirect = null; + //var response = instance.UpdateRedirect(collectionId, redirectId, updateMask, redirect); + //Assert.IsType(response); + } + } +} diff --git a/src/Com.Sajari.Sdk.Test/Model/ActivePromotionTests.cs b/src/Com.Sajari.Sdk.Test/Model/ActivePromotionTests.cs new file mode 100644 index 0000000..2aaa32f --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/ActivePromotionTests.cs @@ -0,0 +1,87 @@ +/* + * 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 ActivePromotion + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivePromotionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivePromotion + //private ActivePromotion instance; + + public ActivePromotionTests() + { + // TODO uncomment below to create an instance of ActivePromotion + //instance = new ActivePromotion(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivePromotion + /// + [Fact] + public void ActivePromotionInstanceTest() + { + // TODO uncomment below to test "IsType" ActivePromotion + //Assert.IsType(instance); + } + + + /// + /// Test the property 'ActiveExclusions' + /// + [Fact] + public void ActiveExclusionsTest() + { + // TODO unit test for the property 'ActiveExclusions' + } + /// + /// Test the property 'ActivePins' + /// + [Fact] + public void ActivePinsTest() + { + // TODO unit test for the property 'ActivePins' + } + /// + /// Test the property 'PromotionId' + /// + [Fact] + public void PromotionIdTest() + { + // TODO unit test for the property 'PromotionId' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsRequestTests.cs b/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsRequestTests.cs new file mode 100644 index 0000000..7457986 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsRequestTests.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 BatchUpdateRecordsRequest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BatchUpdateRecordsRequestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BatchUpdateRecordsRequest + //private BatchUpdateRecordsRequest instance; + + public BatchUpdateRecordsRequestTests() + { + // TODO uncomment below to create an instance of BatchUpdateRecordsRequest + //instance = new BatchUpdateRecordsRequest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BatchUpdateRecordsRequest + /// + [Fact] + public void BatchUpdateRecordsRequestInstanceTest() + { + // TODO uncomment below to test "IsType" BatchUpdateRecordsRequest + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Requests' + /// + [Fact] + public void RequestsTest() + { + // TODO unit test for the property 'Requests' + } + /// + /// Test the property 'UpdateMask' + /// + [Fact] + public void UpdateMaskTest() + { + // TODO unit test for the property 'UpdateMask' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseErrorTests.cs b/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseErrorTests.cs new file mode 100644 index 0000000..ab67edf --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseErrorTests.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 BatchUpdateRecordsResponseError + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BatchUpdateRecordsResponseErrorTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BatchUpdateRecordsResponseError + //private BatchUpdateRecordsResponseError instance; + + public BatchUpdateRecordsResponseErrorTests() + { + // TODO uncomment below to create an instance of BatchUpdateRecordsResponseError + //instance = new BatchUpdateRecordsResponseError(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BatchUpdateRecordsResponseError + /// + [Fact] + public void BatchUpdateRecordsResponseErrorInstanceTest() + { + // TODO uncomment below to test "IsType" BatchUpdateRecordsResponseError + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Index' + /// + [Fact] + public void IndexTest() + { + // TODO unit test for the property 'Index' + } + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseRecordTests.cs b/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseRecordTests.cs new file mode 100644 index 0000000..e5560c3 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseRecordTests.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 BatchUpdateRecordsResponseRecord + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BatchUpdateRecordsResponseRecordTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BatchUpdateRecordsResponseRecord + //private BatchUpdateRecordsResponseRecord instance; + + public BatchUpdateRecordsResponseRecordTests() + { + // TODO uncomment below to create an instance of BatchUpdateRecordsResponseRecord + //instance = new BatchUpdateRecordsResponseRecord(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BatchUpdateRecordsResponseRecord + /// + [Fact] + public void BatchUpdateRecordsResponseRecordInstanceTest() + { + // TODO uncomment below to test "IsType" BatchUpdateRecordsResponseRecord + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Index' + /// + [Fact] + public void IndexTest() + { + // TODO unit test for the property 'Index' + } + /// + /// Test the property 'Record' + /// + [Fact] + public void RecordTest() + { + // TODO unit test for the property 'Record' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseTests.cs b/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseTests.cs new file mode 100644 index 0000000..cfdcee5 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/BatchUpdateRecordsResponseTests.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 BatchUpdateRecordsResponse + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BatchUpdateRecordsResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for BatchUpdateRecordsResponse + //private BatchUpdateRecordsResponse instance; + + public BatchUpdateRecordsResponseTests() + { + // TODO uncomment below to create an instance of BatchUpdateRecordsResponse + //instance = new BatchUpdateRecordsResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BatchUpdateRecordsResponse + /// + [Fact] + public void BatchUpdateRecordsResponseInstanceTest() + { + // TODO uncomment below to test "IsType" BatchUpdateRecordsResponse + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Errors' + /// + [Fact] + public void ErrorsTest() + { + // TODO unit test for the property 'Errors' + } + /// + /// Test the property 'Records' + /// + [Fact] + public void RecordsTest() + { + // TODO unit test for the property 'Records' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/ListPromotionsResponseTests.cs b/src/Com.Sajari.Sdk.Test/Model/ListPromotionsResponseTests.cs new file mode 100644 index 0000000..d170afa --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/ListPromotionsResponseTests.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 ListPromotionsResponse + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ListPromotionsResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ListPromotionsResponse + //private ListPromotionsResponse instance; + + public ListPromotionsResponseTests() + { + // TODO uncomment below to create an instance of ListPromotionsResponse + //instance = new ListPromotionsResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ListPromotionsResponse + /// + [Fact] + public void ListPromotionsResponseInstanceTest() + { + // TODO uncomment below to test "IsType" ListPromotionsResponse + //Assert.IsType(instance); + } + + + /// + /// Test the property 'NextPageToken' + /// + [Fact] + public void NextPageTokenTest() + { + // TODO unit test for the property 'NextPageToken' + } + /// + /// Test the property 'Promotions' + /// + [Fact] + public void PromotionsTest() + { + // TODO unit test for the property 'Promotions' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/ListRedirectsResponseTests.cs b/src/Com.Sajari.Sdk.Test/Model/ListRedirectsResponseTests.cs new file mode 100644 index 0000000..38acdd4 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/ListRedirectsResponseTests.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 ListRedirectsResponse + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ListRedirectsResponseTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ListRedirectsResponse + //private ListRedirectsResponse instance; + + public ListRedirectsResponseTests() + { + // TODO uncomment below to create an instance of ListRedirectsResponse + //instance = new ListRedirectsResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ListRedirectsResponse + /// + [Fact] + public void ListRedirectsResponseInstanceTest() + { + // TODO uncomment below to test "IsType" ListRedirectsResponse + //Assert.IsType(instance); + } + + + /// + /// Test the property 'NextPageToken' + /// + [Fact] + public void NextPageTokenTest() + { + // TODO unit test for the property 'NextPageToken' + } + /// + /// Test the property 'Redirects' + /// + [Fact] + public void RedirectsTest() + { + // TODO unit test for the property 'Redirects' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/PromotionCategoryTests.cs b/src/Com.Sajari.Sdk.Test/Model/PromotionCategoryTests.cs new file mode 100644 index 0000000..4392b71 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/PromotionCategoryTests.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 PromotionCategory + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PromotionCategoryTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PromotionCategory + //private PromotionCategory instance; + + public PromotionCategoryTests() + { + // TODO uncomment below to create an instance of PromotionCategory + //instance = new PromotionCategory(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PromotionCategory + /// + [Fact] + public void PromotionCategoryInstanceTest() + { + // TODO uncomment below to test "IsType" PromotionCategory + //Assert.IsType(instance); + } + + + /// + /// Test the property 'IdField' + /// + [Fact] + public void IdFieldTest() + { + // TODO unit test for the property 'IdField' + } + /// + /// Test the property 'MappingField' + /// + [Fact] + public void MappingFieldTest() + { + // TODO unit test for the property 'MappingField' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/PromotionExclusionTests.cs b/src/Com.Sajari.Sdk.Test/Model/PromotionExclusionTests.cs new file mode 100644 index 0000000..862d949 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/PromotionExclusionTests.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 PromotionExclusion + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PromotionExclusionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PromotionExclusion + //private PromotionExclusion instance; + + public PromotionExclusionTests() + { + // TODO uncomment below to create an instance of PromotionExclusion + //instance = new PromotionExclusion(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PromotionExclusion + /// + [Fact] + public void PromotionExclusionInstanceTest() + { + // TODO uncomment below to test "IsType" PromotionExclusion + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Key' + /// + [Fact] + public void KeyTest() + { + // TODO unit test for the property 'Key' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/PromotionFilterBoostTests.cs b/src/Com.Sajari.Sdk.Test/Model/PromotionFilterBoostTests.cs new file mode 100644 index 0000000..9920d0d --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/PromotionFilterBoostTests.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 PromotionFilterBoost + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PromotionFilterBoostTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PromotionFilterBoost + //private PromotionFilterBoost instance; + + public PromotionFilterBoostTests() + { + // TODO uncomment below to create an instance of PromotionFilterBoost + //instance = new PromotionFilterBoost(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PromotionFilterBoost + /// + [Fact] + public void PromotionFilterBoostInstanceTest() + { + // TODO uncomment below to test "IsType" PromotionFilterBoost + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Boost' + /// + [Fact] + public void BoostTest() + { + // TODO unit test for the property 'Boost' + } + /// + /// Test the property 'Filter' + /// + [Fact] + public void FilterTest() + { + // TODO unit test for the property 'Filter' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/PromotionFilterConditionTests.cs b/src/Com.Sajari.Sdk.Test/Model/PromotionFilterConditionTests.cs new file mode 100644 index 0000000..d89b31d --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/PromotionFilterConditionTests.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 PromotionFilterCondition + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PromotionFilterConditionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PromotionFilterCondition + //private PromotionFilterCondition instance; + + public PromotionFilterConditionTests() + { + // TODO uncomment below to create an instance of PromotionFilterCondition + //instance = new PromotionFilterCondition(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PromotionFilterCondition + /// + [Fact] + public void PromotionFilterConditionInstanceTest() + { + // TODO uncomment below to test "IsType" PromotionFilterCondition + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Filter' + /// + [Fact] + public void FilterTest() + { + // TODO unit test for the property 'Filter' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/PromotionPinTests.cs b/src/Com.Sajari.Sdk.Test/Model/PromotionPinTests.cs new file mode 100644 index 0000000..084d03f --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/PromotionPinTests.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 PromotionPin + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PromotionPinTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PromotionPin + //private PromotionPin instance; + + public PromotionPinTests() + { + // TODO uncomment below to create an instance of PromotionPin + //instance = new PromotionPin(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PromotionPin + /// + [Fact] + public void PromotionPinInstanceTest() + { + // TODO uncomment below to test "IsType" PromotionPin + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Key' + /// + [Fact] + public void KeyTest() + { + // TODO unit test for the property 'Key' + } + /// + /// Test the property 'Position' + /// + [Fact] + public void PositionTest() + { + // TODO unit test for the property 'Position' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/PromotionRangeBoostTests.cs b/src/Com.Sajari.Sdk.Test/Model/PromotionRangeBoostTests.cs new file mode 100644 index 0000000..e87e142 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/PromotionRangeBoostTests.cs @@ -0,0 +1,103 @@ +/* + * 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 PromotionRangeBoost + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PromotionRangeBoostTests : IDisposable + { + // TODO uncomment below to declare an instance variable for PromotionRangeBoost + //private PromotionRangeBoost instance; + + public PromotionRangeBoostTests() + { + // TODO uncomment below to create an instance of PromotionRangeBoost + //instance = new PromotionRangeBoost(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of PromotionRangeBoost + /// + [Fact] + public void PromotionRangeBoostInstanceTest() + { + // TODO uncomment below to test "IsType" PromotionRangeBoost + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Boost' + /// + [Fact] + public void BoostTest() + { + // TODO unit test for the property 'Boost' + } + /// + /// Test the property 'End' + /// + [Fact] + public void EndTest() + { + // TODO unit test for the property 'End' + } + /// + /// Test the property 'Field' + /// + [Fact] + public void FieldTest() + { + // TODO unit test for the property 'Field' + } + /// + /// Test the property 'NullBoost' + /// + [Fact] + public void NullBoostTest() + { + // TODO unit test for the property 'NullBoost' + } + /// + /// Test the property 'Start' + /// + [Fact] + public void StartTest() + { + // TODO unit test for the property 'Start' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/PromotionTests.cs b/src/Com.Sajari.Sdk.Test/Model/PromotionTests.cs new file mode 100644 index 0000000..71c0848 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/PromotionTests.cs @@ -0,0 +1,175 @@ +/* + * 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 Promotion + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class PromotionTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Promotion + //private Promotion instance; + + public PromotionTests() + { + // TODO uncomment below to create an instance of Promotion + //instance = new Promotion(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Promotion + /// + [Fact] + public void PromotionInstanceTest() + { + // TODO uncomment below to test "IsType" Promotion + //Assert.IsType(instance); + } + + + /// + /// Test the property 'CollectionId' + /// + [Fact] + public void CollectionIdTest() + { + // TODO unit test for the property 'CollectionId' + } + /// + /// Test the property 'Condition' + /// + [Fact] + public void ConditionTest() + { + // TODO unit test for the property 'Condition' + } + /// + /// Test the property 'CreateTime' + /// + [Fact] + public void CreateTimeTest() + { + // TODO unit test for the property 'CreateTime' + } + /// + /// Test the property 'Disabled' + /// + [Fact] + public void DisabledTest() + { + // TODO unit test for the property 'Disabled' + } + /// + /// Test the property 'DisplayName' + /// + [Fact] + public void DisplayNameTest() + { + // TODO unit test for the property 'DisplayName' + } + /// + /// Test the property 'EndTime' + /// + [Fact] + public void EndTimeTest() + { + // TODO unit test for the property 'EndTime' + } + /// + /// Test the property 'Exclusions' + /// + [Fact] + public void ExclusionsTest() + { + // TODO unit test for the property 'Exclusions' + } + /// + /// Test the property 'FilterBoosts' + /// + [Fact] + public void FilterBoostsTest() + { + // TODO unit test for the property 'FilterBoosts' + } + /// + /// Test the property 'FilterConditions' + /// + [Fact] + public void FilterConditionsTest() + { + // TODO unit test for the property 'FilterConditions' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Pins' + /// + [Fact] + public void PinsTest() + { + // TODO unit test for the property 'Pins' + } + /// + /// Test the property 'RangeBoosts' + /// + [Fact] + public void RangeBoostsTest() + { + // TODO unit test for the property 'RangeBoosts' + } + /// + /// Test the property 'StartTime' + /// + [Fact] + public void StartTimeTest() + { + // TODO unit test for the property 'StartTime' + } + /// + /// Test the property 'UpdateTime' + /// + [Fact] + public void UpdateTimeTest() + { + // TODO unit test for the property 'UpdateTime' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/ProtobufFieldMaskTests.cs b/src/Com.Sajari.Sdk.Test/Model/ProtobufFieldMaskTests.cs new file mode 100644 index 0000000..97f5e80 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/ProtobufFieldMaskTests.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 ProtobufFieldMask + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ProtobufFieldMaskTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ProtobufFieldMask + //private ProtobufFieldMask instance; + + public ProtobufFieldMaskTests() + { + // TODO uncomment below to create an instance of ProtobufFieldMask + //instance = new ProtobufFieldMask(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ProtobufFieldMask + /// + [Fact] + public void ProtobufFieldMaskInstanceTest() + { + // TODO uncomment below to test "IsType" ProtobufFieldMask + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Paths' + /// + [Fact] + public void PathsTest() + { + // TODO unit test for the property 'Paths' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/RedirectResultTests.cs b/src/Com.Sajari.Sdk.Test/Model/RedirectResultTests.cs new file mode 100644 index 0000000..2505584 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/RedirectResultTests.cs @@ -0,0 +1,87 @@ +/* + * 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 RedirectResult + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RedirectResultTests : IDisposable + { + // TODO uncomment below to declare an instance variable for RedirectResult + //private RedirectResult instance; + + public RedirectResultTests() + { + // TODO uncomment below to create an instance of RedirectResult + //instance = new RedirectResult(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RedirectResult + /// + [Fact] + public void RedirectResultInstanceTest() + { + // TODO uncomment below to test "IsType" RedirectResult + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Target' + /// + [Fact] + public void TargetTest() + { + // TODO unit test for the property 'Target' + } + /// + /// Test the property 'Token' + /// + [Fact] + public void TokenTest() + { + // TODO unit test for the property 'Token' + } + + } + +} diff --git a/src/Com.Sajari.Sdk.Test/Model/RedirectTests.cs b/src/Com.Sajari.Sdk.Test/Model/RedirectTests.cs new file mode 100644 index 0000000..7bebd47 --- /dev/null +++ b/src/Com.Sajari.Sdk.Test/Model/RedirectTests.cs @@ -0,0 +1,119 @@ +/* + * 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 Redirect + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RedirectTests : IDisposable + { + // TODO uncomment below to declare an instance variable for Redirect + //private Redirect instance; + + public RedirectTests() + { + // TODO uncomment below to create an instance of Redirect + //instance = new Redirect(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Redirect + /// + [Fact] + public void RedirectInstanceTest() + { + // TODO uncomment below to test "IsType" Redirect + //Assert.IsType(instance); + } + + + /// + /// Test the property 'CollectionId' + /// + [Fact] + public void CollectionIdTest() + { + // TODO unit test for the property 'CollectionId' + } + /// + /// Test the property 'Condition' + /// + [Fact] + public void ConditionTest() + { + // TODO unit test for the property 'Condition' + } + /// + /// Test the property 'CreateTime' + /// + [Fact] + public void CreateTimeTest() + { + // TODO unit test for the property 'CreateTime' + } + /// + /// Test the property 'Disabled' + /// + [Fact] + public void DisabledTest() + { + // TODO unit test for the property 'Disabled' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Target' + /// + [Fact] + public void TargetTest() + { + // TODO unit test for the property 'Target' + } + /// + /// Test the property 'UpdateTime' + /// + [Fact] + public void UpdateTimeTest() + { + // TODO unit test for the property 'UpdateTime' + } + + } + +} diff --git a/src/Com.Sajari.Sdk/Api/CollectionsApi.cs b/src/Com.Sajari.Sdk/Api/CollectionsApi.cs index 260cc48..c238d23 100644 --- a/src/Com.Sajari.Sdk/Api/CollectionsApi.cs +++ b/src/Com.Sajari.Sdk/Api/CollectionsApi.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -31,7 +31,7 @@ public interface ICollectionsApiSync : IApiAccessor /// Create collection /// /// - /// Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Sajari Console, which handles the creation of the schema and pipelines for you. + /// Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Search.io Console, which handles the creation of the schema and pipelines for you. /// /// Thrown when fails to make API call /// 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\\-]*$`. @@ -43,7 +43,7 @@ public interface ICollectionsApiSync : IApiAccessor /// Create collection /// /// - /// Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Sajari Console, which handles the creation of the schema and pipelines for you. + /// Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Search.io Console, which handles the creation of the schema and pipelines for you. /// /// Thrown when fails to make API call /// 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\\-]*$`. @@ -119,7 +119,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -131,7 +131,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -142,7 +142,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -155,7 +155,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -201,7 +201,7 @@ public interface ICollectionsApiAsync : IApiAccessor /// Create collection /// /// - /// Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Sajari Console, which handles the creation of the schema and pipelines for you. + /// Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Search.io Console, which handles the creation of the schema and pipelines for you. /// /// Thrown when fails to make API call /// 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\\-]*$`. @@ -214,7 +214,7 @@ public interface ICollectionsApiAsync : IApiAccessor /// Create collection /// /// - /// Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Sajari Console, which handles the creation of the schema and pipelines for you. + /// Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Search.io Console, which handles the creation of the schema and pipelines for you. /// /// Thrown when fails to make API call /// 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\\-]*$`. @@ -297,7 +297,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -310,7 +310,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -322,7 +322,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -336,7 +336,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -493,7 +493,7 @@ public Com.Sajari.Sdk.Client.ExceptionFactory ExceptionFactory } /// - /// Create collection Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Sajari Console, which handles the creation of the schema and pipelines for you. + /// Create collection Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Search.io Console, which handles the creation of the schema and pipelines for you. /// /// Thrown when fails to make API call /// 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\\-]*$`. @@ -506,7 +506,7 @@ public Collection CreateCollection(string collectionId, Collection collection) } /// - /// Create collection Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Sajari Console, which handles the creation of the schema and pipelines for you. + /// Create collection Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Search.io Console, which handles the creation of the schema and pipelines for you. /// /// Thrown when fails to make API call /// 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\\-]*$`. @@ -516,11 +516,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateCollectionWithHttpInf { // 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->CreateCollection"); + } // verify the required parameter 'collection' is set if (collection == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collection' when calling CollectionsApi->CreateCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -534,10 +538,16 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateCollectionWithHttpInf }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "collection_id", collectionId)); localVarRequestOptions.Data = collection; @@ -551,18 +561,20 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateCollectionWithHttpInf // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; } /// - /// Create collection Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Sajari Console, which handles the creation of the schema and pipelines for you. + /// Create collection Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Search.io Console, which handles the creation of the schema and pipelines for you. /// /// Thrown when fails to make API call /// 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\\-]*$`. @@ -576,7 +588,7 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateCollectionWithHttpInf } /// - /// Create collection Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Sajari Console, which handles the creation of the schema and pipelines for you. + /// Create collection Create an empty collection. Before records can be added to a collection, the schema and pipelines for the collection have to be set up. Consider setting up new collections via the Search.io Console, which handles the creation of the schema and pipelines for you. /// /// Thrown when fails to make API call /// 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\\-]*$`. @@ -587,11 +599,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateCollectionWithHttpInf { // 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->CreateCollection"); + } // verify the required parameter 'collection' is set if (collection == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collection' when calling CollectionsApi->CreateCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -605,12 +621,17 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateCollectionWithHttpInf "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "collection_id", collectionId)); localVarRequestOptions.Data = collection; @@ -623,13 +644,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateCollectionWithHttpInf } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -657,7 +680,9 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteCollectionWithHttpInfo(st { // 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->DeleteCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -670,10 +695,16 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteCollectionWithHttpInfo(st }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter @@ -686,11 +717,13 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteCollectionWithHttpInfo(st // make the HTTP request var localVarResponse = this.Client.Delete("/v4/collections/{collection_id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -720,7 +753,9 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteCollectionWithHttpInfo(st { // 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->DeleteCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -733,12 +768,17 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteCollectionWithHttpInfo(st "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter @@ -750,13 +790,15 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteCollectionWithHttpInfo(st } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/v4/collections/{collection_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -784,7 +826,9 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s { // 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->GetCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -797,10 +841,16 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter @@ -813,11 +863,13 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s // make the HTTP request var localVarResponse = this.Client.Get("/v4/collections/{collection_id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -847,7 +899,9 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s { // 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->GetCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -860,12 +914,17 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter @@ -877,13 +936,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v4/collections/{collection_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -922,10 +983,16 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } if (pageSize != null) { @@ -945,11 +1012,13 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s // make the HTTP request var localVarResponse = this.Client.Get("/v4/collections", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ListCollections", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -990,12 +1059,17 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } if (pageSize != null) { @@ -1014,20 +1088,22 @@ public Com.Sajari.Sdk.Client.ApiResponse GetCollectionWithHttpInfo(s } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v4/collections", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ListCollections", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; } /// - /// 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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1040,7 +1116,7 @@ public QueryCollectionResponse QueryCollection(string collectionId, QueryCollect } /// - /// 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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1050,11 +1126,15 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio { // 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->QueryCollection"); + } // verify the required parameter 'queryCollectionRequest' is set if (queryCollectionRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'queryCollectionRequest' when calling CollectionsApi->QueryCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1068,10 +1148,16 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = queryCollectionRequest; @@ -1085,18 +1171,20 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}:query", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("QueryCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; } /// - /// 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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1110,7 +1198,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1121,11 +1209,15 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio { // 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->QueryCollection"); + } // verify the required parameter 'queryCollectionRequest' is set if (queryCollectionRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'queryCollectionRequest' when calling CollectionsApi->QueryCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1139,12 +1231,17 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = queryCollectionRequest; @@ -1157,20 +1254,22 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}:query", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("QueryCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; } /// - /// 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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1184,7 +1283,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1195,11 +1294,15 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio { // 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->QueryCollection2"); + } // verify the required parameter 'queryCollectionRequest' is set if (queryCollectionRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'queryCollectionRequest' when calling CollectionsApi->QueryCollection2"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1213,10 +1316,16 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = queryCollectionRequest; @@ -1230,18 +1339,20 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}:queryCollection", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("QueryCollection2", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; } /// - /// 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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1256,7 +1367,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.sajari.com/user-guide/integrating-search/filters/) - 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/sajari-sdk-js/blob/master/src/session.ts) /// /// Thrown when fails to make API call /// The collection to query, e.g. `my-collection`. @@ -1268,11 +1379,15 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio { // 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->QueryCollection2"); + } // verify the required parameter 'queryCollectionRequest' is set if (queryCollectionRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'queryCollectionRequest' when calling CollectionsApi->QueryCollection2"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1286,12 +1401,17 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = queryCollectionRequest; @@ -1304,13 +1424,15 @@ public Com.Sajari.Sdk.Client.ApiResponse QueryCollectio } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}:queryCollection", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("QueryCollection2", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1342,15 +1464,21 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf { // 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->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) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collection' when calling CollectionsApi->UpdateCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1364,10 +1492,16 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } 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)); @@ -1382,11 +1516,13 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf // make the HTTP request var localVarResponse = this.Client.Patch("/v4/collections/{collection_id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1420,15 +1556,21 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf { // 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->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) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collection' when calling CollectionsApi->UpdateCollection"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1442,12 +1584,17 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } 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)); @@ -1461,13 +1608,15 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateCollectionWithHttpInf } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/v4/collections/{collection_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateCollection", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; diff --git a/src/Com.Sajari.Sdk/Api/EventsApi.cs b/src/Com.Sajari.Sdk/Api/EventsApi.cs index 7642887..b02843b 100644 --- a/src/Com.Sajari.Sdk/Api/EventsApi.cs +++ b/src/Com.Sajari.Sdk/Api/EventsApi.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -270,7 +270,9 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent { // verify the required parameter 'sendEventRequest' is set if (sendEventRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'sendEventRequest' when calling EventsApi->SendEvent"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -284,10 +286,16 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.Data = sendEventRequest; @@ -300,11 +308,13 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent // make the HTTP request var localVarResponse = this.Client.Post("/v4/events:send", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SendEvent", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -334,7 +344,9 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent { // verify the required parameter 'sendEventRequest' is set if (sendEventRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'sendEventRequest' when calling EventsApi->SendEvent"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -348,12 +360,17 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.Data = sendEventRequest; @@ -365,13 +382,15 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEventWithHttpInfo(SendEvent } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/events:send", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SendEvent", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -401,7 +420,9 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven { // verify the required parameter 'sendEventRequest' is set if (sendEventRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'sendEventRequest' when calling EventsApi->SendEvent2"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -415,10 +436,16 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.Data = sendEventRequest; @@ -431,11 +458,13 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven // make the HTTP request var localVarResponse = this.Client.Post("/v4/events:sendEvent", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SendEvent2", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -467,7 +496,9 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven { // verify the required parameter 'sendEventRequest' is set if (sendEventRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'sendEventRequest' when calling EventsApi->SendEvent2"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -481,12 +512,17 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.Data = sendEventRequest; @@ -498,13 +534,15 @@ public Com.Sajari.Sdk.Client.ApiResponse SendEvent2WithHttpInfo(SendEven } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/events:sendEvent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SendEvent2", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; diff --git a/src/Com.Sajari.Sdk/Api/PipelinesApi.cs b/src/Com.Sajari.Sdk/Api/PipelinesApi.cs index f0e2ce9..6ca7d23 100644 --- a/src/Com.Sajari.Sdk/Api/PipelinesApi.cs +++ b/src/Com.Sajari.Sdk/Api/PipelinesApi.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -600,11 +600,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePipelineWithHttpInfo(st { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->CreatePipeline"); + } // verify the required parameter 'pipeline' is set if (pipeline == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'pipeline' when calling PipelinesApi->CreatePipeline"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -620,10 +624,16 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePipelineWithHttpInfo(st }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = pipeline; @@ -637,11 +647,13 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePipelineWithHttpInfo(st // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}/pipelines", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreatePipeline", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -673,11 +685,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePipelineWithHttpInfo(st { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->CreatePipeline"); + } // verify the required parameter 'pipeline' is set if (pipeline == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'pipeline' when calling PipelinesApi->CreatePipeline"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -693,12 +709,17 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePipelineWithHttpInfo(st "application/yaml" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = pipeline; @@ -711,13 +732,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreatePipelineWithHttpInfo(st } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}/pipelines", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreatePipeline", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -747,11 +770,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GeneratePipe { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->GeneratePipelines"); + } // verify the required parameter 'generatePipelinesRequest' is set if (generatePipelinesRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'generatePipelinesRequest' when calling PipelinesApi->GeneratePipelines"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -766,10 +793,16 @@ public Com.Sajari.Sdk.Client.ApiResponse GeneratePipe }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = generatePipelinesRequest; @@ -783,11 +816,13 @@ public Com.Sajari.Sdk.Client.ApiResponse GeneratePipe // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}:generatePipelines", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GeneratePipelines", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -819,11 +854,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GeneratePipe { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->GeneratePipelines"); + } // verify the required parameter 'generatePipelinesRequest' is set if (generatePipelinesRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'generatePipelinesRequest' when calling PipelinesApi->GeneratePipelines"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -838,12 +877,17 @@ public Com.Sajari.Sdk.Client.ApiResponse GeneratePipe "application/yaml" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = generatePipelinesRequest; @@ -856,13 +900,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GeneratePipe } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}:generatePipelines", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GeneratePipelines", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -892,11 +938,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->GetDefaultPipeline"); + } // verify the required parameter 'type' is set if (type == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'type' when calling PipelinesApi->GetDefaultPipeline"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -909,10 +959,16 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "type", type)); @@ -926,11 +982,13 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // make the HTTP request var localVarResponse = this.Client.Get("/v4/collections/{collection_id}:getDefaultPipeline", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetDefaultPipeline", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -962,11 +1020,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->GetDefaultPipeline"); + } // verify the required parameter 'type' is set if (type == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'type' when calling PipelinesApi->GetDefaultPipeline"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -979,12 +1041,17 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "type", type)); @@ -997,13 +1064,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v4/collections/{collection_id}:getDefaultPipeline", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetDefaultPipeline", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1037,15 +1106,21 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->GetDefaultVersion"); + } // verify the required parameter 'type' is set if (type == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'type' when calling PipelinesApi->GetDefaultVersion"); + } // verify the required parameter 'name' is set if (name == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'name' when calling PipelinesApi->GetDefaultVersion"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1059,10 +1134,16 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.PathParameters.Add("type", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(type)); // path parameter @@ -1081,11 +1162,13 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // make the HTTP request var localVarResponse = this.Client.Get("/v4/collections/{collection_id}/pipelines/{type}/{name}:getDefaultVersion", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetDefaultVersion", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1121,15 +1204,21 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->GetDefaultVersion"); + } // verify the required parameter 'type' is set if (type == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'type' when calling PipelinesApi->GetDefaultVersion"); + } // verify the required parameter 'name' is set if (name == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'name' when calling PipelinesApi->GetDefaultVersion"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1143,12 +1232,17 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP "application/yaml" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.PathParameters.Add("type", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(type)); // path parameter @@ -1166,13 +1260,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v4/collections/{collection_id}/pipelines/{type}/{name}:getDefaultVersion", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetDefaultVersion", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1208,19 +1304,27 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->GetPipeline"); + } // verify the required parameter 'type' is set if (type == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'type' when calling PipelinesApi->GetPipeline"); + } // verify the required parameter 'name' is set if (name == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'name' when calling PipelinesApi->GetPipeline"); + } // verify the required parameter 'version' is set if (version == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'version' when calling PipelinesApi->GetPipeline"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1234,10 +1338,16 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.PathParameters.Add("type", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(type)); // path parameter @@ -1257,11 +1367,13 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // make the HTTP request var localVarResponse = this.Client.Get("/v4/collections/{collection_id}/pipelines/{type}/{name}/{version}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPipeline", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1299,19 +1411,27 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->GetPipeline"); + } // verify the required parameter 'type' is set if (type == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'type' when calling PipelinesApi->GetPipeline"); + } // verify the required parameter 'name' is set if (name == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'name' when calling PipelinesApi->GetPipeline"); + } // verify the required parameter 'version' is set if (version == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'version' when calling PipelinesApi->GetPipeline"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1325,12 +1445,17 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP "application/yaml" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.PathParameters.Add("type", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(type)); // path parameter @@ -1349,13 +1474,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v4/collections/{collection_id}/pipelines/{type}/{name}/{version}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetPipeline", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1389,7 +1516,9 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->ListPipelines"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1402,10 +1531,16 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter if (pageSize != null) @@ -1430,11 +1565,13 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP // make the HTTP request var localVarResponse = this.Client.Get("/v4/collections/{collection_id}/pipelines", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ListPipelines", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1470,7 +1607,9 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->ListPipelines"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1483,12 +1622,17 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter if (pageSize != null) @@ -1512,13 +1656,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetDefaultP } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v4/collections/{collection_id}/pipelines", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ListPipelines", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1548,11 +1694,15 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultPipelineWithHttpInfo( { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->SetDefaultPipeline"); + } // verify the required parameter 'setDefaultPipelineRequest' is set if (setDefaultPipelineRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'setDefaultPipelineRequest' when calling PipelinesApi->SetDefaultPipeline"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1566,10 +1716,16 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultPipelineWithHttpInfo( }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = setDefaultPipelineRequest; @@ -1583,11 +1739,13 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultPipelineWithHttpInfo( // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}:setDefaultPipeline", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SetDefaultPipeline", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1619,11 +1777,15 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultPipelineWithHttpInfo( { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->SetDefaultPipeline"); + } // verify the required parameter 'setDefaultPipelineRequest' is set if (setDefaultPipelineRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'setDefaultPipelineRequest' when calling PipelinesApi->SetDefaultPipeline"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1637,12 +1799,17 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultPipelineWithHttpInfo( "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = setDefaultPipelineRequest; @@ -1655,13 +1822,15 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultPipelineWithHttpInfo( } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}:setDefaultPipeline", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SetDefaultPipeline", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1695,19 +1864,27 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultVersionWithHttpInfo(s { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->SetDefaultVersion"); + } // verify the required parameter 'type' is set if (type == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'type' when calling PipelinesApi->SetDefaultVersion"); + } // verify the required parameter 'name' is set if (name == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'name' when calling PipelinesApi->SetDefaultVersion"); + } // verify the required parameter 'setDefaultVersionRequest' is set if (setDefaultVersionRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'setDefaultVersionRequest' when calling PipelinesApi->SetDefaultVersion"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1721,10 +1898,16 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultVersionWithHttpInfo(s }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.PathParameters.Add("type", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(type)); // path parameter @@ -1740,11 +1923,13 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultVersionWithHttpInfo(s // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}/pipelines/{type}/{name}:setDefaultVersion", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SetDefaultVersion", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1780,19 +1965,27 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultVersionWithHttpInfo(s { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PipelinesApi->SetDefaultVersion"); + } // verify the required parameter 'type' is set if (type == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'type' when calling PipelinesApi->SetDefaultVersion"); + } // verify the required parameter 'name' is set if (name == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'name' when calling PipelinesApi->SetDefaultVersion"); + } // verify the required parameter 'setDefaultVersionRequest' is set if (setDefaultVersionRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'setDefaultVersionRequest' when calling PipelinesApi->SetDefaultVersion"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1806,12 +1999,17 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultVersionWithHttpInfo(s "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.PathParameters.Add("type", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(type)); // path parameter @@ -1826,13 +2024,15 @@ public Com.Sajari.Sdk.Client.ApiResponse SetDefaultVersionWithHttpInfo(s } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}/pipelines/{type}/{name}:setDefaultVersion", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SetDefaultVersion", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; diff --git a/src/Com.Sajari.Sdk/Api/PromotionsApi.cs b/src/Com.Sajari.Sdk/Api/PromotionsApi.cs new file mode 100644 index 0000000..b1a25ec --- /dev/null +++ b/src/Com.Sajari.Sdk/Api/PromotionsApi.cs @@ -0,0 +1,1278 @@ +/* + * 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.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Com.Sajari.Sdk.Client; +using Com.Sajari.Sdk.Model; + +namespace Com.Sajari.Sdk.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPromotionsApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create promotion + /// + /// + /// Create a new promotion in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a promotion in, e.g. `my-collection`. + /// The promotion to create. + /// Promotion + Promotion CreatePromotion(string collectionId, Promotion promotion); + + /// + /// Create promotion + /// + /// + /// Create a new promotion in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a promotion in, e.g. `my-collection`. + /// The promotion to create. + /// ApiResponse of Promotion + ApiResponse CreatePromotionWithHttpInfo(string collectionId, Promotion promotion); + /// + /// Delete promotion + /// + /// + /// Delete a promotion and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to delete, e.g. `1234`. + /// Object + Object DeletePromotion(string collectionId, string promotionId); + + /// + /// Delete promotion + /// + /// + /// Delete a promotion and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to delete, e.g. `1234`. + /// ApiResponse of Object + ApiResponse DeletePromotionWithHttpInfo(string collectionId, string promotionId); + /// + /// Get promotion + /// + /// + /// Retrieve the details of a promotion. + /// + /// Thrown when fails to make API call + /// The collection that owns the promotion, e.g. `my-collection`. + /// The promotion to retrieve, e.g. `1234`. + /// Promotion + Promotion GetPromotion(string collectionId, string promotionId); + + /// + /// Get promotion + /// + /// + /// Retrieve the details of a promotion. + /// + /// Thrown when fails to make API call + /// The collection that owns the promotion, e.g. `my-collection`. + /// The promotion to retrieve, e.g. `1234`. + /// ApiResponse of Promotion + ApiResponse GetPromotionWithHttpInfo(string collectionId, string promotionId); + /// + /// List promotions + /// + /// + /// Retrieve a list of promotions in a collection. Promotion pins, exclusions and filter boosts are not returned in this call. + /// + /// 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) + /// ListPromotionsResponse + ListPromotionsResponse ListPromotions(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); + + /// + /// List promotions + /// + /// + /// Retrieve a list of promotions in a collection. Promotion pins, exclusions and filter boosts are not returned in this call. + /// + /// 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) + /// ApiResponse of ListPromotionsResponse + ApiResponse ListPromotionsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); + /// + /// Update promotion + /// + /// + /// Update the details of a promotion. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `display_name` and `start_time` fields, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/promotions/{promotion_id}?update_mask=display_name,start_time ``` With the JSON body: ``` { \"display_name\": \"new value\", \"start_time\": \"2006-01-02T15:04:05Z07:00\", \"end_time\": \"2006-01-02T15:04:05Z07:00\" } ``` > Note: In this example `end_time` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to update, e.g. `1234`. + /// 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. + /// Details of the promotion to update. + /// Promotion + Promotion UpdatePromotion(string collectionId, string promotionId, string updateMask, Promotion promotion); + + /// + /// Update promotion + /// + /// + /// Update the details of a promotion. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `display_name` and `start_time` fields, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/promotions/{promotion_id}?update_mask=display_name,start_time ``` With the JSON body: ``` { \"display_name\": \"new value\", \"start_time\": \"2006-01-02T15:04:05Z07:00\", \"end_time\": \"2006-01-02T15:04:05Z07:00\" } ``` > Note: In this example `end_time` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to update, e.g. `1234`. + /// 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. + /// Details of the promotion to update. + /// ApiResponse of Promotion + ApiResponse UpdatePromotionWithHttpInfo(string collectionId, string promotionId, string updateMask, Promotion promotion); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPromotionsApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create promotion + /// + /// + /// Create a new promotion in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a promotion in, e.g. `my-collection`. + /// The promotion to create. + /// Cancellation Token to cancel the request. + /// Task of Promotion + System.Threading.Tasks.Task CreatePromotionAsync(string collectionId, Promotion promotion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create promotion + /// + /// + /// Create a new promotion in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a promotion in, e.g. `my-collection`. + /// The promotion to create. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Promotion) + System.Threading.Tasks.Task> CreatePromotionWithHttpInfoAsync(string collectionId, Promotion promotion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete promotion + /// + /// + /// Delete a promotion and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to delete, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of Object + System.Threading.Tasks.Task DeletePromotionAsync(string collectionId, string promotionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete promotion + /// + /// + /// Delete a promotion and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to delete, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Object) + System.Threading.Tasks.Task> DeletePromotionWithHttpInfoAsync(string collectionId, string promotionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get promotion + /// + /// + /// Retrieve the details of a promotion. + /// + /// Thrown when fails to make API call + /// The collection that owns the promotion, e.g. `my-collection`. + /// The promotion to retrieve, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of Promotion + System.Threading.Tasks.Task GetPromotionAsync(string collectionId, string promotionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get promotion + /// + /// + /// Retrieve the details of a promotion. + /// + /// Thrown when fails to make API call + /// The collection that owns the promotion, e.g. `my-collection`. + /// The promotion to retrieve, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Promotion) + System.Threading.Tasks.Task> GetPromotionWithHttpInfoAsync(string collectionId, string promotionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List promotions + /// + /// + /// Retrieve a list of promotions in a collection. Promotion pins, exclusions and filter boosts are not returned in this call. + /// + /// 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) + /// 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)); + + /// + /// List promotions + /// + /// + /// Retrieve a list of promotions in a collection. Promotion pins, exclusions and filter boosts are not returned in this call. + /// + /// 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) + /// 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)); + /// + /// Update promotion + /// + /// + /// Update the details of a promotion. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `display_name` and `start_time` fields, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/promotions/{promotion_id}?update_mask=display_name,start_time ``` With the JSON body: ``` { \"display_name\": \"new value\", \"start_time\": \"2006-01-02T15:04:05Z07:00\", \"end_time\": \"2006-01-02T15:04:05Z07:00\" } ``` > Note: In this example `end_time` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to update, e.g. `1234`. + /// 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. + /// Details of the promotion to update. + /// Cancellation Token to cancel the request. + /// Task of Promotion + System.Threading.Tasks.Task UpdatePromotionAsync(string collectionId, string promotionId, string updateMask, Promotion promotion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update promotion + /// + /// + /// Update the details of a promotion. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `display_name` and `start_time` fields, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/promotions/{promotion_id}?update_mask=display_name,start_time ``` With the JSON body: ``` { \"display_name\": \"new value\", \"start_time\": \"2006-01-02T15:04:05Z07:00\", \"end_time\": \"2006-01-02T15:04:05Z07:00\" } ``` > Note: In this example `end_time` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to update, e.g. `1234`. + /// 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. + /// Details of the promotion to update. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Promotion) + System.Threading.Tasks.Task> UpdatePromotionWithHttpInfoAsync(string collectionId, string promotionId, string updateMask, Promotion promotion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPromotionsApi : IPromotionsApiSync, IPromotionsApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class PromotionsApi : IPromotionsApi + { + private Com.Sajari.Sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public PromotionsApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PromotionsApi(string basePath) + { + this.Configuration = Com.Sajari.Sdk.Client.Configuration.MergeConfigurations( + Com.Sajari.Sdk.Client.GlobalConfiguration.Instance, + new Com.Sajari.Sdk.Client.Configuration { BasePath = basePath } + ); + this.Client = new Com.Sajari.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Com.Sajari.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Com.Sajari.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public PromotionsApi(Com.Sajari.Sdk.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Com.Sajari.Sdk.Client.Configuration.MergeConfigurations( + Com.Sajari.Sdk.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Com.Sajari.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Com.Sajari.Sdk.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Com.Sajari.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public PromotionsApi(Com.Sajari.Sdk.Client.ISynchronousClient client, Com.Sajari.Sdk.Client.IAsynchronousClient asyncClient, Com.Sajari.Sdk.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Com.Sajari.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Com.Sajari.Sdk.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Com.Sajari.Sdk.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Com.Sajari.Sdk.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Com.Sajari.Sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create promotion Create a new promotion in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a promotion in, e.g. `my-collection`. + /// The promotion to create. + /// Promotion + public Promotion CreatePromotion(string collectionId, Promotion promotion) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = CreatePromotionWithHttpInfo(collectionId, promotion); + return localVarResponse.Data; + } + + /// + /// Create promotion Create a new promotion in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a promotion in, e.g. `my-collection`. + /// The promotion to create. + /// ApiResponse of Promotion + public Com.Sajari.Sdk.Client.ApiResponse CreatePromotionWithHttpInfo(string collectionId, Promotion promotion) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PromotionsApi->CreatePromotion"); + } + + // verify the required parameter 'promotion' is set + if (promotion == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotion' when calling PromotionsApi->CreatePromotion"); + } + + 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 = promotion; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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}/promotions", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreatePromotion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create promotion Create a new promotion in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a promotion in, e.g. `my-collection`. + /// The promotion to create. + /// Cancellation Token to cancel the request. + /// Task of Promotion + public async System.Threading.Tasks.Task CreatePromotionAsync(string collectionId, Promotion promotion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await CreatePromotionWithHttpInfoAsync(collectionId, promotion, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create promotion Create a new promotion in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a promotion in, e.g. `my-collection`. + /// The promotion to create. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Promotion) + public async System.Threading.Tasks.Task> CreatePromotionWithHttpInfoAsync(string collectionId, Promotion promotion, 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 PromotionsApi->CreatePromotion"); + } + + // verify the required parameter 'promotion' is set + if (promotion == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotion' when calling PromotionsApi->CreatePromotion"); + } + + + 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 = promotion; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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}/promotions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreatePromotion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete promotion Delete a promotion and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to delete, e.g. `1234`. + /// Object + public Object DeletePromotion(string collectionId, string promotionId) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = DeletePromotionWithHttpInfo(collectionId, promotionId); + return localVarResponse.Data; + } + + /// + /// Delete promotion Delete a promotion and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to delete, e.g. `1234`. + /// ApiResponse of Object + public Com.Sajari.Sdk.Client.ApiResponse DeletePromotionWithHttpInfo(string collectionId, string promotionId) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PromotionsApi->DeletePromotion"); + } + + // verify the required parameter 'promotionId' is set + if (promotionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotionId' when calling PromotionsApi->DeletePromotion"); + } + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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.PathParameters.Add("promotion_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(promotionId)); // path parameter + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.Delete("/v4/collections/{collection_id}/promotions/{promotion_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeletePromotion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete promotion Delete a promotion and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to delete, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of Object + public async System.Threading.Tasks.Task DeletePromotionAsync(string collectionId, string promotionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await DeletePromotionWithHttpInfoAsync(collectionId, promotionId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Delete promotion Delete a promotion and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to delete, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Object) + public async System.Threading.Tasks.Task> DeletePromotionWithHttpInfoAsync(string collectionId, string promotionId, 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 PromotionsApi->DeletePromotion"); + } + + // verify the required parameter 'promotionId' is set + if (promotionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotionId' when calling PromotionsApi->DeletePromotion"); + } + + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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.PathParameters.Add("promotion_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(promotionId)); // path parameter + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.DeleteAsync("/v4/collections/{collection_id}/promotions/{promotion_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeletePromotion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get promotion Retrieve the details of a promotion. + /// + /// Thrown when fails to make API call + /// The collection that owns the promotion, e.g. `my-collection`. + /// The promotion to retrieve, e.g. `1234`. + /// Promotion + public Promotion GetPromotion(string collectionId, string promotionId) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = GetPromotionWithHttpInfo(collectionId, promotionId); + return localVarResponse.Data; + } + + /// + /// Get promotion Retrieve the details of a promotion. + /// + /// Thrown when fails to make API call + /// The collection that owns the promotion, e.g. `my-collection`. + /// The promotion to retrieve, e.g. `1234`. + /// ApiResponse of Promotion + public Com.Sajari.Sdk.Client.ApiResponse GetPromotionWithHttpInfo(string collectionId, string promotionId) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PromotionsApi->GetPromotion"); + } + + // verify the required parameter 'promotionId' is set + if (promotionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotionId' when calling PromotionsApi->GetPromotion"); + } + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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.PathParameters.Add("promotion_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(promotionId)); // path parameter + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.Get("/v4/collections/{collection_id}/promotions/{promotion_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPromotion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get promotion Retrieve the details of a promotion. + /// + /// Thrown when fails to make API call + /// The collection that owns the promotion, e.g. `my-collection`. + /// The promotion to retrieve, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of Promotion + public async System.Threading.Tasks.Task GetPromotionAsync(string collectionId, string promotionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await GetPromotionWithHttpInfoAsync(collectionId, promotionId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get promotion Retrieve the details of a promotion. + /// + /// Thrown when fails to make API call + /// The collection that owns the promotion, e.g. `my-collection`. + /// The promotion to retrieve, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Promotion) + public async System.Threading.Tasks.Task> GetPromotionWithHttpInfoAsync(string collectionId, string promotionId, 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 PromotionsApi->GetPromotion"); + } + + // verify the required parameter 'promotionId' is set + if (promotionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotionId' when calling PromotionsApi->GetPromotion"); + } + + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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.PathParameters.Add("promotion_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(promotionId)); // path parameter + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.GetAsync("/v4/collections/{collection_id}/promotions/{promotion_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPromotion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List promotions Retrieve a list of promotions in a collection. Promotion pins, exclusions and filter boosts are not returned in this call. + /// + /// 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) + /// ListPromotionsResponse + public ListPromotionsResponse ListPromotions(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = ListPromotionsWithHttpInfo(collectionId, pageSize, pageToken); + return localVarResponse.Data; + } + + /// + /// List promotions Retrieve a list of promotions in a collection. Promotion pins, exclusions and filter boosts are not returned in this call. + /// + /// 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) + /// ApiResponse of ListPromotionsResponse + public Com.Sajari.Sdk.Client.ApiResponse ListPromotionsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PromotionsApi->ListPromotions"); + } + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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 + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.Get("/v4/collections/{collection_id}/promotions", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListPromotions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List promotions Retrieve a list of promotions in a collection. Promotion pins, exclusions and filter boosts are not returned in this call. + /// + /// 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) + /// 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)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await ListPromotionsWithHttpInfoAsync(collectionId, pageSize, pageToken, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List promotions Retrieve a list of promotions in a collection. Promotion pins, exclusions and filter boosts are not returned in this call. + /// + /// 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) + /// 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)) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PromotionsApi->ListPromotions"); + } + + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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 + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.GetAsync("/v4/collections/{collection_id}/promotions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListPromotions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update promotion Update the details of a promotion. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `display_name` and `start_time` fields, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/promotions/{promotion_id}?update_mask=display_name,start_time ``` With the JSON body: ``` { \"display_name\": \"new value\", \"start_time\": \"2006-01-02T15:04:05Z07:00\", \"end_time\": \"2006-01-02T15:04:05Z07:00\" } ``` > Note: In this example `end_time` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to update, e.g. `1234`. + /// 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. + /// Details of the promotion to update. + /// Promotion + public Promotion UpdatePromotion(string collectionId, string promotionId, string updateMask, Promotion promotion) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = UpdatePromotionWithHttpInfo(collectionId, promotionId, updateMask, promotion); + return localVarResponse.Data; + } + + /// + /// Update promotion Update the details of a promotion. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `display_name` and `start_time` fields, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/promotions/{promotion_id}?update_mask=display_name,start_time ``` With the JSON body: ``` { \"display_name\": \"new value\", \"start_time\": \"2006-01-02T15:04:05Z07:00\", \"end_time\": \"2006-01-02T15:04:05Z07:00\" } ``` > Note: In this example `end_time` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to update, e.g. `1234`. + /// 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. + /// Details of the promotion to update. + /// ApiResponse of Promotion + public Com.Sajari.Sdk.Client.ApiResponse UpdatePromotionWithHttpInfo(string collectionId, string promotionId, string updateMask, Promotion promotion) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling PromotionsApi->UpdatePromotion"); + } + + // verify the required parameter 'promotionId' is set + if (promotionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotionId' when calling PromotionsApi->UpdatePromotion"); + } + + // verify the required parameter 'updateMask' is set + if (updateMask == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'updateMask' when calling PromotionsApi->UpdatePromotion"); + } + + // verify the required parameter 'promotion' is set + if (promotion == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotion' when calling PromotionsApi->UpdatePromotion"); + } + + 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.PathParameters.Add("promotion_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(promotionId)); // path parameter + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "update_mask", updateMask)); + localVarRequestOptions.Data = promotion; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.Patch("/v4/collections/{collection_id}/promotions/{promotion_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdatePromotion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update promotion Update the details of a promotion. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `display_name` and `start_time` fields, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/promotions/{promotion_id}?update_mask=display_name,start_time ``` With the JSON body: ``` { \"display_name\": \"new value\", \"start_time\": \"2006-01-02T15:04:05Z07:00\", \"end_time\": \"2006-01-02T15:04:05Z07:00\" } ``` > Note: In this example `end_time` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to update, e.g. `1234`. + /// 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. + /// Details of the promotion to update. + /// Cancellation Token to cancel the request. + /// Task of Promotion + public async System.Threading.Tasks.Task UpdatePromotionAsync(string collectionId, string promotionId, string updateMask, Promotion promotion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await UpdatePromotionWithHttpInfoAsync(collectionId, promotionId, updateMask, promotion, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update promotion Update the details of a promotion. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `display_name` and `start_time` fields, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/promotions/{promotion_id}?update_mask=display_name,start_time ``` With the JSON body: ``` { \"display_name\": \"new value\", \"start_time\": \"2006-01-02T15:04:05Z07:00\", \"end_time\": \"2006-01-02T15:04:05Z07:00\" } ``` > Note: In this example `end_time` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the promotion belongs to, e.g. `my-collection`. + /// The promotion to update, e.g. `1234`. + /// 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. + /// Details of the promotion to update. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Promotion) + public async System.Threading.Tasks.Task> UpdatePromotionWithHttpInfoAsync(string collectionId, string promotionId, string updateMask, Promotion promotion, 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 PromotionsApi->UpdatePromotion"); + } + + // verify the required parameter 'promotionId' is set + if (promotionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotionId' when calling PromotionsApi->UpdatePromotion"); + } + + // verify the required parameter 'updateMask' is set + if (updateMask == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'updateMask' when calling PromotionsApi->UpdatePromotion"); + } + + // verify the required parameter 'promotion' is set + if (promotion == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'promotion' when calling PromotionsApi->UpdatePromotion"); + } + + + 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.PathParameters.Add("promotion_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(promotionId)); // path parameter + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "update_mask", updateMask)); + localVarRequestOptions.Data = promotion; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.PatchAsync("/v4/collections/{collection_id}/promotions/{promotion_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdatePromotion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/Com.Sajari.Sdk/Api/RecordsApi.cs b/src/Com.Sajari.Sdk/Api/RecordsApi.cs index 7e6be0c..b6127aa 100644 --- a/src/Com.Sajari.Sdk/Api/RecordsApi.cs +++ b/src/Com.Sajari.Sdk/Api/RecordsApi.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -28,6 +28,29 @@ public interface IRecordsApiSync : IApiAccessor { #region Synchronous Operations /// + /// Batch update records + /// + /// + /// The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// + /// Thrown when fails to make API call + /// The collection that contains the records to update, e.g. `my-collection`. + /// + /// BatchUpdateRecordsResponse + BatchUpdateRecordsResponse BatchUpdateRecords(string collectionId, BatchUpdateRecordsRequest batchUpdateRecordsRequest); + + /// + /// Batch update records + /// + /// + /// The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// + /// Thrown when fails to make API call + /// The collection that contains the records to update, e.g. `my-collection`. + /// + /// ApiResponse of BatchUpdateRecordsResponse + ApiResponse BatchUpdateRecordsWithHttpInfo(string collectionId, BatchUpdateRecordsRequest batchUpdateRecordsRequest); + /// /// Batch upsert records /// /// @@ -152,6 +175,31 @@ public interface IRecordsApiAsync : IApiAccessor { #region Asynchronous Operations /// + /// Batch update records + /// + /// + /// The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// + /// Thrown when fails to make API call + /// The collection that contains the records to update, e.g. `my-collection`. + /// + /// Cancellation Token to cancel the request. + /// Task of BatchUpdateRecordsResponse + System.Threading.Tasks.Task BatchUpdateRecordsAsync(string collectionId, BatchUpdateRecordsRequest batchUpdateRecordsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Batch update records + /// + /// + /// The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// + /// Thrown when fails to make API call + /// The collection that contains the records to update, e.g. `my-collection`. + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (BatchUpdateRecordsResponse) + System.Threading.Tasks.Task> BatchUpdateRecordsWithHttpInfoAsync(string collectionId, BatchUpdateRecordsRequest batchUpdateRecordsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Batch upsert records /// /// @@ -396,6 +444,172 @@ public Com.Sajari.Sdk.Client.ExceptionFactory ExceptionFactory set { _exceptionFactory = value; } } + /// + /// Batch update records The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// + /// Thrown when fails to make API call + /// The collection that contains the records to update, e.g. `my-collection`. + /// + /// BatchUpdateRecordsResponse + public BatchUpdateRecordsResponse BatchUpdateRecords(string collectionId, BatchUpdateRecordsRequest batchUpdateRecordsRequest) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = BatchUpdateRecordsWithHttpInfo(collectionId, batchUpdateRecordsRequest); + return localVarResponse.Data; + } + + /// + /// Batch update records The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// + /// Thrown when fails to make API call + /// The collection that contains the records to update, e.g. `my-collection`. + /// + /// ApiResponse of BatchUpdateRecordsResponse + public Com.Sajari.Sdk.Client.ApiResponse BatchUpdateRecordsWithHttpInfo(string collectionId, BatchUpdateRecordsRequest batchUpdateRecordsRequest) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->BatchUpdateRecords"); + } + + // verify the required parameter 'batchUpdateRecordsRequest' is set + if (batchUpdateRecordsRequest == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'batchUpdateRecordsRequest' when calling RecordsApi->BatchUpdateRecords"); + } + + 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 = batchUpdateRecordsRequest; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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}/records:batchUpdate", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BatchUpdateRecords", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Batch update records The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// + /// Thrown when fails to make API call + /// The collection that contains the records to update, e.g. `my-collection`. + /// + /// Cancellation Token to cancel the request. + /// Task of BatchUpdateRecordsResponse + public async System.Threading.Tasks.Task BatchUpdateRecordsAsync(string collectionId, BatchUpdateRecordsRequest batchUpdateRecordsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await BatchUpdateRecordsWithHttpInfoAsync(collectionId, batchUpdateRecordsRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Batch update records The batch version of the [UpdateRecord](/api#operation/UpdateRecord) call. + /// + /// Thrown when fails to make API call + /// The collection that contains the records to update, e.g. `my-collection`. + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (BatchUpdateRecordsResponse) + public async System.Threading.Tasks.Task> BatchUpdateRecordsWithHttpInfoAsync(string collectionId, BatchUpdateRecordsRequest batchUpdateRecordsRequest, 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 RecordsApi->BatchUpdateRecords"); + } + + // verify the required parameter 'batchUpdateRecordsRequest' is set + if (batchUpdateRecordsRequest == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'batchUpdateRecordsRequest' when calling RecordsApi->BatchUpdateRecords"); + } + + + 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 = batchUpdateRecordsRequest; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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}/records:batchUpdate", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("BatchUpdateRecords", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// /// Batch upsert records The batch version of the [UpsertRecord](/api#operation/UpsertRecord) call. /// @@ -420,11 +634,15 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->BatchUpsertRecords"); + } // verify the required parameter 'batchUpsertRecordsRequest' is set if (batchUpsertRecordsRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'batchUpsertRecordsRequest' when calling RecordsApi->BatchUpsertRecords"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -438,10 +656,16 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = batchUpsertRecordsRequest; @@ -455,11 +679,13 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}/records:batchUpsert", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("BatchUpsertRecords", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -491,11 +717,15 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->BatchUpsertRecords"); + } // verify the required parameter 'batchUpsertRecordsRequest' is set if (batchUpsertRecordsRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'batchUpsertRecordsRequest' when calling RecordsApi->BatchUpsertRecords"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -509,12 +739,17 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = batchUpsertRecordsRequest; @@ -527,13 +762,15 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchUpsert } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}/records:batchUpsert", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("BatchUpsertRecords", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -563,11 +800,15 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRecordWithHttpInfo(string { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->DeleteRecord"); + } // verify the required parameter 'deleteRecordRequest' is set if (deleteRecordRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'deleteRecordRequest' when calling RecordsApi->DeleteRecord"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -581,10 +822,16 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRecordWithHttpInfo(string }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = deleteRecordRequest; @@ -598,11 +845,13 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRecordWithHttpInfo(string // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}/records:delete", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteRecord", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -634,11 +883,15 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRecordWithHttpInfo(string { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->DeleteRecord"); + } // verify the required parameter 'deleteRecordRequest' is set if (deleteRecordRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'deleteRecordRequest' when calling RecordsApi->DeleteRecord"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -652,12 +905,17 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRecordWithHttpInfo(string "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = deleteRecordRequest; @@ -670,13 +928,15 @@ public Com.Sajari.Sdk.Client.ApiResponse DeleteRecordWithHttpInfo(string } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}/records:delete", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteRecord", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -706,11 +966,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRecordWithHttpInfo(string co { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->GetRecord"); + } // verify the required parameter 'getRecordRequest' is set if (getRecordRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'getRecordRequest' when calling RecordsApi->GetRecord"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -724,10 +988,16 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRecordWithHttpInfo(string co }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = getRecordRequest; @@ -741,11 +1011,13 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRecordWithHttpInfo(string co // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}/records:get", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetRecord", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -777,11 +1049,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRecordWithHttpInfo(string co { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->GetRecord"); + } // verify the required parameter 'getRecordRequest' is set if (getRecordRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'getRecordRequest' when calling RecordsApi->GetRecord"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -795,12 +1071,17 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRecordWithHttpInfo(string co "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = getRecordRequest; @@ -813,13 +1094,15 @@ public Com.Sajari.Sdk.Client.ApiResponse GetRecordWithHttpInfo(string co } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}/records:get", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("GetRecord", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -849,11 +1132,15 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->UpdateRecord"); + } // verify the required parameter 'updateRecordRequest' is set if (updateRecordRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'updateRecordRequest' when calling RecordsApi->UpdateRecord"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -867,10 +1154,16 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = updateRecordRequest; @@ -884,11 +1177,13 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}/records:update", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateRecord", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -920,11 +1215,15 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->UpdateRecord"); + } // verify the required parameter 'updateRecordRequest' is set if (updateRecordRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'updateRecordRequest' when calling RecordsApi->UpdateRecord"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -938,12 +1237,17 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = updateRecordRequest; @@ -956,13 +1260,15 @@ public Com.Sajari.Sdk.Client.ApiResponse UpdateRecordWithHttpInfo(string } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}/records:update", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateRecord", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -992,11 +1298,15 @@ public Com.Sajari.Sdk.Client.ApiResponse UpsertRecordWithH { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->UpsertRecord"); + } // verify the required parameter 'upsertRecordRequest' is set if (upsertRecordRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'upsertRecordRequest' when calling RecordsApi->UpsertRecord"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1010,10 +1320,16 @@ public Com.Sajari.Sdk.Client.ApiResponse UpsertRecordWithH }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = upsertRecordRequest; @@ -1027,11 +1343,13 @@ public Com.Sajari.Sdk.Client.ApiResponse UpsertRecordWithH // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}/records:upsert", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpsertRecord", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -1063,11 +1381,15 @@ public Com.Sajari.Sdk.Client.ApiResponse UpsertRecordWithH { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RecordsApi->UpsertRecord"); + } // verify the required parameter 'upsertRecordRequest' is set if (upsertRecordRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'upsertRecordRequest' when calling RecordsApi->UpsertRecord"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -1081,12 +1403,17 @@ public Com.Sajari.Sdk.Client.ApiResponse UpsertRecordWithH "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = upsertRecordRequest; @@ -1099,13 +1426,15 @@ public Com.Sajari.Sdk.Client.ApiResponse UpsertRecordWithH } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}/records:upsert", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpsertRecord", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; diff --git a/src/Com.Sajari.Sdk/Api/RedirectsApi.cs b/src/Com.Sajari.Sdk/Api/RedirectsApi.cs new file mode 100644 index 0000000..4d3c12d --- /dev/null +++ b/src/Com.Sajari.Sdk/Api/RedirectsApi.cs @@ -0,0 +1,1278 @@ +/* + * 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.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Com.Sajari.Sdk.Client; +using Com.Sajari.Sdk.Model; + +namespace Com.Sajari.Sdk.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IRedirectsApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create redirect + /// + /// + /// Create a new redirect in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a redirect in, e.g. `my-collection`. + /// The redirect to create. + /// Redirect + Redirect CreateRedirect(string collectionId, Redirect redirect); + + /// + /// Create redirect + /// + /// + /// Create a new redirect in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a redirect in, e.g. `my-collection`. + /// The redirect to create. + /// ApiResponse of Redirect + ApiResponse CreateRedirectWithHttpInfo(string collectionId, Redirect redirect); + /// + /// Delete redirect + /// + /// + /// Delete a redirect and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to delete, e.g. `1234`. + /// Object + Object DeleteRedirect(string collectionId, string redirectId); + + /// + /// Delete redirect + /// + /// + /// Delete a redirect and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to delete, e.g. `1234`. + /// ApiResponse of Object + ApiResponse DeleteRedirectWithHttpInfo(string collectionId, string redirectId); + /// + /// Get redirect + /// + /// + /// Retrieve the details of a redirect. + /// + /// Thrown when fails to make API call + /// The collection that owns the redirect, e.g. `my-collection`. + /// The redirect to retrieve, e.g. `1234`. + /// Redirect + Redirect GetRedirect(string collectionId, string redirectId); + + /// + /// Get redirect + /// + /// + /// Retrieve the details of a redirect. + /// + /// Thrown when fails to make API call + /// The collection that owns the redirect, e.g. `my-collection`. + /// The redirect to retrieve, e.g. `1234`. + /// ApiResponse of Redirect + ApiResponse GetRedirectWithHttpInfo(string collectionId, string redirectId); + /// + /// List redirects + /// + /// + /// Retrieve a list of redirects in a collection. + /// + /// 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) + /// ListRedirectsResponse + ListRedirectsResponse ListRedirects(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); + + /// + /// List redirects + /// + /// + /// Retrieve a list of redirects in a collection. + /// + /// 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) + /// ApiResponse of ListRedirectsResponse + ApiResponse ListRedirectsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)); + /// + /// Update redirect + /// + /// + /// Update the details of a redirect. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `condition` field, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/redirects/{redirect_id}?update_mask=condition ``` With the JSON body: ``` { \"condition\": \"new value\", \"target\": \"...\" } ``` > Note: In this example `target` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to update, e.g. `1234`. + /// 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. + /// Details of the redirect to update. + /// Redirect + Redirect UpdateRedirect(string collectionId, string redirectId, string updateMask, Redirect redirect); + + /// + /// Update redirect + /// + /// + /// Update the details of a redirect. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `condition` field, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/redirects/{redirect_id}?update_mask=condition ``` With the JSON body: ``` { \"condition\": \"new value\", \"target\": \"...\" } ``` > Note: In this example `target` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to update, e.g. `1234`. + /// 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. + /// Details of the redirect to update. + /// ApiResponse of Redirect + ApiResponse UpdateRedirectWithHttpInfo(string collectionId, string redirectId, string updateMask, Redirect redirect); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IRedirectsApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create redirect + /// + /// + /// Create a new redirect in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a redirect in, e.g. `my-collection`. + /// The redirect to create. + /// Cancellation Token to cancel the request. + /// Task of Redirect + System.Threading.Tasks.Task CreateRedirectAsync(string collectionId, Redirect redirect, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create redirect + /// + /// + /// Create a new redirect in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a redirect in, e.g. `my-collection`. + /// The redirect to create. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Redirect) + System.Threading.Tasks.Task> CreateRedirectWithHttpInfoAsync(string collectionId, Redirect redirect, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Delete redirect + /// + /// + /// Delete a redirect and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to delete, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of Object + System.Threading.Tasks.Task DeleteRedirectAsync(string collectionId, string redirectId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete redirect + /// + /// + /// Delete a redirect and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to delete, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Object) + System.Threading.Tasks.Task> DeleteRedirectWithHttpInfoAsync(string collectionId, string redirectId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get redirect + /// + /// + /// Retrieve the details of a redirect. + /// + /// Thrown when fails to make API call + /// The collection that owns the redirect, e.g. `my-collection`. + /// The redirect to retrieve, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of Redirect + System.Threading.Tasks.Task GetRedirectAsync(string collectionId, string redirectId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get redirect + /// + /// + /// Retrieve the details of a redirect. + /// + /// Thrown when fails to make API call + /// The collection that owns the redirect, e.g. `my-collection`. + /// The redirect to retrieve, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Redirect) + System.Threading.Tasks.Task> GetRedirectWithHttpInfoAsync(string collectionId, string redirectId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List redirects + /// + /// + /// Retrieve a list of redirects in a collection. + /// + /// 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) + /// 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)); + + /// + /// List redirects + /// + /// + /// Retrieve a list of redirects in a collection. + /// + /// 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) + /// 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)); + /// + /// Update redirect + /// + /// + /// Update the details of a redirect. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `condition` field, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/redirects/{redirect_id}?update_mask=condition ``` With the JSON body: ``` { \"condition\": \"new value\", \"target\": \"...\" } ``` > Note: In this example `target` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to update, e.g. `1234`. + /// 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. + /// Details of the redirect to update. + /// Cancellation Token to cancel the request. + /// Task of Redirect + System.Threading.Tasks.Task UpdateRedirectAsync(string collectionId, string redirectId, string updateMask, Redirect redirect, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Update redirect + /// + /// + /// Update the details of a redirect. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `condition` field, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/redirects/{redirect_id}?update_mask=condition ``` With the JSON body: ``` { \"condition\": \"new value\", \"target\": \"...\" } ``` > Note: In this example `target` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to update, e.g. `1234`. + /// 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. + /// Details of the redirect to update. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Redirect) + System.Threading.Tasks.Task> UpdateRedirectWithHttpInfoAsync(string collectionId, string redirectId, string updateMask, Redirect redirect, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IRedirectsApi : IRedirectsApiSync, IRedirectsApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class RedirectsApi : IRedirectsApi + { + private Com.Sajari.Sdk.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public RedirectsApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public RedirectsApi(string basePath) + { + this.Configuration = Com.Sajari.Sdk.Client.Configuration.MergeConfigurations( + Com.Sajari.Sdk.Client.GlobalConfiguration.Instance, + new Com.Sajari.Sdk.Client.Configuration { BasePath = basePath } + ); + this.Client = new Com.Sajari.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Com.Sajari.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Com.Sajari.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public RedirectsApi(Com.Sajari.Sdk.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Com.Sajari.Sdk.Client.Configuration.MergeConfigurations( + Com.Sajari.Sdk.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Com.Sajari.Sdk.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Com.Sajari.Sdk.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Com.Sajari.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public RedirectsApi(Com.Sajari.Sdk.Client.ISynchronousClient client, Com.Sajari.Sdk.Client.IAsynchronousClient asyncClient, Com.Sajari.Sdk.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Com.Sajari.Sdk.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Com.Sajari.Sdk.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Com.Sajari.Sdk.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Com.Sajari.Sdk.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Com.Sajari.Sdk.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create redirect Create a new redirect in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a redirect in, e.g. `my-collection`. + /// The redirect to create. + /// Redirect + public Redirect CreateRedirect(string collectionId, Redirect redirect) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = CreateRedirectWithHttpInfo(collectionId, redirect); + return localVarResponse.Data; + } + + /// + /// Create redirect Create a new redirect in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a redirect in, e.g. `my-collection`. + /// The redirect to create. + /// ApiResponse of Redirect + public Com.Sajari.Sdk.Client.ApiResponse CreateRedirectWithHttpInfo(string collectionId, Redirect redirect) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RedirectsApi->CreateRedirect"); + } + + // verify the required parameter 'redirect' is set + if (redirect == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirect' when calling RedirectsApi->CreateRedirect"); + } + + 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 = redirect; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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}/redirects", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateRedirect", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create redirect Create a new redirect in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a redirect in, e.g. `my-collection`. + /// The redirect to create. + /// Cancellation Token to cancel the request. + /// Task of Redirect + public async System.Threading.Tasks.Task CreateRedirectAsync(string collectionId, Redirect redirect, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await CreateRedirectWithHttpInfoAsync(collectionId, redirect, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create redirect Create a new redirect in a collection. + /// + /// Thrown when fails to make API call + /// The collection to create a redirect in, e.g. `my-collection`. + /// The redirect to create. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Redirect) + public async System.Threading.Tasks.Task> CreateRedirectWithHttpInfoAsync(string collectionId, Redirect redirect, 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 RedirectsApi->CreateRedirect"); + } + + // verify the required parameter 'redirect' is set + if (redirect == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirect' when calling RedirectsApi->CreateRedirect"); + } + + + 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 = redirect; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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}/redirects", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateRedirect", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete redirect Delete a redirect and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to delete, e.g. `1234`. + /// Object + public Object DeleteRedirect(string collectionId, string redirectId) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = DeleteRedirectWithHttpInfo(collectionId, redirectId); + return localVarResponse.Data; + } + + /// + /// Delete redirect Delete a redirect and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to delete, e.g. `1234`. + /// ApiResponse of Object + public Com.Sajari.Sdk.Client.ApiResponse DeleteRedirectWithHttpInfo(string collectionId, string redirectId) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RedirectsApi->DeleteRedirect"); + } + + // verify the required parameter 'redirectId' is set + if (redirectId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirectId' when calling RedirectsApi->DeleteRedirect"); + } + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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.PathParameters.Add("redirect_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(redirectId)); // path parameter + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.Delete("/v4/collections/{collection_id}/redirects/{redirect_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteRedirect", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete redirect Delete a redirect and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to delete, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of Object + public async System.Threading.Tasks.Task DeleteRedirectAsync(string collectionId, string redirectId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await DeleteRedirectWithHttpInfoAsync(collectionId, redirectId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Delete redirect Delete a redirect and all of its associated data. > Note: This operation cannot be reversed. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to delete, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Object) + public async System.Threading.Tasks.Task> DeleteRedirectWithHttpInfoAsync(string collectionId, string redirectId, 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 RedirectsApi->DeleteRedirect"); + } + + // verify the required parameter 'redirectId' is set + if (redirectId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirectId' when calling RedirectsApi->DeleteRedirect"); + } + + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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.PathParameters.Add("redirect_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(redirectId)); // path parameter + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.DeleteAsync("/v4/collections/{collection_id}/redirects/{redirect_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteRedirect", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get redirect Retrieve the details of a redirect. + /// + /// Thrown when fails to make API call + /// The collection that owns the redirect, e.g. `my-collection`. + /// The redirect to retrieve, e.g. `1234`. + /// Redirect + public Redirect GetRedirect(string collectionId, string redirectId) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = GetRedirectWithHttpInfo(collectionId, redirectId); + return localVarResponse.Data; + } + + /// + /// Get redirect Retrieve the details of a redirect. + /// + /// Thrown when fails to make API call + /// The collection that owns the redirect, e.g. `my-collection`. + /// The redirect to retrieve, e.g. `1234`. + /// ApiResponse of Redirect + public Com.Sajari.Sdk.Client.ApiResponse GetRedirectWithHttpInfo(string collectionId, string redirectId) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RedirectsApi->GetRedirect"); + } + + // verify the required parameter 'redirectId' is set + if (redirectId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirectId' when calling RedirectsApi->GetRedirect"); + } + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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.PathParameters.Add("redirect_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(redirectId)); // path parameter + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.Get("/v4/collections/{collection_id}/redirects/{redirect_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRedirect", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get redirect Retrieve the details of a redirect. + /// + /// Thrown when fails to make API call + /// The collection that owns the redirect, e.g. `my-collection`. + /// The redirect to retrieve, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of Redirect + public async System.Threading.Tasks.Task GetRedirectAsync(string collectionId, string redirectId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await GetRedirectWithHttpInfoAsync(collectionId, redirectId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get redirect Retrieve the details of a redirect. + /// + /// Thrown when fails to make API call + /// The collection that owns the redirect, e.g. `my-collection`. + /// The redirect to retrieve, e.g. `1234`. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Redirect) + public async System.Threading.Tasks.Task> GetRedirectWithHttpInfoAsync(string collectionId, string redirectId, 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 RedirectsApi->GetRedirect"); + } + + // verify the required parameter 'redirectId' is set + if (redirectId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirectId' when calling RedirectsApi->GetRedirect"); + } + + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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.PathParameters.Add("redirect_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(redirectId)); // path parameter + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.GetAsync("/v4/collections/{collection_id}/redirects/{redirect_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetRedirect", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List redirects Retrieve a list of redirects in a collection. + /// + /// 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) + /// ListRedirectsResponse + public ListRedirectsResponse ListRedirects(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = ListRedirectsWithHttpInfo(collectionId, pageSize, pageToken); + return localVarResponse.Data; + } + + /// + /// List redirects Retrieve a list of redirects in a collection. + /// + /// 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) + /// ApiResponse of ListRedirectsResponse + public Com.Sajari.Sdk.Client.ApiResponse ListRedirectsWithHttpInfo(string collectionId, int? pageSize = default(int?), string pageToken = default(string)) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RedirectsApi->ListRedirects"); + } + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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 + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.Get("/v4/collections/{collection_id}/redirects", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListRedirects", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List redirects Retrieve a list of redirects in a collection. + /// + /// 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) + /// 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)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await ListRedirectsWithHttpInfoAsync(collectionId, pageSize, pageToken, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List redirects Retrieve a list of redirects in a collection. + /// + /// 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) + /// 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)) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RedirectsApi->ListRedirects"); + } + + + Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // 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 + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.GetAsync("/v4/collections/{collection_id}/redirects", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListRedirects", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update redirect Update the details of a redirect. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `condition` field, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/redirects/{redirect_id}?update_mask=condition ``` With the JSON body: ``` { \"condition\": \"new value\", \"target\": \"...\" } ``` > Note: In this example `target` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to update, e.g. `1234`. + /// 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. + /// Details of the redirect to update. + /// Redirect + public Redirect UpdateRedirect(string collectionId, string redirectId, string updateMask, Redirect redirect) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = UpdateRedirectWithHttpInfo(collectionId, redirectId, updateMask, redirect); + return localVarResponse.Data; + } + + /// + /// Update redirect Update the details of a redirect. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `condition` field, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/redirects/{redirect_id}?update_mask=condition ``` With the JSON body: ``` { \"condition\": \"new value\", \"target\": \"...\" } ``` > Note: In this example `target` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to update, e.g. `1234`. + /// 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. + /// Details of the redirect to update. + /// ApiResponse of Redirect + public Com.Sajari.Sdk.Client.ApiResponse UpdateRedirectWithHttpInfo(string collectionId, string redirectId, string updateMask, Redirect redirect) + { + // verify the required parameter 'collectionId' is set + if (collectionId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling RedirectsApi->UpdateRedirect"); + } + + // verify the required parameter 'redirectId' is set + if (redirectId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirectId' when calling RedirectsApi->UpdateRedirect"); + } + + // verify the required parameter 'updateMask' is set + if (updateMask == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'updateMask' when calling RedirectsApi->UpdateRedirect"); + } + + // verify the required parameter 'redirect' is set + if (redirect == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirect' when calling RedirectsApi->UpdateRedirect"); + } + + 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.PathParameters.Add("redirect_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(redirectId)); // path parameter + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "update_mask", updateMask)); + localVarRequestOptions.Data = redirect; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.Patch("/v4/collections/{collection_id}/redirects/{redirect_id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateRedirect", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Update redirect Update the details of a redirect. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `condition` field, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/redirects/{redirect_id}?update_mask=condition ``` With the JSON body: ``` { \"condition\": \"new value\", \"target\": \"...\" } ``` > Note: In this example `target` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to update, e.g. `1234`. + /// 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. + /// Details of the redirect to update. + /// Cancellation Token to cancel the request. + /// Task of Redirect + public async System.Threading.Tasks.Task UpdateRedirectAsync(string collectionId, string redirectId, string updateMask, Redirect redirect, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Com.Sajari.Sdk.Client.ApiResponse localVarResponse = await UpdateRedirectWithHttpInfoAsync(collectionId, redirectId, updateMask, redirect, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Update redirect Update the details of a redirect. Pass each field that you want to update in the request body. Also specify the name of each field that you want to update in the `update_mask` in the request URL query string. Separate multiple fields with a comma. Fields included in the request body, but not included in the field mask are not updated. For example, to update the `condition` field, make a `PATCH` request to the URL: ``` /v4/collections/{collection_id}/redirects/{redirect_id}?update_mask=condition ``` With the JSON body: ``` { \"condition\": \"new value\", \"target\": \"...\" } ``` > Note: In this example `target` is not updated because it is not specified in the `update_mask`. + /// + /// Thrown when fails to make API call + /// The collection the redirect belongs to, e.g. `my-collection`. + /// The redirect to update, e.g. `1234`. + /// 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. + /// Details of the redirect to update. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Redirect) + public async System.Threading.Tasks.Task> UpdateRedirectWithHttpInfoAsync(string collectionId, string redirectId, string updateMask, Redirect redirect, 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 RedirectsApi->UpdateRedirect"); + } + + // verify the required parameter 'redirectId' is set + if (redirectId == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirectId' when calling RedirectsApi->UpdateRedirect"); + } + + // verify the required parameter 'updateMask' is set + if (updateMask == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'updateMask' when calling RedirectsApi->UpdateRedirect"); + } + + // verify the required parameter 'redirect' is set + if (redirect == null) + { + throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'redirect' when calling RedirectsApi->UpdateRedirect"); + } + + + 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.PathParameters.Add("redirect_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(redirectId)); // path parameter + localVarRequestOptions.QueryParameters.Add(Com.Sajari.Sdk.Client.ClientUtils.ParameterToMultiMap("", "update_mask", updateMask)); + localVarRequestOptions.Data = redirect; + + // authentication (BasicAuth) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password)) + { + 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.PatchAsync("/v4/collections/{collection_id}/redirects/{redirect_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("UpdateRedirect", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/Com.Sajari.Sdk/Api/SchemaApi.cs b/src/Com.Sajari.Sdk/Api/SchemaApi.cs index d53e825..275e4b4 100644 --- a/src/Com.Sajari.Sdk/Api/SchemaApi.cs +++ b/src/Com.Sajari.Sdk/Api/SchemaApi.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -328,11 +328,15 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling SchemaApi->BatchCreateSchemaFields"); + } // verify the required parameter 'batchCreateSchemaFieldsRequest' is set if (batchCreateSchemaFieldsRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'batchCreateSchemaFieldsRequest' when calling SchemaApi->BatchCreateSchemaFields"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -346,10 +350,16 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = batchCreateSchemaFieldsRequest; @@ -363,11 +373,13 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}/schemaFields:batchCreate", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("BatchCreateSchemaFields", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -399,11 +411,15 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling SchemaApi->BatchCreateSchemaFields"); + } // verify the required parameter 'batchCreateSchemaFieldsRequest' is set if (batchCreateSchemaFieldsRequest == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'batchCreateSchemaFieldsRequest' when calling SchemaApi->BatchCreateSchemaFields"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -417,12 +433,17 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = batchCreateSchemaFieldsRequest; @@ -435,13 +456,15 @@ public Com.Sajari.Sdk.Client.ApiResponse BatchC } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}/schemaFields:batchCreate", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("BatchCreateSchemaFields", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -471,11 +494,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling SchemaApi->CreateSchemaField"); + } // verify the required parameter 'schemaField' is set if (schemaField == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'schemaField' when calling SchemaApi->CreateSchemaField"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -489,10 +516,16 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = schemaField; @@ -506,11 +539,13 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI // make the HTTP request var localVarResponse = this.Client.Post("/v4/collections/{collection_id}/schemaFields", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateSchemaField", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -542,11 +577,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling SchemaApi->CreateSchemaField"); + } // verify the required parameter 'schemaField' is set if (schemaField == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'schemaField' when calling SchemaApi->CreateSchemaField"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -560,12 +599,17 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter localVarRequestOptions.Data = schemaField; @@ -578,13 +622,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v4/collections/{collection_id}/schemaFields", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateSchemaField", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -616,7 +662,9 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling SchemaApi->ListSchemaFields"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -629,10 +677,16 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI }; var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter if (pageSize != null) @@ -653,11 +707,13 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI // make the HTTP request var localVarResponse = this.Client.Get("/v4/collections/{collection_id}/schemaFields", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ListSchemaFields", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; @@ -691,7 +747,9 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI { // verify the required parameter 'collectionId' is set if (collectionId == null) + { throw new Com.Sajari.Sdk.Client.ApiException(400, "Missing required parameter 'collectionId' when calling SchemaApi->ListSchemaFields"); + } Com.Sajari.Sdk.Client.RequestOptions localVarRequestOptions = new Com.Sajari.Sdk.Client.RequestOptions(); @@ -704,12 +762,17 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI "application/json" }; - var localVarContentType = Com.Sajari.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + 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); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } localVarRequestOptions.PathParameters.Add("collection_id", Com.Sajari.Sdk.Client.ClientUtils.ParameterToString(collectionId)); // path parameter if (pageSize != null) @@ -729,13 +792,15 @@ public Com.Sajari.Sdk.Client.ApiResponse CreateSchemaFieldWithHttpI } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v4/collections/{collection_id}/schemaFields", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("ListSchemaFields", localVarResponse); - if (_exception != null) throw _exception; + if (_exception != null) + { + throw _exception; + } } return localVarResponse; diff --git a/src/Com.Sajari.Sdk/Client/ApiClient.cs b/src/Com.Sajari.Sdk/Client/ApiClient.cs index d80a8e9..de7da7e 100644 --- a/src/Com.Sajari.Sdk/Client/ApiClient.cs +++ b/src/Com.Sajari.Sdk/Client/ApiClient.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/ApiException.cs b/src/Com.Sajari.Sdk/Client/ApiException.cs index 1484417..9f52991 100644 --- a/src/Com.Sajari.Sdk/Client/ApiException.cs +++ b/src/Com.Sajari.Sdk/Client/ApiException.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/ApiResponse.cs b/src/Com.Sajari.Sdk/Client/ApiResponse.cs index 93badae..d398164 100644 --- a/src/Com.Sajari.Sdk/Client/ApiResponse.cs +++ b/src/Com.Sajari.Sdk/Client/ApiResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/ClientUtils.cs b/src/Com.Sajari.Sdk/Client/ClientUtils.cs index 852727e..b0af06a 100644 --- a/src/Com.Sajari.Sdk/Client/ClientUtils.cs +++ b/src/Com.Sajari.Sdk/Client/ClientUtils.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/Configuration.cs b/src/Com.Sajari.Sdk/Client/Configuration.cs index aa6d9cd..485f6df 100644 --- a/src/Com.Sajari.Sdk/Client/Configuration.cs +++ b/src/Com.Sajari.Sdk/Client/Configuration.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -32,7 +32,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "4.2.0"; + public const string Version = "4.3.0"; /// /// Identifier for ISO 8601 DateTime Format @@ -102,8 +102,8 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = "sajari-sdk-csharp-4.2.0"; - BasePath = "https://api-gateway.sajari.com"; + UserAgent = "sajari-sdk-csharp-4.3.0"; + BasePath = "https://api.search.io"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); ApiKeyPrefix = new ConcurrentDictionary(); @@ -111,7 +111,7 @@ public Configuration() { { new Dictionary { - {"url", "https://api-gateway.sajari.com"}, + {"url", "https://api.search.io"}, {"description", "No description provided"}, } } @@ -129,7 +129,7 @@ public Configuration( IDictionary defaultHeaders, IDictionary apiKey, IDictionary apiKeyPrefix, - string basePath = "https://api-gateway.sajari.com") : this() + string basePath = "https://api.search.io") : this() { if (string.IsNullOrWhiteSpace(basePath)) throw new ArgumentException("The provided basePath is invalid.", "basePath"); @@ -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.2.0\n"; + report += " SDK Package Version: 4.3.0\n"; return report; } diff --git a/src/Com.Sajari.Sdk/Client/ExceptionFactory.cs b/src/Com.Sajari.Sdk/Client/ExceptionFactory.cs index d055cb3..89dfa5c 100644 --- a/src/Com.Sajari.Sdk/Client/ExceptionFactory.cs +++ b/src/Com.Sajari.Sdk/Client/ExceptionFactory.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/GlobalConfiguration.cs b/src/Com.Sajari.Sdk/Client/GlobalConfiguration.cs index 8a24d93..67ad32f 100644 --- a/src/Com.Sajari.Sdk/Client/GlobalConfiguration.cs +++ b/src/Com.Sajari.Sdk/Client/GlobalConfiguration.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/HttpMethod.cs b/src/Com.Sajari.Sdk/Client/HttpMethod.cs index 8f887ef..97d1a2d 100644 --- a/src/Com.Sajari.Sdk/Client/HttpMethod.cs +++ b/src/Com.Sajari.Sdk/Client/HttpMethod.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/IApiAccessor.cs b/src/Com.Sajari.Sdk/Client/IApiAccessor.cs index bf2afc6..5ea9536 100644 --- a/src/Com.Sajari.Sdk/Client/IApiAccessor.cs +++ b/src/Com.Sajari.Sdk/Client/IApiAccessor.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/IAsynchronousClient.cs b/src/Com.Sajari.Sdk/Client/IAsynchronousClient.cs index 46f768d..7884fef 100644 --- a/src/Com.Sajari.Sdk/Client/IAsynchronousClient.cs +++ b/src/Com.Sajari.Sdk/Client/IAsynchronousClient.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/IReadableConfiguration.cs b/src/Com.Sajari.Sdk/Client/IReadableConfiguration.cs index cff2230..705b477 100644 --- a/src/Com.Sajari.Sdk/Client/IReadableConfiguration.cs +++ b/src/Com.Sajari.Sdk/Client/IReadableConfiguration.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/ISynchronousClient.cs b/src/Com.Sajari.Sdk/Client/ISynchronousClient.cs index 6ccad24..63e496b 100644 --- a/src/Com.Sajari.Sdk/Client/ISynchronousClient.cs +++ b/src/Com.Sajari.Sdk/Client/ISynchronousClient.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/Multimap.cs b/src/Com.Sajari.Sdk/Client/Multimap.cs index e2eee79..5d06496 100644 --- a/src/Com.Sajari.Sdk/Client/Multimap.cs +++ b/src/Com.Sajari.Sdk/Client/Multimap.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/OpenAPIDateConverter.cs b/src/Com.Sajari.Sdk/Client/OpenAPIDateConverter.cs index 830899f..054b8e4 100644 --- a/src/Com.Sajari.Sdk/Client/OpenAPIDateConverter.cs +++ b/src/Com.Sajari.Sdk/Client/OpenAPIDateConverter.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Client/RequestOptions.cs b/src/Com.Sajari.Sdk/Client/RequestOptions.cs index 1634370..f7af61b 100644 --- a/src/Com.Sajari.Sdk/Client/RequestOptions.cs +++ b/src/Com.Sajari.Sdk/Client/RequestOptions.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj b/src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj index 0e16395..18229b4 100644 --- a/src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj +++ b/src/Com.Sajari.Sdk/Com.Sajari.Sdk.csproj @@ -12,7 +12,7 @@ A library generated from a OpenAPI doc No Copyright Com.Sajari.Sdk - 4.2.0 + 4.3.0 bin\$(Configuration)\$(TargetFramework)\Com.Sajari.Sdk.xml https://github.com/sajari/GIT_USER_ID/sdk-dotnet.git git @@ -21,9 +21,9 @@ - - - + + + diff --git a/src/Com.Sajari.Sdk/Model/AbstractOpenAPISchema.cs b/src/Com.Sajari.Sdk/Model/AbstractOpenAPISchema.cs index b87f4b9..cee9012 100644 --- a/src/Com.Sajari.Sdk/Model/AbstractOpenAPISchema.cs +++ b/src/Com.Sajari.Sdk/Model/AbstractOpenAPISchema.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Model/ActivePromotion.cs b/src/Com.Sajari.Sdk/Model/ActivePromotion.cs new file mode 100644 index 0000000..d1e7041 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/ActivePromotion.cs @@ -0,0 +1,170 @@ +/* + * 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 +{ + /// + /// ActivePromotion is a promotion that is active for a given search. + /// + [DataContract(Name = "ActivePromotion")] + public partial class ActivePromotion : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The records that are excluded from the result set by the active promotion.. + /// The pins that belong to the active promotion. Note that the positions in these pins are the positions specified at pin creation time, which is not necessarily the position that a pin ends up in. For example, if a pin is created at position 2, but the query that the pin is active in has zero results, the pinned result actually appears in position 1.. + /// The ID of the active promotion.. + public ActivePromotion(List activeExclusions = default(List), List activePins = default(List), string promotionId = default(string)) + { + this.ActiveExclusions = activeExclusions; + this.ActivePins = activePins; + this.PromotionId = promotionId; + } + + /// + /// The records that are excluded from the result set by the active promotion. + /// + /// The records that are excluded from the result set by the active promotion. + [DataMember(Name = "active_exclusions", EmitDefaultValue = false)] + public List ActiveExclusions { get; set; } + + /// + /// The pins that belong to the active promotion. Note that the positions in these pins are the positions specified at pin creation time, which is not necessarily the position that a pin ends up in. For example, if a pin is created at position 2, but the query that the pin is active in has zero results, the pinned result actually appears in position 1. + /// + /// The pins that belong to the active promotion. Note that the positions in these pins are the positions specified at pin creation time, which is not necessarily the position that a pin ends up in. For example, if a pin is created at position 2, but the query that the pin is active in has zero results, the pinned result actually appears in position 1. + [DataMember(Name = "active_pins", EmitDefaultValue = false)] + public List ActivePins { get; set; } + + /// + /// The ID of the active promotion. + /// + /// The ID of the active promotion. + [DataMember(Name = "promotion_id", EmitDefaultValue = false)] + public string PromotionId { 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 ActivePromotion {\n"); + sb.Append(" ActiveExclusions: ").Append(ActiveExclusions).Append("\n"); + sb.Append(" ActivePins: ").Append(ActivePins).Append("\n"); + sb.Append(" PromotionId: ").Append(PromotionId).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 ActivePromotion); + } + + /// + /// Returns true if ActivePromotion instances are equal + /// + /// Instance of ActivePromotion to be compared + /// Boolean + public bool Equals(ActivePromotion input) + { + if (input == null) + { + return false; + } + return + ( + this.ActiveExclusions == input.ActiveExclusions || + this.ActiveExclusions != null && + input.ActiveExclusions != null && + this.ActiveExclusions.SequenceEqual(input.ActiveExclusions) + ) && + ( + this.ActivePins == input.ActivePins || + this.ActivePins != null && + input.ActivePins != null && + this.ActivePins.SequenceEqual(input.ActivePins) + ) && + ( + this.PromotionId == input.PromotionId || + (this.PromotionId != null && + this.PromotionId.Equals(input.PromotionId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ActiveExclusions != null) + { + hashCode = (hashCode * 59) + this.ActiveExclusions.GetHashCode(); + } + if (this.ActivePins != null) + { + hashCode = (hashCode * 59) + this.ActivePins.GetHashCode(); + } + if (this.PromotionId != null) + { + hashCode = (hashCode * 59) + this.PromotionId.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/BatchCreateSchemaFieldsRequest.cs b/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsRequest.cs index e24767e..fc82254 100644 --- a/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsRequest.cs +++ b/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ protected BatchCreateSchemaFieldsRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BatchCreateSchemaFieldsRequest {\n"); sb.Append(" Fields: ").Append(Fields).Append("\n"); sb.Append("}\n"); @@ -97,8 +97,9 @@ public override bool Equals(object input) public bool Equals(BatchCreateSchemaFieldsRequest input) { if (input == null) + { return false; - + } return ( this.Fields == input.Fields || @@ -118,7 +119,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Fields != null) - hashCode = hashCode * 59 + this.Fields.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Fields.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponse.cs b/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponse.cs index 255e95c..2342778 100644 --- a/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponse.cs +++ b/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public partial class BatchCreateSchemaFieldsResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BatchCreateSchemaFieldsResponse {\n"); sb.Append(" Errors: ").Append(Errors).Append("\n"); sb.Append(" Fields: ").Append(Fields).Append("\n"); @@ -98,8 +98,9 @@ public override bool Equals(object input) public bool Equals(BatchCreateSchemaFieldsResponse input) { if (input == null) + { return false; - + } return ( this.Errors == input.Errors || @@ -125,9 +126,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Errors != null) - hashCode = hashCode * 59 + this.Errors.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Errors.GetHashCode(); + } if (this.Fields != null) - hashCode = hashCode * 59 + this.Fields.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Fields.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponseError.cs b/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponseError.cs index 0143231..9c93fce 100644 --- a/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponseError.cs +++ b/src/Com.Sajari.Sdk/Model/BatchCreateSchemaFieldsResponseError.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -62,7 +62,7 @@ public partial class BatchCreateSchemaFieldsResponseError : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BatchCreateSchemaFieldsResponseError {\n"); sb.Append(" Index: ").Append(Index).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); @@ -97,8 +97,9 @@ public override bool Equals(object input) public bool Equals(BatchCreateSchemaFieldsResponseError input) { if (input == null) + { return false; - + } return ( this.Index == input.Index || @@ -120,9 +121,11 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Index.GetHashCode(); + hashCode = (hashCode * 59) + this.Index.GetHashCode(); if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/BatchUpdateRecordsRequest.cs b/src/Com.Sajari.Sdk/Model/BatchUpdateRecordsRequest.cs new file mode 100644 index 0000000..519e51a --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/BatchUpdateRecordsRequest.cs @@ -0,0 +1,159 @@ +/* + * 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 +{ + /// + /// BatchUpdateRecordsRequest + /// + [DataContract(Name = "BatchUpdateRecordsRequest")] + public partial class BatchUpdateRecordsRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BatchUpdateRecordsRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// The list of requests containing the records to be updated. A maximum of 200 records can be updated in a batch. (required). + /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. For each field that you want to update, provide a corresponding value in each record object, within the requests list, containing the new value. If provided, and you also provide an update mask in any child request, the values must match.. + public BatchUpdateRecordsRequest(List requests = default(List), string updateMask = default(string)) + { + // to ensure "requests" is required (not null) + if (requests == null) { + throw new ArgumentNullException("requests is a required property for BatchUpdateRecordsRequest and cannot be null"); + } + this.Requests = requests; + this.UpdateMask = updateMask; + } + + /// + /// The list of requests containing the records to be updated. A maximum of 200 records can be updated in a batch. + /// + /// The list of requests containing the records to be updated. A maximum of 200 records can be updated in a batch. + [DataMember(Name = "requests", IsRequired = true, EmitDefaultValue = false)] + public List Requests { get; set; } + + /// + /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. For each field that you want to update, provide a corresponding value in each record object, within the requests list, containing the new value. If provided, and you also provide an update mask in any child request, the values must match. + /// + /// The list of fields to be updated, separated by a comma, e.g. `field1,field2`. For each field that you want to update, provide a corresponding value in each record object, within the requests list, containing the new value. If provided, and you also provide an update mask in any child request, the values must match. + [DataMember(Name = "update_mask", EmitDefaultValue = false)] + public string UpdateMask { 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 BatchUpdateRecordsRequest {\n"); + sb.Append(" Requests: ").Append(Requests).Append("\n"); + sb.Append(" UpdateMask: ").Append(UpdateMask).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 BatchUpdateRecordsRequest); + } + + /// + /// Returns true if BatchUpdateRecordsRequest instances are equal + /// + /// Instance of BatchUpdateRecordsRequest to be compared + /// Boolean + public bool Equals(BatchUpdateRecordsRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.Requests == input.Requests || + this.Requests != null && + input.Requests != null && + this.Requests.SequenceEqual(input.Requests) + ) && + ( + this.UpdateMask == input.UpdateMask || + (this.UpdateMask != null && + this.UpdateMask.Equals(input.UpdateMask)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Requests != null) + { + hashCode = (hashCode * 59) + this.Requests.GetHashCode(); + } + if (this.UpdateMask != null) + { + hashCode = (hashCode * 59) + this.UpdateMask.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/BatchUpdateRecordsResponse.cs b/src/Com.Sajari.Sdk/Model/BatchUpdateRecordsResponse.cs new file mode 100644 index 0000000..90439fd --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/BatchUpdateRecordsResponse.cs @@ -0,0 +1,151 @@ +/* + * 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 +{ + /// + /// BatchUpdateRecordsResponse + /// + [DataContract(Name = "BatchUpdateRecordsResponse")] + public partial class BatchUpdateRecordsResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The errors that occurred.. + /// A list of updated records.. + public BatchUpdateRecordsResponse(List errors = default(List), List records = default(List)) + { + this.Errors = errors; + this.Records = records; + } + + /// + /// The errors that occurred. + /// + /// The errors that occurred. + [DataMember(Name = "errors", EmitDefaultValue = false)] + public List Errors { get; set; } + + /// + /// A list of updated records. + /// + /// A list of updated records. + [DataMember(Name = "records", EmitDefaultValue = false)] + public List Records { 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 BatchUpdateRecordsResponse {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append(" Records: ").Append(Records).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 BatchUpdateRecordsResponse); + } + + /// + /// Returns true if BatchUpdateRecordsResponse instances are equal + /// + /// Instance of BatchUpdateRecordsResponse to be compared + /// Boolean + public bool Equals(BatchUpdateRecordsResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.Errors == input.Errors || + this.Errors != null && + input.Errors != null && + this.Errors.SequenceEqual(input.Errors) + ) && + ( + this.Records == input.Records || + this.Records != null && + input.Records != null && + this.Records.SequenceEqual(input.Records) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Errors != null) + { + hashCode = (hashCode * 59) + this.Errors.GetHashCode(); + } + if (this.Records != null) + { + hashCode = (hashCode * 59) + this.Records.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/BatchUpdateRecordsResponseError.cs b/src/Com.Sajari.Sdk/Model/BatchUpdateRecordsResponseError.cs new file mode 100644 index 0000000..634c67f --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/BatchUpdateRecordsResponseError.cs @@ -0,0 +1,144 @@ +/* + * 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 +{ + /// + /// BatchUpdateRecordsResponseError + /// + [DataContract(Name = "BatchUpdateRecordsResponseError")] + public partial class BatchUpdateRecordsResponseError : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The index of the record in `requests` that this error corresponds to.. + /// status. + public BatchUpdateRecordsResponseError(int index = default(int), Status status = default(Status)) + { + this.Index = index; + this.Status = status; + } + + /// + /// The index of the record in `requests` that this error corresponds to. + /// + /// The index of the record in `requests` that this error corresponds to. + [DataMember(Name = "index", EmitDefaultValue = false)] + public int Index { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = false)] + public Status Status { 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 BatchUpdateRecordsResponseError {\n"); + sb.Append(" Index: ").Append(Index).Append("\n"); + sb.Append(" Status: ").Append(Status).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 BatchUpdateRecordsResponseError); + } + + /// + /// Returns true if BatchUpdateRecordsResponseError instances are equal + /// + /// Instance of BatchUpdateRecordsResponseError to be compared + /// Boolean + public bool Equals(BatchUpdateRecordsResponseError input) + { + if (input == null) + { + return false; + } + return + ( + this.Index == input.Index || + this.Index.Equals(input.Index) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Index.GetHashCode(); + if (this.Status != null) + { + hashCode = (hashCode * 59) + this.Status.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/BatchUpdateRecordsResponseRecord.cs b/src/Com.Sajari.Sdk/Model/BatchUpdateRecordsResponseRecord.cs new file mode 100644 index 0000000..8cbff2f --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/BatchUpdateRecordsResponseRecord.cs @@ -0,0 +1,145 @@ +/* + * 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 +{ + /// + /// BatchUpdateRecordsResponseRecord + /// + [DataContract(Name = "BatchUpdateRecordsResponseRecord")] + public partial class BatchUpdateRecordsResponseRecord : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The index of the record in `requests`.. + /// The updated record.. + public BatchUpdateRecordsResponseRecord(int index = default(int), Object record = default(Object)) + { + this.Index = index; + this.Record = record; + } + + /// + /// The index of the record in `requests`. + /// + /// The index of the record in `requests`. + [DataMember(Name = "index", EmitDefaultValue = false)] + public int Index { get; set; } + + /// + /// The updated record. + /// + /// The updated record. + [DataMember(Name = "record", EmitDefaultValue = false)] + public Object Record { 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 BatchUpdateRecordsResponseRecord {\n"); + sb.Append(" Index: ").Append(Index).Append("\n"); + sb.Append(" Record: ").Append(Record).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 BatchUpdateRecordsResponseRecord); + } + + /// + /// Returns true if BatchUpdateRecordsResponseRecord instances are equal + /// + /// Instance of BatchUpdateRecordsResponseRecord to be compared + /// Boolean + public bool Equals(BatchUpdateRecordsResponseRecord input) + { + if (input == null) + { + return false; + } + return + ( + this.Index == input.Index || + this.Index.Equals(input.Index) + ) && + ( + this.Record == input.Record || + (this.Record != null && + this.Record.Equals(input.Record)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Index.GetHashCode(); + if (this.Record != null) + { + hashCode = (hashCode * 59) + this.Record.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/BatchUpsertRecordsRequest.cs b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsRequest.cs index d5e41ae..e62ab77 100644 --- a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsRequest.cs +++ b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -80,7 +80,7 @@ protected BatchUpsertRecordsRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BatchUpsertRecordsRequest {\n"); sb.Append(" Pipeline: ").Append(Pipeline).Append("\n"); sb.Append(" Records: ").Append(Records).Append("\n"); @@ -116,8 +116,9 @@ public override bool Equals(object input) public bool Equals(BatchUpsertRecordsRequest input) { if (input == null) + { return false; - + } return ( this.Pipeline == input.Pipeline || @@ -148,11 +149,17 @@ public override int GetHashCode() { int hashCode = 41; if (this.Pipeline != null) - hashCode = hashCode * 59 + this.Pipeline.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Pipeline.GetHashCode(); + } if (this.Records != null) - hashCode = hashCode * 59 + this.Records.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Records.GetHashCode(); + } if (this.Variables != null) - hashCode = hashCode * 59 + this.Variables.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsRequestPipeline.cs b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsRequestPipeline.cs index df2c37f..3f4e1a1 100644 --- a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsRequestPipeline.cs +++ b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsRequestPipeline.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -72,7 +72,7 @@ protected BatchUpsertRecordsRequestPipeline() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BatchUpsertRecordsRequestPipeline {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" _Version: ").Append(_Version).Append("\n"); @@ -107,8 +107,9 @@ public override bool Equals(object input) public bool Equals(BatchUpsertRecordsRequestPipeline input) { if (input == null) + { return false; - + } return ( this.Name == input.Name || @@ -132,9 +133,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } if (this._Version != null) - hashCode = hashCode * 59 + this._Version.GetHashCode(); + { + hashCode = (hashCode * 59) + this._Version.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponse.cs b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponse.cs index 0b2eef9..fa19a5b 100644 --- a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponse.cs +++ b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -72,7 +72,7 @@ public partial class BatchUpsertRecordsResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BatchUpsertRecordsResponse {\n"); sb.Append(" Errors: ").Append(Errors).Append("\n"); sb.Append(" Keys: ").Append(Keys).Append("\n"); @@ -108,8 +108,9 @@ public override bool Equals(object input) public bool Equals(BatchUpsertRecordsResponse input) { if (input == null) + { return false; - + } return ( this.Errors == input.Errors || @@ -141,11 +142,17 @@ public override int GetHashCode() { int hashCode = 41; if (this.Errors != null) - hashCode = hashCode * 59 + this.Errors.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Errors.GetHashCode(); + } if (this.Keys != null) - hashCode = hashCode * 59 + this.Keys.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Keys.GetHashCode(); + } if (this.Variables != null) - hashCode = hashCode * 59 + this.Variables.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseError.cs b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseError.cs index 95ca9f6..4279bb0 100644 --- a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseError.cs +++ b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseError.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -62,7 +62,7 @@ public partial class BatchUpsertRecordsResponseError : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BatchUpsertRecordsResponseError {\n"); sb.Append(" Index: ").Append(Index).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); @@ -97,8 +97,9 @@ public override bool Equals(object input) public bool Equals(BatchUpsertRecordsResponseError input) { if (input == null) + { return false; - + } return ( this.Index == input.Index || @@ -120,9 +121,11 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Index.GetHashCode(); + hashCode = (hashCode * 59) + this.Index.GetHashCode(); if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseKey.cs b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseKey.cs index 52b3728..f6d9268 100644 --- a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseKey.cs +++ b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseKey.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -62,7 +62,7 @@ public partial class BatchUpsertRecordsResponseKey : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BatchUpsertRecordsResponseKey {\n"); sb.Append(" Index: ").Append(Index).Append("\n"); sb.Append(" Key: ").Append(Key).Append("\n"); @@ -97,8 +97,9 @@ public override bool Equals(object input) public bool Equals(BatchUpsertRecordsResponseKey input) { if (input == null) + { return false; - + } return ( this.Index == input.Index || @@ -120,9 +121,11 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Index.GetHashCode(); + hashCode = (hashCode * 59) + this.Index.GetHashCode(); if (this.Key != null) - hashCode = hashCode * 59 + this.Key.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Key.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseVariables.cs b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseVariables.cs index 1abcafd..15cabbe 100644 --- a/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseVariables.cs +++ b/src/Com.Sajari.Sdk/Model/BatchUpsertRecordsResponseVariables.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public partial class BatchUpsertRecordsResponseVariables : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BatchUpsertRecordsResponseVariables {\n"); sb.Append(" Index: ").Append(Index).Append("\n"); sb.Append(" Variables: ").Append(Variables).Append("\n"); @@ -98,8 +98,9 @@ public override bool Equals(object input) public bool Equals(BatchUpsertRecordsResponseVariables input) { if (input == null) + { return false; - + } return ( this.Index == input.Index || @@ -122,9 +123,11 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Index.GetHashCode(); + hashCode = (hashCode * 59) + this.Index.GetHashCode(); if (this.Variables != null) - hashCode = hashCode * 59 + this.Variables.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/Collection.cs b/src/Com.Sajari.Sdk/Model/Collection.cs index 7bf4674..520403d 100644 --- a/src/Com.Sajari.Sdk/Model/Collection.cs +++ b/src/Com.Sajari.Sdk/Model/Collection.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -117,7 +117,7 @@ public bool ShouldSerializeId() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Collection {\n"); sb.Append(" AccountId: ").Append(AccountId).Append("\n"); sb.Append(" AuthorizedQueryDomains: ").Append(AuthorizedQueryDomains).Append("\n"); @@ -155,8 +155,9 @@ public override bool Equals(object input) public bool Equals(Collection input) { if (input == null) + { return false; - + } return ( this.AccountId == input.AccountId || @@ -196,15 +197,25 @@ public override int GetHashCode() { int hashCode = 41; if (this.AccountId != null) - hashCode = hashCode * 59 + this.AccountId.GetHashCode(); + { + hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); + } if (this.AuthorizedQueryDomains != null) - hashCode = hashCode * 59 + this.AuthorizedQueryDomains.GetHashCode(); + { + hashCode = (hashCode * 59) + this.AuthorizedQueryDomains.GetHashCode(); + } if (this.CreateTime != null) - hashCode = hashCode * 59 + this.CreateTime.GetHashCode(); + { + hashCode = (hashCode * 59) + this.CreateTime.GetHashCode(); + } if (this.DisplayName != null) - hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); + { + hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); + } if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/DeleteRecordRequest.cs b/src/Com.Sajari.Sdk/Model/DeleteRecordRequest.cs index 43957ba..a72e383 100644 --- a/src/Com.Sajari.Sdk/Model/DeleteRecordRequest.cs +++ b/src/Com.Sajari.Sdk/Model/DeleteRecordRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -62,7 +62,7 @@ protected DeleteRecordRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DeleteRecordRequest {\n"); sb.Append(" Key: ").Append(Key).Append("\n"); sb.Append("}\n"); @@ -96,8 +96,9 @@ public override bool Equals(object input) public bool Equals(DeleteRecordRequest input) { if (input == null) + { return false; - + } return ( this.Key == input.Key || @@ -116,7 +117,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Key != null) - hashCode = hashCode * 59 + this.Key.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Key.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/Error.cs b/src/Com.Sajari.Sdk/Model/Error.cs index 8e2489f..2420913 100644 --- a/src/Com.Sajari.Sdk/Model/Error.cs +++ b/src/Com.Sajari.Sdk/Model/Error.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -69,7 +69,7 @@ public partial class Error : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Error {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" Details: ").Append(Details).Append("\n"); @@ -105,8 +105,9 @@ public override bool Equals(object input) public bool Equals(Error input) { if (input == null) + { return false; - + } return ( this.Code == input.Code || @@ -134,11 +135,15 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Code.GetHashCode(); + hashCode = (hashCode * 59) + this.Code.GetHashCode(); if (this.Details != null) - hashCode = hashCode * 59 + this.Details.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Details.GetHashCode(); + } if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs b/src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs index 5d5b99a..c67bae3 100644 --- a/src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs +++ b/src/Com.Sajari.Sdk/Model/GeneratePipelinesRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -72,7 +72,7 @@ protected GeneratePipelinesRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GeneratePipelinesRequest {\n"); sb.Append(" QueryTrainingFields: ").Append(QueryTrainingFields).Append("\n"); sb.Append(" SearchableFields: ").Append(SearchableFields).Append("\n"); @@ -107,8 +107,9 @@ public override bool Equals(object input) public bool Equals(GeneratePipelinesRequest input) { if (input == null) + { return false; - + } return ( this.QueryTrainingFields == input.QueryTrainingFields || @@ -134,9 +135,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.QueryTrainingFields != null) - hashCode = hashCode * 59 + this.QueryTrainingFields.GetHashCode(); + { + hashCode = (hashCode * 59) + this.QueryTrainingFields.GetHashCode(); + } if (this.SearchableFields != null) - hashCode = hashCode * 59 + this.SearchableFields.GetHashCode(); + { + hashCode = (hashCode * 59) + this.SearchableFields.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/GeneratePipelinesResponse.cs b/src/Com.Sajari.Sdk/Model/GeneratePipelinesResponse.cs index 2aa57bf..42619ba 100644 --- a/src/Com.Sajari.Sdk/Model/GeneratePipelinesResponse.cs +++ b/src/Com.Sajari.Sdk/Model/GeneratePipelinesResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -69,7 +69,7 @@ public partial class GeneratePipelinesResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GeneratePipelinesResponse {\n"); sb.Append(" AutocompletePipeline: ").Append(AutocompletePipeline).Append("\n"); sb.Append(" QueryPipeline: ").Append(QueryPipeline).Append("\n"); @@ -105,8 +105,9 @@ public override bool Equals(object input) public bool Equals(GeneratePipelinesResponse input) { if (input == null) + { return false; - + } return ( this.AutocompletePipeline == input.AutocompletePipeline || @@ -135,11 +136,17 @@ public override int GetHashCode() { int hashCode = 41; if (this.AutocompletePipeline != null) - hashCode = hashCode * 59 + this.AutocompletePipeline.GetHashCode(); + { + hashCode = (hashCode * 59) + this.AutocompletePipeline.GetHashCode(); + } if (this.QueryPipeline != null) - hashCode = hashCode * 59 + this.QueryPipeline.GetHashCode(); + { + hashCode = (hashCode * 59) + this.QueryPipeline.GetHashCode(); + } if (this.RecordPipeline != null) - hashCode = hashCode * 59 + this.RecordPipeline.GetHashCode(); + { + hashCode = (hashCode * 59) + this.RecordPipeline.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/GetDefaultPipelineResponse.cs b/src/Com.Sajari.Sdk/Model/GetDefaultPipelineResponse.cs index 01f7cbd..e5a1fc9 100644 --- a/src/Com.Sajari.Sdk/Model/GetDefaultPipelineResponse.cs +++ b/src/Com.Sajari.Sdk/Model/GetDefaultPipelineResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -54,7 +54,7 @@ public partial class GetDefaultPipelineResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GetDefaultPipelineResponse {\n"); sb.Append(" Pipeline: ").Append(Pipeline).Append("\n"); sb.Append("}\n"); @@ -88,8 +88,9 @@ public override bool Equals(object input) public bool Equals(GetDefaultPipelineResponse input) { if (input == null) + { return false; - + } return ( this.Pipeline == input.Pipeline || @@ -108,7 +109,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Pipeline != null) - hashCode = hashCode * 59 + this.Pipeline.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Pipeline.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/GetDefaultVersionRequestView.cs b/src/Com.Sajari.Sdk/Model/GetDefaultVersionRequestView.cs index e4fff77..75c5987 100644 --- a/src/Com.Sajari.Sdk/Model/GetDefaultVersionRequestView.cs +++ b/src/Com.Sajari.Sdk/Model/GetDefaultVersionRequestView.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Model/GetPipelineRequestView.cs b/src/Com.Sajari.Sdk/Model/GetPipelineRequestView.cs index 610423a..25892ee 100644 --- a/src/Com.Sajari.Sdk/Model/GetPipelineRequestView.cs +++ b/src/Com.Sajari.Sdk/Model/GetPipelineRequestView.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Model/GetRecordRequest.cs b/src/Com.Sajari.Sdk/Model/GetRecordRequest.cs index 7c680da..0d9b33f 100644 --- a/src/Com.Sajari.Sdk/Model/GetRecordRequest.cs +++ b/src/Com.Sajari.Sdk/Model/GetRecordRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -62,7 +62,7 @@ protected GetRecordRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GetRecordRequest {\n"); sb.Append(" Key: ").Append(Key).Append("\n"); sb.Append("}\n"); @@ -96,8 +96,9 @@ public override bool Equals(object input) public bool Equals(GetRecordRequest input) { if (input == null) + { return false; - + } return ( this.Key == input.Key || @@ -116,7 +117,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Key != null) - hashCode = hashCode * 59 + this.Key.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Key.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/ListCollectionsResponse.cs b/src/Com.Sajari.Sdk/Model/ListCollectionsResponse.cs index 8f3a2c1..9833b95 100644 --- a/src/Com.Sajari.Sdk/Model/ListCollectionsResponse.cs +++ b/src/Com.Sajari.Sdk/Model/ListCollectionsResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public partial class ListCollectionsResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ListCollectionsResponse {\n"); sb.Append(" Collections: ").Append(Collections).Append("\n"); sb.Append(" NextPageToken: ").Append(NextPageToken).Append("\n"); @@ -98,8 +98,9 @@ public override bool Equals(object input) public bool Equals(ListCollectionsResponse input) { if (input == null) + { return false; - + } return ( this.Collections == input.Collections || @@ -124,9 +125,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Collections != null) - hashCode = hashCode * 59 + this.Collections.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Collections.GetHashCode(); + } if (this.NextPageToken != null) - hashCode = hashCode * 59 + this.NextPageToken.GetHashCode(); + { + hashCode = (hashCode * 59) + this.NextPageToken.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs b/src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs index 7750c8a..3784f2d 100644 --- a/src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs +++ b/src/Com.Sajari.Sdk/Model/ListPipelinesRequestView.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Model/ListPipelinesResponse.cs b/src/Com.Sajari.Sdk/Model/ListPipelinesResponse.cs index 1a9bdca..b6cb65b 100644 --- a/src/Com.Sajari.Sdk/Model/ListPipelinesResponse.cs +++ b/src/Com.Sajari.Sdk/Model/ListPipelinesResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public partial class ListPipelinesResponse : IEquatable, /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ListPipelinesResponse {\n"); sb.Append(" NextPageToken: ").Append(NextPageToken).Append("\n"); sb.Append(" Pipelines: ").Append(Pipelines).Append("\n"); @@ -98,8 +98,9 @@ public override bool Equals(object input) public bool Equals(ListPipelinesResponse input) { if (input == null) + { return false; - + } return ( this.NextPageToken == input.NextPageToken || @@ -124,9 +125,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.NextPageToken != null) - hashCode = hashCode * 59 + this.NextPageToken.GetHashCode(); + { + hashCode = (hashCode * 59) + this.NextPageToken.GetHashCode(); + } if (this.Pipelines != null) - hashCode = hashCode * 59 + this.Pipelines.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Pipelines.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/ListPromotionsResponse.cs b/src/Com.Sajari.Sdk/Model/ListPromotionsResponse.cs new file mode 100644 index 0000000..aabe858 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/ListPromotionsResponse.cs @@ -0,0 +1,150 @@ +/* + * 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 +{ + /// + /// ListPromotionsResponse + /// + [DataContract(Name = "ListPromotionsResponse")] + public partial class ListPromotionsResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.. + /// The promotions.. + public ListPromotionsResponse(string nextPageToken = default(string), List promotions = default(List)) + { + this.NextPageToken = nextPageToken; + this.Promotions = promotions; + } + + /// + /// A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + /// + /// A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + [DataMember(Name = "next_page_token", EmitDefaultValue = false)] + public string NextPageToken { get; set; } + + /// + /// The promotions. + /// + /// The promotions. + [DataMember(Name = "promotions", EmitDefaultValue = false)] + public List Promotions { 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 ListPromotionsResponse {\n"); + sb.Append(" NextPageToken: ").Append(NextPageToken).Append("\n"); + sb.Append(" Promotions: ").Append(Promotions).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 ListPromotionsResponse); + } + + /// + /// Returns true if ListPromotionsResponse instances are equal + /// + /// Instance of ListPromotionsResponse to be compared + /// Boolean + public bool Equals(ListPromotionsResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.NextPageToken == input.NextPageToken || + (this.NextPageToken != null && + this.NextPageToken.Equals(input.NextPageToken)) + ) && + ( + this.Promotions == input.Promotions || + this.Promotions != null && + input.Promotions != null && + this.Promotions.SequenceEqual(input.Promotions) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NextPageToken != null) + { + hashCode = (hashCode * 59) + this.NextPageToken.GetHashCode(); + } + if (this.Promotions != null) + { + hashCode = (hashCode * 59) + this.Promotions.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/ListRedirectsResponse.cs b/src/Com.Sajari.Sdk/Model/ListRedirectsResponse.cs new file mode 100644 index 0000000..d655355 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/ListRedirectsResponse.cs @@ -0,0 +1,150 @@ +/* + * 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 +{ + /// + /// ListRedirectsResponse + /// + [DataContract(Name = "ListRedirectsResponse")] + public partial class ListRedirectsResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.. + /// The redirects.. + public ListRedirectsResponse(string nextPageToken = default(string), List redirects = default(List)) + { + this.NextPageToken = nextPageToken; + this.Redirects = redirects; + } + + /// + /// A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + /// + /// A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + [DataMember(Name = "next_page_token", EmitDefaultValue = false)] + public string NextPageToken { get; set; } + + /// + /// The redirects. + /// + /// The redirects. + [DataMember(Name = "redirects", EmitDefaultValue = false)] + public List Redirects { 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 ListRedirectsResponse {\n"); + sb.Append(" NextPageToken: ").Append(NextPageToken).Append("\n"); + sb.Append(" Redirects: ").Append(Redirects).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 ListRedirectsResponse); + } + + /// + /// Returns true if ListRedirectsResponse instances are equal + /// + /// Instance of ListRedirectsResponse to be compared + /// Boolean + public bool Equals(ListRedirectsResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.NextPageToken == input.NextPageToken || + (this.NextPageToken != null && + this.NextPageToken.Equals(input.NextPageToken)) + ) && + ( + this.Redirects == input.Redirects || + this.Redirects != null && + input.Redirects != null && + this.Redirects.SequenceEqual(input.Redirects) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.NextPageToken != null) + { + hashCode = (hashCode * 59) + this.NextPageToken.GetHashCode(); + } + if (this.Redirects != null) + { + hashCode = (hashCode * 59) + this.Redirects.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/ListSchemaFieldsResponse.cs b/src/Com.Sajari.Sdk/Model/ListSchemaFieldsResponse.cs index 9787a2f..31505cd 100644 --- a/src/Com.Sajari.Sdk/Model/ListSchemaFieldsResponse.cs +++ b/src/Com.Sajari.Sdk/Model/ListSchemaFieldsResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -72,7 +72,7 @@ public partial class ListSchemaFieldsResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ListSchemaFieldsResponse {\n"); sb.Append(" NextPageToken: ").Append(NextPageToken).Append("\n"); sb.Append(" SchemaFields: ").Append(SchemaFields).Append("\n"); @@ -108,8 +108,9 @@ public override bool Equals(object input) public bool Equals(ListSchemaFieldsResponse input) { if (input == null) + { return false; - + } return ( this.NextPageToken == input.NextPageToken || @@ -138,10 +139,14 @@ public override int GetHashCode() { int hashCode = 41; if (this.NextPageToken != null) - hashCode = hashCode * 59 + this.NextPageToken.GetHashCode(); + { + hashCode = (hashCode * 59) + this.NextPageToken.GetHashCode(); + } if (this.SchemaFields != null) - hashCode = hashCode * 59 + this.SchemaFields.GetHashCode(); - hashCode = hashCode * 59 + this.TotalSize.GetHashCode(); + { + hashCode = (hashCode * 59) + this.SchemaFields.GetHashCode(); + } + hashCode = (hashCode * 59) + this.TotalSize.GetHashCode(); return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/PercentileDataPoint.cs b/src/Com.Sajari.Sdk/Model/PercentileDataPoint.cs index 1b77678..d4bad5a 100644 --- a/src/Com.Sajari.Sdk/Model/PercentileDataPoint.cs +++ b/src/Com.Sajari.Sdk/Model/PercentileDataPoint.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public partial class PercentileDataPoint : IEquatable, IVal /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class PercentileDataPoint {\n"); sb.Append(" Point: ").Append(Point).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); @@ -98,8 +98,9 @@ public override bool Equals(object input) public bool Equals(PercentileDataPoint input) { if (input == null) + { return false; - + } return ( this.Point == input.Point || @@ -120,8 +121,8 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Point.GetHashCode(); - hashCode = hashCode * 59 + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Point.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.GetHashCode(); return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/Pipeline.cs b/src/Com.Sajari.Sdk/Model/Pipeline.cs index 844557a..8f76e4a 100644 --- a/src/Com.Sajari.Sdk/Model/Pipeline.cs +++ b/src/Com.Sajari.Sdk/Model/Pipeline.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -48,8 +48,8 @@ protected Pipeline() { } /// /// Description of the pipeline.. /// The pipeline's name. Must start with an alphanumeric character followed by one or more alphanumeric, `_`, `-` or `.` characters. Strictly speaking, it must match the regular expression: `^[a-zA-Z0-9][a-zA-Z0-9_\\-\\.]+$`. (required). - /// Post-steps are run after an indexing operation or query request has been sent to the search index. For indexing operations, the post-steps only run when creating new records. They do not run when updating records. For querying, the post-steps have access to the result-set. This makes it possible to act on the results before sending them back to the caller.. - /// Pre-steps are run before an indexing operation or query request is sent to the search index.. + /// The post-steps that are run after an indexing operation or query request has been sent to the search index. For indexing operations, the post-steps only run when creating new records. They do not run when updating records. For querying, the post-steps have access to the result-set. This makes it possible to act on the results before sending them back to the caller.. + /// The pre-steps that are run before an indexing operation or query request is sent to the search index.. /// type (required). /// The pipeline's version. Must start with an alphanumeric character followed by one or more alphanumeric, `_`, `-` or `.` characters. Strictly speaking, it must match the regular expression: `^[a-zA-Z0-9][a-zA-Z0-9_\\-\\.]+$`. (required). public Pipeline(string description = default(string), string name = default(string), List postSteps = default(List), List preSteps = default(List), PipelineType type = default(PipelineType), string version = default(string)) @@ -130,16 +130,16 @@ public bool ShouldSerializeDefaultVersion() public string Name { get; set; } /// - /// Post-steps are run after an indexing operation or query request has been sent to the search index. For indexing operations, the post-steps only run when creating new records. They do not run when updating records. For querying, the post-steps have access to the result-set. This makes it possible to act on the results before sending them back to the caller. + /// The post-steps that are run after an indexing operation or query request has been sent to the search index. For indexing operations, the post-steps only run when creating new records. They do not run when updating records. For querying, the post-steps have access to the result-set. This makes it possible to act on the results before sending them back to the caller. /// - /// Post-steps are run after an indexing operation or query request has been sent to the search index. For indexing operations, the post-steps only run when creating new records. They do not run when updating records. For querying, the post-steps have access to the result-set. This makes it possible to act on the results before sending them back to the caller. + /// The post-steps that are run after an indexing operation or query request has been sent to the search index. For indexing operations, the post-steps only run when creating new records. They do not run when updating records. For querying, the post-steps have access to the result-set. This makes it possible to act on the results before sending them back to the caller. [DataMember(Name = "post_steps", EmitDefaultValue = false)] public List PostSteps { get; set; } /// - /// Pre-steps are run before an indexing operation or query request is sent to the search index. + /// The pre-steps that are run before an indexing operation or query request is sent to the search index. /// - /// Pre-steps are run before an indexing operation or query request is sent to the search index. + /// The pre-steps that are run before an indexing operation or query request is sent to the search index. [DataMember(Name = "pre_steps", EmitDefaultValue = false)] public List PreSteps { get; set; } @@ -156,7 +156,7 @@ public bool ShouldSerializeDefaultVersion() /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Pipeline {\n"); sb.Append(" CollectionDefault: ").Append(CollectionDefault).Append("\n"); sb.Append(" CreateTime: ").Append(CreateTime).Append("\n"); @@ -198,8 +198,9 @@ public override bool Equals(object input) public bool Equals(Pipeline input) { if (input == null) + { return false; - + } return ( this.CollectionDefault == input.CollectionDefault || @@ -256,21 +257,33 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.CollectionDefault.GetHashCode(); + hashCode = (hashCode * 59) + this.CollectionDefault.GetHashCode(); if (this.CreateTime != null) - hashCode = hashCode * 59 + this.CreateTime.GetHashCode(); - hashCode = hashCode * 59 + this.DefaultVersion.GetHashCode(); + { + hashCode = (hashCode * 59) + this.CreateTime.GetHashCode(); + } + hashCode = (hashCode * 59) + this.DefaultVersion.GetHashCode(); if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } if (this.PostSteps != null) - hashCode = hashCode * 59 + this.PostSteps.GetHashCode(); + { + hashCode = (hashCode * 59) + this.PostSteps.GetHashCode(); + } if (this.PreSteps != null) - hashCode = hashCode * 59 + this.PreSteps.GetHashCode(); - hashCode = hashCode * 59 + this.Type.GetHashCode(); + { + hashCode = (hashCode * 59) + this.PreSteps.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); if (this._Version != null) - hashCode = hashCode * 59 + this._Version.GetHashCode(); + { + hashCode = (hashCode * 59) + this._Version.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/PipelineStep.cs b/src/Com.Sajari.Sdk/Model/PipelineStep.cs index d109519..d8df388 100644 --- a/src/Com.Sajari.Sdk/Model/PipelineStep.cs +++ b/src/Com.Sajari.Sdk/Model/PipelineStep.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -41,7 +41,7 @@ protected PipelineStep() { } /// Initializes a new instance of the class. /// /// Annotations added to the request when the step is run.. - /// Condition expression to determine if the step should be run. This is a filter expression much like the query filter expression, but it acts upon the pipeline variables. For example, to only run the step if the pipeline `q` variable is not empty, set this to `q != ''`.. + /// A condition expression to determine if the step should be run. This is a filter expression much like the query filter expression, but it acts upon the pipeline variables. For example, to only run the step if the pipeline `q` variable is not empty, set this to `q != ''`.. /// Description for the step. Overrides the default description.. /// ID of the step template. (required). /// Bindings for the step parameters.. @@ -68,9 +68,9 @@ protected PipelineStep() { } public List Annotations { get; set; } /// - /// Condition expression to determine if the step should be run. This is a filter expression much like the query filter expression, but it acts upon the pipeline variables. For example, to only run the step if the pipeline `q` variable is not empty, set this to `q != ''`. + /// A condition expression to determine if the step should be run. This is a filter expression much like the query filter expression, but it acts upon the pipeline variables. For example, to only run the step if the pipeline `q` variable is not empty, set this to `q != ''`. /// - /// Condition expression to determine if the step should be run. This is a filter expression much like the query filter expression, but it acts upon the pipeline variables. For example, to only run the step if the pipeline `q` variable is not empty, set this to `q != ''`. + /// A condition expression to determine if the step should be run. This is a filter expression much like the query filter expression, but it acts upon the pipeline variables. For example, to only run the step if the pipeline `q` variable is not empty, set this to `q != ''`. [DataMember(Name = "condition", EmitDefaultValue = false)] public string Condition { get; set; } @@ -108,7 +108,7 @@ protected PipelineStep() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class PipelineStep {\n"); sb.Append(" Annotations: ").Append(Annotations).Append("\n"); sb.Append(" Condition: ").Append(Condition).Append("\n"); @@ -147,8 +147,9 @@ public override bool Equals(object input) public bool Equals(PipelineStep input) { if (input == null) + { return false; - + } return ( this.Annotations == input.Annotations || @@ -194,17 +195,29 @@ public override int GetHashCode() { int hashCode = 41; if (this.Annotations != null) - hashCode = hashCode * 59 + this.Annotations.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Annotations.GetHashCode(); + } if (this.Condition != null) - hashCode = hashCode * 59 + this.Condition.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Condition.GetHashCode(); + } if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } if (this.Params != null) - hashCode = hashCode * 59 + this.Params.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Params.GetHashCode(); + } if (this.Title != null) - hashCode = hashCode * 59 + this.Title.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/PipelineStepParamBinding.cs b/src/Com.Sajari.Sdk/Model/PipelineStepParamBinding.cs index 5810ec7..c09be44 100644 --- a/src/Com.Sajari.Sdk/Model/PipelineStepParamBinding.cs +++ b/src/Com.Sajari.Sdk/Model/PipelineStepParamBinding.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -81,7 +81,7 @@ public partial class PipelineStepParamBinding : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class PipelineStepParamBinding {\n"); sb.Append(" Bind: ").Append(Bind).Append("\n"); sb.Append(" Constant: ").Append(Constant).Append("\n"); @@ -118,8 +118,9 @@ public override bool Equals(object input) public bool Equals(PipelineStepParamBinding input) { if (input == null) + { return false; - + } return ( this.Bind == input.Bind || @@ -153,13 +154,21 @@ public override int GetHashCode() { int hashCode = 41; if (this.Bind != null) - hashCode = hashCode * 59 + this.Bind.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Bind.GetHashCode(); + } if (this.Constant != null) - hashCode = hashCode * 59 + this.Constant.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Constant.GetHashCode(); + } if (this.DefaultValue != null) - hashCode = hashCode * 59 + this.DefaultValue.GetHashCode(); + { + hashCode = (hashCode * 59) + this.DefaultValue.GetHashCode(); + } if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/PipelineType.cs b/src/Com.Sajari.Sdk/Model/PipelineType.cs index 21ec21f..6b50d58 100644 --- a/src/Com.Sajari.Sdk/Model/PipelineType.cs +++ b/src/Com.Sajari.Sdk/Model/PipelineType.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Model/Promotion.cs b/src/Com.Sajari.Sdk/Model/Promotion.cs new file mode 100644 index 0000000..609608d --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/Promotion.cs @@ -0,0 +1,409 @@ +/* + * 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 contains a trigger, determining which searches it should be active for, and a list of alterations that should be made to search results when it is active. + /// + [DataContract(Name = "Promotion")] + public partial class Promotion : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Promotion() { } + /// + /// Initializes a new instance of the class. + /// + /// 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). + /// If specified, the promotion is considered disabled after this time.. + /// The records to exclude from search results, if the promotion is enabled.. + /// The filter boosts to apply to searches, if the promotion is enabled.. + /// The conditions applied to the filters passed from the user. A query must match at least one of these in order to trigger the promotion.. + /// The promotion's ID.. + /// 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)) + { + // to ensure "condition" is required (not null) + if (condition == null) { + throw new ArgumentNullException("condition is a required property for Promotion and cannot be null"); + } + this.Condition = condition; + // to ensure "displayName" is required (not null) + if (displayName == null) { + throw new ArgumentNullException("displayName is a required property for Promotion and cannot be null"); + } + this.DisplayName = displayName; + this.Disabled = disabled; + this.EndTime = endTime; + this.Exclusions = exclusions; + this.FilterBoosts = filterBoosts; + this.FilterConditions = filterConditions; + this.Id = id; + this.Pins = pins; + this.RangeBoosts = rangeBoosts; + this.StartTime = startTime; + } + + /// + /// Output only. The ID of the collection that owns this promotion. + /// + /// Output only. The ID of the collection that owns this promotion. + [DataMember(Name = "collection_id", EmitDefaultValue = false)] + public string CollectionId { get; private set; } + + /// + /// Returns false as CollectionId should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeCollectionId() + { + return false; + } + /// + /// 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'`. + /// + /// 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'`. + [DataMember(Name = "condition", IsRequired = true, EmitDefaultValue = false)] + public string Condition { get; set; } + + /// + /// Output only. Time the promotion was created. + /// + /// Output only. Time the promotion was created. + [DataMember(Name = "create_time", EmitDefaultValue = false)] + public DateTime CreateTime { get; private set; } + + /// + /// Returns false as CreateTime should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeCreateTime() + { + return false; + } + /// + /// If disabled, the promotion is never triggered. + /// + /// If disabled, the promotion is never triggered. + [DataMember(Name = "disabled", EmitDefaultValue = true)] + public bool Disabled { get; set; } + + /// + /// The promotion's display name. + /// + /// The promotion's display name. + [DataMember(Name = "display_name", IsRequired = true, EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// If specified, the promotion is considered disabled after this time. + /// + /// If specified, the promotion is considered disabled after this time. + [DataMember(Name = "end_time", EmitDefaultValue = false)] + public DateTime EndTime { get; set; } + + /// + /// The records to exclude from search results, if the promotion is enabled. + /// + /// The records to exclude from search results, if the promotion is enabled. + [DataMember(Name = "exclusions", EmitDefaultValue = false)] + public List Exclusions { get; set; } + + /// + /// The filter boosts to apply to searches, if the promotion is enabled. + /// + /// The filter boosts to apply to searches, if the promotion is enabled. + [DataMember(Name = "filter_boosts", EmitDefaultValue = false)] + public List FilterBoosts { get; set; } + + /// + /// The conditions applied to the filters passed from the user. A query must match at least one of these in order to trigger the promotion. + /// + /// The conditions applied to the filters passed from the user. A query must match at least one of these in order to trigger the promotion. + [DataMember(Name = "filter_conditions", EmitDefaultValue = false)] + public List FilterConditions { get; set; } + + /// + /// The promotion's ID. + /// + /// The promotion's ID. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// The items to fix to specific positions in the search results. + /// + /// The items to fix to specific positions in the search results. + [DataMember(Name = "pins", EmitDefaultValue = false)] + public List Pins { get; set; } + + /// + /// The range boosts to apply to searches, if the promotion is enabled. + /// + /// The range boosts to apply to searches, if the promotion is enabled. + [DataMember(Name = "range_boosts", EmitDefaultValue = false)] + public List RangeBoosts { get; set; } + + /// + /// If specified, the promotion is considered disabled before this time. + /// + /// If specified, the promotion is considered disabled before this time. + [DataMember(Name = "start_time", EmitDefaultValue = false)] + public DateTime StartTime { get; set; } + + /// + /// Output only. Time the promotion was last updated. + /// + /// Output only. Time the promotion was last updated. + [DataMember(Name = "update_time", EmitDefaultValue = false)] + public DateTime UpdateTime { get; private set; } + + /// + /// Returns false as UpdateTime should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeUpdateTime() + { + return false; + } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Promotion {\n"); + sb.Append(" CollectionId: ").Append(CollectionId).Append("\n"); + sb.Append(" Condition: ").Append(Condition).Append("\n"); + sb.Append(" CreateTime: ").Append(CreateTime).Append("\n"); + sb.Append(" Disabled: ").Append(Disabled).Append("\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append(" EndTime: ").Append(EndTime).Append("\n"); + sb.Append(" Exclusions: ").Append(Exclusions).Append("\n"); + sb.Append(" FilterBoosts: ").Append(FilterBoosts).Append("\n"); + sb.Append(" FilterConditions: ").Append(FilterConditions).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Pins: ").Append(Pins).Append("\n"); + sb.Append(" RangeBoosts: ").Append(RangeBoosts).Append("\n"); + sb.Append(" StartTime: ").Append(StartTime).Append("\n"); + sb.Append(" UpdateTime: ").Append(UpdateTime).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 Promotion); + } + + /// + /// Returns true if Promotion instances are equal + /// + /// Instance of Promotion to be compared + /// Boolean + public bool Equals(Promotion input) + { + if (input == null) + { + return false; + } + return + ( + this.CollectionId == input.CollectionId || + (this.CollectionId != null && + this.CollectionId.Equals(input.CollectionId)) + ) && + ( + this.Condition == input.Condition || + (this.Condition != null && + this.Condition.Equals(input.Condition)) + ) && + ( + this.CreateTime == input.CreateTime || + (this.CreateTime != null && + this.CreateTime.Equals(input.CreateTime)) + ) && + ( + this.Disabled == input.Disabled || + this.Disabled.Equals(input.Disabled) + ) && + ( + this.DisplayName == input.DisplayName || + (this.DisplayName != null && + this.DisplayName.Equals(input.DisplayName)) + ) && + ( + this.EndTime == input.EndTime || + (this.EndTime != null && + this.EndTime.Equals(input.EndTime)) + ) && + ( + this.Exclusions == input.Exclusions || + this.Exclusions != null && + input.Exclusions != null && + this.Exclusions.SequenceEqual(input.Exclusions) + ) && + ( + this.FilterBoosts == input.FilterBoosts || + this.FilterBoosts != null && + input.FilterBoosts != null && + this.FilterBoosts.SequenceEqual(input.FilterBoosts) + ) && + ( + this.FilterConditions == input.FilterConditions || + this.FilterConditions != null && + input.FilterConditions != null && + this.FilterConditions.SequenceEqual(input.FilterConditions) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Pins == input.Pins || + this.Pins != null && + input.Pins != null && + this.Pins.SequenceEqual(input.Pins) + ) && + ( + this.RangeBoosts == input.RangeBoosts || + this.RangeBoosts != null && + input.RangeBoosts != null && + this.RangeBoosts.SequenceEqual(input.RangeBoosts) + ) && + ( + this.StartTime == input.StartTime || + (this.StartTime != null && + this.StartTime.Equals(input.StartTime)) + ) && + ( + this.UpdateTime == input.UpdateTime || + (this.UpdateTime != null && + this.UpdateTime.Equals(input.UpdateTime)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CollectionId != null) + { + hashCode = (hashCode * 59) + this.CollectionId.GetHashCode(); + } + if (this.Condition != null) + { + hashCode = (hashCode * 59) + this.Condition.GetHashCode(); + } + if (this.CreateTime != null) + { + hashCode = (hashCode * 59) + this.CreateTime.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Disabled.GetHashCode(); + if (this.DisplayName != null) + { + hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); + } + if (this.EndTime != null) + { + hashCode = (hashCode * 59) + this.EndTime.GetHashCode(); + } + if (this.Exclusions != null) + { + hashCode = (hashCode * 59) + this.Exclusions.GetHashCode(); + } + if (this.FilterBoosts != null) + { + hashCode = (hashCode * 59) + this.FilterBoosts.GetHashCode(); + } + if (this.FilterConditions != null) + { + hashCode = (hashCode * 59) + this.FilterConditions.GetHashCode(); + } + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Pins != null) + { + hashCode = (hashCode * 59) + this.Pins.GetHashCode(); + } + if (this.RangeBoosts != null) + { + hashCode = (hashCode * 59) + this.RangeBoosts.GetHashCode(); + } + if (this.StartTime != null) + { + hashCode = (hashCode * 59) + this.StartTime.GetHashCode(); + } + if (this.UpdateTime != null) + { + hashCode = (hashCode * 59) + this.UpdateTime.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/PromotionCategory.cs b/src/Com.Sajari.Sdk/Model/PromotionCategory.cs new file mode 100644 index 0000000..70e1a7e --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/PromotionCategory.cs @@ -0,0 +1,149 @@ +/* + * 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 +{ + /// + /// PromotionCategory + /// + [DataContract(Name = "PromotionCategory")] + public partial class PromotionCategory : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The logical field that specifies a record's category, e.g. \"product_type\".. + /// The field that contains a human-readable rendering of a record's category, e.g. \"product_type_name\". When creating promotions, this field's text value is displayed instead of the `id_field`. If `mapping_field` is not provided, the text value of the record's `id_field` is displayed.. + public PromotionCategory(string idField = default(string), string mappingField = default(string)) + { + this.IdField = idField; + this.MappingField = mappingField; + } + + /// + /// The logical field that specifies a record's category, e.g. \"product_type\". + /// + /// The logical field that specifies a record's category, e.g. \"product_type\". + [DataMember(Name = "id_field", EmitDefaultValue = false)] + public string IdField { get; set; } + + /// + /// The field that contains a human-readable rendering of a record's category, e.g. \"product_type_name\". When creating promotions, this field's text value is displayed instead of the `id_field`. If `mapping_field` is not provided, the text value of the record's `id_field` is displayed. + /// + /// The field that contains a human-readable rendering of a record's category, e.g. \"product_type_name\". When creating promotions, this field's text value is displayed instead of the `id_field`. If `mapping_field` is not provided, the text value of the record's `id_field` is displayed. + [DataMember(Name = "mapping_field", EmitDefaultValue = false)] + public string MappingField { 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 PromotionCategory {\n"); + sb.Append(" IdField: ").Append(IdField).Append("\n"); + sb.Append(" MappingField: ").Append(MappingField).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 PromotionCategory); + } + + /// + /// Returns true if PromotionCategory instances are equal + /// + /// Instance of PromotionCategory to be compared + /// Boolean + public bool Equals(PromotionCategory input) + { + if (input == null) + { + return false; + } + return + ( + this.IdField == input.IdField || + (this.IdField != null && + this.IdField.Equals(input.IdField)) + ) && + ( + this.MappingField == input.MappingField || + (this.MappingField != null && + this.MappingField.Equals(input.MappingField)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.IdField != null) + { + hashCode = (hashCode * 59) + this.IdField.GetHashCode(); + } + if (this.MappingField != null) + { + hashCode = (hashCode * 59) + this.MappingField.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/PromotionExclusion.cs b/src/Com.Sajari.Sdk/Model/PromotionExclusion.cs new file mode 100644 index 0000000..c97cb53 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/PromotionExclusion.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 +{ + /// + /// PromotionExclusion + /// + [DataContract(Name = "PromotionExclusion")] + public partial class PromotionExclusion : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// key. + public PromotionExclusion(RecordKey key = default(RecordKey)) + { + this.Key = key; + } + + /// + /// Gets or Sets Key + /// + [DataMember(Name = "key", EmitDefaultValue = false)] + public RecordKey Key { 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 PromotionExclusion {\n"); + sb.Append(" Key: ").Append(Key).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 PromotionExclusion); + } + + /// + /// Returns true if PromotionExclusion instances are equal + /// + /// Instance of PromotionExclusion to be compared + /// Boolean + public bool Equals(PromotionExclusion input) + { + if (input == null) + { + return false; + } + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + { + hashCode = (hashCode * 59) + this.Key.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/PromotionFilterBoost.cs b/src/Com.Sajari.Sdk/Model/PromotionFilterBoost.cs new file mode 100644 index 0000000..c909cc1 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/PromotionFilterBoost.cs @@ -0,0 +1,145 @@ +/* + * 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 +{ + /// + /// PromotionFilterBoost + /// + [DataContract(Name = "PromotionFilterBoost")] + public partial class PromotionFilterBoost : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Number that determines the size of the boost that is applied to matching records. Must be greater than or equal to 0 and less than or equal to 1.. + /// Filter expression that applies a relevance boost to records matching this filter. This is a filter expression much like the query filter expression.. + public PromotionFilterBoost(float boost = default(float), string filter = default(string)) + { + this.Boost = boost; + this.Filter = filter; + } + + /// + /// Number that determines the size of the boost that is applied to matching records. Must be greater than or equal to 0 and less than or equal to 1. + /// + /// Number that determines the size of the boost that is applied to matching records. Must be greater than or equal to 0 and less than or equal to 1. + [DataMember(Name = "boost", EmitDefaultValue = false)] + public float Boost { get; set; } + + /// + /// Filter expression that applies a relevance boost to records matching this filter. This is a filter expression much like the query filter expression. + /// + /// Filter expression that applies a relevance boost to records matching this filter. This is a filter expression much like the query filter expression. + [DataMember(Name = "filter", EmitDefaultValue = false)] + public string Filter { 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 PromotionFilterBoost {\n"); + sb.Append(" Boost: ").Append(Boost).Append("\n"); + sb.Append(" Filter: ").Append(Filter).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 PromotionFilterBoost); + } + + /// + /// Returns true if PromotionFilterBoost instances are equal + /// + /// Instance of PromotionFilterBoost to be compared + /// Boolean + public bool Equals(PromotionFilterBoost input) + { + if (input == null) + { + return false; + } + return + ( + this.Boost == input.Boost || + this.Boost.Equals(input.Boost) + ) && + ( + this.Filter == input.Filter || + (this.Filter != null && + this.Filter.Equals(input.Filter)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Boost.GetHashCode(); + if (this.Filter != null) + { + hashCode = (hashCode * 59) + this.Filter.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/PromotionFilterCondition.cs b/src/Com.Sajari.Sdk/Model/PromotionFilterCondition.cs new file mode 100644 index 0000000..14722e2 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/PromotionFilterCondition.cs @@ -0,0 +1,131 @@ +/* + * 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 set of filters of the form `field = 'value'`. Matches a query if the set of filters in the condition matches exactly the set of filters associated with it. + /// + [DataContract(Name = "PromotionFilterCondition")] + public partial class PromotionFilterCondition : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// A filter of the form `field = 'value'`.. + public PromotionFilterCondition(List filter = default(List)) + { + this.Filter = filter; + } + + /// + /// A filter of the form `field = 'value'`. + /// + /// A filter of the form `field = 'value'`. + [DataMember(Name = "filter", EmitDefaultValue = false)] + public List Filter { 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 PromotionFilterCondition {\n"); + sb.Append(" Filter: ").Append(Filter).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 PromotionFilterCondition); + } + + /// + /// Returns true if PromotionFilterCondition instances are equal + /// + /// Instance of PromotionFilterCondition to be compared + /// Boolean + public bool Equals(PromotionFilterCondition input) + { + if (input == null) + { + return false; + } + return + ( + this.Filter == input.Filter || + this.Filter != null && + input.Filter != null && + this.Filter.SequenceEqual(input.Filter) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Filter != null) + { + hashCode = (hashCode * 59) + this.Filter.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/PromotionPin.cs b/src/Com.Sajari.Sdk/Model/PromotionPin.cs new file mode 100644 index 0000000..28fa192 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/PromotionPin.cs @@ -0,0 +1,144 @@ +/* + * 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 +{ + /// + /// PromotionPin + /// + [DataContract(Name = "PromotionPin")] + public partial class PromotionPin : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// key. + /// 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)) + { + this.Key = key; + this.Position = position; + } + + /// + /// Gets or Sets Key + /// + [DataMember(Name = "key", EmitDefaultValue = false)] + public RecordKey Key { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "position", EmitDefaultValue = false)] + public int Position { 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 PromotionPin {\n"); + sb.Append(" Key: ").Append(Key).Append("\n"); + sb.Append(" Position: ").Append(Position).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 PromotionPin); + } + + /// + /// Returns true if PromotionPin instances are equal + /// + /// Instance of PromotionPin to be compared + /// Boolean + public bool Equals(PromotionPin input) + { + if (input == null) + { + return false; + } + return + ( + this.Key == input.Key || + (this.Key != null && + this.Key.Equals(input.Key)) + ) && + ( + this.Position == input.Position || + this.Position.Equals(input.Position) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Key != null) + { + hashCode = (hashCode * 59) + this.Key.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Position.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/PromotionRangeBoost.cs b/src/Com.Sajari.Sdk/Model/PromotionRangeBoost.cs new file mode 100644 index 0000000..8875a0e --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/PromotionRangeBoost.cs @@ -0,0 +1,190 @@ +/* + * 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 +{ + /// + /// PromotionRangeBoost + /// + [DataContract(Name = "PromotionRangeBoost")] + public partial class PromotionRangeBoost : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Number that determines the size of the boost that is applied to matching records. Must be greater than or equal to 0 and less than or equal to 1.. + /// The end value to apply 1 boost to.. + /// The field to apply the boost to.. + /// The boost given to null/empty values. Must be greater than or equal to 0 and less than or equal to 1. The default value is 0.. + /// The start value to apply 0 boost to.. + public PromotionRangeBoost(float boost = default(float), float end = default(float), string field = default(string), float nullBoost = default(float), float start = default(float)) + { + this.Boost = boost; + this.End = end; + this.Field = field; + this.NullBoost = nullBoost; + this.Start = start; + } + + /// + /// Number that determines the size of the boost that is applied to matching records. Must be greater than or equal to 0 and less than or equal to 1. + /// + /// Number that determines the size of the boost that is applied to matching records. Must be greater than or equal to 0 and less than or equal to 1. + [DataMember(Name = "boost", EmitDefaultValue = false)] + public float Boost { get; set; } + + /// + /// The end value to apply 1 boost to. + /// + /// The end value to apply 1 boost to. + [DataMember(Name = "end", EmitDefaultValue = false)] + public float End { get; set; } + + /// + /// The field to apply the boost to. + /// + /// The field to apply the boost to. + [DataMember(Name = "field", EmitDefaultValue = false)] + public string Field { get; set; } + + /// + /// The boost given to null/empty values. Must be greater than or equal to 0 and less than or equal to 1. The default value is 0. + /// + /// The boost given to null/empty values. Must be greater than or equal to 0 and less than or equal to 1. The default value is 0. + [DataMember(Name = "null_boost", EmitDefaultValue = false)] + public float NullBoost { get; set; } + + /// + /// The start value to apply 0 boost to. + /// + /// The start value to apply 0 boost to. + [DataMember(Name = "start", EmitDefaultValue = false)] + public float Start { 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 PromotionRangeBoost {\n"); + sb.Append(" Boost: ").Append(Boost).Append("\n"); + sb.Append(" End: ").Append(End).Append("\n"); + sb.Append(" Field: ").Append(Field).Append("\n"); + sb.Append(" NullBoost: ").Append(NullBoost).Append("\n"); + sb.Append(" Start: ").Append(Start).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 PromotionRangeBoost); + } + + /// + /// Returns true if PromotionRangeBoost instances are equal + /// + /// Instance of PromotionRangeBoost to be compared + /// Boolean + public bool Equals(PromotionRangeBoost input) + { + if (input == null) + { + return false; + } + return + ( + this.Boost == input.Boost || + this.Boost.Equals(input.Boost) + ) && + ( + this.End == input.End || + this.End.Equals(input.End) + ) && + ( + this.Field == input.Field || + (this.Field != null && + this.Field.Equals(input.Field)) + ) && + ( + this.NullBoost == input.NullBoost || + this.NullBoost.Equals(input.NullBoost) + ) && + ( + this.Start == input.Start || + this.Start.Equals(input.Start) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + hashCode = (hashCode * 59) + this.Boost.GetHashCode(); + hashCode = (hashCode * 59) + this.End.GetHashCode(); + if (this.Field != null) + { + hashCode = (hashCode * 59) + this.Field.GetHashCode(); + } + hashCode = (hashCode * 59) + this.NullBoost.GetHashCode(); + hashCode = (hashCode * 59) + this.Start.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/ProtobufAny.cs b/src/Com.Sajari.Sdk/Model/ProtobufAny.cs index 0d051c5..d66c346 100644 --- a/src/Com.Sajari.Sdk/Model/ProtobufAny.cs +++ b/src/Com.Sajari.Sdk/Model/ProtobufAny.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public partial class ProtobufAny : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ProtobufAny {\n"); sb.Append(" TypeUrl: ").Append(TypeUrl).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); @@ -98,8 +98,9 @@ public override bool Equals(object input) public bool Equals(ProtobufAny input) { if (input == null) + { return false; - + } return ( this.TypeUrl == input.TypeUrl || @@ -123,9 +124,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.TypeUrl != null) - hashCode = hashCode * 59 + this.TypeUrl.GetHashCode(); + { + hashCode = (hashCode * 59) + this.TypeUrl.GetHashCode(); + } if (this.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/ProtobufFieldMask.cs b/src/Com.Sajari.Sdk/Model/ProtobufFieldMask.cs new file mode 100644 index 0000000..bdc58be --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/ProtobufFieldMask.cs @@ -0,0 +1,131 @@ +/* + * 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 +{ + /// + /// paths: \"f.a\" paths: \"f.b.d\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, new values will be appended to the existing repeated field in the target resource. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then new value will be merged into the existing sub-message in the target resource. For example, given the target message: f { b { d: 1 x: 2 } c: [1] } And an update message: f { b { d: 10 } c: [2] } then if the field mask is: paths: [\"f.b\", \"f.c\"] then the result will be: f { b { d: 10 x: 2 } c: [1, 2] } An implementation may provide options to override this default behavior for repeated and message fields. In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \"user.display_name\" paths: \"photo\" } In JSON, the same mask is represented as below: { mask: \"user.displayName,photo\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \"name\" } Or: mask { paths: \"sub_message\" } Note that oneof type names (\"test_oneof\" in this case) cannot be used in paths. ## Field Mask Verification The implementation of any API method which has a FieldMask type field in the request should verify the included field paths, and return an `INVALID_ARGUMENT` error if any path is unmappable. + /// + [DataContract(Name = "protobufFieldMask")] + public partial class ProtobufFieldMask : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The set of field mask paths.. + public ProtobufFieldMask(List paths = default(List)) + { + this.Paths = paths; + } + + /// + /// The set of field mask paths. + /// + /// The set of field mask paths. + [DataMember(Name = "paths", EmitDefaultValue = false)] + public List Paths { 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 ProtobufFieldMask {\n"); + sb.Append(" Paths: ").Append(Paths).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 ProtobufFieldMask); + } + + /// + /// Returns true if ProtobufFieldMask instances are equal + /// + /// Instance of ProtobufFieldMask to be compared + /// Boolean + public bool Equals(ProtobufFieldMask input) + { + if (input == null) + { + return false; + } + return + ( + this.Paths == input.Paths || + this.Paths != null && + input.Paths != null && + this.Paths.SequenceEqual(input.Paths) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Paths != null) + { + hashCode = (hashCode * 59) + this.Paths.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/ProtobufNullValue.cs b/src/Com.Sajari.Sdk/Model/ProtobufNullValue.cs index 4025ab1..6fc3483 100644 --- a/src/Com.Sajari.Sdk/Model/ProtobufNullValue.cs +++ b/src/Com.Sajari.Sdk/Model/ProtobufNullValue.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Model/QueryAggregateResult.cs b/src/Com.Sajari.Sdk/Model/QueryAggregateResult.cs index 57653f4..a26539b 100644 --- a/src/Com.Sajari.Sdk/Model/QueryAggregateResult.cs +++ b/src/Com.Sajari.Sdk/Model/QueryAggregateResult.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -93,7 +93,7 @@ public partial class QueryAggregateResult : IEquatable, IV /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryAggregateResult {\n"); sb.Append(" Analysis: ").Append(Analysis).Append("\n"); sb.Append(" Buckets: ").Append(Buckets).Append("\n"); @@ -132,8 +132,9 @@ public override bool Equals(object input) public bool Equals(QueryAggregateResult input) { if (input == null) + { return false; - + } return ( this.Analysis == input.Analysis || @@ -177,17 +178,29 @@ public override int GetHashCode() { int hashCode = 41; if (this.Analysis != null) - hashCode = hashCode * 59 + this.Analysis.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Analysis.GetHashCode(); + } if (this.Buckets != null) - hashCode = hashCode * 59 + this.Buckets.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Buckets.GetHashCode(); + } if (this.Count != null) - hashCode = hashCode * 59 + this.Count.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Count.GetHashCode(); + } if (this.Date != null) - hashCode = hashCode * 59 + this.Date.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Date.GetHashCode(); + } if (this.Metric != null) - hashCode = hashCode * 59 + this.Metric.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Metric.GetHashCode(); + } if (this.Percentile != null) - hashCode = hashCode * 59 + this.Percentile.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Percentile.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryAggregateResultAnalysis.cs b/src/Com.Sajari.Sdk/Model/QueryAggregateResultAnalysis.cs index cafcb7a..f3a9d29 100644 --- a/src/Com.Sajari.Sdk/Model/QueryAggregateResultAnalysis.cs +++ b/src/Com.Sajari.Sdk/Model/QueryAggregateResultAnalysis.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -90,7 +90,7 @@ public partial class QueryAggregateResultAnalysis : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryAggregateResultAnalysis {\n"); sb.Append(" AvgLength: ").Append(AvgLength).Append("\n"); sb.Append(" Cardinality: ").Append(Cardinality).Append("\n"); @@ -128,8 +128,9 @@ public override bool Equals(object input) public bool Equals(QueryAggregateResultAnalysis input) { if (input == null) + { return false; - + } return ( this.AvgLength == input.AvgLength || @@ -162,11 +163,11 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.AvgLength.GetHashCode(); - hashCode = hashCode * 59 + this.Cardinality.GetHashCode(); - hashCode = hashCode * 59 + this.Coverage.GetHashCode(); - hashCode = hashCode * 59 + this.MaxLength.GetHashCode(); - hashCode = hashCode * 59 + this.MinLength.GetHashCode(); + hashCode = (hashCode * 59) + this.AvgLength.GetHashCode(); + hashCode = (hashCode * 59) + this.Cardinality.GetHashCode(); + hashCode = (hashCode * 59) + this.Coverage.GetHashCode(); + hashCode = (hashCode * 59) + this.MaxLength.GetHashCode(); + hashCode = (hashCode * 59) + this.MinLength.GetHashCode(); return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryAggregateResultBuckets.cs b/src/Com.Sajari.Sdk/Model/QueryAggregateResultBuckets.cs index a5bd786..b82ffd5 100644 --- a/src/Com.Sajari.Sdk/Model/QueryAggregateResultBuckets.cs +++ b/src/Com.Sajari.Sdk/Model/QueryAggregateResultBuckets.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -53,7 +53,7 @@ public partial class QueryAggregateResultBuckets : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryAggregateResultBuckets {\n"); sb.Append(" Buckets: ").Append(Buckets).Append("\n"); sb.Append("}\n"); @@ -87,8 +87,9 @@ public override bool Equals(object input) public bool Equals(QueryAggregateResultBuckets input) { if (input == null) + { return false; - + } return ( this.Buckets == input.Buckets || @@ -108,7 +109,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Buckets != null) - hashCode = hashCode * 59 + this.Buckets.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Buckets.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryAggregateResultBucketsBucket.cs b/src/Com.Sajari.Sdk/Model/QueryAggregateResultBucketsBucket.cs index 1453d37..c150190 100644 --- a/src/Com.Sajari.Sdk/Model/QueryAggregateResultBucketsBucket.cs +++ b/src/Com.Sajari.Sdk/Model/QueryAggregateResultBucketsBucket.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public partial class QueryAggregateResultBucketsBucket : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryAggregateResultBucketsBucket {\n"); sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); @@ -98,8 +98,9 @@ public override bool Equals(object input) public bool Equals(QueryAggregateResultBucketsBucket input) { if (input == null) + { return false; - + } return ( this.Count == input.Count || @@ -121,9 +122,11 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Count.GetHashCode(); + hashCode = (hashCode * 59) + this.Count.GetHashCode(); if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryAggregateResultCount.cs b/src/Com.Sajari.Sdk/Model/QueryAggregateResultCount.cs index 9a4ff6a..13d4917 100644 --- a/src/Com.Sajari.Sdk/Model/QueryAggregateResultCount.cs +++ b/src/Com.Sajari.Sdk/Model/QueryAggregateResultCount.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -53,7 +53,7 @@ public partial class QueryAggregateResultCount : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryAggregateResultCount {\n"); sb.Append(" Counts: ").Append(Counts).Append("\n"); sb.Append("}\n"); @@ -87,8 +87,9 @@ public override bool Equals(object input) public bool Equals(QueryAggregateResultCount input) { if (input == null) + { return false; - + } return ( this.Counts == input.Counts || @@ -108,7 +109,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Counts != null) - hashCode = hashCode * 59 + this.Counts.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Counts.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryAggregateResultDate.cs b/src/Com.Sajari.Sdk/Model/QueryAggregateResultDate.cs index 0eee953..961a0b7 100644 --- a/src/Com.Sajari.Sdk/Model/QueryAggregateResultDate.cs +++ b/src/Com.Sajari.Sdk/Model/QueryAggregateResultDate.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -53,7 +53,7 @@ public partial class QueryAggregateResultDate : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryAggregateResultDate {\n"); sb.Append(" Dates: ").Append(Dates).Append("\n"); sb.Append("}\n"); @@ -87,8 +87,9 @@ public override bool Equals(object input) public bool Equals(QueryAggregateResultDate input) { if (input == null) + { return false; - + } return ( this.Dates == input.Dates || @@ -108,7 +109,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Dates != null) - hashCode = hashCode * 59 + this.Dates.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Dates.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryAggregateResultMetric.cs b/src/Com.Sajari.Sdk/Model/QueryAggregateResultMetric.cs index 013709f..154c992 100644 --- a/src/Com.Sajari.Sdk/Model/QueryAggregateResultMetric.cs +++ b/src/Com.Sajari.Sdk/Model/QueryAggregateResultMetric.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -53,7 +53,7 @@ public partial class QueryAggregateResultMetric : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryAggregateResultMetric {\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append("}\n"); @@ -87,8 +87,9 @@ public override bool Equals(object input) public bool Equals(QueryAggregateResultMetric input) { if (input == null) + { return false; - + } return ( this.Value == input.Value || @@ -105,7 +106,7 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Value.GetHashCode(); + hashCode = (hashCode * 59) + this.Value.GetHashCode(); return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryAggregateResultPercentile.cs b/src/Com.Sajari.Sdk/Model/QueryAggregateResultPercentile.cs index dda210e..c7b3e5b 100644 --- a/src/Com.Sajari.Sdk/Model/QueryAggregateResultPercentile.cs +++ b/src/Com.Sajari.Sdk/Model/QueryAggregateResultPercentile.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public partial class QueryAggregateResultPercentile : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryAggregateResultPercentile {\n"); sb.Append(" Cdf: ").Append(Cdf).Append("\n"); sb.Append(" Percentiles: ").Append(Percentiles).Append("\n"); @@ -98,8 +98,9 @@ public override bool Equals(object input) public bool Equals(QueryAggregateResultPercentile input) { if (input == null) + { return false; - + } return ( this.Cdf == input.Cdf || @@ -125,9 +126,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Cdf != null) - hashCode = hashCode * 59 + this.Cdf.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Cdf.GetHashCode(); + } if (this.Percentiles != null) - hashCode = hashCode * 59 + this.Percentiles.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Percentiles.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryCollectionRequest.cs b/src/Com.Sajari.Sdk/Model/QueryCollectionRequest.cs index 72cb203..9d4676f 100644 --- a/src/Com.Sajari.Sdk/Model/QueryCollectionRequest.cs +++ b/src/Com.Sajari.Sdk/Model/QueryCollectionRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -79,7 +79,7 @@ protected QueryCollectionRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryCollectionRequest {\n"); sb.Append(" Pipeline: ").Append(Pipeline).Append("\n"); sb.Append(" Tracking: ").Append(Tracking).Append("\n"); @@ -115,8 +115,9 @@ public override bool Equals(object input) public bool Equals(QueryCollectionRequest input) { if (input == null) + { return false; - + } return ( this.Pipeline == input.Pipeline || @@ -146,11 +147,17 @@ public override int GetHashCode() { int hashCode = 41; if (this.Pipeline != null) - hashCode = hashCode * 59 + this.Pipeline.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Pipeline.GetHashCode(); + } if (this.Tracking != null) - hashCode = hashCode * 59 + this.Tracking.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Tracking.GetHashCode(); + } if (this.Variables != null) - hashCode = hashCode * 59 + this.Variables.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestPipeline.cs b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestPipeline.cs index 39abbf8..acb9d50 100644 --- a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestPipeline.cs +++ b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestPipeline.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -72,7 +72,7 @@ protected QueryCollectionRequestPipeline() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryCollectionRequestPipeline {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" _Version: ").Append(_Version).Append("\n"); @@ -107,8 +107,9 @@ public override bool Equals(object input) public bool Equals(QueryCollectionRequestPipeline input) { if (input == null) + { return false; - + } return ( this.Name == input.Name || @@ -132,9 +133,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } if (this._Version != null) - hashCode = hashCode * 59 + this._Version.GetHashCode(); + { + hashCode = (hashCode * 59) + this._Version.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTracking.cs b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTracking.cs index eb2b56a..97b4ad7 100644 --- a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTracking.cs +++ b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTracking.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -89,7 +89,7 @@ public partial class QueryCollectionRequestTracking : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryCollectionRequestTracking {\n"); sb.Append(" Data: ").Append(Data).Append("\n"); sb.Append(" Field: ").Append(Field).Append("\n"); @@ -127,8 +127,9 @@ public override bool Equals(object input) public bool Equals(QueryCollectionRequestTracking input) { if (input == null) + { return false; - + } return ( this.Data == input.Data || @@ -166,13 +167,19 @@ public override int GetHashCode() { int hashCode = 41; if (this.Data != null) - hashCode = hashCode * 59 + this.Data.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Data.GetHashCode(); + } if (this.Field != null) - hashCode = hashCode * 59 + this.Field.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Field.GetHashCode(); + } if (this.QueryId != null) - hashCode = hashCode * 59 + this.QueryId.GetHashCode(); - hashCode = hashCode * 59 + this.Sequence.GetHashCode(); - hashCode = hashCode * 59 + this.Type.GetHashCode(); + { + hashCode = (hashCode * 59) + this.QueryId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Sequence.GetHashCode(); + hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTrackingType.cs b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTrackingType.cs index 2be4757..e806eb6 100644 --- a/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTrackingType.cs +++ b/src/Com.Sajari.Sdk/Model/QueryCollectionRequestTrackingType.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -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 will be generated for each result. Results which do not receive clicks will fall down rankings, and similarly low-ranked records which receive clicks will be moved up the rankings. - POS_NEG: Pos/neg tracking. Pos/neg tokens will be 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. /// - /// - TYPE_UNSPECIFIED: The default / unset value. The API defaults to `NONE` tracking. - NONE: No tracking. - CLICK: Click tracking. A click token will be generated for each result. Results which do not receive clicks will fall down rankings, and similarly low-ranked records which receive clicks will be moved up the rankings. - POS_NEG: Pos/neg tracking. Pos/neg tokens will be 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. [JsonConverter(typeof(StringEnumConverter))] public enum QueryCollectionRequestTrackingType { diff --git a/src/Com.Sajari.Sdk/Model/QueryCollectionResponse.cs b/src/Com.Sajari.Sdk/Model/QueryCollectionResponse.cs index 683d47c..217192a 100644 --- a/src/Com.Sajari.Sdk/Model/QueryCollectionResponse.cs +++ b/src/Com.Sajari.Sdk/Model/QueryCollectionResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -35,24 +35,37 @@ public partial class QueryCollectionResponse : IEquatable /// Initializes a new instance of the class. /// + /// A list of the promotions activated when running the query.. /// The aggregates run with filters.. /// The aggregates returned by the 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.. + /// 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(Dictionary aggregateFilters = default(Dictionary), Dictionary aggregates = default(Dictionary), QueryCollectionResponsePipeline pipeline = default(QueryCollectionResponsePipeline), string processingDuration = default(string), 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), 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)) { + this.ActivePromotions = activePromotions; this.AggregateFilters = aggregateFilters; this.Aggregates = aggregates; + this.FeatureScoreWeight = featureScoreWeight; this.Pipeline = pipeline; this.ProcessingDuration = processingDuration; + this.Redirects = redirects; this.Results = results; this.TotalSize = totalSize; this.Variables = variables; } + /// + /// A list of the promotions activated when running the query. + /// + /// A list of the promotions activated when running the query. + [DataMember(Name = "active_promotions", EmitDefaultValue = false)] + public List ActivePromotions { get; set; } + /// /// The aggregates run with filters. /// @@ -67,6 +80,13 @@ public partial class QueryCollectionResponse : IEquatable Aggregates { 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 ``` + /// + /// 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 ``` + [DataMember(Name = "feature_score_weight", EmitDefaultValue = false)] + public double FeatureScoreWeight { get; set; } + /// /// Gets or Sets Pipeline /// @@ -80,6 +100,13 @@ public partial class QueryCollectionResponse : IEquatable + /// A mapping of redirects triggered for all possible variations of the query. + /// + /// A mapping of redirects triggered for all possible variations of the query. + [DataMember(Name = "redirects", EmitDefaultValue = false)] + public Dictionary Redirects { get; set; } + /// /// The results returned by the query. /// @@ -107,12 +134,15 @@ public partial class QueryCollectionResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryCollectionResponse {\n"); + sb.Append(" ActivePromotions: ").Append(ActivePromotions).Append("\n"); sb.Append(" AggregateFilters: ").Append(AggregateFilters).Append("\n"); sb.Append(" Aggregates: ").Append(Aggregates).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(" Redirects: ").Append(Redirects).Append("\n"); sb.Append(" Results: ").Append(Results).Append("\n"); sb.Append(" TotalSize: ").Append(TotalSize).Append("\n"); sb.Append(" Variables: ").Append(Variables).Append("\n"); @@ -147,9 +177,16 @@ public override bool Equals(object input) public bool Equals(QueryCollectionResponse input) { if (input == null) + { return false; - + } return + ( + this.ActivePromotions == input.ActivePromotions || + this.ActivePromotions != null && + input.ActivePromotions != null && + this.ActivePromotions.SequenceEqual(input.ActivePromotions) + ) && ( this.AggregateFilters == input.AggregateFilters || this.AggregateFilters != null && @@ -162,6 +199,10 @@ public bool Equals(QueryCollectionResponse input) input.Aggregates != null && this.Aggregates.SequenceEqual(input.Aggregates) ) && + ( + this.FeatureScoreWeight == input.FeatureScoreWeight || + this.FeatureScoreWeight.Equals(input.FeatureScoreWeight) + ) && ( this.Pipeline == input.Pipeline || (this.Pipeline != null && @@ -172,6 +213,12 @@ public bool Equals(QueryCollectionResponse input) (this.ProcessingDuration != null && this.ProcessingDuration.Equals(input.ProcessingDuration)) ) && + ( + this.Redirects == input.Redirects || + this.Redirects != null && + input.Redirects != null && + this.Redirects.SequenceEqual(input.Redirects) + ) && ( this.Results == input.Results || this.Results != null && @@ -200,20 +247,43 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.ActivePromotions != null) + { + hashCode = (hashCode * 59) + this.ActivePromotions.GetHashCode(); + } if (this.AggregateFilters != null) - hashCode = hashCode * 59 + this.AggregateFilters.GetHashCode(); + { + hashCode = (hashCode * 59) + this.AggregateFilters.GetHashCode(); + } if (this.Aggregates != null) - hashCode = hashCode * 59 + this.Aggregates.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Aggregates.GetHashCode(); + } + hashCode = (hashCode * 59) + this.FeatureScoreWeight.GetHashCode(); if (this.Pipeline != null) - hashCode = hashCode * 59 + this.Pipeline.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Pipeline.GetHashCode(); + } if (this.ProcessingDuration != null) - hashCode = hashCode * 59 + this.ProcessingDuration.GetHashCode(); + { + hashCode = (hashCode * 59) + this.ProcessingDuration.GetHashCode(); + } + if (this.Redirects != null) + { + hashCode = (hashCode * 59) + this.Redirects.GetHashCode(); + } if (this.Results != null) - hashCode = hashCode * 59 + this.Results.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Results.GetHashCode(); + } if (this.TotalSize != null) - hashCode = hashCode * 59 + this.TotalSize.GetHashCode(); + { + hashCode = (hashCode * 59) + this.TotalSize.GetHashCode(); + } if (this.Variables != null) - hashCode = hashCode * 59 + this.Variables.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryCollectionResponsePipeline.cs b/src/Com.Sajari.Sdk/Model/QueryCollectionResponsePipeline.cs index 22c21f9..a79ddaf 100644 --- a/src/Com.Sajari.Sdk/Model/QueryCollectionResponsePipeline.cs +++ b/src/Com.Sajari.Sdk/Model/QueryCollectionResponsePipeline.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ public partial class QueryCollectionResponsePipeline : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryCollectionResponsePipeline {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" _Version: ").Append(_Version).Append("\n"); @@ -98,8 +98,9 @@ public override bool Equals(object input) public bool Equals(QueryCollectionResponsePipeline input) { if (input == null) + { return false; - + } return ( this.Name == input.Name || @@ -123,9 +124,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } if (this._Version != null) - hashCode = hashCode * 59 + this._Version.GetHashCode(); + { + hashCode = (hashCode * 59) + this._Version.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryResult.cs b/src/Com.Sajari.Sdk/Model/QueryResult.cs index 6e4e4f3..19dff15 100644 --- a/src/Com.Sajari.Sdk/Model/QueryResult.cs +++ b/src/Com.Sajari.Sdk/Model/QueryResult.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -35,25 +35,43 @@ public partial class QueryResult : IEquatable, IValidatableObject /// /// Initializes a new instance of the class. /// - /// Index score.. + /// 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 normalized score attributed to this record. Combines the index score and feature score.. + /// 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 indexScore = default(double), Object record = default(Object), double score = default(double), QueryResultToken token = default(QueryResultToken)) + 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)) { + this.FeatureScore = featureScore; this.IndexScore = indexScore; + this.NeuralScore = neuralScore; this.Record = record; this.Score = score; this.Token = token; } /// - /// Index score. + /// 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. /// - /// Index score. + /// 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. + [DataMember(Name = "feature_score", EmitDefaultValue = false)] + public double FeatureScore { get; set; } + + /// + /// 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 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. [DataMember(Name = "index_score", EmitDefaultValue = false)] public double IndexScore { get; set; } + /// + /// 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. + /// + /// 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. + [DataMember(Name = "neural_score", EmitDefaultValue = false)] + public double NeuralScore { get; set; } + /// /// An object made up of field-value pairs that contains the record data. /// @@ -62,9 +80,9 @@ public partial class QueryResult : IEquatable, IValidatableObject public Object Record { get; set; } /// - /// The normalized score attributed to this record. Combines the index score and feature score. + /// 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. /// - /// The normalized score attributed to this record. Combines the index score and feature score. + /// 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. [DataMember(Name = "score", EmitDefaultValue = false)] public double Score { get; set; } @@ -80,9 +98,11 @@ public partial class QueryResult : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryResult {\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(" Score: ").Append(Score).Append("\n"); sb.Append(" Token: ").Append(Token).Append("\n"); @@ -117,13 +137,22 @@ public override bool Equals(object input) public bool Equals(QueryResult input) { if (input == null) + { return false; - + } return + ( + this.FeatureScore == input.FeatureScore || + this.FeatureScore.Equals(input.FeatureScore) + ) && ( this.IndexScore == input.IndexScore || this.IndexScore.Equals(input.IndexScore) ) && + ( + this.NeuralScore == input.NeuralScore || + this.NeuralScore.Equals(input.NeuralScore) + ) && ( this.Record == input.Record || (this.Record != null && @@ -149,12 +178,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.IndexScore.GetHashCode(); + hashCode = (hashCode * 59) + this.FeatureScore.GetHashCode(); + hashCode = (hashCode * 59) + this.IndexScore.GetHashCode(); + hashCode = (hashCode * 59) + this.NeuralScore.GetHashCode(); if (this.Record != null) - hashCode = hashCode * 59 + this.Record.GetHashCode(); - hashCode = hashCode * 59 + this.Score.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Record.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Score.GetHashCode(); if (this.Token != null) - hashCode = hashCode * 59 + this.Token.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Token.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryResultToken.cs b/src/Com.Sajari.Sdk/Model/QueryResultToken.cs index 210c771..a88193b 100644 --- a/src/Com.Sajari.Sdk/Model/QueryResultToken.cs +++ b/src/Com.Sajari.Sdk/Model/QueryResultToken.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -61,7 +61,7 @@ public partial class QueryResultToken : IEquatable, IValidatab /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryResultToken {\n"); sb.Append(" Click: ").Append(Click).Append("\n"); sb.Append(" PosNeg: ").Append(PosNeg).Append("\n"); @@ -96,8 +96,9 @@ public override bool Equals(object input) public bool Equals(QueryResultToken input) { if (input == null) + { return false; - + } return ( this.Click == input.Click || @@ -121,9 +122,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Click != null) - hashCode = hashCode * 59 + this.Click.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Click.GetHashCode(); + } if (this.PosNeg != null) - hashCode = hashCode * 59 + this.PosNeg.GetHashCode(); + { + hashCode = (hashCode * 59) + this.PosNeg.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryResultTokenClick.cs b/src/Com.Sajari.Sdk/Model/QueryResultTokenClick.cs index b4550f3..b70c67d 100644 --- a/src/Com.Sajari.Sdk/Model/QueryResultTokenClick.cs +++ b/src/Com.Sajari.Sdk/Model/QueryResultTokenClick.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -53,7 +53,7 @@ public partial class QueryResultTokenClick : IEquatable, /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryResultTokenClick {\n"); sb.Append(" Token: ").Append(Token).Append("\n"); sb.Append("}\n"); @@ -87,8 +87,9 @@ public override bool Equals(object input) public bool Equals(QueryResultTokenClick input) { if (input == null) + { return false; - + } return ( this.Token == input.Token || @@ -107,7 +108,9 @@ public override int GetHashCode() { int hashCode = 41; if (this.Token != null) - hashCode = hashCode * 59 + this.Token.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Token.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/QueryResultTokenPosNeg.cs b/src/Com.Sajari.Sdk/Model/QueryResultTokenPosNeg.cs index a5a069b..8888ced 100644 --- a/src/Com.Sajari.Sdk/Model/QueryResultTokenPosNeg.cs +++ b/src/Com.Sajari.Sdk/Model/QueryResultTokenPosNeg.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -61,7 +61,7 @@ public partial class QueryResultTokenPosNeg : IEquatable /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class QueryResultTokenPosNeg {\n"); sb.Append(" Neg: ").Append(Neg).Append("\n"); sb.Append(" Pos: ").Append(Pos).Append("\n"); @@ -96,8 +96,9 @@ public override bool Equals(object input) public bool Equals(QueryResultTokenPosNeg input) { if (input == null) + { return false; - + } return ( this.Neg == input.Neg || @@ -121,9 +122,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Neg != null) - hashCode = hashCode * 59 + this.Neg.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Neg.GetHashCode(); + } if (this.Pos != null) - hashCode = hashCode * 59 + this.Pos.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Pos.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/RecordKey.cs b/src/Com.Sajari.Sdk/Model/RecordKey.cs index 6813be0..cb5289a 100644 --- a/src/Com.Sajari.Sdk/Model/RecordKey.cs +++ b/src/Com.Sajari.Sdk/Model/RecordKey.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -76,7 +76,7 @@ protected RecordKey() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class RecordKey {\n"); sb.Append(" Field: ").Append(Field).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); @@ -111,8 +111,9 @@ public override bool Equals(object input) public bool Equals(RecordKey input) { if (input == null) + { return false; - + } return ( this.Field == input.Field || @@ -136,9 +137,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Field != null) - hashCode = hashCode * 59 + this.Field.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Field.GetHashCode(); + } if (this.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/Redirect.cs b/src/Com.Sajari.Sdk/Model/Redirect.cs new file mode 100644 index 0000000..11375c4 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/Redirect.cs @@ -0,0 +1,277 @@ +/* + * 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 +{ + /// + /// Redirect contains a target that you can redirect users to if their search query matches a certain condition. + /// + [DataContract(Name = "Redirect")] + public partial class Redirect : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Redirect() { } + /// + /// Initializes a new instance of the class. + /// + /// A condition expression applied to a search request that determines whether a search is redirected. For example, to redirect if the user's query is `apples`, set condition to `q = 'apples'`. (required). + /// If disabled, the redirect is never triggered.. + /// The target to redirect the user to if their query matches `condition`. For searches performed in a browser, target is usually a URL but it can be any value that your integration can interpret as a redirect. For example, for URLs that you need to resolve at runtime, target might be a URL template string. For apps, target might be a unique identifier used to send the user to the correct view. (required). + public Redirect(string condition = default(string), bool disabled = default(bool), string target = default(string)) + { + // to ensure "condition" is required (not null) + if (condition == null) { + throw new ArgumentNullException("condition is a required property for Redirect and cannot be null"); + } + this.Condition = condition; + // to ensure "target" is required (not null) + if (target == null) { + throw new ArgumentNullException("target is a required property for Redirect and cannot be null"); + } + this.Target = target; + this.Disabled = disabled; + } + + /// + /// Output only. The ID of the collection that owns this redirect. + /// + /// Output only. The ID of the collection that owns this redirect. + [DataMember(Name = "collection_id", EmitDefaultValue = false)] + public string CollectionId { get; private set; } + + /// + /// Returns false as CollectionId should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeCollectionId() + { + return false; + } + /// + /// A condition expression applied to a search request that determines whether a search is redirected. For example, to redirect if the user's query is `apples`, set condition to `q = 'apples'`. + /// + /// A condition expression applied to a search request that determines whether a search is redirected. For example, to redirect if the user's query is `apples`, set condition to `q = 'apples'`. + [DataMember(Name = "condition", IsRequired = true, EmitDefaultValue = false)] + public string Condition { get; set; } + + /// + /// Output only. Time the redirect was created. + /// + /// Output only. Time the redirect was created. + [DataMember(Name = "create_time", EmitDefaultValue = false)] + public DateTime CreateTime { get; private set; } + + /// + /// Returns false as CreateTime should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeCreateTime() + { + return false; + } + /// + /// If disabled, the redirect is never triggered. + /// + /// If disabled, the redirect is never triggered. + [DataMember(Name = "disabled", EmitDefaultValue = true)] + public bool Disabled { get; set; } + + /// + /// Output only. The redirect's ID. + /// + /// Output only. The redirect's ID. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; private set; } + + /// + /// Returns false as Id should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeId() + { + return false; + } + /// + /// The target to redirect the user to if their query matches `condition`. For searches performed in a browser, target is usually a URL but it can be any value that your integration can interpret as a redirect. For example, for URLs that you need to resolve at runtime, target might be a URL template string. For apps, target might be a unique identifier used to send the user to the correct view. + /// + /// The target to redirect the user to if their query matches `condition`. For searches performed in a browser, target is usually a URL but it can be any value that your integration can interpret as a redirect. For example, for URLs that you need to resolve at runtime, target might be a URL template string. For apps, target might be a unique identifier used to send the user to the correct view. + [DataMember(Name = "target", IsRequired = true, EmitDefaultValue = false)] + public string Target { get; set; } + + /// + /// Output only. Time the redirect was last updated. + /// + /// Output only. Time the redirect was last updated. + [DataMember(Name = "update_time", EmitDefaultValue = false)] + public DateTime UpdateTime { get; private set; } + + /// + /// Returns false as UpdateTime should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerializeUpdateTime() + { + return false; + } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Redirect {\n"); + sb.Append(" CollectionId: ").Append(CollectionId).Append("\n"); + sb.Append(" Condition: ").Append(Condition).Append("\n"); + sb.Append(" CreateTime: ").Append(CreateTime).Append("\n"); + sb.Append(" Disabled: ").Append(Disabled).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Target: ").Append(Target).Append("\n"); + sb.Append(" UpdateTime: ").Append(UpdateTime).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 Redirect); + } + + /// + /// Returns true if Redirect instances are equal + /// + /// Instance of Redirect to be compared + /// Boolean + public bool Equals(Redirect input) + { + if (input == null) + { + return false; + } + return + ( + this.CollectionId == input.CollectionId || + (this.CollectionId != null && + this.CollectionId.Equals(input.CollectionId)) + ) && + ( + this.Condition == input.Condition || + (this.Condition != null && + this.Condition.Equals(input.Condition)) + ) && + ( + this.CreateTime == input.CreateTime || + (this.CreateTime != null && + this.CreateTime.Equals(input.CreateTime)) + ) && + ( + this.Disabled == input.Disabled || + this.Disabled.Equals(input.Disabled) + ) && + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Target == input.Target || + (this.Target != null && + this.Target.Equals(input.Target)) + ) && + ( + this.UpdateTime == input.UpdateTime || + (this.UpdateTime != null && + this.UpdateTime.Equals(input.UpdateTime)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.CollectionId != null) + { + hashCode = (hashCode * 59) + this.CollectionId.GetHashCode(); + } + if (this.Condition != null) + { + hashCode = (hashCode * 59) + this.Condition.GetHashCode(); + } + if (this.CreateTime != null) + { + hashCode = (hashCode * 59) + this.CreateTime.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Disabled.GetHashCode(); + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Target != null) + { + hashCode = (hashCode * 59) + this.Target.GetHashCode(); + } + if (this.UpdateTime != null) + { + hashCode = (hashCode * 59) + this.UpdateTime.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/RedirectResult.cs b/src/Com.Sajari.Sdk/Model/RedirectResult.cs new file mode 100644 index 0000000..406acf4 --- /dev/null +++ b/src/Com.Sajari.Sdk/Model/RedirectResult.cs @@ -0,0 +1,168 @@ +/* + * 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 +{ + /// + /// RedirectResult indicates that a redirect has been triggered for a given query. + /// + [DataContract(Name = "RedirectResult")] + public partial class RedirectResult : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The redirect's ID.. + /// The target to redirect the user to.. + /// A redirect token. Call SendEvent with this token to indicate that a redirect has been performed.. + public RedirectResult(string id = default(string), string target = default(string), string token = default(string)) + { + this.Id = id; + this.Target = target; + this.Token = token; + } + + /// + /// The redirect's ID. + /// + /// The redirect's ID. + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// The target to redirect the user to. + /// + /// The target to redirect the user to. + [DataMember(Name = "target", EmitDefaultValue = false)] + public string Target { get; set; } + + /// + /// A redirect token. Call SendEvent with this token to indicate that a redirect has been performed. + /// + /// A redirect token. Call SendEvent with this token to indicate that a redirect has been performed. + [DataMember(Name = "token", EmitDefaultValue = false)] + public string Token { 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 RedirectResult {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Target: ").Append(Target).Append("\n"); + sb.Append(" Token: ").Append(Token).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 RedirectResult); + } + + /// + /// Returns true if RedirectResult instances are equal + /// + /// Instance of RedirectResult to be compared + /// Boolean + public bool Equals(RedirectResult input) + { + if (input == null) + { + return false; + } + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.Target == input.Target || + (this.Target != null && + this.Target.Equals(input.Target)) + ) && + ( + this.Token == input.Token || + (this.Token != null && + this.Token.Equals(input.Token)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + { + hashCode = (hashCode * 59) + this.Id.GetHashCode(); + } + if (this.Target != null) + { + hashCode = (hashCode * 59) + this.Target.GetHashCode(); + } + if (this.Token != null) + { + hashCode = (hashCode * 59) + this.Token.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/SchemaField.cs b/src/Com.Sajari.Sdk/Model/SchemaField.cs index 2630436..8ef703f 100644 --- a/src/Com.Sajari.Sdk/Model/SchemaField.cs +++ b/src/Com.Sajari.Sdk/Model/SchemaField.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -106,7 +106,7 @@ protected SchemaField() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class SchemaField {\n"); sb.Append(" Array: ").Append(Array).Append("\n"); sb.Append(" ArrayLength: ").Append(ArrayLength).Append("\n"); @@ -145,8 +145,9 @@ public override bool Equals(object input) public bool Equals(SchemaField input) { if (input == null) + { return false; - + } return ( this.Array == input.Array || @@ -185,14 +186,18 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Array.GetHashCode(); - hashCode = hashCode * 59 + this.ArrayLength.GetHashCode(); + hashCode = (hashCode * 59) + this.Array.GetHashCode(); + hashCode = (hashCode * 59) + this.ArrayLength.GetHashCode(); if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - hashCode = hashCode * 59 + this.Mode.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Description.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Mode.GetHashCode(); if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - hashCode = hashCode * 59 + this.Type.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/SchemaFieldMode.cs b/src/Com.Sajari.Sdk/Model/SchemaFieldMode.cs index 536b535..426f03e 100644 --- a/src/Com.Sajari.Sdk/Model/SchemaFieldMode.cs +++ b/src/Com.Sajari.Sdk/Model/SchemaFieldMode.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Com.Sajari.Sdk/Model/SchemaFieldType.cs b/src/Com.Sajari.Sdk/Model/SchemaFieldType.cs index 378e67a..d875575 100644 --- a/src/Com.Sajari.Sdk/Model/SchemaFieldType.cs +++ b/src/Com.Sajari.Sdk/Model/SchemaFieldType.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -27,9 +27,9 @@ namespace Com.Sajari.Sdk.Model { /// - /// Type represents the underlying data type of the field. - TYPE_UNSPECIFIED: Type not specified. - STRING: String values. - INTEGER: Integer values (64-bit). - FLOAT: Floating point values (32-bit). - DOUBLE: Double floating point values (64-bit). - BOOLEAN: Boolean values. - TIMESTAMP: Timestamp values. + /// Type represents the underlying data type of the field. - TYPE_UNSPECIFIED: Type not specified. - STRING: String values. - INTEGER: Integer values (64-bit). - FLOAT: Floating point values (32-bit). - DOUBLE: Double floating point values (64-bit). - BOOLEAN: Boolean values. - TIMESTAMP: Timestamp values. - BYTES: Raw byte values. /// - /// Type represents the underlying data type of the field. - TYPE_UNSPECIFIED: Type not specified. - STRING: String values. - INTEGER: Integer values (64-bit). - FLOAT: Floating point values (32-bit). - DOUBLE: Double floating point values (64-bit). - BOOLEAN: Boolean values. - TIMESTAMP: Timestamp values. + /// Type represents the underlying data type of the field. - TYPE_UNSPECIFIED: Type not specified. - STRING: String values. - INTEGER: Integer values (64-bit). - FLOAT: Floating point values (32-bit). - DOUBLE: Double floating point values (64-bit). - BOOLEAN: Boolean values. - TIMESTAMP: Timestamp values. - BYTES: Raw byte values. [JsonConverter(typeof(StringEnumConverter))] public enum SchemaFieldType { @@ -73,7 +73,13 @@ public enum SchemaFieldType /// Enum TIMESTAMP for value: TIMESTAMP /// [EnumMember(Value = "TIMESTAMP")] - TIMESTAMP = 7 + TIMESTAMP = 7, + + /// + /// Enum BYTES for value: BYTES + /// + [EnumMember(Value = "BYTES")] + BYTES = 8 } diff --git a/src/Com.Sajari.Sdk/Model/SendEventRequest.cs b/src/Com.Sajari.Sdk/Model/SendEventRequest.cs index e7b94cd..120c0d6 100644 --- a/src/Com.Sajari.Sdk/Model/SendEventRequest.cs +++ b/src/Com.Sajari.Sdk/Model/SendEventRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -94,7 +94,7 @@ protected SendEventRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class SendEventRequest {\n"); sb.Append(" Metadata: ").Append(Metadata).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); @@ -131,8 +131,9 @@ public override bool Equals(object input) public bool Equals(SendEventRequest input) { if (input == null) + { return false; - + } return ( this.Metadata == input.Metadata || @@ -166,12 +167,18 @@ public override int GetHashCode() { int hashCode = 41; if (this.Metadata != null) - hashCode = hashCode * 59 + this.Metadata.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); + } if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } if (this.Token != null) - hashCode = hashCode * 59 + this.Token.GetHashCode(); - hashCode = hashCode * 59 + this.Weight.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Token.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Weight.GetHashCode(); return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/SetDefaultPipelineRequest.cs b/src/Com.Sajari.Sdk/Model/SetDefaultPipelineRequest.cs index 04f8808..07a6629 100644 --- a/src/Com.Sajari.Sdk/Model/SetDefaultPipelineRequest.cs +++ b/src/Com.Sajari.Sdk/Model/SetDefaultPipelineRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -71,7 +71,7 @@ protected SetDefaultPipelineRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class SetDefaultPipelineRequest {\n"); sb.Append(" Pipeline: ").Append(Pipeline).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); @@ -106,8 +106,9 @@ public override bool Equals(object input) public bool Equals(SetDefaultPipelineRequest input) { if (input == null) + { return false; - + } return ( this.Pipeline == input.Pipeline || @@ -130,8 +131,10 @@ public override int GetHashCode() { int hashCode = 41; if (this.Pipeline != null) - hashCode = hashCode * 59 + this.Pipeline.GetHashCode(); - hashCode = hashCode * 59 + this.Type.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Pipeline.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/SetDefaultVersionRequest.cs b/src/Com.Sajari.Sdk/Model/SetDefaultVersionRequest.cs index 7c54dae..770a6c9 100644 --- a/src/Com.Sajari.Sdk/Model/SetDefaultVersionRequest.cs +++ b/src/Com.Sajari.Sdk/Model/SetDefaultVersionRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -63,7 +63,7 @@ protected SetDefaultVersionRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class SetDefaultVersionRequest {\n"); sb.Append(" _Version: ").Append(_Version).Append("\n"); sb.Append("}\n"); @@ -97,8 +97,9 @@ public override bool Equals(object input) public bool Equals(SetDefaultVersionRequest input) { if (input == null) + { return false; - + } return ( this._Version == input._Version || @@ -117,7 +118,9 @@ public override int GetHashCode() { int hashCode = 41; if (this._Version != null) - hashCode = hashCode * 59 + this._Version.GetHashCode(); + { + hashCode = (hashCode * 59) + this._Version.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/Status.cs b/src/Com.Sajari.Sdk/Model/Status.cs index a949edd..b57da5f 100644 --- a/src/Com.Sajari.Sdk/Model/Status.cs +++ b/src/Com.Sajari.Sdk/Model/Status.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -72,7 +72,7 @@ public partial class Status : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Status {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" Details: ").Append(Details).Append("\n"); @@ -108,8 +108,9 @@ public override bool Equals(object input) public bool Equals(Status input) { if (input == null) + { return false; - + } return ( this.Code == input.Code || @@ -137,11 +138,15 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = hashCode * 59 + this.Code.GetHashCode(); + hashCode = (hashCode * 59) + this.Code.GetHashCode(); if (this.Details != null) - hashCode = hashCode * 59 + this.Details.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Details.GetHashCode(); + } if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/UpdateRecordRequest.cs b/src/Com.Sajari.Sdk/Model/UpdateRecordRequest.cs index 2e48db3..a534e06 100644 --- a/src/Com.Sajari.Sdk/Model/UpdateRecordRequest.cs +++ b/src/Com.Sajari.Sdk/Model/UpdateRecordRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -88,7 +88,7 @@ protected UpdateRecordRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class UpdateRecordRequest {\n"); sb.Append(" Key: ").Append(Key).Append("\n"); sb.Append(" Record: ").Append(Record).Append("\n"); @@ -124,8 +124,9 @@ public override bool Equals(object input) public bool Equals(UpdateRecordRequest input) { if (input == null) + { return false; - + } return ( this.Key == input.Key || @@ -155,11 +156,17 @@ public override int GetHashCode() { int hashCode = 41; if (this.Key != null) - hashCode = hashCode * 59 + this.Key.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Key.GetHashCode(); + } if (this.Record != null) - hashCode = hashCode * 59 + this.Record.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Record.GetHashCode(); + } if (this.UpdateMask != null) - hashCode = hashCode * 59 + this.UpdateMask.GetHashCode(); + { + hashCode = (hashCode * 59) + this.UpdateMask.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/UpsertRecordRequest.cs b/src/Com.Sajari.Sdk/Model/UpsertRecordRequest.cs index 6e47c18..611c07f 100644 --- a/src/Com.Sajari.Sdk/Model/UpsertRecordRequest.cs +++ b/src/Com.Sajari.Sdk/Model/UpsertRecordRequest.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -80,7 +80,7 @@ protected UpsertRecordRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class UpsertRecordRequest {\n"); sb.Append(" Pipeline: ").Append(Pipeline).Append("\n"); sb.Append(" Record: ").Append(Record).Append("\n"); @@ -116,8 +116,9 @@ public override bool Equals(object input) public bool Equals(UpsertRecordRequest input) { if (input == null) + { return false; - + } return ( this.Pipeline == input.Pipeline || @@ -147,11 +148,17 @@ public override int GetHashCode() { int hashCode = 41; if (this.Pipeline != null) - hashCode = hashCode * 59 + this.Pipeline.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Pipeline.GetHashCode(); + } if (this.Record != null) - hashCode = hashCode * 59 + this.Record.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Record.GetHashCode(); + } if (this.Variables != null) - hashCode = hashCode * 59 + this.Variables.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/UpsertRecordRequestPipeline.cs b/src/Com.Sajari.Sdk/Model/UpsertRecordRequestPipeline.cs index 6cce73c..a2161c3 100644 --- a/src/Com.Sajari.Sdk/Model/UpsertRecordRequestPipeline.cs +++ b/src/Com.Sajari.Sdk/Model/UpsertRecordRequestPipeline.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -72,7 +72,7 @@ protected UpsertRecordRequestPipeline() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class UpsertRecordRequestPipeline {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" _Version: ").Append(_Version).Append("\n"); @@ -107,8 +107,9 @@ public override bool Equals(object input) public bool Equals(UpsertRecordRequestPipeline input) { if (input == null) + { return false; - + } return ( this.Name == input.Name || @@ -132,9 +133,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } if (this._Version != null) - hashCode = hashCode * 59 + this._Version.GetHashCode(); + { + hashCode = (hashCode * 59) + this._Version.GetHashCode(); + } return hashCode; } } diff --git a/src/Com.Sajari.Sdk/Model/UpsertRecordResponse.cs b/src/Com.Sajari.Sdk/Model/UpsertRecordResponse.cs index 754313b..8b12461 100644 --- a/src/Com.Sajari.Sdk/Model/UpsertRecordResponse.cs +++ b/src/Com.Sajari.Sdk/Model/UpsertRecordResponse.cs @@ -1,10 +1,10 @@ /* - * Sajari API + * Search.io API * - * Sajari is a smart, highly-configurable, real-time search service that enables thousands of businesses worldwide to provide amazing search experiences on their websites, stores, and applications. + * 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@sajari.com + * Contact: support@search.io * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -62,7 +62,7 @@ public partial class UpsertRecordResponse : IEquatable, IV /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class UpsertRecordResponse {\n"); sb.Append(" Key: ").Append(Key).Append("\n"); sb.Append(" Variables: ").Append(Variables).Append("\n"); @@ -97,8 +97,9 @@ public override bool Equals(object input) public bool Equals(UpsertRecordResponse input) { if (input == null) + { return false; - + } return ( this.Key == input.Key || @@ -123,9 +124,13 @@ public override int GetHashCode() { int hashCode = 41; if (this.Key != null) - hashCode = hashCode * 59 + this.Key.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Key.GetHashCode(); + } if (this.Variables != null) - hashCode = hashCode * 59 + this.Variables.GetHashCode(); + { + hashCode = (hashCode * 59) + this.Variables.GetHashCode(); + } return hashCode; } }