diff --git a/services/cognitiveservices/v4.0/qnamaker/alterations.go b/services/cognitiveservices/v4.0/qnamaker/alterations.go index e07ec64fea29..ef36c4626f54 100644 --- a/services/cognitiveservices/v4.0/qnamaker/alterations.go +++ b/services/cognitiveservices/v4.0/qnamaker/alterations.go @@ -93,7 +93,6 @@ func (client AlterationsClient) GetSender(req *http.Request) (*http.Response, er func (client AlterationsClient) GetResponder(resp *http.Response) (result WordAlterationsDTO, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -168,7 +167,6 @@ func (client AlterationsClient) ReplaceSender(req *http.Request) (*http.Response func (client AlterationsClient) ReplaceResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp diff --git a/services/cognitiveservices/v4.0/qnamaker/endpointkeys.go b/services/cognitiveservices/v4.0/qnamaker/endpointkeys.go index d924799f8b6e..da6494b0e2a6 100644 --- a/services/cognitiveservices/v4.0/qnamaker/endpointkeys.go +++ b/services/cognitiveservices/v4.0/qnamaker/endpointkeys.go @@ -92,7 +92,6 @@ func (client EndpointKeysClient) GetKeysSender(req *http.Request) (*http.Respons func (client EndpointKeysClient) GetKeysResponder(resp *http.Response) (result EndpointKeysDTO, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -163,7 +162,6 @@ func (client EndpointKeysClient) RefreshKeysSender(req *http.Request) (*http.Res func (client EndpointKeysClient) RefreshKeysResponder(resp *http.Response) (result EndpointKeysDTO, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cognitiveservices/v4.0/qnamaker/endpointsettings.go b/services/cognitiveservices/v4.0/qnamaker/endpointsettings.go index 76ddc395ccbe..8d43cafa21ec 100644 --- a/services/cognitiveservices/v4.0/qnamaker/endpointsettings.go +++ b/services/cognitiveservices/v4.0/qnamaker/endpointsettings.go @@ -92,7 +92,6 @@ func (client EndpointSettingsClient) GetSettingsSender(req *http.Request) (*http func (client EndpointSettingsClient) GetSettingsResponder(resp *http.Response) (result EndpointSettingsDTO, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -161,7 +160,6 @@ func (client EndpointSettingsClient) UpdateSettingsSender(req *http.Request) (*h func (client EndpointSettingsClient) UpdateSettingsResponder(resp *http.Response) (result String, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result.Value), autorest.ByClosing()) diff --git a/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go b/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go index 16b55d750b9f..480700e4ef6b 100644 --- a/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go +++ b/services/cognitiveservices/v4.0/qnamaker/knowledgebase.go @@ -114,7 +114,6 @@ func (client KnowledgebaseClient) CreateSender(req *http.Request) (*http.Respons func (client KnowledgebaseClient) CreateResponder(resp *http.Response) (result Operation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -185,7 +184,6 @@ func (client KnowledgebaseClient) DeleteSender(req *http.Request) (*http.Respons func (client KnowledgebaseClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -257,7 +255,6 @@ func (client KnowledgebaseClient) DownloadSender(req *http.Request) (*http.Respo func (client KnowledgebaseClient) DownloadResponder(resp *http.Response) (result QnADocumentsDTO, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -328,7 +325,6 @@ func (client KnowledgebaseClient) GetDetailsSender(req *http.Request) (*http.Res func (client KnowledgebaseClient) GetDetailsResponder(resp *http.Response) (result KnowledgebaseDTO, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -393,7 +389,6 @@ func (client KnowledgebaseClient) ListAllSender(req *http.Request) (*http.Respon func (client KnowledgebaseClient) ListAllResponder(resp *http.Response) (result KnowledgebasesDTO, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -464,7 +459,6 @@ func (client KnowledgebaseClient) PublishSender(req *http.Request) (*http.Respon func (client KnowledgebaseClient) PublishResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -543,7 +537,6 @@ func (client KnowledgebaseClient) ReplaceSender(req *http.Request) (*http.Respon func (client KnowledgebaseClient) ReplaceResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -616,7 +609,6 @@ func (client KnowledgebaseClient) UpdateSender(req *http.Request) (*http.Respons func (client KnowledgebaseClient) UpdateResponder(resp *http.Response) (result Operation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cognitiveservices/v4.0/qnamaker/operations.go b/services/cognitiveservices/v4.0/qnamaker/operations.go index 4187dc5c82d1..b361811900b6 100644 --- a/services/cognitiveservices/v4.0/qnamaker/operations.go +++ b/services/cognitiveservices/v4.0/qnamaker/operations.go @@ -98,7 +98,6 @@ func (client OperationsClient) GetDetailsSender(req *http.Request) (*http.Respon func (client OperationsClient) GetDetailsResponder(resp *http.Response) (result Operation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cognitiveservices/v4.0/qnamaker/version.go b/services/cognitiveservices/v4.0/qnamaker/version.go index e8c39284ae65..177a36944aa3 100644 --- a/services/cognitiveservices/v4.0/qnamaker/version.go +++ b/services/cognitiveservices/v4.0/qnamaker/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " qnamaker/4.0" + return "Azure-SDK-For-Go/" + Version() + " qnamaker/4.0" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/services/cognitiveservices/v4.0/qnamakerruntime/models.go b/services/cognitiveservices/v4.0/qnamakerruntime/models.go index a207048f787c..f922ad0d3864 100644 --- a/services/cognitiveservices/v4.0/qnamakerruntime/models.go +++ b/services/cognitiveservices/v4.0/qnamakerruntime/models.go @@ -63,6 +63,21 @@ func PossibleErrorCodeTypeValues() []ErrorCodeType { return []ErrorCodeType{BadArgument, EndpointKeysError, ExtractionFailure, Forbidden, KbNotFound, NotFound, OperationNotFound, QnaRuntimeError, QuotaExceeded, ServiceError, SKULimitExceeded, Unauthorized, Unspecified, ValidationFailure} } +// StrictFiltersCompoundOperationType enumerates the values for strict filters compound operation type. +type StrictFiltersCompoundOperationType string + +const ( + // AND ... + AND StrictFiltersCompoundOperationType = "AND" + // OR ... + OR StrictFiltersCompoundOperationType = "OR" +) + +// PossibleStrictFiltersCompoundOperationTypeValues returns an array of possible values for the StrictFiltersCompoundOperationType const type. +func PossibleStrictFiltersCompoundOperationTypeValues() []StrictFiltersCompoundOperationType { + return []StrictFiltersCompoundOperationType{AND, OR} +} + // ContextDTO context associated with Qna. type ContextDTO struct { // IsContextOnly - To mark if a prompt is relevant only with a previous question or not. @@ -260,6 +275,8 @@ type QueryDTO struct { RankerType *string `json:"rankerType,omitempty"` // StrictFilters - Find only answers that contain these metadata. StrictFilters *[]MetadataDTO `json:"strictFilters,omitempty"` + // StrictFiltersCompoundOperationType - Optional field. Set to OR for using OR as Operation for Strict Filters. Possible values include: 'AND', 'OR' + StrictFiltersCompoundOperationType StrictFiltersCompoundOperationType `json:"strictFiltersCompoundOperationType,omitempty"` } // QueryDTOContext context object with previous QnA's information. diff --git a/services/cognitiveservices/v4.0/qnamakerruntime/runtime.go b/services/cognitiveservices/v4.0/qnamakerruntime/runtime.go index b21597622dff..5e613c2091e2 100644 --- a/services/cognitiveservices/v4.0/qnamakerruntime/runtime.go +++ b/services/cognitiveservices/v4.0/qnamakerruntime/runtime.go @@ -101,7 +101,6 @@ func (client RuntimeClient) GenerateAnswerSender(req *http.Request) (*http.Respo func (client RuntimeClient) GenerateAnswerResponder(resp *http.Response) (result QnASearchResultList, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -175,7 +174,6 @@ func (client RuntimeClient) TrainSender(req *http.Request) (*http.Response, erro func (client RuntimeClient) TrainResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp diff --git a/services/cognitiveservices/v4.0/qnamakerruntime/version.go b/services/cognitiveservices/v4.0/qnamakerruntime/version.go index 978022bca72d..4e54c4501df0 100644 --- a/services/cognitiveservices/v4.0/qnamakerruntime/version.go +++ b/services/cognitiveservices/v4.0/qnamakerruntime/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " qnamakerruntime/4.0" + return "Azure-SDK-For-Go/" + Version() + " qnamakerruntime/4.0" } // Version returns the semantic version (see http://semver.org) of the client.