diff --git a/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceAsyncClient.java b/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceAsyncClient.java index 3b6882f4a223c..e4b363464e602 100644 --- a/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceAsyncClient.java +++ b/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceAsyncClient.java @@ -1288,19 +1288,69 @@ Mono> createOrUpdateSynonymMapWithResponse(SynonymMap synon } /** - * @return a reactive response signalling completion. - * @throws NotImplementedException not implemented + * Deletes an Azure Cognitive Search synonym map. + * + * @param synonymMapName the name of the synonym map to delete + * @return a response signalling completion. */ - public Mono deleteSynonymMap() { - throw logger.logExceptionAsError(new NotImplementedException("not implemented.")); + public Mono deleteSynonymMap(String synonymMapName) { + return this.deleteSynonymMap(synonymMapName, null, null); } /** - * @return a reactive response signalling completion. - * @throws NotImplementedException not implemented + * Deletes an Azure Cognitive Search synonym map. + * + * @param synonymMapName the name of the synonym map to delete + * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or + * doesn't match specified values + * @return a response signalling completion. */ - public Mono>> deleteSynonymMapWithResponse() { - throw logger.logExceptionAsError(new NotImplementedException("not implemented.")); + public Mono deleteSynonymMap(String synonymMapName, AccessCondition accessCondition) { + return this.deleteSynonymMap(synonymMapName, accessCondition, null); + } + + /** + * Deletes an Azure Cognitive Search synonym map. + * + * @param synonymMapName the name of the synonym map to delete + * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or + * doesn't match specified values + * @param requestOptions additional parameters for the operation. + * Contains the tracking ID sent with the request to help with debugging + * @return a response signalling completion. + */ + public Mono deleteSynonymMap(String synonymMapName, + AccessCondition accessCondition, + RequestOptions requestOptions) { + return this.deleteSynonymMapWithResponse(synonymMapName, accessCondition, requestOptions) + .flatMap(FluxUtil::toMono); + } + + /** + * Deletes an Azure Cognitive Search synonym map. + * + * @param synonymMapName the name of the synonym map to delete + * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or + * doesn't match specified values + * @param requestOptions additional parameters for the operation. + * Contains the tracking ID sent with the request to help with debugging + * @return a response signalling completion. + */ + public Mono> deleteSynonymMapWithResponse(String synonymMapName, + AccessCondition accessCondition, + RequestOptions requestOptions) { + return withContext(context -> + this.deleteSynonymMapWithResponse(synonymMapName, accessCondition, requestOptions, context)); + } + + Mono> deleteSynonymMapWithResponse(String synonymMapName, + AccessCondition accessCondition, + RequestOptions requestOptions, + Context context) { + return restClient + .synonymMaps() + .deleteWithRestResponseAsync(synonymMapName, requestOptions, accessCondition, context) + .map(Function.identity()); } /** diff --git a/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceClient.java b/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceClient.java index 02b05a6e87e43..47fe7ef74eb77 100644 --- a/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceClient.java +++ b/sdk/search/azure-search/src/main/java/com/azure/search/SearchServiceClient.java @@ -1200,18 +1200,80 @@ public Response createOrUpdateSynonymMapWithResponse(SynonymMap syno } /** - * @throws NotImplementedException not implemented + * Deletes an Azure Cognitive Search synonym map. + * + * @param synonymMapName the name of the synonym map to delete */ - public void deleteSynonymMap() { - throw logger.logExceptionAsError(new NotImplementedException("not implemented.")); + public void deleteSynonymMap(String synonymMapName) { + asyncClient.deleteSynonymMap(synonymMapName).block(); } /** - * @return a response signalling completion - * @throws NotImplementedException not implemented + * Deletes an Azure Cognitive Search synonym map. + * + * @param synonymMapName the name of the synonym map to delete + * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or + * doesn't match specified values */ - public Response> deleteSynonymMapWithResponse() { - throw logger.logExceptionAsError(new NotImplementedException("not implemented.")); + public void deleteSynonymMap(String synonymMapName, AccessCondition accessCondition) { + asyncClient.deleteSynonymMap(synonymMapName, accessCondition).block(); + } + + /** + * Deletes an Azure Cognitive Search synonym map. + * + * @param synonymMapName the name of the synonym map to delete + * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or + * doesn't match specified values + * @param requestOptions additional parameters for the operation. + * Contains the tracking ID sent with the request to help with debugging + */ + public void deleteSynonymMap(String synonymMapName, + AccessCondition accessCondition, + RequestOptions requestOptions) { + asyncClient.deleteSynonymMap(synonymMapName, accessCondition, requestOptions).block(); + } + + /** + * Deletes an Azure Cognitive Search synonym map. + * + * @param synonymMapName the name of the synonym map to delete + * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or + * doesn't match specified values + * @param requestOptions additional parameters for the operation. + * Contains the tracking ID sent with the request to help with debugging + * @param context additional context that is passed through the Http pipeline during the service call + * Contains the tracking ID sent with the request to help with debugging + */ + public void deleteSynonymMap(String synonymMapName, + AccessCondition accessCondition, + RequestOptions requestOptions, + Context context) { + this.deleteSynonymMapWithResponse(synonymMapName, + accessCondition, + requestOptions, + context); + } + + /** + * Deletes an Azure Cognitive Search synonym map. + * + * @param synonymMapName the name of the synonym map to delete + * @param accessCondition the condition where the operation will be performed if the ETag on the server matches or + * doesn't match specified values + * @param requestOptions additional parameters for the operation. + * Contains the tracking ID sent with the request to help with debugging + * @param context additional context that is passed through the Http pipeline during the service call + * @return a response signalling completion. + */ + public Response deleteSynonymMapWithResponse(String synonymMapName, + AccessCondition accessCondition, + RequestOptions requestOptions, + Context context) { + return asyncClient.deleteSynonymMapWithResponse(synonymMapName, + accessCondition, + requestOptions, + context).block(); } /** diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementAsyncTests.java b/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementAsyncTests.java index 28e5b60a5cc59..fc292e689fbea 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementAsyncTests.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementAsyncTests.java @@ -5,6 +5,7 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.Response; import com.azure.search.models.AccessCondition; import com.azure.search.models.RequestOptions; import com.azure.search.models.SynonymMap; @@ -266,17 +267,70 @@ public void createOrUpdateSynonymMapIfNotChangedFailsWhenResourceChanged() { @Override public void deleteSynonymMapIfNotChangedWorksOnlyOnCurrentResource() { + SynonymMap synonymMap = createTestSynonymMap(); + SynonymMap staleResource = client.createOrUpdateSynonymMap(synonymMap).block(); + SynonymMap currentResource = client.createOrUpdateSynonymMap(staleResource.setSynonyms("updatedword1,updatedword2")).block(); + + StepVerifier + .create(client.deleteSynonymMap(synonymMap.getName(), generateIfMatchAccessCondition(staleResource.getETag()))) + .verifyErrorSatisfies(error -> { + Assert.assertEquals(HttpResponseException.class, error.getClass()); + Assert.assertEquals(HttpResponseStatus.PRECONDITION_FAILED.code(), ((HttpResponseException) error).getResponse().getStatusCode()); + }); + Response response = client.deleteSynonymMapWithResponse(synonymMap.getName(), + generateIfMatchAccessCondition(currentResource.getETag()), + null, + null + ).block(); + Assert.assertEquals(HttpResponseStatus.NO_CONTENT.code(), response.getStatusCode()); } @Override public void deleteSynonymMapIfExistsWorksOnlyWhenResourceExists() { + SynonymMap synonymMap = createTestSynonymMap(); + client.createSynonymMap(synonymMap).block(); + client.deleteSynonymMap(synonymMap.getName(), generateIfExistsAccessCondition()).block(); + StepVerifier + .create(client.deleteSynonymMap(synonymMap.getName(), generateIfExistsAccessCondition())) + .verifyErrorSatisfies(error -> { + Assert.assertEquals(HttpResponseException.class, error.getClass()); + Assert.assertEquals(HttpResponseStatus.PRECONDITION_FAILED.code(), ((HttpResponseException) error).getResponse().getStatusCode()); + }); } @Override public void deleteSynonymMapIsIdempotent() { + SynonymMap synonymMap = createTestSynonymMap(); + StepVerifier + .create(client.deleteSynonymMapWithResponse(synonymMap.getName(), null, null, null)) + .assertNext(synonymMapResponse -> { + Assert.assertEquals(HttpResponseStatus.NOT_FOUND.code(), synonymMapResponse.getStatusCode()); + }) + .verifyComplete(); + + StepVerifier + .create(client.createSynonymMapWithResponse(synonymMap, null, null)) + .assertNext(synonymMapResponse -> { + Assert.assertEquals(HttpResponseStatus.CREATED.code(), synonymMapResponse.getStatusCode()); + }) + .verifyComplete(); + + StepVerifier + .create(client.deleteSynonymMapWithResponse(synonymMap.getName(), null, null, null)) + .assertNext(synonymMapResponse -> { + Assert.assertEquals(HttpResponseStatus.NO_CONTENT.code(), synonymMapResponse.getStatusCode()); + }) + .verifyComplete(); + + StepVerifier + .create(client.deleteSynonymMapWithResponse(synonymMap.getName(), null, null, null)) + .assertNext(synonymMapResponse -> { + Assert.assertEquals(HttpResponseStatus.NOT_FOUND.code(), synonymMapResponse.getStatusCode()); + }) + .verifyComplete(); } @Override diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementSyncTests.java b/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementSyncTests.java index ff9e7008f2856..55fb69bdc7822 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementSyncTests.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementSyncTests.java @@ -243,17 +243,54 @@ public void createOrUpdateSynonymMapIfNotChangedFailsWhenResourceChanged() { @Override public void deleteSynonymMapIfNotChangedWorksOnlyOnCurrentResource() { + SynonymMap synonymMap = createTestSynonymMap(); + SynonymMap staleResource = client.createOrUpdateSynonymMap(synonymMap); + SynonymMap currentResource = client.createOrUpdateSynonymMap(staleResource.setSynonyms("updatedword1,updatedword2")); + try { + client.deleteSynonymMap(synonymMap.getName(), generateIfMatchAccessCondition(staleResource.getETag())); + Assert.fail("deleteSynonym did not throw an expected Exception"); + } catch (Exception ex) { + Assert.assertEquals(HttpResponseException.class, ex.getClass()); + Assert.assertEquals(HttpResponseStatus.PRECONDITION_FAILED.code(), ((HttpResponseException) ex).getResponse().getStatusCode()); + } + + Response response = client.deleteSynonymMapWithResponse(synonymMap.getName(), + generateIfMatchAccessCondition(currentResource.getETag()), + null, + null); + Assert.assertEquals(HttpResponseStatus.NO_CONTENT.code(), response.getStatusCode()); } @Override public void deleteSynonymMapIfExistsWorksOnlyWhenResourceExists() { + SynonymMap synonymMap = createTestSynonymMap(); + client.createSynonymMap(synonymMap); + client.deleteSynonymMap(synonymMap.getName(), generateIfExistsAccessCondition()); + try { + client.deleteSynonymMap(synonymMap.getName(), generateIfExistsAccessCondition()); + Assert.fail("deleteSynonymMap did not throw an expected Exception"); + } catch (Exception ex) { + Assert.assertEquals(HttpResponseException.class, ex.getClass()); + Assert.assertEquals(HttpResponseStatus.PRECONDITION_FAILED.code(), ((HttpResponseException) ex).getResponse().getStatusCode()); + } } @Override public void deleteSynonymMapIsIdempotent() { + SynonymMap synonymMap = createTestSynonymMap(); + Response deleteResponse = client.deleteSynonymMapWithResponse(synonymMap.getName(), null, null, null); + Assert.assertEquals(HttpResponseStatus.NOT_FOUND.code(), deleteResponse.getStatusCode()); + + Response createResponse = client.createSynonymMapWithResponse(synonymMap, null, null); + Assert.assertEquals(HttpResponseStatus.CREATED.code(), createResponse.getStatusCode()); + + deleteResponse = client.deleteSynonymMapWithResponse(synonymMap.getName(), null, null, null); + Assert.assertEquals(HttpResponseStatus.NO_CONTENT.code(), deleteResponse.getStatusCode()); + deleteResponse = client.deleteSynonymMapWithResponse(synonymMap.getName(), null, null, null); + Assert.assertEquals(HttpResponseStatus.NOT_FOUND.code(), deleteResponse.getStatusCode()); } @Override diff --git a/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementTestBase.java b/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementTestBase.java index db2b3b3535830..294d52b4ea1c6 100644 --- a/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementTestBase.java +++ b/sdk/search/azure-search/src/test/java/com/azure/search/SynonymMapManagementTestBase.java @@ -43,10 +43,13 @@ public abstract class SynonymMapManagementTestBase extends SearchServiceTestBase @Test public abstract void createOrUpdateSynonymMapIfNotChangedFailsWhenResourceChanged(); + @Test public abstract void deleteSynonymMapIfNotChangedWorksOnlyOnCurrentResource(); + @Test public abstract void deleteSynonymMapIfExistsWorksOnlyWhenResourceExists(); + @Test public abstract void deleteSynonymMapIsIdempotent(); @Test diff --git a/sdk/search/azure-search/src/test/resources/session-records/deleteSynonymMapIfExistsWorksOnlyWhenResourceExists.json b/sdk/search/azure-search/src/test/resources/session-records/deleteSynonymMapIfExistsWorksOnlyWhenResourceExists.json new file mode 100644 index 0000000000000..35e5e5b07c518 --- /dev/null +++ b/sdk/search/azure-search/src/test/resources/session-records/deleteSynonymMapIfExistsWorksOnlyWhenResourceExists.json @@ -0,0 +1,67 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://azs-sdk2f925909d842.search.windows.net/synonymmaps?api-version=2019-05-06", + "Headers" : { + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "a2a81072-a279-4156-b958-b5ccdcdd2738", + "StatusCode" : "201", + "Date" : "Wed, 06 Nov 2019 00:16:38 GMT", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"0x8D7624E97B6E25F\"", + "elapsed-time" : "66", + "OData-Version" : "4.0", + "Expires" : "-1", + "Content-Length" : "198", + "Body" : "{\"@odata.context\":\"https://azs-sdk2f925909d842.search.windows.net/$metadata#synonymmaps/$entity\",\"@odata.etag\":\"\\\"0x8D7624E97B6E25F\\\"\",\"name\":\"test-synonym\",\"format\":\"solr\",\"synonyms\":\"word1,word2\"}", + "Preference-Applied" : "odata.include-annotations=\"*\"", + "Content-Type" : "application/json; odata.metadata=minimal", + "Location" : "https://azs-sdk2f925909d842.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azs-sdk2f925909d842.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", + "Headers" : { }, + "Response" : { + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "elapsed-time" : "29", + "Expires" : "-1", + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "406fcd1b-223c-4e32-a8b7-9230815e8d2e", + "StatusCode" : "204", + "Date" : "Wed, 06 Nov 2019 00:16:38 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azs-sdk2f925909d842.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", + "Headers" : { }, + "Response" : { + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "288b7fae-b7c1-4755-8fba-4154ebfdb38d", + "StatusCode" : "412", + "Date" : "Wed, 06 Nov 2019 00:16:38 GMT", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "elapsed-time" : "6", + "OData-Version" : "4.0", + "Expires" : "-1", + "Content-Length" : "160", + "Body" : "{\"error\":{\"code\":\"\",\"message\":\"The precondition given in one of the request headers evaluated to false. No change was made to the resource from this request.\"}}", + "Preference-Applied" : "odata.include-annotations=\"*\"", + "Content-Language" : "en", + "Content-Type" : "application/json; odata.metadata=minimal" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/search/azure-search/src/test/resources/session-records/deleteSynonymMapIfNotChangedWorksOnlyOnCurrentResource.json b/sdk/search/azure-search/src/test/resources/session-records/deleteSynonymMapIfNotChangedWorksOnlyOnCurrentResource.json new file mode 100644 index 0000000000000..7535cfa506016 --- /dev/null +++ b/sdk/search/azure-search/src/test/resources/session-records/deleteSynonymMapIfNotChangedWorksOnlyOnCurrentResource.json @@ -0,0 +1,91 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "https://azs-sdk847105502c9e.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", + "Headers" : { + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "94d7e523-28d7-42b9-b4c4-a032d6a04a6e", + "StatusCode" : "201", + "Date" : "Wed, 06 Nov 2019 00:12:50 GMT", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"0x8D7624E101A1F9F\"", + "elapsed-time" : "169", + "OData-Version" : "4.0", + "Expires" : "-1", + "Content-Length" : "198", + "Body" : "{\"@odata.context\":\"https://azs-sdk847105502c9e.search.windows.net/$metadata#synonymmaps/$entity\",\"@odata.etag\":\"\\\"0x8D7624E101A1F9F\\\"\",\"name\":\"test-synonym\",\"format\":\"solr\",\"synonyms\":\"word1,word2\"}", + "Preference-Applied" : "odata.include-annotations=\"*\"", + "Content-Type" : "application/json; odata.metadata=minimal", + "Location" : "https://azs-sdk847105502c9e.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06" + }, + "Exception" : null + }, { + "Method" : "PUT", + "Uri" : "https://azs-sdk847105502c9e.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", + "Headers" : { + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "db47d73b-7cf8-4269-b84e-3922804c32dc", + "StatusCode" : "200", + "Date" : "Wed, 06 Nov 2019 00:12:51 GMT", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"0x8D7624E1079BC0D\"", + "elapsed-time" : "185", + "OData-Version" : "4.0", + "Expires" : "-1", + "Content-Length" : "212", + "Body" : "{\"@odata.context\":\"https://azs-sdk847105502c9e.search.windows.net/$metadata#synonymmaps/$entity\",\"@odata.etag\":\"\\\"0x8D7624E1079BC0D\\\"\",\"name\":\"test-synonym\",\"format\":\"solr\",\"synonyms\":\"updatedword1,updatedword2\"}", + "Preference-Applied" : "odata.include-annotations=\"*\"", + "Content-Type" : "application/json; odata.metadata=minimal" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azs-sdk847105502c9e.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", + "Headers" : { }, + "Response" : { + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "0f6520a8-2e61-457f-a8c9-7e2195f7e6dd", + "StatusCode" : "412", + "Date" : "Wed, 06 Nov 2019 00:12:51 GMT", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "elapsed-time" : "28", + "OData-Version" : "4.0", + "Expires" : "-1", + "Content-Length" : "160", + "Body" : "{\"error\":{\"code\":\"\",\"message\":\"The precondition given in one of the request headers evaluated to false. No change was made to the resource from this request.\"}}", + "Preference-Applied" : "odata.include-annotations=\"*\"", + "Content-Language" : "en", + "Content-Type" : "application/json; odata.metadata=minimal" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azs-sdk847105502c9e.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", + "Headers" : { }, + "Response" : { + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "elapsed-time" : "40", + "Expires" : "-1", + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "e65ba84c-b85a-45a3-a167-d5e435326266", + "StatusCode" : "204", + "Date" : "Wed, 06 Nov 2019 00:12:52 GMT" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file diff --git a/sdk/search/azure-search/src/test/resources/session-records/deleteSynonymMapIsIdempotent.json b/sdk/search/azure-search/src/test/resources/session-records/deleteSynonymMapIsIdempotent.json new file mode 100644 index 0000000000000..660e4ad9d8b6b --- /dev/null +++ b/sdk/search/azure-search/src/test/resources/session-records/deleteSynonymMapIsIdempotent.json @@ -0,0 +1,89 @@ +{ + "networkCallRecords" : [ { + "Method" : "DELETE", + "Uri" : "https://azs-sdkd5035369c18d.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", + "Headers" : { }, + "Response" : { + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "db347b91-9861-4b8a-ba35-1167cf03f240", + "StatusCode" : "404", + "Date" : "Wed, 06 Nov 2019 00:26:36 GMT", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "elapsed-time" : "63", + "OData-Version" : "4.0", + "Expires" : "-1", + "Content-Length" : "128", + "Body" : "{\"error\":{\"code\":\"\",\"message\":\"No synonymMap with the name 'test-synonym' was found in a service named 'azs-sdkd5035369c18d'.\"}}", + "Preference-Applied" : "odata.include-annotations=\"*\"", + "Content-Language" : "en", + "Content-Type" : "application/json; odata.metadata=minimal" + }, + "Exception" : null + }, { + "Method" : "POST", + "Uri" : "https://azs-sdkd5035369c18d.search.windows.net/synonymmaps?api-version=2019-05-06", + "Headers" : { + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "2181573b-d284-4806-8bec-32b7d9dfc6fa", + "StatusCode" : "201", + "Date" : "Wed, 06 Nov 2019 00:26:36 GMT", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "ETag" : "W/\"0x8D7624FFC618083\"", + "elapsed-time" : "29", + "OData-Version" : "4.0", + "Expires" : "-1", + "Content-Length" : "198", + "Body" : "{\"@odata.context\":\"https://azs-sdkd5035369c18d.search.windows.net/$metadata#synonymmaps/$entity\",\"@odata.etag\":\"\\\"0x8D7624FFC618083\\\"\",\"name\":\"test-synonym\",\"format\":\"solr\",\"synonyms\":\"word1,word2\"}", + "Preference-Applied" : "odata.include-annotations=\"*\"", + "Content-Type" : "application/json; odata.metadata=minimal", + "Location" : "https://azs-sdkd5035369c18d.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azs-sdkd5035369c18d.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", + "Headers" : { }, + "Response" : { + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "elapsed-time" : "14", + "Expires" : "-1", + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "8677e53f-e094-473e-a1e0-d9d5fb58265a", + "StatusCode" : "204", + "Date" : "Wed, 06 Nov 2019 00:26:36 GMT" + }, + "Exception" : null + }, { + "Method" : "DELETE", + "Uri" : "https://azs-sdkd5035369c18d.search.windows.net/synonymmaps('test-synonym')?api-version=2019-05-06", + "Headers" : { }, + "Response" : { + "Pragma" : "no-cache", + "retry-after" : "0", + "request-id" : "c198094a-925c-411c-aa32-ce5d9e05bcce", + "StatusCode" : "404", + "Date" : "Wed, 06 Nov 2019 00:26:36 GMT", + "Strict-Transport-Security" : "max-age=15724800; includeSubDomains", + "Cache-Control" : "no-cache", + "elapsed-time" : "6", + "OData-Version" : "4.0", + "Expires" : "-1", + "Content-Length" : "128", + "Body" : "{\"error\":{\"code\":\"\",\"message\":\"No synonymMap with the name 'test-synonym' was found in a service named 'azs-sdkd5035369c18d'.\"}}", + "Preference-Applied" : "odata.include-annotations=\"*\"", + "Content-Language" : "en", + "Content-Type" : "application/json; odata.metadata=minimal" + }, + "Exception" : null + } ], + "variables" : [ ] +} \ No newline at end of file